Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   trimming (https://forums.graalonline.com/forums/showthread.php?t=28156)

RavenTelvecho 04-28-2002 06:35 AM

trimming
 
NPC Code:

if (playerchats&&isweapon) {
if (startswith(/setsay,#c)) {
tokenize #c;
}
if (strequals(#t(3),#s(petnick_this.id))) {
setstring petsay_#v(this.id),#T(#e(18,20,#c));
setplayerprop #c,;
}
}



if i say
/setsay for <PETNICK> <THE NICK HERE> it wont work but if i say
/setsay for <PETNICK><THE NICK HERE> it works
in the attachment
say
"/setsay for derek hi my name is derek"
then say
"/setsay for derekhi my name is derek"



see the prob?


yes i know it says isweapon its cause i took it from the script its from

RavenTelvecho 04-28-2002 06:36 AM

1 Attachment(s)
attachment forgot x.x

Gohan43331 04-28-2002 08:37 AM

Quote:

if (strequals(#t(3),#s(petnick_this.id))) {
Remember: Indexes start at 0

0 = /setsay
1 = for
2 = nick
3+ = text

if (strequals(#t(2),derek)) { // or #s(petnick_#v(this.id))

I think that should fix it

RavenTelvecho 04-28-2002 09:13 AM

now i have to say
/setsay forskulliohi
x.x

RavenTelvecho 04-28-2002 09:17 AM

k srry ill edit it

RavenTelvecho 04-28-2002 09:41 AM

d) Since the pet's nick is variable length, the start index in your #e should also be variable
what u mean
---
edit
-----
oohhh ok lemme tst

RavenTelvecho 04-28-2002 09:46 AM

werks XD
thanks guys


All times are GMT +2. The time now is 04:11 AM.

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