Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(isPackage(CopyCat))
- deactivatePackage(CopyCat);
- package Copycat
- {
- function CopyCat()
- {
- return new scriptObject()
- {
- class = CopyCat;
- enabled = false;
- victim = "";
- lastMessage = "";
- };
- }
- function CopyCat::HandleMessage(%this, %sender, %message)
- {
- if(!%this.enabled) return;
- if(%sender $= %this.victim)
- {
- if(%this.lastMessage !$= %message)
- {
- commandToServer('messageSent', %message);
- }
- %this.lastMessage = %message;
- }
- }
- //Words are saved to file. Update the file when these next two methods are called
- function CopyCat::AddGoodWord(%this, %word)
- {
- }
- function CopyCat::AddBadWord(%this, %word)
- {
- }
- function clientCmdChatMessage(%sender, %voice, %pitch, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10)
- {
- parent::clientCmdChatMessage(%sender, %voice, %pitch, %msgString, %a1, %a2, %a3, %a4, %a5, %a6, %a7, %a8, %a9, %a10);
- $CopyCat.HandleMessage(%a2, %a4);
- }
- //function test()
- //{
- // if(strPos($chat, "Entity"))
- // {
- // echo("ok");
- // }
- //}
- };
- activatePackage(CopyCat);
- $CopyCat = CopyCat();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement