Jump to content

Question

Posted

How can i put a announcer to a specific map? 

Example i added a warp using addwarp script and then once someone will enter the said map will announce that

"<Name> has entered the pvp room!" I tried this script but doesn't work

-	script	-1{
OnPCLoadMapEvent:
	if (strcharinfo(3) == "pvp_arena2")
		mapannounce "pvp_arena2", strcharinfo(0) + " has entered the PVP Arena!",0;
	end;
}
// - Map flags

 

 

13 answers to this question

Recommended Posts

Posted

OnPCLoadMapEvent:

This special label will trigger once a player steps in a map marked with the

'loadevent' mapflag and attach its RID. The fact that this label requires a

mapflag for it to work is because, otherwise, it'd be server-wide and trigger

every time a player would change maps. Imagine the server load with 1,000 players

(oh the pain...)

Add the mapflag 'loadevent' to your map

 

 

or.. you can use a fake warp :

prontera,150,180,6	script	fake_warp	45,2,2,{
	warp "pvp_arena2",0,0;
	mapannounce "pvp_arena2", strcharinfo(0) + " has entered the PVP Arena!",0;
	end;
}
Posted

Capuche said that if you change that in the first line of the announcer script and add the loadevent mapflag to the pvp_arena2 map you can solve your error. The announcer is indeed a script of a NPC. An invisible one, though.

Posted

I did but once i will enter the room. It doesn't do anything.

when the NPC announce the message in that particular map...your character isnt warped to there yet..so he wont saw the messages..

only the players who are currently in that map will saw the messages.

 

in your first post...

you are just missing the loadevent mapflag...

mapname    mapflag    loadevent
Posted

I use this

 

-	script	pvp_ann	-1,{
OnPCLoadMapEvent:
	if (strcharinfo(3) == "pvp_y_1-2")
		announce "pvp_y_1-2", strcharinfo(0) + " has entered the PVP Arena!",0;
	end;
}
// - Map flags
pvp_y_1-2    mapflag    loadevent

 

But dont work. says this is unknow syntax:

pvp_y_1-2 mapflag loadevent

Posted


prontera,150,180,6 script fake_warp 45,2,2,{

warp "pvp_arena2",0,0;

mapannounce "prontera", strcharinfo(0) + " has entered the PVP Arena!",0;

end;

}

  • Upvote 1

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