I'm having trouble with my script. I'm trying to make it so I have a random chance of the bottle breaking but I can't get it to work.
I had it working without the random chance of breakage.
Can someone please help, thanks, Twilight
### Clay Bottle
id=301
name=Clay Bottle
group=stuff
icon=gfx\claybottle.bmp
model=gfx\bottle.b3d
scale=0.8
mat=stone
weight=50
info=A Clay Bottle, It cannot be used until I fire it.
script=start
//Fire
on:use {
if ((count_inrange("state",5,50)+count_inrange("state",4,50))>0){
if (random(1,3)=1);{
process "Firing",2000;
play "crack2.wav";
freestored "unit",1,301,1;
msg "Oh, no! My bottle broke in the fire!",6;
}else{
process "Firing",2000;
freestored "unit",1,301,1;
$id=create("item",106,0,0,1);
store $id,"unit",1;
}}else{
msg "I need to fire this in the fire!",6;
speech "negative";
}
}
script=end
edited 1×, last 24.06.12 08:26:14 am