Jump to content
  • 0
Sign in to follow this  
bWolfie

Command to raise character + OnPCDieEvent

Question

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;
}

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

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 by Ridley

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.