Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - Server-Side -
- 1. no modServerLooop, em cima de:
- ' Check for disconnections every half second
- Add(Talvez vc tenha que adicionar um dim tmr250 as long ):
- '##Scripted Battle##
- If Tick > tmr250 Then
- For i = 1 To SMaxBattles
- ScriptedBattleSub i
- Next
- tmr250 = GetTickCount + 250
- End If
- 2. no modPlayer, na sub PlayerWarp, em baixo de:
- ' Regenerate all NPCs' health
- For i = 1 To MAX_MAP_NPCS
- If MapNpc(OldMap).Npc(i).num > 0 Then
- MapNpc(OldMap).Npc(i).Vital(Vitals.HP) = GetNpcMaxVital(MapNpc(OldMap).Npc(i).num, Vitals.HP)
- End If
- Next
- add:
- '##Scripted Battle##
- ClearScriptedBattle OldMap, 0, True
- 3. Na Sub NpcWarpBehind, em baixo de:
- If index < 1 Or index > MAX_PLAYERS Then Exit Sub
- If NpcID < 1 Or NpcID > MAX_MAP_NPCS Then Exit Sub
- Add: '##Scripted Battle##
- If IsPlaying(index) = False Then Exit Sub
- 4. Na sub PlayerAttackNpc, em baixo de:
- If Damage >= MapNpc(mapNum).Npc(mapNpcNum).Vital(Vitals.HP) Then
- Add:
- '##Scripted Battle##
- ClearScriptedBattle mapNum, mapNpcNum
- 5. Na msm sub, em baixo de:
- ' NPC not dead, just do the damage
- MapNpc(mapNum).Npc(mapNpcNum).Vital(Vitals.HP) = MapNpc(mapNum).Npc(mapNpcNum).Vital(Vitals.HP) - Damage
- Add:
- '##Scripted Battle##
- ConfigureScriptedBattle
- For i = 1 To SMaxBattles
- If sBattle(i).SOn = False Then
- ScriptedBattleSub i, mapNum, mapNpcNum
- Exit For
- End If
- Next
- 6. Na sub NpcAttackPlayer, em baixo de:
- If Damage >= GetPlayerVital(victim, Vitals.HP) Then
- Add:
- '##Scripted Battle##
- ClearScriptedBattle mapNum, mapNpcNum, True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement