Add the parts inside of /* */ in to a level, and then name the class 'tagadder' and it'll work!
HTML Code:
/*
function onCreated()
{
this.curGuild = "Guild Name";
this.guildOwner = "Owner's account";
this.join("tagadder");
}
*/
function onPlayerChats()
{
if (this.curGuild == "")
{
return false;
}
if (player.account != this.guildOwner)
{
return false;
}
temp.curTokens = player.chat.tokenize();
switch(temp.curTokens[0])
{
case ":addMember":
this.curPlayer = this.findCurPlayer(temp.curTokens[1]);
if (!this.curPlayer)
{
return false;
}
addguildmember(this.curGuild, temp.curTokens[1], temp.curTokens[2]);
say2("Added" SPC temp.curTokens[1] @ "(" @ temp.curTokens[2] @ ")!");
break;
case ":removeMember":
removeguildmember(this.curGuild, temp.curTokens[1]);
say2("Removed" SPC temp.curTokens[1]);
break;
case ":help":
say2(":addMember ''account'' ''nickname'' \n:removeMember ''account''");
break;
}
}
function findCurPlayer(newMember)
{
if (findplayer(temp.newMember) == NULL)
{
return false;
}
return true;
}