Hercules Posted August 27, 2012 Posted August 27, 2012 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.... Quote
goddameit Posted August 27, 2012 Posted August 27, 2012 (edited) on chat or announce? Edited August 27, 2012 by goddameit Quote
Hercules Posted August 28, 2012 Author Posted August 28, 2012 on chat or announce? at the chat box of each players online... not announce.. Quote
Emistry Posted August 28, 2012 Posted August 28, 2012 - script Sample -1,{ OnPCKillEvent: if( killedrid != getcharid(3) ) globalmes "[ "+strcharinfo(0)+" ] killed [ "+rid2name(killedrid)+" ] "; end; } Quote
kyeme Posted August 28, 2012 Posted August 28, 2012 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. Quote
kyeme Posted August 28, 2012 Posted August 28, 2012 Ohh I See, but we don't have commands like 'globalmes' that will announce only in chat box? Quote
Emistry Posted August 28, 2012 Posted August 28, 2012 *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. Quote
Euphy Posted August 28, 2012 Posted August 28, 2012 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. 1 Quote
Hercules Posted August 29, 2012 Author Posted August 29, 2012 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? Quote
Hercules Posted August 29, 2012 Author Posted August 29, 2012 (edited) - script Sample -1,{ OnPCKillEvent: if( killedrid != getcharid(3) ) globalmes "[ "+strcharinfo(0)+" ] killed [ "+rid2name(killedrid)+" ] "; end; } How can i change this color?? Edited August 29, 2012 by SkyPirate Quote
Emistry Posted August 29, 2012 Posted August 29, 2012 it's hexed in client....you have to hex your client to change the colour.... Quote
Hercules Posted August 29, 2012 Author Posted August 29, 2012 (edited) 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 August 29, 2012 by SkyPirate Quote
Euphy Posted August 29, 2012 Posted August 29, 2012 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. Quote
Hercules Posted August 30, 2012 Author Posted August 30, 2012 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.. Quote
Emistry Posted August 30, 2012 Posted August 30, 2012 cant.....globelmes will send to all users....you cant limit who it send without any source mod ...... Quote
Hercules Posted August 30, 2012 Author Posted August 30, 2012 cant.....globelmes will send to all users....you cant limit who it send without any source mod ...... Awww... Too bad, Anyway !! Quote
Question
Hercules
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....
20 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.