![]() |
Scripting Guidance
Okay, so I've recently taken up an interest in scripting. So far all I am doing is looking at scripts and trying to understand them, and then editing them in some other way to try new things. I could use your help some. If someone could please explain the following script in the most basic of terms possible, it'd be greatly appreciated.
NPC Code: I understand the part about it having to be my account, and it starting with /skin and then the color, but I don't understand how the NPC Code:makes it all work. Thank you for your help.setcharprop #C0,#T(#e(6,-1,#c)); |
NPC Code:setcharprop #C0,#T(#e(6,-1,#c)); setcharprop - sets THIS npc's property #C0 - property for skin color #T(string) - trims spaces off start and end of string, not needed here #e(startindex,stopindex,string) - takes a slice of a string from startindex to stopindex. 6 is determined by counting characters (including spaces!), so it'd be / = 1, s = 2, k = 3, and so on. remember, spaces count. -1 means to not take a stopindex, but use the end of the string as the terminator. #c is the player's chat string. |
wow...even that helped me thx :)
|
If you want that #T to work properly, the #e should start counting at position 5, not 6.
It starts from zero, Tupper. |
| All times are GMT +2. The time now is 06:10 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.