redwulf25_ci
Member
Code:
//Drink 3 Neuromancers
if (item_amount ($item[Neuromancer]) >= 3 && DrunkLeft >= 12)
drink (3, $item[Neuromancer] );
else {
if (!user_confirm("Not enough Neuromancers want to buy "+(floor((DrunkLeft) / 4) - item_amount ($item[mandarina colada]))+" @ "+ ((floor((DrunkLeft) / 4) - item_amount ($item[mandarina colada])) * mall_price($item[mandarina colada]) )+"" ))
{
abort("CHEAP!");
}
drink (floor((DrunkLeft) / 4), $item[Neuromancer] );
}
//Drink 1 dry martini
if (item_amount ($item[dry martini]) >= 1 && DrunkLeft >= 3)
drink (1, $item[dry martini] );
else {
if (!user_confirm("Not enough Martinis want to buy "+(floor((DrunkLeft) / 2) - item_amount ($item[dry martini]))+" @ "+ ((floor((DrunkLeft) / 2) - item_amount ($item[dry martini])) * mall_price($item[dry martini]) )+"" ))
{
abort("CHEAP!");
}
drink (floor((DrunkLeft) / 3), $item[dry martini] );
}
This was an attempt to alter a bit of code written by Icon so that it would drink 4 Neuromancers and 1 Dry Martini instead of 4 mandarina coladas and a dusty bottle of port. For some reason it tries to buy up 9 Dry Martinis instead of the one I want it to drink.
Here is the original section of code.
Code:
//Drink 3 Mandarina Coladas
if (item_amount ($item[mandarina colada]) >= 3 && DrunkLeft >= 12)
drink (3, $item[mandarina colada] );
else {
if (!user_confirm("Not enough Coladas want to buy "+(floor((DrunkLeft) / 4) - item_amount ($item[mandarina colada]))+" @ "+ ((floor((DrunkLeft) / 4) - item_amount ($item[mandarina colada])) * mall_price($item[mandarina colada]) )+"" ))
{
abort("CHEAP!");
}
drink (floor((DrunkLeft) / 4), $item[mandarina colada] );
}
//Drink 1 Port
if (item_amount ($item[dusty bottle of Port]) >= 1 && DrunkLeft >= 2)
drink (1, $item[dusty bottle of Port] );
else {
if (!user_confirm("Not enough Ports want to buy "+(floor((DrunkLeft) / 2) - item_amount ($item[dusty bottle of Port]))+" @ "+ ((floor((DrunkLeft) / 2) - item_amount ($item[dusty bottle of Port])) * mall_price($item[dusty bottle of Port]) )+"" ))
{
abort("CHEAP!");
}
drink (floor((DrunkLeft) / 2), $item[dusty bottle of Port] );
}
And I've just noticed I apparently have it drinking 3 not 4 Neuromancers. I changed the numbers under DrunkLeft from the 2 in the original code to 3 because I thought I was correcting for the difference in Drunk between a Dry Martini and Port. Is that the cause for trying to buy 9 of them? If I change them back to a 2 will it work right?
Edit: Changed the numbers back and it still wants to buy 9 Dry Martinis but actually only buys 2 if I answer yes. Then it asks if I really want to overdrink. If I say no it drinks neither and continues on to the rest of the script. How can I get it to buy and drink ONE Dry martini like I want it to so it puts my Drunkenness to 19?
Last edited: