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-26-2007, 04:42 AM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
Tailor System

Here is a tailor system I made....
This is the first thing I have posted in the code gallery. :P
I know my style of scripting is...not as effecient as it can be, but thats how I learned, so...yeah.
Feel free to use this, change it, edit it, do w/e.
Just at least give me some credit....

Sorry its in an attachment,....but it wouldnt let me post it all. =/
Attached Files
File Type: txt tailorsys.txt (12.4 KB, 572 views)
Reply With Quote
  #2  
Old 09-26-2007, 05:01 AM
Kyranki Kyranki is offline
Freelance Coder
Join Date: Aug 2007
Location: At the end of the rainbow, in the pot of gold.
Posts: 202
Kyranki is on a distinguished road
Send a message via AIM to Kyranki Send a message via MSN to Kyranki
Near the bottom where you declared the variable "this.t" that would be better off being a temporary variable as it doesn't need to exist beyond that function.

Also the multiple if checks is ridiculous when you could have made it much easier on yourself by tokenizing the players chat and then using switch and case statements.

This isn't what I would expect from someone who supposedly was to be given a chance at GST. >_>
__________________
Stan.
Reply With Quote
  #3  
Old 09-26-2007, 06:57 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
PHP Code:
  tailor_inp1.text this.t[0];
  
tailor_inp2.text this.t[1];
  
tailor_inp3.text this.t[2];
  
tailor_inp4.text this.t[3];
  
tailor_inp5.text this.t[4]; 
Stuff like this could easily be using a for() statement... as for chat commands, you should at least be doing if, else if, else if etc or, as Stan pointed out, a switch statement.
Reply With Quote
  #4  
Old 09-26-2007, 01:15 PM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
also, shouldn't GUI components use
position = {x, y}
or "x y"


and extent = {l, w}
extent = "l w"
instead of
x =, y =, width, height/
Reply With Quote
  #5  
Old 09-26-2007, 11:16 PM
oo_jazz_oo oo_jazz_oo is offline
Jazz teh Awesome
oo_jazz_oo's Avatar
Join Date: Jul 2006
Location: California
Posts: 596
oo_jazz_oo is a jewel in the roughoo_jazz_oo is a jewel in the rough
Send a message via MSN to oo_jazz_oo
Ok, I told you, my scripting isnt as effecient. -.-
I know I could have done a for() on the tailor text or w/e.
And I know I could have done a tokeninze on the players chat, but I didnt because I didnt think I was going to keep the color setting commands.
They were temp, and I just didnt remove them.
Reply With Quote
  #6  
Old 09-27-2007, 12:09 AM
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
Nice job, buddy! Keep it up! Work on a few of the things mentioned in this thread
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #7  
Old 09-29-2007, 04:12 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
extent = {w, h} and position = {x, y} should be used. position = "x y" only works for compatibility with Torque GUI script. And the width, height, x, and y exist for compatibility in Graal, but they're really just reflections of position and extent.
__________________
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 08:37 AM.


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