View Single Post
  #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