bWolfie 139 Posted July 4, 2016 Hello, I'm trying to make a script where: - When player dies on X map, is warped to Y map. - When player is warped to Y location, player is revived. This is what I have so far, but I can't get the player to revive after moving map. - script ondeath FAKE_NPC,{ OnPCDieEvent: if (strcharinfo(3) == "prontera") { warp "prontera",150,150,0; atcommand "@raise"; } end; } Quote Share this post Link to post Share on other sites
0 Ridley 295 Posted July 4, 2016 (edited) OnPCDieEvent: if(.active == 1) { getmapxy(@mapname$,@mapx,@mapy,0); if(@mapname$ == .map$) { message strcharinfo(0),"AUTO REVIVING IN 5 SECONDS"; sleep2 5000; atcommand "@alive"; warp .map$,.mapx,.mapy; end; } else { end; } } else { end; } use the command before the warp, (warp detaches the player) example above is how i did it in the autores command http://herc.ws/board/files/file/240-autores-auto-resurrection/ Edited July 4, 2016 by Ridley Quote Share this post Link to post Share on other sites
0 bWolfie 139 Posted July 4, 2016 Thanks Ridley, it worked, and in world record time! Quote Share this post Link to post Share on other sites
Hello,
I'm trying to make a script where:
- When player dies on X map, is warped to Y map.
- When player is warped to Y location, player is revived.
This is what I have so far, but I can't get the player to revive after moving map.
Share this post
Link to post
Share on other sites