Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-30-2011, 11:26 PM
papajchris papajchris is offline
Zeus Condero
papajchris's Avatar
Join Date: Jan 2006
Location: Michigan
Posts: 1,600
papajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to beholdpapajchris is a splendid one to behold
Some questions

So im looking at one of xXziroXx's old scripts and i had some questions

Quote:
Originally Posted by xXziroXx View Post
PHP Code:
function onPlayerChats()
{
  
tokens player.chat.tokenize();
  
BodyParts = { "skin""coat""sleeves""shoes""belt""all"};
  
BodyColors = { "white""yellow""orange""pink""red",
    
"darkred""lightgreen""green""darkgreen""lightblue",
      
"blue""darkblue""brown""cynober""purple",
        
"darkpurple""lightgray""gray""black"};
  if (
BodyParts.indextokens[0]) > -&& BodyColors.indextokens[1]) > -1) {
    if (
tokens[0] != "all"player.colorsBodyParts.indextokens[0])] = tokens[1];
    else {
      for (
iBodyPartsplayer.colorsBodyParts.indexi)] = tokens[1];
    }
    
player.chat "Changed " tokens[0] @ " to " tokens[1] @ "!";
  }

PHP Code:
 if (BodyParts.indextokens[0]) > -&& BodyColors.indextokens[1]) > -1
What does the -1 do? Assuming its the word number, how can words be less than first word (which is number 0).


PHP Code:
for (iBodyPartsplayer.colorsBodyParts.indexi)] = tokens[1]; 
What does the "i" do? My guess is its a variable?

Lastly can SPC be used instead of "@"?
__________________
Reply With Quote
 

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 09:26 AM.


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