Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   string\vars in message codes (https://forums.graalonline.com/forums/showthread.php?t=36952)

Warcaptain 08-30-2002 04:23 PM

string\vars in message codes
 
is there any way that in the near future we can do this?

NPC Code:

for (i=0;i<4;i++;){
setplayerprop #C#v(i),black;
}



to easily set clothing to all black?

or just something like that
and also

wat about message code in command: set

ie:
NPC Code:

set #co_#F_#v(x)_#v(y);


to artificialy create chests;

Com013 08-30-2002 07:02 PM

Maybe "setplayerprop ##C#v(i),black;" works? dunno.

Tyhm 08-31-2002 01:29 AM

You can setplayerprop #C0,#t(2); in the meantime. You only need 5 lines to do it that way...you can do a good old if statement.

if(i=0) setplayerprop #C0,#t(2);
else if(i=1) setplayerprop #C1,#t(2);

etc.

But yeah, that'd be handy.

mikepg 09-02-2002 09:43 AM

Re: string\vars in message codes
 
Quote:

Originally posted by Warcaptain
is there any way that in the near future we can do this?

NPC Code:

for (i=0;i<4;i++;){
setplayerprop #C#v(i),black;
}



to easily set clothing to all black?

or just something like that
and also

wat about message code in command: set

ie:
NPC Code:

set #co_#F_#v(x)_#v(y);


to artificialy create chests;

lol, you and your artificial chests, lol. I'd love for them to add this, it would be usefull...but...eitherway, it can also be done with strings :-/

G_yoshi 09-02-2002 11:00 AM

Re: string\vars in message codes
 
Quote:

Originally posted by Warcaptain
is there any way that in the near future we can do this?

NPC Code:

for (i=0;i<4;i++;){
setplayerprop #C#v(i),black;
}



to easily set clothing to all black?

or just something like that
and also

wat about message code in command: set

ie:
NPC Code:

set #co_#F_#v(x)_#v(y);


to artificialy create chests;

Ehem, I already have artifical chests :p

NPC Code:

//#CLIENTSIDE
// NPC made by G_Yoshi
//#EDIT chestX 0
//#EDIT chestY 0
//#EDIT level onlinestartlocal.graal
//#EDIT gralattype serveraddgreen
//#EDIT gralatimgX 0
//#EDIT gralatimgY 0
setshape 1,32,32;
if (playerenters && !client.ient#co#chestX#chestY#level) {
setimgpart dk_chest.png,0,0,32,32;
} else if (playerenters && client.#co#chestX#chestY#level){
setimgpart dk_chest.png,32,0,32,32;
}


if (playertouchsme && !client.#co#chestX#chestY#level) {
setstring server.rupeescount,1;
rupees = 1;
triggeraction 0,0,gralattype,strtofloat(server.rupeescount);
set client.#co#chestX#chestY#level;
setimgpart dk_chest.png,32,0,32,32;
this.placex=x;
this.placey=y-1;
this.placex2=x-.8;
this.placey2=y-1.8;
play dk_chest.wav;
showimg 10,dk_gralats.png,this.placex,this.placey;
changeimgpart 10,gralatimgX,gralatimgY,32,32;
changeimgvis 10,2;
showimg 11,glare1.mng,this.placex2,this.placey2;
changeimgvis 11,3;
changeimgzoom 10,2;
changeimgzoom 11,2;
for (this.i=2; this.i>1; this.i-=.05) {
changeimgzoom 10,this.i;
changeimgzoom 11,this.i;
sleep .05;
}
sleep 2;
hideimg 10;
hideimg 11;
}



actually, that is something I probably won't use anymore...care to take it if you want :)

Dach 09-02-2002 11:48 AM

Me like! I wonder if we could also do this in the future;

putcomp #s(string),x,y;

or

setcharprop #C0,#s(string);

I think those are the ones, been awhile since I thought of that

Warcaptain 09-02-2002 11:52 AM

Re: Re: string\vars in message codes
 
Quote:

Originally posted by G_yoshi


Ehem, I already have artifical chests :p

NPC Code:

//#CLIENTSIDE
// NPC made by G_Yoshi
//#EDIT chestX 0
//#EDIT chestY 0
//#EDIT level onlinestartlocal.graal
//#EDIT gralattype serveraddgreen
//#EDIT gralatimgX 0
//#EDIT gralatimgY 0
setshape 1,32,32;
if (playerenters && !client.ient#co#chestX#chestY#level) {
setimgpart dk_chest.png,0,0,32,32;
} else if (playerenters && client.#co#chestX#chestY#level){
setimgpart dk_chest.png,32,0,32,32;
}


if (playertouchsme && !client.#co#chestX#chestY#level) {
setstring server.rupeescount,1;
rupees = 1;
triggeraction 0,0,gralattype,strtofloat(server.rupeescount);
set client.#co#chestX#chestY#level;
setimgpart dk_chest.png,32,0,32,32;
this.placex=x;
this.placey=y-1;
this.placex2=x-.8;
this.placey2=y-1.8;
play dk_chest.wav;
showimg 10,dk_gralats.png,this.placex,this.placey;
changeimgpart 10,gralatimgX,gralatimgY,32,32;
changeimgvis 10,2;
showimg 11,glare1.mng,this.placex2,this.placey2;
changeimgvis 11,3;
changeimgzoom 10,2;
changeimgzoom 11,2;
for (this.i=2; this.i>1; this.i-=.05) {
changeimgzoom 10,this.i;
changeimgzoom 11,this.i;
sleep .05;
}
sleep 2;
hideimg 10;
hideimg 11;
}



actually, that is something I probably won't use anymore...care to take it if you want :)

the only problem with that
is you have to change the x,y,level of every chest you lay

see i could easily do that but im trying to do an easier way out of it

G_yoshi 09-02-2002 01:02 PM

Re: Re: Re: string\vars in message codes
 
Quote:

Originally posted by Warcaptain


the only problem with that
is you have to change the x,y,level of every chest you lay

see i could easily do that but im trying to do an easier way out of it

no problem...actually, I did that up as a pre-fab NPC so I could easily replicate it without much difficulty :)

Warcaptain 09-03-2002 12:15 AM

Re: Re: Re: Re: string\vars in message codes
 
Quote:

Originally posted by G_yoshi


no problem...actually, I did that up as a pre-fab NPC so I could easily replicate it without much difficulty :)


well even that npc you sent me didnt work.

G_yoshi 09-03-2002 12:19 AM

Re: Re: Re: Re: Re: string\vars in message codes
 
Quote:

Originally posted by Warcaptain



well even that npc you sent me didnt work.

Didn't add the rupee?

Because it does it serverside :p


All times are GMT +2. The time now is 11:02 PM.

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