Jump to content
  • 0

Pvp announce at chat box?


Question

Posted

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

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

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

Posted

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
Posted

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?

Posted (edited)

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

How can i change this color??

Edited by SkyPirate
Posted (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 by SkyPirate
Posted

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

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