Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-02-2003, 03:55 AM
Idrox0 Idrox0 is offline
Registered User
Join Date: Oct 2003
Posts: 66
Idrox0 is on a distinguished road
Baddy Bug

Hey, I was just making a script for having baddies drop random stuff, but it doesn't seem to work. I have tried killing the baddies multiple times to get out of the random situation, but it will not drop anything! Can anyone shed any light on this? Oh, and here's the script:
NPC Code:

if (playerenters) timeout = 0.05;
if (timeout) {
deadcheck();
timeout = 0.05;
}
function deadcheck() {
for (i=0;i<compuscount;i++) {
if (compus[i].mode==9) {
pi = random(0,100);
if (pi<10) lay2 greenrupee,compus[i].x,compus[i].y;
else if (pi<20) lay2 bluerupee,compus[i].x,compus[i].y;
else if (pi<30) lay2 heart,compus[i].x,compus[i].y;
}
}
}

__________________
Reply With Quote
 


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 12:21 PM.


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