Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

santa-clause

Members
  • Posts

    705
  • Joined

  • Last visited

    Never

Everything posted by santa-clause

  1. > Did you change the list values of the combo box? Yes i've added them to the list
  2. > Is it actually saving the items? May want to look at that first. I looked for that yesterday and i already sayd i don't know it started when i added the item and i've put everything i've done in the thread ;) And i can't seem to fix it at all i've tried everything i know :(
  3. > any other update ? still waiting for guild and quest system tutorial here :) He already sayd hes not putting that in the engine -_-
  4. *BUMP* I really need some help whit this.
  5. > VB6… Heres everything in vb6... > Jasper ill check it later ;-) tnx > What language is this? english and vb6
  6. Client codes: ``` Private Sub HandleUpdateSpell(ByVal Index As Long, ByRef data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim spellnum As Long Dim buffer As clsBuffer Dim SpellSize As Long Dim SpellData() As Byte ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler Set buffer = New clsBuffer buffer.WriteBytes data() spellnum = buffer.ReadLong SpellSize = LenB(Spell(spellnum)) ReDim SpellData(SpellSize - 1) SpellData = buffer.ReadBytes(SpellSize) CopyMemory ByVal VarPtr(Spell(spellnum)), ByVal VarPtr(SpellData(0)), SpellSize Set buffer = Nothing ' Update the spells on the pic Set buffer = New clsBuffer buffer.WriteLong CSpells SendData buffer.ToArray() Set buffer = Nothing ' Error handler Exit Sub errorhandler: HandleError "HandleUpdateSpell", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ``` ``` Private Sub HandleSpell(ByVal Index As Long, ByRef data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim spellnum As Long Dim buffer As clsBuffer Dim SpellSize As Long Dim SpellData() As Byte If Options.Debug = 1 Then On Error GoTo errorhandler Set buffer = New clsBuffer buffer.WriteBytes data() spellnum = buffer.ReadLong SpellSize = LenB(Spell(spellnum)) ReDim SpellData(SpellSize - 1) SpellData = buffer.ReadBytes(SpellSize) CopyMemory ByVal VarPtr(Spell(spellnum)), ByVal VarPtr(SpellData(0)), SpellSize Set buffer = Nothing Exit Sub errorhandler: HandleError "HandleSpell", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ``` ``` Private Sub HandleUpdateItem(ByVal Index As Long, ByRef data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim n As Long Dim buffer As clsBuffer Dim ItemSize As Long Dim ItemData() As Byte ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler Set buffer = New clsBuffer buffer.WriteBytes data() n = buffer.ReadLong ' Update the item ItemSize = LenB(Item(n)) ReDim ItemData(ItemSize - 1) ItemData = buffer.ReadBytes(ItemSize) CopyMemory ByVal VarPtr(Item(n)), ByVal VarPtr(ItemData(0)), ItemSize Set buffer = Nothing ' changes to inventory, need to clear any drop menu sDialogue = vbNullString GUIWindow(GUI_CURRENCY).visible = False inChat = False tmpCurrencyItem = 0 CurrencyMenu = 0 ' clear ' Error handler Exit Sub errorhandler: HandleError "HandleUpdateItem", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ```
  7. ModTypes (Server) ``` Option Explicit ' Public data structures Public Map(1 To MAX_CACHED_MAPS) As MapRec Public MapCache(1 To MAX_CACHED_MAPS) As Cache Public PlayersOnMap(1 To MAX_CACHED_MAPS) As Long Public ResourceCache(1 To MAX_CACHED_MAPS) As ResourceCacheRec Public player(1 To MAX_PLAYERS) As PlayerRec Public Bank(1 To MAX_PLAYERS) As BankRec Public TempPlayer(1 To MAX_PLAYERS) As TempPlayerRec Public Class(1 To MAX_CLASSES) As ClassRec Public Item(1 To MAX_ITEMS) As ItemRec Public NPC(1 To MAX_NPCS) As NpcRec Public MapItem(1 To MAX_CACHED_MAPS, 1 To MAX_MAP_ITEMS) As MapItemRec Public MapNpc(1 To MAX_CACHED_MAPS) As MapDataRec Public Shop(1 To MAX_SHOPS) As ShopRec Public Spell(1 To MAX_SPELLS) As SpellRec Public Resource(1 To MAX_RESOURCES) As ResourceRec Public Animation(1 To MAX_ANIMATIONS) As AnimationRec Public Party(1 To MAX_PARTYS) As PartyRec Public Options As OptionsRec Public Switches(1 To MAX_SWITCHES) As String Public Variables(1 To MAX_VARIABLES) As String Public MapBlocks(1 To MAX_CACHED_MAPS) As MapBlockRec Public Auction(1 To 100) As AuctionHouseRec Public AEditor As PlayerRec Public Type RandInvRec Prefix As String * NAME_LENGTH Suffix As String * NAME_LENGTH Stat(1 To Stats.Stat_Count - 1) As Long Rarity As Long Damage As Long Speed As Long End Type Private Type OptionsRec Game_Name As String MOTD As String port As Long Website As String DayNight As Byte End Type Public Type AuctionHouseRec Owner As String Item As Long Amount As Long Price As Long EndDate As Long Date As String ItemRand As RandInvRec End Type Public Type PartyRec Leader As Long Member(1 To MAX_PARTY_MEMBERS) As Long MemberCount As Long End Type Public Type PlayerInvRec num As Long Value As Long End Type Private Type Cache Data() As Byte End Type Private Type BankRec Item(1 To MAX_BANK) As PlayerInvRec ItemRand(1 To MAX_BANK) As RandInvRec End Type Public Type HotbarRec slot As Long sType As Byte End Type Private Type CharRec ' General Name As String * ACCOUNT_LENGTH Sex As Byte Class As Long Sprite As Long Level As Byte PK As Byte IsMember As Byte DateCount As String GuildFileId As Long GuildMemberId As Long PlayerQuest(1 To MAX_QUESTS) As PlayerQuestRec ' Vitals Vital(1 To Vitals.Vital_Count - 1) As Long ' Stats Stat(1 To Stats.Stat_Count - 1) As Byte StatExp(1 To Stats.Stat_Count - 1) As Long StatTNL(1 To Stats.Stat_Count - 1) As Long ' Worn equipment Equipment(1 To Equipment.Equipment_Count - 1) As Long ' Inventory Inv(1 To MAX_INV) As PlayerInvRec Spell(1 To MAX_PLAYER_SPELLS) As Long ' Hotbar Hotbar(1 To MAX_HOTBAR) As HotbarRec ' Position Map As Long x As Byte y As Byte Dir As Byte Switches(0 To MAX_SWITCHES) As Byte Variables(0 To MAX_VARIABLES) As Long BootMap As Long BootX As Byte BootY As Byte ' Random Items RandInv(1 To MAX_INV) As RandInvRec RandEq(1 To Equipment.Equipment_Count - 1) As RandInvRec Spriteold As Long SpellUses(1 To MAX_PLAYER_SPELLS) As Long EventOpen(1 To MAX_EVENTS) As Byte End Type Private Type PlayerRec ' Account Login As String * ACCOUNT_LENGTH password As String * NAME_LENGTH ' Access Access As Byte ' Characters Char(1 To MAX_PLAYER_CHARACTERS) As CharRec End Type Public Type SpellBufferRec Spell As Long Timer As Long Target As Long tType As Byte End Type Public Type DoTRec Used As Boolean Spell As Long Timer As Long Caster As Long StartTime As Long End Type Public Type TempPlayerRec ' Non saved local vars Buffer As clsBuffer InGame As Boolean AttackTimer As Long DataTimer As Long DataBytes As Long DataPackets As Long targetType As Byte Target As Long GettingMap As Byte SpellCD(1 To MAX_PLAYER_SPELLS) As Long InShop As Long StunTimer As Long StunDuration As Long InBank As Boolean ' trade TradeRequest As Long InTrade As Long TradeOffer(1 To MAX_INV) As PlayerInvRec AcceptTrade As Boolean ' dot/hot DoT(1 To MAX_DOTS) As DoTRec HoT(1 To MAX_DOTS) As DoTRec ' spell buffer spellBuffer As SpellBufferRec ' regen stopRegen As Boolean stopRegenTimer As Long ' party inParty As Long partyInvite As Long tmpGuildSlot As Long tmpGuildInviteSlot As Long tmpGuildInviteTimer As Long tmpGuildInviteId As Long Craft(1 To 2) As Byte CurChar As Byte Buffs(1 To MAX_BUFFS) As Long BuffTimer(1 To MAX_BUFFS) As Long BuffValue(1 To MAX_BUFFS) As Long Transformed As Boolean CurrentEvent As Long inChatWith As Long mapnum As Long mapNpcNum As Long SlotA As Long SlotB As Long inDevSuite As Byte FreeAction As Boolean End Type Private Type TileDataRec x As Long y As Long Tileset As Long End Type Public Type TileRec Layer(1 To MapLayer.Layer_Count - 1) As TileDataRec Autotile(1 To MapLayer.Layer_Count - 1) As Byte Type As Byte Data1 As Long Data2 As Long Data3 As Long Data4 As String DirBlock As Byte End Type Private Type MapRec Name As String * NAME_LENGTH Music As String * MUSIC_LENGTH BGS As String * MUSIC_LENGTH Revision As Long Moral As Byte Up As Long Down As Long Left As Long Right As Long BootMap As Long BootX As Byte BootY As Byte Weather As Long WeatherIntensity As Long Fog As Long FogSpeed As Long FogOpacity As Long Red As Long Green As Long Blue As Long Alpha As Long MaxX As Byte MaxY As Byte Tile() As TileRec NPC(1 To MAX_MAP_NPCS) As Long NpcSpawnType(1 To MAX_MAP_NPCS) As Long IsMember As Byte Panorama As Byte DayNight As Byte End Type Private Type ClassRec Name As String * NAME_LENGTH Stat(1 To Stats.Stat_Count - 1) As Byte MaleSprite() As Long FemaleSprite() As Long startItemCount As Long StartItem() As Long StartValue() As Long startSpellCount As Long StartSpell() As Long Next As Byte StartMap As Long StartMapX As Long StartMapY As Long End Type Private Type ItemRec Name As String * NAME_LENGTH Desc As String * 255 Sound As String * NAME_LENGTH Pic As Long Type As Byte Data1 As Long Data2 As Long Data3 As Long ClassReq(1 To MAX_CLASSES) As Byte AccessReq As Long LevelReq As Long Price As Long Add_Stat(1 To Stats.Stat_Count - 1) As Byte Rarity As Byte Speed As Long ConsumeItem As Long Code As Long QuestNum As Long BindType As Byte Stat_Req(1 To Stats.Stat_Count - 1) As Byte Animation As Long Paperdoll As Long AddHP As Long AddMP As Long AddEXP As Long EXPStat As Long CastSpell As Long instaCast As Byte IsMember As Byte A As Byte r As Byte G As Byte b As Byte PDef As Long MDef As Long RDef As Long Random As Byte ItemLevel As Byte isTwoHanded As Byte Projectile As Long Range As Byte Rotation As Integer Ammo As Long End Type Private Type MapItemRec num As Long Value As Long x As Byte y As Byte ' ownership + despawn playerName As String playerTimer As Long canDespawn As Boolean despawnTimer As Long RandData As RandInvRec End Type Private Type NpcRec Name As String * NAME_LENGTH AttackSay As String * 100 Sound As String * NAME_LENGTH Sprite As Long SpawnSecs As Long Behaviour As Byte Range As Byte DropChance(1 To MAX_NPC_DROPS) As Double DropItem(1 To MAX_NPC_DROPS) As Byte DropItemValue(1 To MAX_NPC_DROPS) As Integer Stat(1 To Stats.Stat_Count - 1) As Byte HP As Long Animation As Long Damage As Long Level As Long PDef As Long MDef As Long RDef As Long Quest As Byte QuestNum As Long A As Byte r As Byte G As Byte b As Byte SpawnAtDay As Byte SpawnAtNight As Byte Event As Long isBoss As Byte Moral As Byte Projectile As Long ProjectileRange As Byte Rotation As Integer End Type Private Type MapNpcRec num As Long Target As Long targetType As Byte Vital(1 To Vitals.Vital_Count - 1) As Long x As Byte y As Byte Dir As Byte End Type Private Type TempMapNpcRec SpawnWait As Long AttackTimer As Long StunDuration As Long StunTimer As Long ' regen stopRegen As Boolean stopRegenTimer As Long ' dot/hot DoT(1 To MAX_DOTS) As DoTRec HoT(1 To MAX_DOTS) As DoTRec lastDir As Byte inChatWith As Long End Type Private Type TradeItemRec Item As Long ItemValue As Long costitem As Long costvalue As Long End Type Private Type ShopRec Name As String * NAME_LENGTH BuyRate As Long TradeItem(1 To MAX_TRADES) As TradeItemRec End Type Private Type SpellRec Name As String * NAME_LENGTH Desc As String * 255 Sound As String * NAME_LENGTH Type As Byte MPCost As Long LevelReq As Long AccessReq As Long ClassReq(1 To MAX_CLASSES) As Byte CastTime As Long CDTime As Long Icon As Long Map As Long x As Long y As Long Dir As Byte Vital As Long Duration As Long Interval As Long Range As Byte IsAoE As Boolean AoE As Long CastAnim As Long SpellAnim As Long StunDuration As Long isLinear As Boolean BuffType As Byte Sprite As Long NextRank As Long NextUses As Long End Type Private Type MapDataRec NPC() As MapNpcRec TempNPC() As TempMapNpcRec End Type Private Type MapResourceRec ResourceState As Byte ResourceTimer As Long x As Long y As Long cur_health As Long End Type Private Type ResourceCacheRec Resource_Count As Long ResourceData() As MapResourceRec End Type Private Type ResourceRec Name As String * NAME_LENGTH SuccessMessage As String * NAME_LENGTH EmptyMessage As String * NAME_LENGTH Sound As String * NAME_LENGTH ResourceType As Byte ResourceImage As Long ExhaustedImage As Long ItemReward As Long ToolRequired As Long health As Long RespawnTime As Long WalkThrough As Boolean Animation As Long Exp As Long LevelReq As Long End Type Private Type AnimationRec Name As String * NAME_LENGTH Sound As String * NAME_LENGTH Sprite(0 To 1) As Long Frames(0 To 1) As Long LoopCount(0 To 1) As Long LoopTime(0 To 1) As Long End Type Public Type Vector x As Long y As Long End Type Public Type MapBlockRec Blocks() As Long End Type ```
  8. hello everyone, So i'm having problem with my item stuff resetting all the time and it started when i made 2custom items. So i found a Quickfix already for it but it works till i go to the editor then it crashes again. So i've looked at the difference between server Sub SendUpdateSpellTo and the client Private Sub HandleUpdateSpell So i made at server that ``` SpellSize = LenB(Spell(spellNum)) SpellSize = SpellSize + 12 ``` But that was actually just a little test if that could fix that would be able to fix it but it only worked half :'( ModTypes Client: ``` Option Explicit ' Public data structures Public Map As MapRec Public Bank As BankRec Public Player(1 To MAX_PLAYERS) As PlayerRec Public TempPlayer(1 To MAX_PLAYERS) As TempPlayerRec Public Class(1 To MAX_CLASSES) As ClassRec Public Item(1 To MAX_ITEMS) As ItemRec Public NPC(1 To MAX_NPCS) As NpcRec Public MapItem(1 To MAX_MAP_ITEMS) As MapItemRec Public MapNpc(1 To MAX_MAP_NPCS) As MapNpcRec Public TempMapNpc(1 To MAX_MAP_NPCS) As TempMapNpcRec Public Shop(1 To MAX_SHOPS) As ShopRec Public Spell(1 To MAX_SPELLS) As SpellRec Public Resource(1 To MAX_RESOURCES) As ResourceRec Public Animation(1 To MAX_ANIMATIONS) As AnimationRec Public Switches(1 To MAX_SWITCHES) As String Public Variables(1 To MAX_VARIABLES) As String Public MapSounds() As MapSoundRec Public MapSoundCount As Long Public WeatherParticle(1 To MAX_WEATHER_PARTICLES) As WeatherParticleRec Public Autotile() As AutotileRec Public Auction(1 To 100) As AuctionHouseRec Public BattleMsg(1 To MAX_BATTLEMSG) As BattleMsgRec ' client-side stuff Public ActionMsg(1 To MAX_BYTE) As ActionMsgRec Public BossMsg As BossMsgRec Public Blood(1 To MAX_BYTE) As BloodRec Public AnimInstance(1 To MAX_BYTE) As AnimInstanceRec Public Party As PartyRec Public GUIWindow() As GUIWindowRec Public Buttons(1 To MAX_BUTTONS) As ButtonRec Public Chat(1 To 20) As ChatRec Public TheirTrade(1 To MAX_INV) As TheirTradeRec Public CharData(1 To MAX_PLAYER_CHARACTERS) As CharDataRec Public PlayerInfo As InfoRec Public Hotbar(1 To MAX_HOTBAR) As HotbarRec Public TradeYourOffer(1 To MAX_INV) As PlayerInvRec Public MapResource() As MapResourceRec Public PlayerInv(1 To MAX_INV) As PlayerInvRec ' Inventory Public PlayerSpells(1 To MAX_PLAYER_SPELLS) As PlayerSpellRec ' autotiling Public autoInner(1 To 4) As PointRec Public autoNW(1 To 4) As PointRec Public autoNE(1 To 4) As PointRec Public autoSW(1 To 4) As PointRec Public autoSE(1 To 4) As PointRec Public chatBubble(1 To MAX_BYTE) As ChatBubbleRec Public ProjectileList() As ProjectileRec ' options Public Options As OptionsRec Public Type RandInvRec prefix As String * NAME_LENGTH Suffix As String * NAME_LENGTH Stat(1 To Stats.Stat_Count - 1) As Long Rarity As Long Damage As Long speed As Long End Type 'Evilbunnie's DrawnChat system Private Type ChatRec Text As String Colour As Long End Type ' Type recs Private Type OptionsRec Game_Name As String savePass As Byte Password As String * NAME_LENGTH Username As String * ACCOUNT_LENGTH IP As String Port As Long MenuMusic As String Theme As String Website As String Music As Byte sound As Byte Debug As Byte Windowed As Byte End Type Public Type AuctionHouseRec Owner As String Item As Long Amount As Long Price As Long EndDate As Long Date As String ItemRand As RandInvRec End Type Public Type PartyRec Leader As Long Member(1 To MAX_PARTY_MEMBERS) As Long MemberCount As Long End Type Public Type PlayerInvRec Num As Long Value As Long End Type Public Type PlayerSpellRec Spell As Long Uses As Long End Type Private Type BankRec Item(1 To MAX_BANK) As PlayerInvRec ItemRand(1 To MAX_BANK) As RandInvRec End Type Private Type SpellAnim spellnum As Long timer As Long FramePointer As Long End Type Private Type PlayerRec ' General Name As String Class As Long Sprite As Long Level As Byte Access As Byte PK As Byte IsMember As Byte DateCount As String PlayerQuest(1 To MAX_QUESTS) As PlayerQuestRec ' Vitals Vital(1 To Vitals.Vital_Count - 1) As Long MaxVital(1 To Vitals.Vital_Count - 1) As Long ' Stats Stat(1 To Stats.Stat_Count - 1) As Byte StatExp(1 To Stats.Stat_Count - 1) As Long StatTNL(1 To Stats.Stat_Count - 1) As Long ' Worn equipment Equipment(1 To Equipment.Equipment_Count - 1) As Long ' Position Map As Long X As Byte y As Byte Dir As Byte ' Random Items RandInv(1 To MAX_INV) As RandInvRec RandEq(1 To Equipment.Equipment_Count - 1) As RandInvRec EventOpen(1 To MAX_EVENTS) As Byte End Type Private Type TempPlayerRec xOffset As Integer yOffset As Integer Moving As Byte Attacking As Byte AttackTimer As Long MapGetTimer As Long Step As Byte GuildColor As Long GuildName As String GuildTag As String * 3 SlashAnim As Byte NextAnim As Long Anim As Long AnimTimer As Long StartFlash As Long End Type Private Type TileDataRec X As Long y As Long Tileset As Long End Type Public Type TileRec layer(1 To MapLayer.Layer_Count - 1) As TileDataRec Autotile(1 To MapLayer.Layer_Count - 1) As Byte Type As Byte Data1 As Long Data2 As Long Data3 As Long Data4 As String DirBlock As Byte End Type Private Type MapEventRec Name As String Dir As Long X As Long y As Long GraphicType As Long GraphicX As Long GraphicY As Long GraphicX2 As Long GraphicY2 As Long GraphicNum As Long Moving As Long MovementSpeed As Long Position As Long xOffset As Long yOffset As Long Step As Long visible As Long WalkAnim As Long DirFix As Long ShowDir As Long WalkThrough As Long ShowName As Long End Type Private Type MapRec Name As String * NAME_LENGTH Music As String * MUSIC_LENGTH BGS As String * MUSIC_LENGTH Revision As Long Moral As Byte Up As Long Down As Long Left As Long Right As Long BootMap As Long BootX As Byte BootY As Byte Weather As Long WeatherIntensity As Long Fog As Long FogSpeed As Long FogOpacity As Long Red As Long Green As Long Blue As Long Alpha As Long MaxX As Byte MaxY As Byte Tile() As TileRec NPC(1 To MAX_MAP_NPCS) As Long NpcSpawnType(1 To MAX_MAP_NPCS) As Long IsMember As Byte Panorama As Byte DayNight As Byte End Type Private Type ClassRec Name As String * NAME_LENGTH Stat(1 To Stats.Stat_Count - 1) As Byte MaleSprite() As Long FemaleSprite() As Long ' For client use Vital(1 To Vitals.Vital_Count - 1) As Long Desc As String End Type Private Type ItemRec Name As String * NAME_LENGTH Desc As String * 255 sound As String * NAME_LENGTH Pic As Long Type As Byte Data1 As Long Data2 As Long Data3 As Long ClassReq(1 To MAX_CLASSES) As Byte AccessReq As Long LevelReq As Long Price As Long Add_Stat(1 To Stats.Stat_Count - 1) As Byte Rarity As Byte speed As Long ConsumeItem As Long Code As Long QuestNum As Long BindType As Byte Stat_Req(1 To Stats.Stat_Count - 1) As Byte Animation As Long Paperdoll As Long AddHP As Long AddMP As Long AddEXP As Long EXPStat As Long CastSpell As Long instaCast As Byte IsMember As Byte a As Byte R As Byte G As Byte B As Byte PDef As Long MDef As Long RDef As Long Random As Byte ItemLevel As Byte isTwoHanded As Byte Projectile As Long Range As Byte Rotation As Integer Ammo As Long End Type Private Type MapItemRec playerName As String Num As Long Value As Long Frame As Byte X As Byte y As Byte End Type Private Type NpcRec Name As String * NAME_LENGTH AttackSay As String * 100 sound As String * NAME_LENGTH Sprite As Long SpawnSecs As Long Behaviour As Byte Range As Byte DropChance(1 To MAX_NPC_DROPS) As Double DropItem(1 To MAX_NPC_DROPS) As Byte DropItemValue(1 To MAX_NPC_DROPS) As Integer Stat(1 To Stats.Stat_Count - 1) As Byte HP As Long Animation As Long Damage As Long Level As Long PDef As Long MDef As Long RDef As Long Quest As Byte QuestNum As Long a As Byte R As Byte G As Byte B As Byte SpawnAtDay As Byte SpawnAtNight As Byte Event As Long isBoss As Byte Moral As Byte Projectile As Long ProjectileRange As Byte Rotation As Integer End Type Private Type MapNpcRec Num As Long target As Long TargetType As Byte Vital(1 To Vitals.Vital_Count - 1) As Long Map As Long X As Byte y As Byte Dir As Byte End Type Private Type TempMapNpcRec xOffset As Long yOffset As Long Moving As Byte Attacking As Byte AttackTimer As Long Step As Byte StartFlash As Long Anim As Long AnimTimer As Long End Type Private Type TradeItemRec Item As Long ItemValue As Long CostItem As Long CostValue As Long End Type Private Type ShopRec Name As String * NAME_LENGTH BuyRate As Long TradeItem(1 To MAX_TRADES) As TradeItemRec End Type Private Type SpellRec Name As String * NAME_LENGTH Desc As String * 255 sound As String * NAME_LENGTH Type As Byte MPCost As Long LevelReq As Long AccessReq As Long ClassReq(1 To MAX_CLASSES) As Byte CastTime As Long CDTime As Long Icon As Long Map As Long X As Long y As Long Dir As Byte Vital As Long Duration As Long Interval As Long Range As Byte IsAoE As Boolean AoE As Long CastAnim As Long SpellAnim As Long StunDuration As Long IsLinear As Boolean BuffType As Byte Sprite As Long NextRank As Long NextUses As Long End Type Public Type MapResourceRec X As Long y As Long ResourceState As Byte End Type Private Type ResourceRec Name As String * NAME_LENGTH SuccessMessage As String * NAME_LENGTH EmptyMessage As String * NAME_LENGTH sound As String * NAME_LENGTH ResourceType As Byte ResourceImage As Long ExhaustedImage As Long ItemReward As Long ToolRequired As Long health As Long RespawnTime As Long WalkThrough As Boolean Animation As Long Exp As Long LevelReq As Long End Type Private Type ActionMsgRec Message As String Created As Long Type As Long color As Long Scroll As Long X As Long y As Long Alpha As Byte End Type Private Type BossMsgRec Message As String Created As Long color As Long End Type Private Type BloodRec Sprite As Long timer As Long X As Long y As Long End Type Private Type AnimationRec Name As String * NAME_LENGTH sound As String * NAME_LENGTH Sprite(0 To 1) As Long Frames(0 To 1) As Long LoopCount(0 To 1) As Long looptime(0 To 1) As Long End Type Private Type AnimInstanceRec Animation As Long X As Long y As Long ' used for locking to players/npcs lockindex As Long LockType As Byte ' timing timer(0 To 1) As Long ' rendering check Used(0 To 1) As Boolean ' counting the loop LoopIndex(0 To 1) As Long frameIndex(0 To 1) As Long End Type Public Type HotbarRec Slot As Long sType As Byte End Type Public Type ButtonRec state As Byte X As Long y As Long width As Long height As Long visible As Boolean PicNum As Long End Type Public Type GUIWindowRec X As Long y As Long width As Long height As Long visible As Boolean End Type Public Type EventListRec CommandList As Long CommandNum As Long End Type Public Type MapSoundRec X As Long y As Long SoundHandle As Long InUse As Boolean Channel As Long End Type Public Type WeatherParticleRec Type As Long X As Long y As Long Velocity As Long InUse As Long End Type 'Auto tiles "/ Public Type PointRec X As Long y As Long End Type Public Type QuarterTileRec QuarterTile(1 To 4) As PointRec RenderState As Byte srcX(1 To 4) As Long srcY(1 To 4) As Long End Type Public Type AutotileRec layer(1 To MapLayer.Layer_Count - 1) As QuarterTileRec End Type Public Type ChatBubbleRec Msg As String Colour As Long target As Long TargetType As Byte timer As Long active As Boolean End Type Private Type TheirTradeRec itemNum As Long ItemValue As Long Rand As RandInvRec End Type Public Type CharDataRec Name As String * NAME_LENGTH Level As Long Class As Long Sex As Long Sprite As Long End Type Public Type InfoRec CurrentWindow As Byte AttackDamage As Long ArcheryDamage As Long PDef As Long MDef As Long RDef As Long block As Long Crit As Long Dodge As Long Parry As Long End Type '''''''''''''''''''''''''''''''' ' ****** Battle Message ****** ' '''''''''''''''''''''''''''''''' Type BattleMsgRec Msg As String color As Long Created As Long dY As Long End Type Public Type ProjectileRec X As Long y As Long tx As Long ty As Long RotateSpeed As Byte Rotate As Single Graphic As Long End Type ```
  9. > Above: > > ``` > player(index).Char(TempPlayer(index).CurChar).PlayerQuest(QuestNum).Status = QUEST_COMPLETED > > ``` > Add: > > ``` > If player(index).Char(TempPlayer(index).CurChar).PlayerQuest(QuestNum).Status = QUEST_COMPLETED Then Exit Sub > > ``` Tnx a lot Awesome ;) *Stupid me* -_-
  10. this is not the original endquest sub it's a bit modified(but it's the one i use): ``` Public Sub EndQuest(ByVal index As Long, ByVal QuestNum As Long) Dim i As Long, n As Long player(index).Char(TempPlayer(index).CurChar).PlayerQuest(QuestNum).Status = QUEST_COMPLETED 'reset counters to 0 player(index).Char(TempPlayer(index).CurChar).PlayerQuest(QuestNum).ActualTask = 0 player(index).Char(TempPlayer(index).CurChar).PlayerQuest(QuestNum).CurrentCount = 0 'give experience GivePlayerEXP index, Quest(QuestNum).ExpType, Quest(QuestNum).RewardExp 'remove items on the end For i = 1 To MAX_QUESTS_ITEMS If Quest(QuestNum).TakeItem(i).Item > 0 Then If HasItem(index, Quest(QuestNum).TakeItem(i).Item) > 0 Then If Item(Quest(QuestNum).TakeItem(i).Item).Type = ITEM_TYPE_CURRENCY Then TakeInvItem index, Quest(QuestNum).TakeItem(i).Item, Quest(QuestNum).TakeItem(i).Value Else For n = 1 To Quest(QuestNum).TakeItem(i).Value TakeInvItem index, Quest(QuestNum).TakeItem(i).Item, 1 Next End If End If End If Next SavePlayer index Call SendStats(index) SendPlayerData index 'give rewards For i = 1 To MAX_QUESTS_ITEMS If Quest(QuestNum).RewardItem(i).Item 0 Then 'check if we have space If FindOpenInvSlot(index, Quest(QuestNum).RewardItem(i).Item) = 0 Then SendBattleMsg index, "You have no inventory space.", BrightRed Exit For Else 'if so, check if it's a currency stack the item in one slot If Item(Quest(QuestNum).RewardItem(i).Item).Type = ITEM_TYPE_CURRENCY Then GiveInvItem index, Quest(QuestNum).RewardItem(i).Item, Quest(QuestNum).RewardItem(i).Value Else 'if not, create a new loop and store the item in a new slot if is possible For n = 1 To Quest(QuestNum).RewardItem(i).Value If FindOpenInvSlot(index, Quest(QuestNum).RewardItem(i).Item) = 0 Then SendBattleMsg index, "You have no inventory space.", BrightRed Exit For Else GiveInvItem index, Quest(QuestNum).RewardItem(i).Item, 1 End If Next End If End If End If Next 'mark quest as completed in chat SendBattleMsg index, Trim$(Quest(QuestNum).Name) & ": quest completed", Green SavePlayer index SendEXP index Call SendStats(index) SendPlayerData index SendPlayerQuests index End Sub ```
  11. Hello everyone, I use alatars quest system So i have an event system (deathbeams event system) but i'm having problems ending a quest in it . This is code for starting a quest(no bugs in it): ``` If CanStartQuest(index, .Data(1)) Then 'if can start show the request message (speech1) QuestMessage index, .Data(1), Trim$(Quest(.Data(1)).Speech(1)), .Data(1) Exit Sub End If ``` This is code i use for ending quest (but you can end it constantly ending it constantly wouldn't be a problem if you don't get reward every time :P): ``` EndQuest index, "2" ```
  12. Just add in the player editor i also did that ;) [http://www.eclipseorigins.com/community/index.php?/topic/132530-eo-online-player-editor/](http://www.eclipseorigins.com/community/index.php?/topic/132530-eo-online-player-editor/)
  13. ok but now i'm working on another even better engine then when we worked with EA
  14. > There is a Guild System Tutorial the Website but it doens't work -_- (for me)
  15. > Another maaterpice has arrived! > > but still, pls dont say that this is the last update, i'm still waiting for guild and quest system :) He won't add Quest and Guild system in the base maybe he will make a tutorial for it he already sayd that…
  16. Now you can also edit profile ![](http://www.touchofdeathforums.com/community/public/style_emoticons/default/smile.png) Now i'm working on encryption with bcrypt
  17. Yeah helladen thats only in dx8 ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons//tongue.png)
  18. > I don't mean to be rude, but why would anyone use this? > > It surely won't be up to par with existing forum software that has professional web gurus working on it. Maybe i am a pro guru you don't know….... Added avatar url in edit profile now working on adding more stuff to edit profile. Also added a global header/footer/sidebar so i only have to edit 1 file to change how my header looks Anyway here are some new screenshots of viewing a topic and posting a new reply:
  19. It is for my game but i will make a basic css theme for other people so they can also use it It will be an open-source project like smf,phpbb,…
  20. There is no need to be confused i originally started making this forum/portal engine for my website because i didn't like any of the existing systems. I will change the theme to a default theme once i got the avatar thing to work ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons//wink.png)
×
×
  • Create New...