Jump to content
  • 0

Warp party if leader dies


Question

Posted

Hello everyone!

I don't know alot about scripting, but I have a NPC made by a friend.

What I need is that If the leader of the party dies, warp the whole party (if this party is in the map "1@synav") to Prontera.

So I came up with this npc:

- script quit_pt -1,{
OnPcDieEvent:
 if(strcharinfo(3) == "1@synav" && getcharid(0) == getpartyleader(getcharid(1),2))
  warpparty "prontera",150,150,getcharid(1);
end;
}

But it did not work :(

Does anyone know what's the problem with it?

Thanks /no1

3 answers to this question

Recommended Posts

Posted

What I need is that If the leader of the party dies, warp the whole party (if this party is in the map "1@synav") to Prontera.

If you use instancing system, the map name "1@synav" become "0011@synav"

Posted
If you use instancing system, the map name "1@synav" become "0011@synav"

In that case, you could use compare:

-	script	quit_pt	-1,{
OnPcDieEvent:
if (compare(strcharinfo(3),"1@synav") && getcharid(0) == getpartyleader(getcharid(1),2))
	warpparty "prontera",150,150,getcharid(1);
end;
}

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.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...