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 06-20-2012, 06:29 PM
E_Man E_Man is offline
E-Man
E_Man's Avatar
Join Date: Jun 2012
Posts: 81
E_Man will become famous soon enough
Offline GS1 Commands

Just in case anyone wants to change their head with sethead or hat with sethat like on a server but in graal editor, here is a script you can use that has the same commands.

Quote:
if (created) {
hide;
toweapons Commands;
}
if (playerchats&&startswith(sethead,#c)) {
tokenize #c;
if (tokenscount==2) sethead #t(1);
}
if (playerchats&&startswith(setbody,#c)) {
tokenize #c;
if (tokenscount==2) setbody #t(1);
}
if (playerchats&&startswith(setsword,#c)) {
tokenize #c;
if (tokenscount==2) setplayerprop #1,#t(1);
}
if (playerchats&&startswith(setshield,#c)) {
tokenize #c;
if (tokenscount==2) setplayerprop #2,#t(1);
}
if (playerchats&&startswith(sethat,#c)) {
tokenize #c;
if (tokenscount==2) setplayerprop #P1,#t(1);
}
if (playerchats&&startswith(/skin,#c)) {
tokenize #c;
if (tokenscount==2) setplayerprop #C0,#t(1);
}
if (playerchats&&startswith(/coat,#c)) {
tokenize #c;
if (tokenscount==2) setplayerprop #C1,#t(1);
}
if (playerchats&&startswith(/sleeves,#c)) {
tokenize #c;
if (tokenscount==2) setplayerprop #C2,#t(1);
}
if (playerchats&&startswith(/shoes,#c)) {
tokenize #c;
if (tokenscount==2) setplayerprop #C3,#t(1);
}
if (playerchats&&startswith(/belt,#c)) {
tokenize #c;
if (tokenscount==2) setplayerprop #C4,#t(1);
}
if(playerchats&&strequals(#c,/sit)){
setani sit,;
}
if(playerchats&&strequals(#c,/pull)){
setani pull,;
}
if(playerchats&&strequals(#c,/push)){
setani push,;
}
if(playerchats&&strequals(#c,/dance)){
setani dance,;
}
if(playerchats&&strequals(#c,/grab)){
setani grab,;
}
if(playerchats&&strequals(#c,/walk)){
setani walk,;
}
if(playerchats&&strequals(#c,/dead)){
setani dead,;
}
Reply With Quote
  #2  
Old 06-20-2012, 08:50 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Here again the code gallery is supposed to be for GS2 scripts only. You can still post this in the GS1 section
__________________
MEEP!
Reply With Quote
  #3  
Old 06-20-2012, 09:00 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by callimuc View Post
Here again the code gallery is supposed to be for GS2 scripts only. You can still post this in the GS1 section
See my response to you in the other thread.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #4  
Old 06-20-2012, 09:04 PM
E_Man E_Man is offline
E-Man
E_Man's Avatar
Join Date: Jun 2012
Posts: 81
E_Man will become famous soon enough
Quote:
Here again the code gallery is supposed to be for GS2 scripts only. You can still post this in the GS1 section
I can post GS1 here because under the tile code gallery is said:

For showing complete scripts, if possible with comments. Mark scripts which are for GS1.

And I put GS1 in the title, unless there is another way to mark it.
Reply With Quote
  #5  
Old 06-23-2012, 01:37 AM
E_Man E_Man is offline
E-Man
E_Man's Avatar
Join Date: Jun 2012
Posts: 81
E_Man will become famous soon enough
If anyone still cares about this script, it can be improved by naming the item "-Commands" with the dash so that it is not shown in your inventory but you can use it anywhere.

New First Line:
PHP Code:
if (created) {
hide;
toweapons -Commands;

__________________
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 10:05 PM.


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