Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-09-2008, 08:09 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
I will for sure. You can almost clearly see that parts of it arent your code. The upper part is not formatted at all, you can't really read that. The bottom part is formatted, but its done extremely weird D:
Reply With Quote
  #2  
Old 03-09-2008, 08:39 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
You aren't declaring "tokens," you're just doing "player.chat.tokenize()" and Gscript2 doesn't work like that.
Comparing things should be done using "==" instead of "=" because "=" is used for declaration.
(Sorry, just used editor to style it because I didn't feel like uploading on a server.)
PHP Code:
//Made by Ork
//Released to the public on 3/9/08
function onActionServerSidecmd, var, var2 ){
  switch( 
cmd ) {
    case 
"tag":
    if (
clientr.iset == false ){
      
player.chat "I'm not an ET!";
      return;
    }else{
      
player.nick clientr.ettag;
      
player.chat "Tag on!";
      break;
      case 
"hire":
      if (
player.account == "emeraldwhelpling") {
        
temp.pl findplayer( var );
        if ( 
temp.pl.level.length() > ) {
          
temp.pl.clientr.iset true;
          
temp.pl.clientr.ettag var2;
          
temp.pl.chat "I was added to the Events Team by "@player.account@"";
          
player.chat "I've added "@temp.pl.account@" to the Events Team!";
          break;
          case 
"fire":
          if (
player.account "emeraldwhelpling") {
            
temp.pl findplayer( var );
            if ( 
temp.pl.level.length() > ) {
              
temp.pl.guild temp.pl.clientr.ettag "";
              
temp.pl.clientr.iset false;
              
temp.pl.chat "I was fired from ET by "@player.account@"!";
              
player.chat "I've removed "@temp.pl.account@" from the Events Team!";
              
            }
          }
        }
      }
    }
  }
}
//#CLIENTSIDE
function onKeyPressedcodekey ) {
  if ( 
key == ) {
    
triggerserver("gui",name,"tag");
  }
}
function 
onPlayerChats() {
  
temp.tokens player.chat.tokenize();
  if ( 
tokens[0] == "/hire" ) {
    
triggerserver"weapon"name"hire"tokens[1], tokens[2] );
  }
  if ( 
tokens[0] == "/fire" ) {
    
triggerserver"weapon"name"fire"tokens[1] ) ;
  }

__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
Reply


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 02:32 PM.


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