Jump to content
  • 0

Help how to add broadcast in pvp warper


jpnazar

Question


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  170
  • Reputation:   1
  • Joined:  03/26/13
  • Last Seen:  

how to add announcement when you enter the pvp room like "PLAYER" Entered PVP ROOM ?

here is the script

//PVPROOM
//PVP WARPER
prontera,165,177,3	script	PVP Warper	106,{
function Go; function Disp; function Pick;
// ------------------- Functions -------------------
// * Go("<map>",<x>,<y>);
//	~ Warps directly to a map.
// * Disp("<Menu Option>",<first option>,<last option>);
// * Pick("<map_prefix>"{,<index offset>});
//	~ Dynamic menu and map selection.
// * Disp("","<Option 1>:<Option 2>:<etc.>");
// * Pick("","<map1>","<map2>","<etc.>");
//	~ Manual menu and map selection.
//
// Other notes:
//   ~ Array @c[] holds all (x,y) coordinates.
//   ~ Use @c[2] EXCEPT when maps begin dynamically
//	  at 0: use @c[0] and Pick() offset 1.
// --------------------------------------------------

function Go {
	warp getarg(0),getarg(1,0),getarg(2,0);
	getmapxy(lastwarp$,lastwarpx,lastwarpy,0);
	close; }
function Disp {
	set @menu$,"";
	if(getarg(0)=="") {
		set @menu$,getarg(1);
		return; }
	for(set .@i,getarg(1); .@i<=getarg(2); set .@i,.@i+1)
		set @menu$, @menu$+getarg(0)+" "+.@i+":";
	return; }
function Pick {
	if(getarg(0)=="") {
		set .@i, select(@menu$);
		warp getarg(.@i),@c[.@i*2],@c[.@i*2+1]; }
	else {
		set .@i, select(@menu$)-getarg(1,0);
		warp getarg(0)+((.@i<10)?"0":"")+.@i,@c[.@i*2],@c[.@i*2+1]; }
	getmapxy(lastwarp$,lastwarpx,lastwarpy,0);
	close; }

// --------------------------------------------------
	PVP:
// --------------------------------------------------
menu	"Warp Me",T1;

T1: Go("pvp_y_1-2");
}

 

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

Put this code after getmapxy(lastwarp$,lastwarpx,lastwarpy,0) on Go Function :

 

announce strcharinfo(0)+ " entered " +getarg(0)+ ".",0;
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  170
  • Reputation:   1
  • Joined:  03/26/13
  • Last Seen:  

nothing happens

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

nothing happens

Tried on my test server and it works o.O

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...