Jump to content
  • 0

Map Announce


Ninjamon

Question


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  295
  • Reputation:   2
  • Joined:  03/06/12
  • Last Seen:  

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

 

 

Link to comment
Share on other sites

13 answers to this question

Recommended Posts


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

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;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  295
  • Reputation:   2
  • Joined:  03/06/12
  • Last Seen:  

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

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:  

-	script	-1{

Miss some part

-	script	pvp_ann	-1,{
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  295
  • Reputation:   2
  • Joined:  03/06/12
  • Last Seen:  

-	script	-1{

Miss some part

-	script	pvp_ann	-1,{

What is this for? Btw this is a warp. not a npc

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  182
  • Reputation:   36
  • Joined:  01/26/12
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  295
  • Reputation:   2
  • Joined:  03/06/12
  • Last Seen:  

How about global broadcast?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

How about global broadcast?

change mapannounce to announce

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  130
  • Topics Per Day:  0.03
  • Content Count:  528
  • Reputation:   18
  • Joined:  09/11/12
  • Last Seen:  

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

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:  


pvp_y_1-2%tab%mapflag%tab%loadevent

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  130
  • Topics Per Day:  0.03
  • Content Count:  528
  • Reputation:   18
  • Joined:  09/11/12
  • Last Seen:  

Now it works. But the message only shown at the PVP map not at the Map from where you warped...

 

using mapannounce.

Edited by King555
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  


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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  130
  • Topics Per Day:  0.03
  • Content Count:  528
  • Reputation:   18
  • Joined:  09/11/12
  • Last Seen:  

ok thanks :)

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