Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   probs with #t (https://forums.graalonline.com/forums/showthread.php?t=12814)

Bhala 09-25-2001 08:46 AM

still not workin

Brady2 09-25-2001 09:37 AM

Jadis:

if (startswith(partstr,str)) ;

NPC Code:

if (playerchats&&startswith(changegani ,#c)) {
tokenize #c;
if (tokenscount==3) {
replaceani #t(1),#t(2);
setplayerprop #c,Gani #t(1) changed to #t(2);
}
}



That should work if I am not mistaken. Maybe the replaceani command doesn't support strings? I am not sure.

Merlin 09-25-2001 06:43 PM

Quote:

Originally posted by Kaimetsu


Remember what I told you about string variables and normal variables? You can't do this.anything=#t(whatever);

oh yeah
this.old = (strfloat(#t(1)));
i think..

Merlin 09-25-2001 11:44 PM

ok so like this then?


if (playerchats) {
if (startswith(changegani,#c)) {

if (tokenscount==3) {
this.oldgani = strtofloat(#t(1));
this.newgani = strtofloat(#t(3));
timeout = .5;
}
if (timeout) {
replaceani this.oldgani,this.newgani;
}
}
}

Merlin 09-26-2001 01:18 AM

Quote:

Originally posted by Kaimetsu


Yes, though your {} brackets don't quite match up.

oops two short ;\\\

Brady2 09-26-2001 04:17 AM

Jadis:

Err.. you would have to do setstring this.blah,#t(1);

strtofloat returns the numeric value of a string so that wouldn't work anyway.


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

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