Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Sethead,Steshiled,setsword offline? (https://forums.graalonline.com/forums/showthread.php?t=1368)

Komieko 04-15-2001 01:18 AM

How would I make sethead,setshield,setsword and that is all since you can't do setnick...how would I make em without typing in EVERY shield,sword and head name

zerohero 04-15-2001 01:55 AM

uh, you can't do it in an NPC because Graalscript doesnt have string parsing.

grim_squeaker_x 04-15-2001 03:23 AM

Aye.
 
The closest you can get is by firstly making the player say "setshield" or whatever, and then the image name ;)

kyle0654 04-15-2001 04:17 AM

actually....string parsing exists, though it's quite new, and only supported by the npc server. If you could get Stefan to put it into offline mode then it'd be quite easy...

grim_squeaker_x 04-15-2001 04:25 AM

Quote:

Originally posted by kyle0654
actually....string parsing exists, though it's quite new, and only supported by the npc server. If you could get Stefan to put it into offline mode then it'd be quite easy...
Aha, that explains how the setbomy commands etc. work.

kyle0654 04-15-2001 11:20 AM

actually, setbomy is built in....like sethead....String parsing is too new. Actually, setbomy is just a version of sethead that will only set bomy images (since the bomy image is in fact set to the head of ganis)

grim_squeaker_x 04-15-2001 05:41 PM

Quote:

Originally posted by kyle0654
actually, setbomy is built in....like sethead....String parsing is too new. Actually, setbomy is just a version of sethead that will only set bomy images (since the bomy image is in fact set to the head of ganis)
Erm okay... Then it's how they made that new bomy version. I guess.

Thak2 04-15-2001 10:53 PM

Yes, string parsing was used for the give bomy <acountname> thing, I think.

Lycia 04-17-2001 04:01 PM

Quote:

Originally posted by Thak2
Yes, string parsing was used for the give bomy <acountname> thing, I think.
Yep.

Its used very intensely in the bomy pets.

KJS 04-23-2001 06:27 AM

accually
 
accually you can now do it if you have v2.0.2 +

you would have to use the functions

strlen(str)
startswith(part,str)
#e(startindex,length,str)

you would do something like

if(startswith(setsword,#c){
this.how.long = strlen(#c);
this.gif = #e(9,this.how.long-9,#c);
}

this code was just off the top of my head.. I haven't tested it but it would be something like that I beleve.

GraalWarrior2k1 04-24-2001 05:54 AM

wow man thanx, for the parsing thing, i really needed that =D

Admins 04-26-2001 10:29 AM

i guess i should move the setbomy thing
to the bomy script now, since string
parsing is now possible and other server
makers might not want to have that thing
built-in

Lion'el-Jonson 04-26-2001 12:05 PM

Um, why would you need sethead,setshield and setsword offline?


All times are GMT +2. The time now is 02:34 AM.

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