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

Death HP


blackkat9666
 Share

Recommended Posts

where do i put it? just under Sub OnDeath(index)?
By the way, in case it's help, I'm using TE

And also, i still want them to teleport to the map where everyone goes when they die…so if i replace

> Sub OnDeath(index)

with what you said, will they still go where they die to?

And I'm still not sure where it goes…
Link to comment
Share on other sites

i tried it like this but it didn't teleported me to where players go when they die…i just stayed at the same place i was killed and with full hp...

> Sub OnDeath(index)
> Dim mapnum
> Dim x
> Dim y
> Dim i
> i = GetPlayerClass(index)
>
> mapnum = GetVar("Classes\Class" & i & ".ini", "CLASS", "Map")
> y = GetVar("Classes\Class" & i & ".ini", "CLASS", "y")
> x = GetVar("Classes\Class" & i & ".ini", "CLASS", "x")
>
>   Call SetPlayerHP(index, 1)
>   Call SendHP(index)
> End Sub
>
> Call PlayerWarp(index, mapnum, x, y)
> End Sub
>
> Sub SetBlock(map, X, Y)
> Call SetAttribute(map,X,Y,1,0,0,0,"","","")
> End Sub
>
> Sub SetWarp(map, X, Y, warpmap, warpx, warpy)
> Call SetAttribute(map,X,Y,2,warpmap,warpx,warpy,"","","")
> End Sub
>
> Sub SetHeal(map, X, Y)
> Call SetAttribute(map,X,Y,7,0,0,0,"","","")
> End Sub
>
> Sub SetKill(map, X, Y)
> Call SetAttribute(map,X,Y,8,0,0,0,"","","")
> End Sub
>
> Sub SetItem(map, X, Y, item, value)
> Call SetAttribute(map,X,Y,3,item,value,0,"","","")
> End Sub
>
> Sub SetNPCAvoid(map, X, Y)
> Call SetAttribute(map,X,Y,4,0,0,0,"","","")
> End Sub
>
> Sub SetKey(map, X, Y, key, take)
> Call SetAttribute(map,X,Y,5,key,take,0,"","","")
> End Sub
>
> Sub SetKeyOpen(map, X, Y, keyx, keyy, message)
> Call SetAttribute(map,X,Y,6,keyx,keyy,0,message,"","")
> End Sub
>
> Sub SetShop(map, X, Y,shop)
> Call SetAttribute(map,X,Y,9,shop,0,0,"","","")
> End Sub
>
> Sub SetClassBlock(map, X, Y,allow1,allow2,allow3)
> Call SetAttribute(map,X,Y,10,allow,allow2,allow3,"","","")
> End Sub
>
> Sub SetArena(map, X, Y,amap,ax,ay)
> Call SetAttribute(map,X,Y,11,amap,ax,ay,"","","")
> End Sub
>
> Sub SetSound(map, X, Y,filename)
> Call SetAttribute(map,X,Y,12,0,0,0,filename,"","")
> End Sub
>
> Sub SetSpriteChange(map, X, Y,sprite,item,cost)
> Call SetAttribute(map,X,Y,13,sprite,item,cost,"","","")
> End Sub
>
> Sub SetSign(map, X, Y,line1,line2,line3)
> Call SetAttribute(map,X,Y,14,0,0,0,line1,line2,line3)
> End Sub
>
> Sub SetDoor(map, X, Y)
> Call SetAttribute(map,X,Y,15,0,0,0,"","","")
> End Sub
>
> Sub SetNotice(map, X, Y, title, text, filename)
> Call SetAttribute(map,X,Y,16,0,0,0,title,text,filename)
> End Sub
>
> Sub SetChest(map, X, Y)
> Call SetAttribute(map,X,Y,17,0,0,0,"","","")
> End Sub
>
> Sub SetScripted(map, X, Y, script)
> Call SetAttribute(map,X,Y,18,script,0,0,"","","")
> End Sub
>
> Sub SetBank(map, X, Y)
> Call SetAttribute(map,X,Y,23,0,0,0,"","","")
> End Sub
>
> Sub SetHouse(map, X, Y,item,cost)
> Call SetAttribute(map,X,Y,21,item,cost,0,"","","")
> End Sub
Link to comment
Share on other sites

```
Sub OnDeath(index)
Dim mapnum
Dim x
Dim y
Dim i
i = GetPlayerClass(index)

mapnum = GetVar("Classes\Class" & i & ".ini", "CLASS", "Map")
y = GetVar("Classes\Class" & i & ".ini", "CLASS", "y")
x = GetVar("Classes\Class" & i & ".ini", "CLASS", "x")

  Call SetPlayerHP(index, 1)
  Call SendHP(index)
End Sub '<- this line

Call PlayerWarp(index, mapnum, x, y)
End Sub
```Take out the first End Sub, and that should fix it.
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...