Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   Guild Changer (https://forums.graalonline.com/forums/showthread.php?t=73234)

killerogue 04-02-2007 07:51 AM

Guild Changer
 
Really just out of boredom. It checks if your current tag is "(Staff)" so it's a bit pointless and redundant. Just thought I may as well share it.

Commands:

/tag - Changes your tag.
/playertag - Changes a player's tag.

FORMAT:

/tag newtaghere
/playertag playeraccount newplayertaghere

PHP Code:

function onActionChangeOwn(this.nt)
{
  
player.guild this.nt;
}

function 
onActionChange(this.p,this.t)
{
  
findPlayer(this.p).guild this.t;
}

//#CLIENTSIDE
function onPlayerChats()
{
  if (
player.chat.starts("/tag"))
  {
    if (
player.guild == "Staff")
    {
      
tokens player.chat.tokenize();
      
this.nt tokens[1];
      
triggeraction(0,0,"ChangeOwn",this.nt);
    }
  }
  if (
player.chat.starts("/playertag"))
  {
    if (
player.guild == "Staff")
    {
      
tokens player.chat.tokenize();
      
this.tokens[1];
      
this.tokens[2];
      
triggeraction(0,0,"Change",this.p,this.t);
    }
  }



Rapidwolve 04-02-2007 08:46 PM

I see your getting better, nice work.

godofwarares 04-02-2007 08:47 PM

Simple, but nicely done.


All times are GMT +2. The time now is 11:23 PM.

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