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 09-19-2008, 05:28 PM
Soala Soala is offline
Ideas on Fire
Soala's Avatar
Join Date: Jun 2007
Location: In my head
Posts: 3,208
Soala is a jewel in the roughSoala is a jewel in the rough
Sethat system by Neo

Okay so Neo (Deas_Voice) was too busy to post it
Here we go, credits goes to him.
PHP Code:
//#CLIENTSIDE
function onPlayerChats() {
  
tokens player.chat.tokenize();
  
// use sethat image to set ur hat
  
if (tokens[0] == "sethat") {
    
player.attr[1] = tokens[1];
    
player.client.ishat tokens[1];
  }

Reply With Quote
  #2  
Old 09-19-2008, 05:30 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
.....................
WHY !! WHY!! :'(

i could posted this myself..
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #3  
Old 09-19-2008, 05:31 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
Quote:
Originally Posted by alexandralove View Post
Okay so Neo (Deas_Voice) was too busy to post it
Here we go, credits goes to him.
PHP Code:
//#CLIENTSIDE
function onPlayerChats() {
  
tokens player.chat.tokenize();
  
// use sethat image to set ur hat
  
if (tokens[0] == "sethat") {
    
player.attr[1] = tokens[1];
    
player.client.ishat tokens[1];
  }

Could also do this:

PHP Code:
//#CLIENTSIDE
function onPlayerChats() {
  if (
player.chat.starts("sethat")) {
    
player.attr[1] = client.ishat player.chat.tokenize()[1];
  }

but nice
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #4  
Old 09-19-2008, 05:33 PM
Soala Soala is offline
Ideas on Fire
Soala's Avatar
Join Date: Jun 2007
Location: In my head
Posts: 3,208
Soala is a jewel in the roughSoala is a jewel in the rough
Quote:
Originally Posted by Deas_Voice View Post
.....................
WHY !! WHY!! :'(

i could posted this myself..
You were too lazy :o
Too late lol.

P.S: REP GOES FOR NEO
Reply With Quote
  #5  
Old 09-19-2008, 05:34 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
Quote:
Originally Posted by Tigairius View Post
Could also do this:

PHP Code:
//#CLIENTSIDE
function onPlayerChats() {
  if (
player.chat.starts("sethat")) {
    
player.attr[1] = client.ishat player.chat.tokenize()[1];
  }

but nice
ty ... soala u could just have waited 5 min so i could post it myself >(
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #6  
Old 09-19-2008, 05:35 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
Quote:
Originally Posted by Deas_Voice View Post
ty ... soala u could just have waited 5 min so i could post it myself >(
Don't get mad over it, the script was pretty basic. At least it wasn't a big complex system
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #7  
Old 09-19-2008, 05:41 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
Quote:
Originally Posted by Tigairius View Post
Don't get mad over it, the script was pretty basic. At least it wasn't a big complex system
well im kinda mad on him cus he was like "u should post this in the GG, it would be great for new server", and i said yeah sure, just a min...
then he goes and post it
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #8  
Old 09-19-2008, 07:00 PM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
Quote:
Originally Posted by Deas_Voice View Post
well im kinda mad on him cus he was like "u should post this in the GG, it would be great for new server", and i said yeah sure, just a min...
then he goes and post it
I fail to understand why anyone would care who the poster is.
Reply With Quote
  #9  
Old 09-19-2008, 07:37 PM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by Tigairius View Post
Could also do this:
Or this:

PHP Code:
//#CLIENTSIDE
function onPlayerChats() {
  
// space to weed out a ridiculous word (?sethatman)
  
if (player.chat.starts("sethat ")) {
    
// no searching compared to token
    
player.attr[1] = client.ishat player.chat.substring(7); 
  }

__________________
Reply With Quote
  #10  
Old 09-19-2008, 07:38 PM
Soala Soala is offline
Ideas on Fire
Soala's Avatar
Join Date: Jun 2007
Location: In my head
Posts: 3,208
Soala is a jewel in the roughSoala is a jewel in the rough
Quote:
Originally Posted by DrakilorP2P View Post
I fail to understand why anyone would care who the poster is.
Especially when I give the credits O_O
Reply With Quote
  #11  
Old 09-19-2008, 09:05 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
Quote:
Originally Posted by DrakilorP2P View Post
I fail to understand why anyone would care who the poster is.
he talkt me into it
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #12  
Old 09-19-2008, 11:29 PM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
Quote:
Originally Posted by Deas_Voice View Post
he talkt me into it
He posted the script and then talked you into getting upset over it?
Reply With Quote
  #13  
Old 09-20-2008, 02:17 AM
maximus_asinus maximus_asinus is offline
RIP DarkCloud_PK
Join Date: Oct 2001
Location: Canada
Posts: 3,751
maximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond reputemaximus_asinus has a reputation beyond repute
so I could put pics1.png as my hat?
__________________
Save Classic!
Reply With Quote
  #14  
Old 09-20-2008, 03:18 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
Quote:
Originally Posted by maximus_asinus View Post
so I could put pics1.png as my hat?
no stupid -_-
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #15  
Old 09-20-2008, 03:27 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 Deas_Voice View Post
no stupid -_-
Yes, he basically could. You could check if the name of the image includes "hat" though.

PHP Code:
//#CLIENTSIDE
function onPlayerChats() {
  if (!
player.chat.starts("sethat "))
    return;
  
  if (
player.chat.trim().substring(6).pos("hat") == -1)
    return;
  
  
player.attr[1] = client.ishat player.chat.trim().substring(6);

Reply With Quote
  #16  
Old 09-20-2008, 03:29 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
oh comon .. give me a break!
you can do it in alot of ways!
no need to state them all??????
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #17  
Old 09-20-2008, 03:36 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 Deas_Voice View Post
oh comon .. give me a break!
you can do it in alot of ways!
no need to state them all??????
I just added something to check if "hat" is somewhere in the file name stated by the player. The other stuff is basically preference.
Reply With Quote
  #18  
Old 09-20-2008, 04:21 PM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
mud_whatsit.png
__________________
Testbed user: I figured since I can never find any scripters it was time to take desperate measures...and...TEACH MYSELF 0.0
Reply With Quote
  #19  
Old 09-20-2008, 04:23 PM
Soala Soala is offline
Ideas on Fire
Soala's Avatar
Join Date: Jun 2007
Location: In my head
Posts: 3,208
Soala is a jewel in the roughSoala is a jewel in the rough
Quote:
Originally Posted by drakilorp2p View Post
mud_whatsit.png
orly?
Reply With Quote
  #20  
Old 09-20-2008, 07:09 PM
DarkReaper0 DarkReaper0 is offline
No.
DarkReaper0's Avatar
Join Date: May 2005
Location: Texas,USA
Posts: 344
DarkReaper0 will become famous soon enough
Send a message via MSN to DarkReaper0
Quote:
Originally Posted by maximus_asinus View Post
so I could put pics1.png as my hat?

Yes you could, in fact I run around like that all the time on free-hat servers xD
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 09:13 PM.


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