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

iHero

Members
  • Posts

    207
  • Joined

  • Last visited

    Never

Everything posted by iHero

  1. iHero

    [EO] Titles 1.2

    **Images** **Log - Version 1.0 to Version 1.2** * Correção - Ao remover algum titulo sobrecarregar o servidor; * Nova formula de recompeça dos titulos; * Agora o titulo pode ser arrastado para a hotbar; * Menssagens quando usar/remover um titulo; * Remover o titulo que está usando; **Anexos** * [Full System](http://www.mediafire.com/?6c7oigess19miys) * [Extras](http://www.mediafire.com/?lvaga8mat7vyevl) **Beginning** First download the file _Extras_, which is found in _Annexes_, extract it and add formulas and modules in your game. **Server~Side** > frmServer Create a commandButton with the following settings: > Name: cmdReloadTitulos > > Caption: Titulos Inside it add: ``` Dim i As Long Call LoadTitulos Call TextAdd("All Titulos reloaded.") For i = 1 To Player_HighIndex If IsPlaying(i) Then SendTitulos i End If Next ``` > modCombat Replace _Function GetPlayerMaxVital_ by: ``` Function GetPlayerMaxVital(ByVal index As Long, ByVal Vital As Vitals) As Long Dim x As Long, i As Long, n As Long If index > MAX_PLAYERS Then Exit Function Select Case Vital Case HP x = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Endurance) / 2)) * 15 + 150 Case MP x = ((GetPlayerLevel(index) / 2) + (GetPlayerStat(index, Intelligence) / 2)) * 5 + 25 End Select For i = 1 To MAX_PLAYER_TITULOS If GetPlayerTitulo(index, i) > 0 Then If Titulo(GetPlayerTitulo(index, i)).Passivo = True Then x = x + Titulo(GetPlayerTitulo(index, i)).VitalRec(Vital) End If End If Next If GetPlayerTUsando(index) > 0 Then x = x + Titulo(GetPlayerTUsando(index)).VitalRec(Vital) end if GetPlayerMaxVital = x End Function ``` > modDataBase Look for: ``` ' set start spells If Class(ClassNum).startSpellCount > 0 Then For n = 1 To Class(ClassNum).startSpellCount If Class(ClassNum).StartSpell(n) > 0 Then ' spell exist? If Len(Trim$(Spell(Class(ClassNum).StartItem(n)).Name)) > 0 Then Player(index).Spell(n) = Class(ClassNum).StartSpell(n) End If End If Next End If ``` Below add: ``` ' set start titulos For n = 1 To MAX_TITULOS If Len(Trim$(Titulo(n).Nome)) > 0 Then If Titulo(n).Tipo = TITULO_TYPE_INICIAL Then Call SetPlayerTitulo(index, FindOpenTituloSlot(index), n) End If End If Next ``` > modEnumerations Look for: ``` ' Make sure SMSG_COUNT is below everything else ``` Add up: ``` STituloEditor SUpdateTitulo STitulos ``` Look for: ``` ' Make sure CMSG_COUNT is below everything else ``` Add up: ``` CRequestEditTitulo CSaveTitulo CRequestTitulos CSwapTituloSlots CTituloComando ``` Look for: ``` Public Enum SoundEntity seAnimation = 1 seItem seNpc seResource seSpell ``` Below add: ``` seTitulo ``` > modGeneral Look for: ``` ChkDir App.Path & "\Data\", "spells\" ``` Below add: ``` ChkDir App.Path & "\Data\", "titulos\" ``` Look for: ``` Call SetStatus("Clearing animations...") Call ClearAnimations ``` Below add: ``` Call SetStatus("Clearing titulos...") Call ClearTitulos ``` Look for: ``` Call SetStatus("Loading animations...") Call LoadAnimations ``` Below add: ``` Call SetStatus("Loading titulos...") Call LoadTitulos ``` > modHandleData Look for: ``` HandleDataSub(CPartyLeave) = GetAddress(AddressOf HandlePartyLeave) ``` Below add: ``` HandleDataSub(CRequestEditTitulo) = GetAddress(AddressOf HandleRequestEditTitulo) HandleDataSub(CSaveTitulo) = GetAddress(AddressOf HandleSaveTitulo) HandleDataSub(CRequestTitulos) = GetAddress(AddressOf HandleRequestTitulos) HandleDataSub(CSwapTituloSlots) = GetAddress(AddressOf HandleSwapTituloSlots) HandleDataSub(CTituloComando) = GetAddress(AddressOf HandleTituloComando) ``` Look for: ``` ' Send the update 'Call SendStats(Index) ``` Below add: ``` CheckTitulo index ``` Look for: ``` Case 2 ' spell If Slot > 0 And Slot 0 Then If FindHotbar(index, Player(index).Spell(Slot), SType) = False Then Player(index).Hotbar(hotbarNum).Slot = Player(index).Spell(Slot) Player(index).Hotbar(hotbarNum).SType = SType End If End If End If ``` Below add: ``` Case 3 ' titulo If Slot > 0 And Slot 0 Then If Len(Trim$(Titulo(GetPlayerTitulo(index, Slot)).Nome)) > 0 Then Player(index).Hotbar(hotbarNum).Slot = GetPlayerTitulo(index, Slot) Player(index).Hotbar(hotbarNum).SType = SType End If End If End If ``` > modPlayer Look for: ``` Call SendHotbar(index) ``` Below add: ``` Call SendTitulos(index) ``` Look for: ``` If level_count > 0 Then If level_count = 1 Then 'singular GlobalMsg GetPlayerName(index) & " has gained " & level_count & " level!", Brown Else 'plural GlobalMsg GetPlayerName(index) & " has gained " & level_count & " levels!", Brown End If ``` Below add: ``` CheckTitulo index ``` Replace _Function GetplayerStat_ by: ``` Public Function GetPlayerStat(ByVal index As Long, ByVal Stat As Stats) As Long Dim x As Long, i As Long If index > MAX_PLAYERS Then Exit Function x = Player(index).Stat(Stat) For i = 1 To MAX_PLAYER_TITULOS If GetPlayerTitulo(index, i) > 0 Then If Titulo(GetPlayerTitulo(index, i)).Passivo = True Then x = x + Titulo(GetPlayerTitulo(index, i)).StatRec(Stat) End If End If Next If GetPlayerTUsando(index) > 0 Then x = x + Titulo(GetPlayerTUsando(index)).StatRec(Stat) For i = 1 To Equipment.Equipment_Count - 1 If Player(index).Equipment(i) > 0 Then If Item(Player(index).Equipment(i)).Add_Stat(Stat) > 0 Then x = x + Item(Player(index).Equipment(i)).Add_Stat(Stat) End If End If Next GetPlayerStat = x End Function ``` > modServerTcp Look for: ``` Buffer.WriteLong GetPlayerPK(index) ``` Below add: ``` Buffer.WriteLong GetPlayerTUsando(index) For i = 1 To MAX_PLAYER_TITULOS Buffer.WriteLong GetPlayerTitulo(index, i) Next ``` > modTypes Above Type PlayerRec add: ``` Private Type PlayerTituloRec Titulo(1 To MAX_PLAYER_TITULOS) As Long Usando As Long End Type ``` At the end of Type PlayerRec before the End Type, add: ``` ' Titulo Titulo As PlayerTituloRec ```
  2. iHero

    [FIX] Loop of Sound

    Was by mere chance whilst messing around with the code
  3. iHero

    [FIX] Loop of Sound

    **Description** The sound played only repeats 100 times and not infinite as it should **Client~Side** In modSound search for: ``` Segment.SetRepeats 100 ``` Replace with: ``` Segment.SetRepeats -1 ``` **Credits** Valentine
  4. iHero

    [FIX] Error Kick

    **Client~Side** > frmMain In picAdmin add the code in cmdAKick: ``` ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If GetPlayerAccess(MyIndex) < ADMIN_MAPPER Then Exit Sub End If If Len(Trim$(txtAName.text)) < 1 Then Exit Sub End If SendKick Trim$(txtAName.text) ' Error handler Exit Sub errorhandler: HandleError "cmdAKick_Click", "frmMain", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub ``` **Credits** iHero
  5. iHero

    [EO] Minimap 1.3

    Sorry, I packed the system
  6. Hm, pretty cool. But it is basic … I was working on one, I'm going to edit it. ![](http://img141.imageshack.us/img141/3906/50392802.png)
  7. iHero

    [EO] Minimap 1.3

    **Beginning** First download the following file in your \data files\graphics named minimap and see if the file is saved in bmp. ![](http://img52.imageshack.us/img52/9902/minimaph.png) [http://www.mediafire…fh6oh4t5gj1j023](http://www.mediafire.com/?fh6oh4t5gj1j023) What exists on the minimap? * White icon when there's nothing on the map. * Icon that shows the players that are present on the map. * Icon that shows NPCs that are on the map. * Icon showing map of blocks. * Icon for different players killers. * Icon that shows the teleportation of the map. * Icon that shows the items from the map. * Icon that shows the map and shops by attribute and by being NPC. * Different icon for each type of NPC. **Screenshot** ![](http://img717.imageshack.us/img717/149/minimapn.png) **Client~side** > modDirectDraw7 Find: ``` ' Render the bars BltBars ``` Below add: ``` ' minimap If Options.Minimap = 1 Then BltMiniMap ``` Find: ``` Public DDS_Bars As DirectDrawSurface7 ``` Below add: ``` Public DDS_MiniMap As DirectDrawSurface7 ``` Find: ``` Public DDSD_Bars As DDSURFACEDESC2 ``` Below add: ``` Public DDSD_MiniMap As DDSURFACEDESC2 ``` Find: ``` If FileExist(App.Path & "\data files\graphics\bars.bmp", True) Then Call InitDDSurf("bars", DDSD_Bars, DDS_Bars) ``` Below add: ``` If FileExist(App.Path & "\data files\graphics\minimap.bmp", True) Then Call InitDDSurf("minimap", DDSD_MiniMap, DDS_MiniMap) ``` Find: ``` Set DDS_Target = Nothing ZeroMemory ByVal VarPtr(DDSD_Target), LenB(DDSD_Target) ``` Below add: ``` Set DDS_MiniMap = Nothing ZeroMemory ByVal VarPtr(DDSD_MiniMap), LenB(DDSD_MiniMap) ``` At the end of the module add: ``` Sub BltMiniMap() Dim i As Long Dim x As Integer, Y As Integer Dim CameraX As Long, CameraY As Long Dim BlockRect As RECT, WarpRect As RECT, ItemRect As RECT, ShopRect As RECT, NpcOtherRect As RECT, PlayerRect As RECT, PlayerPkRect As RECT, NpcAttackerRect As RECT, NpcShopRect As RECT, BlankRect As RECT Dim MapX As Long, MapY As Long ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler ' Map size MapX = Map.MaxX MapY = Map.MaxY ' **************** ' ** Rectangles ** ' **************** ' Blank With BlankRect .top = 4 .Bottom = .top + 4 .Left = 0 .Right = .Left + 4 End With ' Player - Norm With PlayerRect .top = 0 .Bottom = .top + 4 .Left = 4 .Right = .Left + 4 End With ' Player - PK With PlayerPkRect .top = 0 .Bottom = .top + 4 .Left = 8 .Right = .Left + 4 End With ' NPC - Attack when attacked With NpcAttackerRect .top = 0 .Bottom = .top + 4 .Left = 12 .Right = .Left + 4 End With ' NPC - Shopkeeper With NpcShopRect .top = 0 .Bottom = .top + 4 .Left = 16 .Right = .Left + 4 End With ' NPC - Others With NpcOtherRect .top = 0 .Bottom = .top + 4 .Left = 20 .Right = .Left + 4 End With ' Attributes - Block With BlockRect .top = 4 .Bottom = .top + 4 .Left = 4 .Right = .Left + 4 End With ' Attributes - Warp With WarpRect .top = 4 .Bottom = .top + 4 .Left = 8 .Right = .Left + 4 End With ' Attributes - Item With ItemRect .top = 4 .Bottom = .top + 4 .Left = 12 .Right = .Left + 4 End With ' Attributes - Shop With ShopRect .top = 4 .Bottom = .top + 4 .Left = 16 .Right = .Left + 4 End With ' Set attributes in map For x = 0 To MapX For Y = 0 To MapY ' Camera loc CameraX = Camera.Left + 25 + (x * 4) CameraY = Camera.top + 25 + (Y * 4) ' Blank tile Engine_BltFast CameraX, CameraY, DDS_MiniMap, BlankRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY Select Case Map.Tile(x, Y).Type Case TILE_TYPE_BLOCKED Engine_BltFast CameraX, CameraY, DDS_MiniMap, BlockRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY Case TILE_TYPE_WARP Engine_BltFast CameraX, CameraY, DDS_MiniMap, WarpRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY Case TILE_TYPE_ITEM Engine_BltFast CameraX, CameraY, DDS_MiniMap, ItemRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY Case TILE_TYPE_SHOP Engine_BltFast CameraX, CameraY, DDS_MiniMap, ShopRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY End Select Next Y Next x ' Set players in mini map For i = 1 To Player_HighIndex If IsPlaying(i) Then ' Player loc x = Player(i).x Y = Player(i).Y ' Camera loc CameraX = Camera.Left + 25 + (x * 4) CameraY = Camera.top + 25 + (Y * 4) Select Case Player(i).PK Case NO Call Engine_BltFast(CameraX, CameraY, DDS_MiniMap, PlayerRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) Case YES Call Engine_BltFast(CameraX, CameraY, DDS_MiniMap, PlayerPkRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) End Select End If Next i ' Set npcs in mini map For i = 1 To Npc_HighIndex If MapNpc(i).num > 0 Then ' Npc loc x = MapNpc(i).x Y = MapNpc(i).Y ' Camera loc CameraX = Camera.Left + 25 + (x * 4) CameraY = Camera.top + 25 + (Y * 4) Select Case Npc(MapNpc(i).num).Behaviour Case NPC_BEHAVIOUR_ATTACKONSIGHT Or NPC_BEHAVIOUR_ATTACKWHENATTACKED Call Engine_BltFast(CameraX, CameraY, DDS_MiniMap, NpcAttackerRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) Case NPC_BEHAVIOUR_SHOPKEEPER Call Engine_BltFast(CameraX, CameraY, DDS_MiniMap, NpcShopRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) Case Else Call Engine_BltFast(CameraX, CameraY, DDS_MiniMap, NpcOtherRect, DDBLTFAST_WAIT Or DDBLTFAST_SRCCOLORKEY) End Select End If Next i ' Error handler Exit Sub errorhandler: HandleError "BltMiniMap", "modDirectDraw7", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ``` > frmMain Within the picOptions create a label with the following caption: > MiniMap Now create a PictureBox with any name in it and add 2 optionsBox with the following settings OptionBox1 > Name: optMiniMapOn > > Caption: On OptionBox2 > Name: optMiniMapOff > > Caption: Off Within the optMiniMapOn add: ``` ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler Options.Minimap = 1 SaveOptions ' Error handler Exit Sub errorhandler: HandleError "optMiniMapOn_Click", "frmMain", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub ``` And within the optMiniMapOff add: ``` ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler Options.Minimap = 0 SaveOptions ' Error handler Exit Sub errorhandler: HandleError "optMiniMapOff_Click", "frmMain", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub ``` > modTypes At the end of Private Type OptionsRec before the End type, add: ``` Minimap As Byte ``` > modDatabase Find: ``` Call PutVar(fileName, "Options", "Debug", Str(Options.Debug)) ``` Below add: ``` Call PutVar(fileName, "Options", "MiniMap", Str(Options.Minimap)) ``` Find: ``` Options.Debug = 0 ``` Below add: ``` Options.Minimap = 1 ``` Find: ``` Options.Debug = GetVar(fileName, "Options", "Debug") ``` Below add: ``` Options.Minimap = GetVar(fileName, "Options", "MiniMap") ``` Find: ``` If Options.Sound = 0 Then frmMain.optSOff.Value = True Else frmMain.optSOn.Value = True End If ``` Below add: ``` If Options.Minimap = 0 Then frmMain.optMiniMapOff.Value = True Else frmMain.optMiniMapOn.Value = True End If ``` Now delete the config.ini **Credits** iRicardo
  8. iHero

    [FIX] Slide

    English is not my first language, my first language is Portuguese, but i know other languages ​​also makes it harder to write.
  9. I was seeing here an error, not to solve it, but when I try to power, I am very busy, the error is as follows, when we finish a quest to pick up items X and start it again it already has said it already has all the items. example: Here is the message (do not remember the message) and after have the following: "10/10", so this is an example might be more ally the amount of item to be searched. thank you
  10. iHero

    [FIX] Slide

    Sorry there, already put the description of the tutorial
  11. iHero

    [FIX] Slide

    **Serve~Side** Search by: ``` ' Slide If .Type = TILE_TYPE_SLIDE Then ForcePlayerMove index, MOVING_WALKING, GetPlayerDir(index) Moved = YES End If ``` Change to: ``` ' Slide If .Type = TILE_TYPE_SLIDE Then ForcePlayerMove index, MOVING_WALKING, .Data1 Moved = YES End If ``` Explaining When we use the option on the map slide, you slide your direction and not sent to this tutorial you incinerate the correct Credits: iHero
  12. Hm, yes, but not everything needs a timer boy
  13. **Beginning** Data files in the folder \ graphics \ create a new folder called images and inside add a second photo with name "1", "2" without quotes **Client~Side** In frmMain create picture box with two settings: > Picture1 > > Name: picTele1 > > Picture2 > > Name: picTele2 Within the picTele1 add: ``` Call SendTele1 ``` And within the Tele2 add pic ``` Call SendTele2 ``` And now the end of modClientTcp add: ``` Public Sub SendTele1() Dim Buffer As clsBuffer Set Buffer = New clsBuffer Buffer.WriteLong CTele1 SendData Buffer.ToArray() Set Buffer = Nothing End Sub Public Sub SendTele2() Dim Buffer As clsBuffer Set Buffer = New clsBuffer Buffer.WriteLong CTele2 SendData Buffer.ToArray() Set Buffer = Nothing End Sub ``` In modEnumerations find: ``` ' Make sure CMSG_COUNT is below everything else CMSG_COUNT ``` And add on top: ``` CTele1 CTele2 ``` Now look for: ``` ' Make sure SMSG_COUNT is below everything else SMSG_COUNT ``` And add up: ``` SImages ``` Look for: ``` HandleDataSub(SPartyVitals) = GetAddress(AddressOf HandlePartyVitals) ``` And add below: ``` HandleDataSub(SImages) = GetAddress(AddressOf HandleImages) ``` Now at the end of modHandleData add: ``` Private Sub HandleImages(ByVal Index As Long, ByRef Data() As Byte, ByVal EditorIndex As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim Buffer As clsBuffer If GetPlayerClass(Index) = 1 Then frmMain.picTele1.Picture = LoadPicture(App.Path & "\data files\graphics\images\1.jpg") frmMain.picTele2.Picture = LoadPicture(App.Path & "\data files\graphics\images\2.jpg") ElseIf GetPlayerClass(Index) = 2 Then 'Here is if you want more pro classes End If Set Buffer = Nothing End Sub ``` **Serve~Side** Look for: ``` HandleDataSub(CPartyLeave) = GetAddress(AddressOf HandlePartyLeave) ``` And add below: ``` HandleDataSub(CTele1) = GetAddress(AddressOf HandleTele1) HandleDataSub(CTele2) = GetAddress(AddressOf HandleTele2) ``` At the end of modHandleData add: ``` Sub HandleTele1(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim Buffer As clsBuffer If GetPlayerLevel(Index) >= 10 Then Call PlayerWarp(Index, 1, 2, 3) End If Set Buffer = Nothing End Sub Sub HandleTele2(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim Buffer As clsBuffer If GetPlayerLevel(Index) >= 10 Then Call PlayerWarp(Index, 1, 2, 3) End If Set Buffer = Nothing End Sub ``` In modEnumerations find: ``` ' Make sure CMSG_COUNT is below everything else CMSG_COUNT ``` And add on top: ``` CTele1 CTele2 ``` Now look for: ``` ' Make sure SMSG_COUNT is below everything else SMSG_COUNT ``` And add up: ``` SImages ``` At the end of modServeTcp add: ``` Sub SendImages(ByVal Index As Long) Dim Buffer As clsBuffer Set Buffer = New clsBuffer Buffer.WriteLong SImages SendDataToMap GetPlayerMap(Index), Buffer.ToArray() Set Buffer = Nothing End Sub ``` Look for: ``` Call SendHotbar(Index) ``` And add below: ``` Call SendImages(Index) ``` Credits: iHero
  14. Ok, ok, ok, Soon I edit my post
  15. It is customary and also I like
  16. Robin wanted to know if you will still proceed with the eclipse Origins, and will launch a new version of it.
  17. **Client~Side** In Type PlayerRec at the end before the End Type, add: ``` Kill As Long Dead As Long ``` **Find: ``` Call SetPlayerPK(i, Buffer.ReadLong) ``` Look for: ``` Player(i).Kill = Buffer.ReadLong Player(i).Dead = Buffer.ReadLong ``` **Serve~Side** In Type PlayerRec at the end before the End Type, add: ``` Kill As Long Dead As Long ``` **In Sub AddChar and find it: ``` Player(Index).Vital(Vitals.MP) = GetPlayerMaxVital(Index, Vitals.MP) ``` Add below: ``` Player(Index).Kill = 0 Player(Index).Dead = 0 ``` Now in Sub PlayerAttackPlayer look for: ``` If exp = 0 Then Call PlayerMsg(victim, "You lost no exp.", BrightRed) Call PlayerMsg(attacker, "You received no exp.", BrightBlue) Else Call SetPlayerExp(victim, GetPlayerExp(victim) - exp) SendEXP victim Call PlayerMsg(victim, "You lost " & exp & " exp.", BrightRed) ``` And add up: ``` ' Kill and Dead Player(attacker).Kill = Player(attacker).Kill + 1 Call PlayerMsg(attacker, "Now you have " & Player(attacker).Kill & " Kill's", BrightRed) Player(victim).Dead = Player(victim).Dead + 1 Call PlayerMsg(victim, "Now you have " & Player(victim).Dead & " Deaths", BrightRed) ``` In Function PlayerData look for: ``` Buffer.WriteLong GetPlayerPK(Index) ``` And add below: ``` Buffer.WriteLong Player(Index).Kill Buffer.WriteLong Player(Index).Dead ``` Credits: iHero****
  18. Well, there are several games that use a "system" that when you reach the level X it returns to the initial level, this is a complete system of this "system" they use.
  19. Yes, but then do I get it right, I have no time to stir in programming except in my project.
  20. **Client~Side In frmEditor_Spel create a chekbox with the settings:** > **Name: chkCSprite > Caption: Copy Sprite** **And add this in it:** ``` If chkCSprite.Value = 0 Then Spell(EditorIndex).CSprite = False Else Spell(EditorIndex).CSprite = True End If ``` **In Type Spellrec add at the end:** ``` CSprite as Boolean ``` **Find:** ``` If Spell(EditorIndex).IsAoE Then .chkAOE.Value = 1 Else .chkAOE.Value = 0 End If ``` **Add below:** ``` If Spell(EditorIndex).CSprite Then .chkCSprite.Value = 1 Else .chkCSprite.Value = 0 End If ``` **Serve~side In Type Spellrec add at the end** ``` CSprite as Boolean ``` **Find:** ``` Public Sub CastSpell(ByVal Index As Long, ByVal spellslot As Long, ByVal target As Long, ByVal targetType As Byte) ``` **Below:** ``` Dim SpellCastType As Long ``` **Add:** ``` Dim NpcTarget As String, PlayerTarget As String ``` **Find:** ``` ' find out what kind of spell it is! self cast, target or AOE ``` **Add up:** ``` ' Copy Sprite If Spell(spellnum).CSprite = True Then If targetType = TARGET_TYPE_PLAYER Then Call SetPlayerSprite(Index, Player(TempPlayer(Index).target).Sprite) Call PlayerWarp(Index, GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index)) Exit Sub ElseIf targetType = TARGET_TYPE_NPC Then Call SetPlayerSprite(Index, NPC(TempPlayer(Index).target).Sprite) Call PlayerWarp(Index, GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index)) Exit Sub End If End If ``` **Credits: iHero**
  21. Hehe, sorry, but there is some problem with the power, if I want to retreat.
  22. **Client~Side** At the end of Type End Type PlayerRec before add: ``` Resets As Long ``` Search by: ``` Call SetPlayerPK(i, Buffer.ReadLong) ``` Add bellow: ``` Call SetPlayerResets(i, Buffer.ReadLong) ``` Search by: ``` Sub SetPlayerPK(ByVal Index As Long, ByVal PK As Long) ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If Index > MAX_PLAYERS Then Exit Sub Player(Index).PK = PK ' Error handler Exit Sub errorhandler: HandleError "SetPlayerPK", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ``` Add below: ``` Function GetPlayerResets(ByVal Index As Long) As Long ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If Index > MAX_PLAYERS Then Exit Function GetPlayerResets = Player(Index).Resets ' Error handler Exit Function errorhandler: HandleError "GetPlayerResets", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Function End Function Sub SetPlayerResets(ByVal Index As Long, ByVal Resets As Long) ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If Index > MAX_PLAYERS Then Exit Sub Player(Index).Resets = Resets ' Error handler Exit Sub errorhandler: HandleError "SetPlayerResets", "modDatabase", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ``` **Serve~Side** At the end of Type End Type PlayerRec before add: ``` Resets As Long ``` Search by: ``` Buffer.WriteLong GetPlayerPK(index) ``` Add bellow: ``` Buffer.WriteLong GetPlayerResets(index) ``` At the end of Sub CheckPlayerLevelUp before the End Sub, add: ``` If GetPlayerLevel(index) = 1000 Then ' Mude o 1000 para o level nessessario para resetar Call PlayerMsg(index, "Congratulations " & GetPlayerName(index) & " you have just reset", 15) Call SendAnimation(1, GetPlayerMap(index), GetPlayerX(index), GetPlayerY(index)) ' 'Change the number 1 for the number of which appeared to reset animation Call SetPlayerLevel(index, 1) 'Return to level 1 Call SetPlayerExp(index, 1) 'Return to experience 1 Call setplayerResets(index, GetPlayerResets(index) + 1) Call SendPlayerData(index) 'Save the player Call SendEXP(index) 'Saves the experience of the player End If ``` Search by: ``` Sub SetPlayerPK(ByVal index As Long, ByVal PK As Long) Player(index).PK = PK End Sub ``` Add bellow: ``` Function GetPlayerResets(ByVal index As Long) As Long If index > MAX_PLAYERS Then Exit Function GetPlayerResets = Player(index).Resets End Function Sub SetPlayerResets(ByVal index As Long, ByVal Resets As Long) Player(index).Resets = Resets End Sub ``` Credits: iHero
  23. **Client~Side** In frmEditor_Spell cmbTyppe add to the end of the list > Trans Now create a frame with the following settings: > Name: fraTrans > Caption: Transformation > Visible: False And inside a scrollbox and create a label with the settings: > Label > > Name: lblTrans > Caption: Sprite Transformation: None > > ScrollBox > > Name: scrlTrans And within the scrlTrans add: ``` ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler lblTrans.Caption = "Sprite da Transformação: " & scrlTrans.Value Spell(EditorIndex).trans = scrlTrans.Value ' Error handler Exit Sub errorhandler: HandleError "scrlTrans_Change", "frmEditor_Spell", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub ``` In 2 clicks in cmbType and add this inside: ``` If cmbType.ListIndex = SPELL_TYPE_TRANFORMATION Then scrlRange.Value = 0 chkAOE.Value = 1 fraTrans.Visible = True End If ``` Look for: ``` .scrlRange.Value = Spell(EditorIndex).Range ``` Add bellow: ``` .scrlTrans.Value = Spell(EditorIndex).Trans ``` At the end of Private Type End Type SpellRec before add: ``` Trans As Long ``` Look for: ``` Public Const SPELL_TYPE_WARP As Byte = 4 ``` Add below: ``` Public Const SPELL_TYPE_TRANFORMATION As Byte = 5 ``` **Serve~Side** At the end of Private Type End Type SpellRec before add: ``` Trans As Long ``` Look for: ``` Public Const SPELL_TYPE_WARP As Byte = 4 ``` Add below: ``` Public Const SPELL_TYPE_TRANFORMATION As Byte = 5 ``` Look for: ``` ' find out what kind of spell it is! self cast, target or AOE ``` Add up: ``` ' Transformation With Spell(SpellNum) If .Type = SPELL_TYPE_TRANFORMATION Then Call SetPlayerSprite(Index, Spell(Index).Trans) Call SetPlayerStat(Index, Stats.Strength, GetPlayerRawStat(Index, Stats.Strength) * 2) Call SetPlayerStat(Index, Stats.Endurance, GetPlayerRawStat(Index, Stats.Endurance) * 2) Call PlayerWarp(Index, GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index)) End If End With ``` Credits: iHero
×
×
  • Create New...