Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   Tag Adder Thing (https://forums.graalonline.com/forums/showthread.php?t=78978)

mYg0tHaMpStEr 03-09-2008 07:03 PM

Tag Adder Thing
 
Hey,

This is my FIRST ever script (other than an AFK System), and what it does is adds account tags, like (Manager) ect. It can be account locked or whatever, so do as you please. :] (I currently use it as the ET Adder on Utopia. :D)

HTML Code:

//Made by Ork
//Released to the public on 3/9/08
function onActionServerSide( cmd, 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() > 0 )
{
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() > 0 )
{
temp.pl.guild = "";
temp.pl.clientr.iset = false;
temp.pl.clientr.ettag = "";
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 onKeyPressed( code, key )
{
if ( key == 5 )
  {
    triggerserver("gui",name,"tag");
  }
}
function onPlayerChats() {
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] ) ;
    }
    }

I can bet you any amount of money Chris will flame me for this. ^^

Crow 03-09-2008 08:09 PM

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:

Tigairius 03-09-2008 08:39 PM

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] ) ;
  }



cbk1994 03-09-2008 08:59 PM

Quote:

Originally Posted by mYg0tHaMpStEr (Post 1378579)
I can bet you any amount of money Chris will flame me for this. ^^

Sure.

First, half of that is my code.

Second, most of it isn't formatted, and what is is pretty messy.

Third, use PHP tags.

Fourth, I already made you one of these ;)

Fifth, doing checking account names (would have to change script majorly instead of a simple var etc)

I could go on if you like ...

Still, nice script I guess, except that half of it is mine.

mYg0tHaMpStEr 03-09-2008 10:47 PM

Quote:

Originally Posted by Crow (Post 1378601)
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:

Formatting is *** ass, to me. If it works, it's good enough.

Quote:

Originally Posted by cbkbud (Post 1378616)
Sure.

First, half of that is my code.

Second, most of it isn't formatted, and what is is pretty messy.

Third, use PHP tags.

Fourth, I already made you one of these ;)

Fifth, doing checking account names (would have to change script majorly instead of a simple var etc)

I could go on if you like ...

Still, nice script I guess, except that half of it is mine.

:P I appreciate the "Still, nice script I guess.." Part. I like HTML Tags better, but whatever.

I did copy/paste some things (very top rofl).

But like I said, if it works, it's good enough for me. :]

Oh yeah, I forgot to mention: This is the thing I wanted help on but you had to be a ****. ;D

Crow 03-09-2008 11:24 PM

Quote:

Originally Posted by mYg0tHaMpStEr (Post 1378646)
Formatting is *** ass, to me. If it works, it's good enough.

You are not going to become a coder.

mYg0tHaMpStEr 03-09-2008 11:57 PM

Quote:

Originally Posted by Crow (Post 1378652)
You are not going to become a coder.

I never said I plan to.

cbk1994 03-10-2008 12:26 AM

Quote:

Originally Posted by Crow (Post 1378652)
You are not going to become a coder.

I already told him that. based on his attitude, when he told me he wanted to become one. :)

bscharff 06-11-2008 01:22 AM

owned

Chompy 06-11-2008 02:22 PM

Uhm? Why did you have to revive yet another thread? ;O

Even worse, with a post with no sense and no feedback or anything related to the thread..

I suggest you read the 'How to bump a thread' book :D

cbk1994 06-11-2008 02:46 PM

Quote:

Originally Posted by Chompy (Post 1396355)
Uhm? Why did you have to revive yet another thread? ;O

Even worse, with a post with no sense and no feedback or anything related to the thread..

I suggest you read the 'How to bump a thread' book :D

:confused:

http://img180.imageshack.us/img180/9193/nobumphd7.png

mYg0tHaMpStEr 06-11-2008 02:51 PM

Quote:

Originally Posted by bscharff (Post 1396289)
owned

Cry kid. That script is better than half of your ****.

cbk1994 06-11-2008 02:55 PM

Quote:

Originally Posted by mYg0tHaMpStEr (Post 1396368)
Cry kid. That script is better than half of your ****.

What do you mean, his ****?

That **** was stolen.

mYg0tHaMpStEr 06-11-2008 02:56 PM

Quote:

Originally Posted by cbk1994 (Post 1396370)
What do you mean, his ****?

That **** was stolen.

oh yeah. damnit.

bscharff 03-14-2009 09:18 PM

Sorry, my mom's trying to take me off of my meds.
I'll delete that.


All times are GMT +2. The time now is 04:12 PM.

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