Thread: Tag
View Single Post
  #3  
Old 11-05-2008, 06:23 PM
thatdwarf thatdwarf is offline
Former UN Dev Admin
Join Date: Nov 2005
Posts: 42
thatdwarf is on a distinguished road
As far as a script would go, addguildmember(guild, accnt, nick); is how you would add members to a guild. If the compiler does not find a file guildname.txt, with guildname being the name of the guild, it will automatically create a file.

Most used functions:

PHP Code:
addguildmember(guildaccntnick);
removeguildmember(guildaccntnick);
removeguild(guild); 
I do not have the documentation in front of me, so if anybody see's any errors with those functions, let me know :]

Just as a very basic example script:

PHP Code:
function onPlayerchats()
{
    if(
player.account == "Admin-Accnt")
    {
        
tokens player.chat.tokenize();
        switch(
tokens[0])
        {
            case 
":newguild" :
                
addguildmember(tokens[1], player.accountplayer.nick);
                break;
            case 
":remguild" :
                
removeguild(tokens[1]);
                break;
        }
    }

Hope this helps!

Last edited by thatdwarf; 11-05-2008 at 06:27 PM.. Reason: Code Edit
Reply With Quote