Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   2 in 1 (https://forums.graalonline.com/forums/showthread.php?t=26625)

Bhala 03-30-2002 01:03 PM

2 in 1
 
would there be any way to make this one command?
NPC Code:

if(this.index[this.selecteditem] in this.anihats) {setstring this.ext,mng;} else {setstring this.ext,png;}
setstring client.hat,hat#v(this.index[this.selecteditem]).#s(this.ext);



I tryed
setstring client.hat,hat#v(this.index[this.selecteditem]).(this.index[this.selecteditem] in this.anihats ? mng:png);
&
setstring client.hat,hat#v(this.index[this.selecteditem]).#s((this.index[this.selecteditem] in this.anihats ? mng:png));


nether worked

Bhala 03-31-2002 05:08 AM

oh ok i did not know of thos... thank you

nyghtGT 03-31-2002 11:32 AM

Re: Re: 2 in 1
 
Quote:

Originally posted by Kaimetsu
Your way is satisfactory. But, if this is to be run on the clientside, use local.strings for the temp value instead of this.strings. And clear it afterwards.
like 'level.string' ?

Python523 03-31-2002 12:18 PM

I think he means like
if (created) {
level.test=true;
}


All times are GMT +2. The time now is 01:45 AM.

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