Guest Posted February 3, 2006 Share Posted February 3, 2006 if ($3 == !buybeer) { if ($mta.area($1,$2) == Mansion) { if ($4 != $null) { if ($calc($readini(RPG2.ini,Cash,$mta.name($1,$2))) < $readini(RPG2.ini,beercost,beercost)) { mta.msg $1 $2 Not enough money } else { !writeini -n $+("RPG2.ini") Cash $mta.name($1,$2) $calc($readini(RPG2.ini,Cash,$mta.name($1,$2)) - $readini(RPG2.ini,beercost,beercost)))} !writeini -n $+("RPG2.ini") beeramount $mta.name($1,$2) $calc($readini(RPG2.ini,beeramount,$mta.name($1,$2))+$4))} mta.msg $1 $2 $mta.name($1,$2) 's current balance is $ $calc($readini(RPG2.ini,Cash,$mta.name($1,$2))) dollar(s), and he/she currently has $readini(RPG2.ini,beeramount,$mta.name($1,$2)) beer(s). } } else { mta.msg $1 $2 Error, !buysec } } else { mta.msg $1 $2 You must be in Mansion } } ok what i want to fix is when i type !buybeer 3 i want it to take out how much 3 beers cost out of me cash and if i dont have the money for 3 beers i want it to tell me that i dont have the cash for them ty guys Link to comment
XaVeR Posted February 13, 2006 Share Posted February 13, 2006 if ($3 == !buybeer) { if ($mta.area($1,$2) == Mansion) { if ($4 != $null) { if ($calc($readini(RPG2.ini,Cash,$mta.name($1,$2))) < $readini(RPG2.ini,beercost,beercost)) { mta.msg $1 $2 Not enough money } else { !writeini -n $+("RPG2.ini") Cash $mta.name($1,$2) $calc($readini(RPG2.ini,Cash,$mta.name($1,$2)) - $readini(RPG2.ini,beercost,beercost)))} !writeini -n $+("RPG2.ini") beeramount $mta.name($1,$2) $calc($readini(RPG2.ini,beeramount,$mta.name($1,$2))+$4))} mta.msg $1 $2 $mta.name($1,$2) 's current balance is $ $calc($readini(RPG2.ini,Cash,$mta.name($1,$2))) dollar(s), and he/she currently has $readini(RPG2.ini,beeramount,$mta.name($1,$2)) beer(s). } } else { mta.msg $1 $2 Error, !buysec } else { mta.msg $1 $2 You must be in Mansion } ? :] Link to comment
Jeremy Posted February 14, 2006 Share Posted February 14, 2006 (edited) if ($3 == !buybeer) { if ($mta.area($1,$2) == Mansion) { if ($4 != $null) { if ($calc($readini(RPG2.ini,Cash,$mta.name($1,$2))) < $readini(RPG2.ini,beercost,beercost) * $4) { mta.msg $1 $2 Not enough money } else { !writeini -n $+("RPG2.ini") Cash $mta.name($1,$2) $calc($readini(RPG2.ini,Cash,$mta.name($1,$2)) - $readini(RPG2.ini,beercost,beercost) * $4))} !writeini -n $+("RPG2.ini") beeramount $mta.name($1,$2) $calc($readini(RPG2.ini,beeramount,$mta.name($1,$2)) + $4))} mta.msg $1 $2 $mta.name($1,$2) 's current balance is $ $calc($readini(RPG2.ini,Cash,$mta.name($1,$2))) dollar(s), and he/she currently has $readini(RPG2.ini,beeramount,$mta.name($1,$2)) beer(s). } } else { mta.msg $1 $2 Error, !buybeer } } else { mta.msg $1 $2 You must be in Mansion } } Try that Edited February 14, 2006 by Guest Link to comment
Wesley Posted February 17, 2006 Share Posted February 17, 2006 wow Jeremy..i didn't see that yet. Thats normal i started scripting 1 week ago :P Link to comment
Recommended Posts