Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Server (https://forums.graalonline.com/forums/forumdisplay.php?f=14)
-   -   setbomy script (For people who have been asking me) (https://forums.graalonline.com/forums/showthread.php?t=3409)

05-23-2001 04:22 AM

setbomy script (For people who have been asking me)
 
if (playerenters) {
toweapons -BomyChanger;
}
if (playerchats) {
if (strcontains(#c,setbomy)) {
tokenize #c;
setstring this.name,#t(1);
setstring this.color,#t(2);
setplayerprop #3,bomy_#s(this.name)#s(this.color).png;
}
}

05-24-2001 04:42 PM

Also..........
 
A lesson in Flags:

In order to enable the sethead command set the flag:
client.race=human

In order to disable the sethead command and enable the setbomy command set the flag:
client.race=bomy

which eliminates the need for that setbomy script altogether, because the NPCServer has it built in.

Thak2 05-24-2001 06:53 PM

Yes, but your script can be very useful for custom races.

05-24-2001 11:27 PM

that would be quite usful for other custom races..cool

Thak2 05-25-2001 04:32 AM

ohhh, yeah forgot about something like that... and I dont see anyway of fixing that script to prevent that...

kyle0654 05-25-2001 06:26 AM

set a temporary string, let's call it this.clientwants, then you have this in the NPCW:
NPC Code:

in created portion:
setstring this.headsallowed<racehere>, bobhead.gif, ilikecheese.gif, monkey.gif, carl.gif;

rest of script
player says what head and it's set to this.clientwants
checkhead();
if (this.headisgood == true) {
sethead script here
} else setplayerprop Not a valid head;


// this goes at the bottom or wherever you put your functions
function checkhead();
this.headisgood = false;
tokenize this.headsallowed;
for (this.z = 0; this.z < tokenscount; this.z++) {
if (strequals(#s(this.clientwants),#t(this.z))) {
this.headisgood = true;
break;
}
}
}


TB3 05-28-2001 04:29 AM

Bout time
 
We have been needing that function for a good while because it realy helps when you are hard coding something for online such as the birds and you know how many you are going to have and you want to get the script in for say a random ammount of 10 birds but you only have 3 drawn i have problems like this alot as I am starting to hard code all of my Items such as my chests my skate board move script and other such scripts as my special effects. WIth this command you can set items up to work with upcoming images and files makes it a whole lot better if you ask me.


All times are GMT +2. The time now is 05:42 PM.

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