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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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