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
Prev Previous Post   Next Post Next
  #1  
Old 07-15-2001, 05:44 AM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
Trouble

Ok. I made a firework weapon that places those bee fireworks on the ground. I used putnpc2 to do it. Here is my code:
NPC Code:

// NPC made by Boco
if (playerenters || created) {
message Bee;
}
if (playerchats && strequals(#c,buy bee)) {
if (playerrupees>=5) {
playerrupees-=5;
toweapons Bee;
setstring client.Firework_Bee_Count,#v(strtofloat(#s(client. Firework_Bee_Count))+5);
} else {
say2 You don't have enough Gralats!;
}
}
if (weaponfired) {
setplayerprop #c,#s(client.Firework_Bee_Count);
putnpc2 playerx+vecx(playerdir)*2, playery+vecy(playerdir)*2, {
if (created) {
message Bee;
showcharacter;
dontblock;
setcharani bravo_firework_bee,;
sleep 0.95;
this.x=random(-1,1);
this.y=random(-1,1);
for (this.time=0.95;this.time<1.85;this.time+=0.1) {
if (this.time<1.2) { hitobjects 0.5,x+1.5,y+2; }
this.x+=random(-0.5,0.5);
this.y+=random(-0.5,0.5);
move this.x,this.y,0.1,1;
sleep 0.1;
}
move this.x,this.y,0.55,1;
sleep 1;
destroy;
}
};
setstring client.Firework_Bee_Count,#v(strtofloat(#s(client. Firework_Bee_Count))-1);
if (strtofloat(#s(client.Firework_Bee_Count))==0) { destroy; }
}
//#CLIENTSIDE
if (created) {
setimgpart bravo_firework_bee.gif,0,0,16,16;
}


Ok. The putnpc2 part of the code doesn't work. The script seems to halt completely at that part of the code. I know this because it won't subtract the string 'client.Firework_Bee_Count' by 1. Can anyone help me in getting this to work? Thanks.
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
 


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 07:55 AM.


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