Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-09-2008, 07:03 PM
mYg0tHaMpStEr mYg0tHaMpStEr is offline
Never trust anyone.
mYg0tHaMpStEr's Avatar
Join Date: Jul 2006
Location: Mars
Posts: 98
mYg0tHaMpStEr is on a distinguished road
Send a message via AIM to mYg0tHaMpStEr Send a message via MSN to mYg0tHaMpStEr
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. )

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.
__________________
Quote:
Originally Posted by Utopia RC Chat
lesmA: it's a good thing i can count to 10 now using gscript, you know, in case i forget how irl
Quote:
Originally Posted by Utopia RC Chat
lesmA: woo now i can make it count to 10 over 10 seconds!
lesmA: WATCH OUT SKYLD, HERE COME'S LESMA THE NEW SUPER-SCRIPTER!!!
Ork: ROFL
Ork: ANOTHER BRILLIANT FORUM SIG QUOTE
lesmA: oh god i should just stop talking before i make a fool of myself
Reply With Quote
  #2  
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
  #3  
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
  #4  
Old 03-09-2008, 08:59 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by mYg0tHaMpStEr View Post
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.
__________________
Reply With Quote
  #5  
Old 03-09-2008, 10:47 PM
mYg0tHaMpStEr mYg0tHaMpStEr is offline
Never trust anyone.
mYg0tHaMpStEr's Avatar
Join Date: Jul 2006
Location: Mars
Posts: 98
mYg0tHaMpStEr is on a distinguished road
Send a message via AIM to mYg0tHaMpStEr Send a message via MSN to mYg0tHaMpStEr
Quote:
Originally Posted by Crow View Post
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 View Post
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
__________________
Quote:
Originally Posted by Utopia RC Chat
lesmA: it's a good thing i can count to 10 now using gscript, you know, in case i forget how irl
Quote:
Originally Posted by Utopia RC Chat
lesmA: woo now i can make it count to 10 over 10 seconds!
lesmA: WATCH OUT SKYLD, HERE COME'S LESMA THE NEW SUPER-SCRIPTER!!!
Ork: ROFL
Ork: ANOTHER BRILLIANT FORUM SIG QUOTE
lesmA: oh god i should just stop talking before i make a fool of myself
Reply With Quote
  #6  
Old 03-09-2008, 11:24 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
Quote:
Originally Posted by mYg0tHaMpStEr View Post
Formatting is *** ass, to me. If it works, it's good enough.
You are not going to become a coder.
__________________
Reply With Quote
  #7  
Old 03-09-2008, 11:57 PM
mYg0tHaMpStEr mYg0tHaMpStEr is offline
Never trust anyone.
mYg0tHaMpStEr's Avatar
Join Date: Jul 2006
Location: Mars
Posts: 98
mYg0tHaMpStEr is on a distinguished road
Send a message via AIM to mYg0tHaMpStEr Send a message via MSN to mYg0tHaMpStEr
Quote:
Originally Posted by Crow View Post
You are not going to become a coder.
I never said I plan to.
__________________
Quote:
Originally Posted by Utopia RC Chat
lesmA: it's a good thing i can count to 10 now using gscript, you know, in case i forget how irl
Quote:
Originally Posted by Utopia RC Chat
lesmA: woo now i can make it count to 10 over 10 seconds!
lesmA: WATCH OUT SKYLD, HERE COME'S LESMA THE NEW SUPER-SCRIPTER!!!
Ork: ROFL
Ork: ANOTHER BRILLIANT FORUM SIG QUOTE
lesmA: oh god i should just stop talking before i make a fool of myself
Reply With Quote
  #8  
Old 03-10-2008, 12:26 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Crow View Post
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.
__________________
Reply With Quote
  #9  
Old 06-11-2008, 01:22 AM
bscharff bscharff is offline
Bloo
bscharff's Avatar
Join Date: Sep 2006
Location: San Antonio, Texas
Posts: 185
bscharff has a little shameless behaviour in the past
Send a message via AIM to bscharff Send a message via MSN to bscharff Send a message via Yahoo to bscharff
owned
__________________
Trying to be nice now...
Reply With Quote
  #10  
Old 06-11-2008, 02:22 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
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
__________________
Reply With Quote
  #11  
Old 06-11-2008, 02:46 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Chompy View Post
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


__________________
Reply With Quote
  #12  
Old 06-11-2008, 02:51 PM
mYg0tHaMpStEr mYg0tHaMpStEr is offline
Never trust anyone.
mYg0tHaMpStEr's Avatar
Join Date: Jul 2006
Location: Mars
Posts: 98
mYg0tHaMpStEr is on a distinguished road
Send a message via AIM to mYg0tHaMpStEr Send a message via MSN to mYg0tHaMpStEr
Quote:
Originally Posted by bscharff View Post
owned
Cry kid. That script is better than half of your ****.
__________________
Quote:
Originally Posted by Utopia RC Chat
lesmA: it's a good thing i can count to 10 now using gscript, you know, in case i forget how irl
Quote:
Originally Posted by Utopia RC Chat
lesmA: woo now i can make it count to 10 over 10 seconds!
lesmA: WATCH OUT SKYLD, HERE COME'S LESMA THE NEW SUPER-SCRIPTER!!!
Ork: ROFL
Ork: ANOTHER BRILLIANT FORUM SIG QUOTE
lesmA: oh god i should just stop talking before i make a fool of myself
Reply With Quote
  #13  
Old 06-11-2008, 02:55 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by mYg0tHaMpStEr View Post
Cry kid. That script is better than half of your ****.
What do you mean, his ****?

That **** was stolen.
__________________
Reply With Quote
  #14  
Old 06-11-2008, 02:56 PM
mYg0tHaMpStEr mYg0tHaMpStEr is offline
Never trust anyone.
mYg0tHaMpStEr's Avatar
Join Date: Jul 2006
Location: Mars
Posts: 98
mYg0tHaMpStEr is on a distinguished road
Send a message via AIM to mYg0tHaMpStEr Send a message via MSN to mYg0tHaMpStEr
Quote:
Originally Posted by cbk1994 View Post
What do you mean, his ****?

That **** was stolen.
oh yeah. damnit.
__________________
Quote:
Originally Posted by Utopia RC Chat
lesmA: it's a good thing i can count to 10 now using gscript, you know, in case i forget how irl
Quote:
Originally Posted by Utopia RC Chat
lesmA: woo now i can make it count to 10 over 10 seconds!
lesmA: WATCH OUT SKYLD, HERE COME'S LESMA THE NEW SUPER-SCRIPTER!!!
Ork: ROFL
Ork: ANOTHER BRILLIANT FORUM SIG QUOTE
lesmA: oh god i should just stop talking before i make a fool of myself
Reply With Quote
  #15  
Old 03-14-2009, 09:18 PM
bscharff bscharff is offline
Bloo
bscharff's Avatar
Join Date: Sep 2006
Location: San Antonio, Texas
Posts: 185
bscharff has a little shameless behaviour in the past
Send a message via AIM to bscharff Send a message via MSN to bscharff Send a message via Yahoo to bscharff
Sorry, my mom's trying to take me off of my meds.
I'll delete that.
__________________
Trying to be nice now...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 01:47 PM.


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