Jump to content
  • 0

Pvp announce at chat box?


Hercules

Question


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  104
  • Reputation:   1
  • Joined:  05/04/12
  • Last Seen:  

A script that every time a player kills on a pvp map,All players online will receive a message on their chat box that displays,

[Killer] killed [Victim]!!

And they can disable it and enable it on a npc..

Anybody can?? Please help....

Link to comment
Share on other sites

20 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

on chat or announce?

Edited by goddameit
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  164
  • Reputation:   12
  • Joined:  03/08/12
  • Last Seen:  

He's saying I think in chatbox only.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  104
  • Reputation:   1
  • Joined:  05/04/12
  • Last Seen:  

on chat or announce?

at the chat box of each players online...

not announce../swt

Link to comment
Share on other sites


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

- script Sample -1,{
OnPCKillEvent:
if( killedrid != getcharid(3) )
globalmes "[ "+strcharinfo(0)+" ] killed [ "+rid2name(killedrid)+" ] ";
end;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  164
  • Reputation:   12
  • Joined:  03/08/12
  • Last Seen:  

Sir Emistry how to set up this message in pvp map only.. for example all players in izlude map only will receive this message or global msg. :)

Link to comment
Share on other sites


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

mapannounce "Mapname","Message",0;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  164
  • Reputation:   12
  • Joined:  03/08/12
  • Last Seen:  

Ohh I See, but we don't have commands like 'globalmes' that will announce only in chat box? :)

Link to comment
Share on other sites


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

*globalmes "<message>"{,"<NPC name>"};

This command will send a message to the chat window of all currently connected
characters.

If NPC name is specified, the message will be sent as if the sender would be
the NPC with the said name.

Link to comment
Share on other sites


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

OnPCKillEvent:
   if (getcharid(3) == killedrid) end;
   setarray .@n$[0],strcharinfo(0),rid2name(killedrid);
   detachrid;
   set .@pvpmap$,"prontera"; // PVP map
   query_sql("SELECT account_id FROM `char` WHERE `last_map` = '"+.@pvpmap$+"' AND online=1;",.@aid);
   for(set .@i,0; .@i<getarraysize(.@aid); set .@i,.@i+1)
       if (attachrid(.@aid[.@i])) {
           dispbottom .@n$[0]+" has killed "+.@n$[1]+"!";
           detachrid;
       }
   end;

`last_map` doesn't get requeried immediately, though.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  164
  • Reputation:   12
  • Joined:  03/08/12
  • Last Seen:  

Thanks Sir Euphy. :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  104
  • Reputation:   1
  • Joined:  05/04/12
  • Last Seen:  

OnPCKillEvent:
if (getcharid(3) == killedrid) end;
setarray .@n$[0],strcharinfo(0),rid2name(killedrid);
detachrid;
set .@pvpmap$,"prontera"; // PVP map
query_sql("SELECT account_id FROM `char` WHERE `last_map` = '"+.@pvpmap$+"' AND online=1;",.@aid);
for(set .@i,0; .@i<getarraysize(.@aid); set .@i,.@i+1)
	if (attachrid(.@aid[.@i])) {
		dispbottom .@n$[0]+" has killed "+.@n$[1]+"!";
		detachrid;
	}
end;

`last_map` doesn't get requeried immediately, though.

Does it work on a TXT server?

Link to comment
Share on other sites


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

no....it contain SQL statements

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  104
  • Reputation:   1
  • Joined:  05/04/12
  • Last Seen:  

- script Sample -1,{
OnPCKillEvent:
if( killedrid != getcharid(3) )
globalmes "[ "+strcharinfo(0)+" ] killed [ "+rid2name(killedrid)+" ] ";
end;
}

How can i change this color??

Edited by SkyPirate
Link to comment
Share on other sites


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

it's hexed in client....you have to hex your client to change the colour....

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  104
  • Reputation:   1
  • Joined:  05/04/12
  • Last Seen:  

it's hexed in client....you have to hex your client to change the colour....

Why this script doesn't work?

- script Sample -1,{
OnPCKillEvent:
if( killedrid != getcharid(3) )
globalmes "[ "+strcharinfo(0)+" ] has slained [ "+rid2name(killedrid)+" ] !! ";
end;
}

bat_c01	mapflag	loadevent

And how can i disable it by using an npc?

Edited by SkyPirate
Link to comment
Share on other sites


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

didnt work ??? /hum

32LCs.png

.

Link to comment
Share on other sites


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

Why this script doesn't work?

And how can i disable it by using an npc?

1: Tabs in header and mapflag.

2: enablenpc / disablenpc.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  104
  • Reputation:   1
  • Joined:  05/04/12
  • Last Seen:  

Why this script doesn't work?

And how can i disable it by using an npc?

1: Tabs in header and mapflag.

2: enablenpc / disablenpc.

I mean that the player can disable it via npc to disable the message pops out to their chat box only the player that disable it to npc does not get the message..

Link to comment
Share on other sites


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

cant.....globelmes will send to all users....you cant limit who it send without any source mod ......

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  104
  • Reputation:   1
  • Joined:  05/04/12
  • Last Seen:  

cant.....globelmes will send to all users....you cant limit who it send without any source mod ......

Awww... Too bad,

Anyway /thx!!

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