Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > NPC Server
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 05-23-2001, 04:22 AM
Guest
Posts: n/a
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;
}
}
  #2  
Old 05-24-2001, 04:42 PM
Guest
Posts: n/a
Exclamation 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.
  #3  
Old 05-24-2001, 06:53 PM
Thak2 Thak2 is offline
:]
Join Date: Mar 2001
Location: BC
Posts: 1,344
Thak2 is on a distinguished road
Send a message via AIM to Thak2
Yes, but your script can be very useful for custom races.
  #4  
Old 05-24-2001, 11:27 PM
Guest
Posts: n/a
that would be quite usful for other custom races..cool
  #5  
Old 05-25-2001, 04:32 AM
Thak2 Thak2 is offline
:]
Join Date: Mar 2001
Location: BC
Posts: 1,344
Thak2 is on a distinguished road
Send a message via AIM to Thak2
ohhh, yeah forgot about something like that... and I dont see anyway of fixing that script to prevent that...
  #6  
Old 05-25-2001, 06:26 AM
kyle0654 kyle0654 is offline
-. .`
kyle0654's Avatar
Join Date: Mar 2001
Posts: 1,000
kyle0654 will become famous soon enough
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;
}
}
}

  #7  
Old 05-28-2001, 04:29 AM
TB3 TB3 is offline
Registered User
TB3's Avatar
Join Date: May 2001
Location: US of A State of VA
Posts: 658
TB3 is on a distinguished road
Send a message via Yahoo to TB3
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.
__________________

To the sun of your age, I arise
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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