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

Pet System script (No Longer Beign Worked On)


Dennys
 Share

Recommended Posts

  • Replies 417
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

YOu will need TO add this Undex Function GetMapNpcNumber:
```
Function GetMapPetNumber(ByVal MapNum As Long, ByVal Index As Long) As Long
    GetMapPetNumber = MapPET(MapNum, Index).num
End Function
```
Ad then use THis COmmand:
```
Case "/sp"
Dim PetIndex
Dim Map
Dim X
Dim Y
Dim PetNum
Map = GetPlayerMap(Index)
X = GetPlayerX(Index) + 1
Y = GetPlayerY(Index) + 1
PetIndex = 1

For I = 1 to 15
If GetMapPetNumber(map, NpcIndex) <> 0 Then
    PetIndex = PetIndex + 1
    Exit For
Else
Next I

If PetIndex > 14
  Call PlayerMsg(Index, "Sorry Map Is Full.", BRIGHTGREEN)
  Exit Sub
End If

Call ScriptSpawnPet(PetIndex, Map, X, Y, TextSay(1))
Exit Sub
```
Link to comment
Share on other sites

Prewien of the attack of the pet
```
Sub PetAttack(Index, Damage)
Dim rnd
Dim str
Dim target

  If GetPlayerPet(index) > 0 Then

target = GetPlayerTarget(index)
Damage = GetPetSTR(GetPlayerPet(index) , GetPlayerMap(index))  * 2
str = GetPetSTR(GetPlayerPet(index) , GetPlayerMap(index))
rnd = (str , 100)

Select Case rnd

Case Else

If Int(Damage) > 0 Then
If Int(GetPlayerTarget(Index)) > 0 Then
Target = GetPlayerTarget(Index)
Call NPCAttack(GetPlayerPet(index)) , Target, Damage)
Else
Target = GetPlayerTargetNPC(Index)
Call NPCAttack(GetPlayerPet(index)) , Target, Damage)
End If
End If
  Else
    Exit Sub
  End If

End Select

End Sub

```then call in SUb OnAttack(index) PetAttack(index)
NOTE you will need the two function i said!
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...