Shoot Rune when messaged

Here is the most(?) wanted script for war.
Shoot Rune if MSG.
Ok let me explain.Lets say all your guild is using this script.
Now one of the guild members will say 'kill Mooki' , then all the ppl
who run the script will shoot the selected rune at Mooki.
this is better than Attack Combo cuz you wont just shoot sds everytime the ledear attacks.You can set any key word that you like.

const
MinHp=400;//the script wont shoot if your hp is under this amount.(anti exhusted for uhing)  
Leader='Party';// 'Party'=if player from your party says keyWord..  
               //'PlayerName'=if X player says keyWord..  
               //'0'=if any player says KeyWord.  
KeyWord='attack'; // set the key word here...  
RuneID=3285; // Rune ID to shooton the target  
function GetCreatureByName(Name: string): TCreature;  
var  
  x: integer;  
begin  
  Result := nil;  
  for x := 0 to Creatures.Count - 1 do  
  begin  
    if x >= Creatures.Count then Break;  
    if Creatures.Creature[x].Name = Name then  
    begin  
      Result := Creatures.Creature[x];  
      Exit;  
    end;  
  end;  
end;  
procedure Attack(Name:string);  
var  
   Player:TCreature;  
   x:integer;  
begin  
updateworld;  
Player:=GetCreatureByName(Name);  
if player<> nil then
if Self.Health>MinHp then  
begin  
Self.Containers.UseItemWithCreature(RuneID, Player);  
updateworld;  
end  
else self.DisplayText('Player '+Name+ ' was not found');  
end;  

procedure Event_Message(Channel: integer; Name, Text: String);  
var  
b,Target:string;  
OK:boolean;  
begin  
OK:=False;  
updateworld;  
Case Leader of  

'Party':begin  
       Creature:=GetCreatureByName(Name); 
       if Creature<>nil then  
       if Creature.PartyMember=true then OK:=true; end;  
'0':begin OK:=true; end;  

Name:begin OK:=true; end;  
end;  
if OK then  
  begin  
  updateworld;  
  b:=Text;  
  if Pos(KeyWord, b)<>0 then  
       begin  
       Delete(b, 1, length(KeyWord)+1);  
       Target:=b;  
       Attack(Target);  
       end;  
  end;  
OK:=false;  
end;  

begin  
while not terminated do  
begin  
processEvents;  
sleep(100);  
end;  
end;
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License