Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-25-2007, 02:36 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
getguildnick(guild, account)

So, does this feature work? I think not.
Working on a basic tag feature, can anyone see why?
HTML Code:
function onPlayerChats()
  {
  if (this.guildowner.index(player.account) == -1) 
    return false;
  temp.playerChat = player.chat.tokenize();
  temp.playerOption = temp.playerChat[0];
  temp.playerParams = player.chat.substring((temp.playerOption.length() + 1)).tokenize();
  switch(temp.playerOption.substring(1))
    {
    case "add":
      this.chat = getguildnick("FAQ", player.account);
      if (getguildnick("FAQ", temp.playerParams[0]) == "") 
        {
        temp.playerAccount = findPlayer(temp.playerParams[0]);
        if (temp.playerAccount.account)
          {
          addguildmember("FAQ", temp.playerParams[0], temp.playerParams[1]);
          this.doMessage({{player.account, format(_("You've added %s [%s]!"), temp.playerParams[0], temp.playerParams[1])},
                          {temp.playerAccount.account, format(_("You've been added to the FAQ Team!\n%s (FAQ)"), temp.playerParams[1])}
                         });
          }
         else
          {
          this.doMessage({{player.account, format(_("%s Isn't online!"),temp.playerParams[0])}});
          } 
        }
       else
        {
        this.doMessage({{player.account, format(_("%s already has a tag! [%s]"), temp.playerParams[0], getguildnick("FAQ", temp.playerParams[0]))}});
        }
    break;
    case "remove":
      if (getguildnick("FAQ", temp.playerParams[0])) 
        {  
          removeguildmember("FAQ", temp.playerParams[0]);
          this.doMessage({{player.account, format(_("You've removed %s!"), temp.playerParams[0])},
                          {temp.playerParams[0], "You've been removed from the FAQ Team!"}
                         });    
        }
       else
        {
        this.doMessage({{player.account, format(_("%s Isn't in the FAQ Team!"),temp.playerParams[0])}});
        }
    break;  
    }
  }
function doMessage(messageData)
  for (temp.currentMessage: temp.messageData)
    findPlayer(temp.currentMessage[0]).sendpm(temp.currentMessage[1]);
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:17 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.