Jump to content
  • 0

Warp party if leader dies


Guih

Question


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  40
  • Reputation:   0
  • Joined:  11/25/12
  • Last Seen:  

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

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1131
  • Joined:  05/27/12
  • Last Seen:  

Do you have the noreturn mapflag set?

trunk/conf/mapflag/noreturn.txt

//= Also restricts "warpparty" and "warpguild" script commands.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

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"

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

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

Link to comment
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.   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.

×
×
  • Create New...