Duffkiligan
Member
Okay, it checks if I have a bartender, buys or pulls my drinks.
and buys or pulls my food.
Then drinks and eats.
However, it's really long and it was the only way I knew how to do it.
Any help on general clean up/shortcuts/ anything to make it more manageable would be great.
Thanks,
-Duff
and buys or pulls my food.
Then drinks and eats.
However, it's really long and it was the only way I knew how to do it.
Any help on general clean up/shortcuts/ anything to make it more manageable would be great.
Code:
# item list
item hhm = $item[hot hi mein];
item slhm = $item[sleazy hi mein];
item sphm = $item[spooky hi mein];
item mt = $item[Mon Tiki];
item l = $item[lime];
item g = $item[grog];
item gt = $item[grogtini];
item mw = $item[Mae West];
item jo = $item[jumbo olive];
item dvm = $item[dry vodka martini];
item v = $item[vesper];
item ybr = $item[yellow brick road];
item c = $item[cherry];
item s = $item[sangria];
item sdd = $item[sangria del diablo];
item bitb = $item[bartender-in-the-box];
#
#So my other characters don't use this script.
#
if(my_name() == "Duffkiligan"){
if(!have_bartender()){
print("Getting a bartender");
if(item_amount(bitb) >= 1){
use(1, bitb);
}
else if(item_amount(bitb) == 0 && can_interact()){
buy(1, bitb);
}
else if(item_amount(bitb) == 0){
take_storage(1, bitb);
}
else{
print("Could not get bartender");
cli_execute("abort");
}
}
else if(have_bartender()){
print("Yay! Bartender!");
}
#Getting the Booze you want.
if(my_level() < 6){
print("Too low of a level to get booze.");
}
else if(my_inebriety() >= 2){
print("You're too drunk to drink your drinks. Get a soberness pill.");
}
else if(!have_skill($skill[Liver of steel])){
print("You don't have you're liver of steel, why get overdrunk?");
}
else if(my_level() >= 6 && my_inebriety() <= 1 && have_skill($skill[Liver of steel])){
print("Getting Booze");
#To buy them instead of pulling them out of ronin, obviously you won't pull if you're not in ronin.
if(can_interact()){
if(my_primestat() == $stat[muscle]){
if(item_amount(mt) == 0 && item_amount(l) == 0 && item_amount(g) == 0){
buy(3, mt);
buy(1, l);
buy(1, g);
}
else if(item_amount(mt) == 1 && item_amount(l) == 0 && item_amount(g) == 0){
buy(2, mt);
buy(1, l);
buy(1, g);
}
else if(item_amount(mt) == 2 && item_amount(l) == 0 && item_amount(g) == 0){
buy(1, mt);
buy(1, l);
buy(1, g);
}
else if(item_amount(mt) >= 3 && item_amount(l) == 0 && item_amount(g) == 0){
buy(1, l);
buy(1, g);
}
else if(item_amount(mt) == 0 && item_amount(l) >= 1 && item_amount(g) == 0){
buy(3, mt);
buy(1, g);
}
else if(item_amount(mt) == 0 && item_amount(l) == 0 && item_amount(g) >= 1){
buy(3, mt);
buy(1, l);
}
else if(item_amount(mt) == 1 && item_amount(l) >= 1 && item_amount(g) == 0){
buy(2, mt);
buy(1, g);
}
else if(item_amount(mt) == 2 && item_amount(l) >= 1 && item_amount(g) == 0){
buy(1, mt);
buy(1, g);
}
else if(item_amount(mt) >= 3 && item_amount(l) >= 1 && item_amount(g) == 0){
buy(1, g);
}
else if(item_amount(mt) == 1 && item_amount(l) == 0 && item_amount(g) >= 1){
buy(2, mt);
buy(1, l);
}
else if(item_amount(mt) == 2 && item_amount(l) == 0 && item_amount(g) >= 1){
buy(1, mt);
buy(1, l);
}
else if(item_amount(mt) >= 3 && item_amount(l) == 0 && item_amount(g) >= 1){
buy(1, l);
}
else if(item_amount(mt) == 0 && item_amount(l) >= 1 && item_amount(g) >= 1){
buy(3, mt);
}
else if(item_amount(mt) == 1 && item_amount(l) >= 1 && item_amount(g) >= 1){
buy(2, mt);
}
else if(item_amount(mt) == 2 && item_amount(l) >= 1 && item_amount(g) >= 1){
buy(1, mt);
}
else if(item_amount(mt) >= 3 && item_amount(l) >= 1 && item_amount(g) >= 1){
print("You have all of your drinks.");
}
else{
print("Something went wrong, line 119.");
}
}
else if(my_primestat() == $stat[moxie]){
if(item_amount(mw) == 0 && item_amount(jo) == 0 && item_amount(dvm) == 0){
buy(3, mw);
buy(1, jo);
buy(1, dvm);
}
else if(item_amount(mw) == 1 && item_amount(jo) == 0 && item_amount(dvm) == 0){
buy(2, mw);
buy(1, jo);
buy(1, dvm);
}
else if(item_amount(mw) == 2 && item_amount(jo) == 0 && item_amount(dvm) == 0){
buy(1, mw);
buy(1, jo);
buy(1, dvm);
}
else if(item_amount(mw) >= 3 && item_amount(jo) == 0 && item_amount(dvm) == 0){
buy(1, jo);
buy(1, dvm);
}
else if(item_amount(mw) == 0 && item_amount(jo) >= 1 && item_amount(dvm) == 0){
buy(3, mw);
buy(1, dvm);
}
else if(item_amount(mw) == 0 && item_amount(jo) == 0 && item_amount(dvm) >= 1){
buy(3, mw);
buy(1, jo);
}
else if(item_amount(mw) == 1 && item_amount(jo) >= 1 && item_amount(dvm) == 0){
buy(2, mw);
buy(1, dvm);
}
else if(item_amount(mw) == 2 && item_amount(jo) >= 1 && item_amount(dvm) == 0){
buy(1, mw);
buy(1, dvm);
}
else if(item_amount(mw) >= 3 && item_amount(jo) >= 1 && item_amount(dvm) == 0){
buy(1, dvm);
}
else if(item_amount(mw) == 1 && item_amount(jo) == 0 && item_amount(dvm) >= 1){
buy(2, mw);
buy(1, jo);
}
else if(item_amount(mw) == 2 && item_amount(jo) == 0 && item_amount(dvm) >= 1){
buy(1, mw);
buy(1, jo);
}
else if(item_amount(mw) >= 3 && item_amount(jo) == 0 && item_amount(dvm) >= 1){
buy(1, jo);
}
else if(item_amount(mw) == 0 && item_amount(jo) >= 1 && item_amount(dvm) >= 1){
buy(3, mw);
}
else if(item_amount(mw) == 1 && item_amount(jo) >= 1 && item_amount(dvm) >= 1){
buy(2, mw);
}
else if(item_amount(mw) == 2 && item_amount(jo) >= 1 && item_amount(dvm) >= 1){
buy(1, mw);
}
else if(item_amount(mw) >= 3 && item_amount(jo) >= 1 && item_amount(dvm) >= 1){
print("You have all of your drinks.");
}
else{
print("Something went wrong, line 185.");
}
}
else if(my_primestat() == $stat[mysticality]){
if(item_amount(ybr) == 0 && item_amount(c) == 0 && item_amount(s) == 0){
buy(3, ybr);
buy(1, c);
buy(1, s);
}
else if(item_amount(ybr) == 1 && item_amount(c) == 0 && item_amount(s) == 0){
buy(2, ybr);
buy(1, c);
buy(1, s);
}
else if(item_amount(ybr) == 2 && item_amount(c) == 0 && item_amount(s) == 0){
buy(1, ybr);
buy(1, c);
buy(1, s);
}
else if(item_amount(ybr) >= 3 && item_amount(c) == 0 && item_amount(s) == 0){
buy(1, c);
buy(1, s);
}
else if(item_amount(ybr) == 0 && item_amount(c) >= 1 && item_amount(s) == 0){
buy(3, ybr);
buy(1, s);
}
else if(item_amount(ybr) == 0 && item_amount(c) == 0 && item_amount(s) >= 1){
buy(3, ybr);
buy(1, c);
}
else if(item_amount(ybr) == 1 && item_amount(c) >= 1 && item_amount(s) == 0){
buy(2, ybr);
buy(1, s);
}
else if(item_amount(ybr) == 2 && item_amount(c) >= 1 && item_amount(s) == 0){
buy(1, ybr);
buy(1, s);
}
else if(item_amount(ybr) >= 3 && item_amount(c) >= 1 && item_amount(s) == 0){
buy(1, s);
}
else if(item_amount(ybr) == 1 && item_amount(c) == 0 && item_amount(s) >= 1){
buy(2, ybr);
buy(1, c);
}
else if(item_amount(ybr) == 2 && item_amount(c) == 0 && item_amount(s) >= 1){
buy(1, ybr);
buy(1, c);
}
else if(item_amount(ybr) >= 3 && item_amount(c) == 0 && item_amount(s) >= 1){
buy(1, c);
}
else if(item_amount(ybr) == 0 && item_amount(c) >= 1 && item_amount(s) >= 1){
buy(3, ybr);
}
else if(item_amount(ybr) == 1 && item_amount(c) >= 1 && item_amount(s) >= 1){
buy(2, ybr);
}
else if(item_amount(ybr) == 2 && item_amount(c) >= 1 && item_amount(s) >= 1){
buy(1, ybr);
}
else if(item_amount(ybr) >= 3 && item_amount(c) >= 1 && item_amount(s) >= 1){
print("You have all of your drinks.");
}
else{
print("Something went wrong, line 251.");
}
}
else{
print("WHAT?! You don't have a Main Stat? Are you an astral spirit?");
}
}
else{
#To pull from storage if you couldn't buy the drinks.
if(my_primestat() == $stat[muscle]){
if(item_amount(mt) == 0 && item_amount(l) == 0 && item_amount(g) == 0){
take_storage(3, mt);
take_storage(1, l);
take_storage(1, g);
}
else if(item_amount(mt) == 1 && item_amount(l) == 0 && item_amount(g) == 0){
take_storage(2, mt);
take_storage(1, l);
take_storage(1, g);
}
else if(item_amount(mt) == 2 && item_amount(l) == 0 && item_amount(g) == 0){
take_storage(1, mt);
take_storage(1, l);
take_storage(1, g);
}
else if(item_amount(mt) >= 3 && item_amount(l) == 0 && item_amount(g) == 0){
take_storage(1, l);
take_storage(1, g);
}
else if(item_amount(mt) == 0 && item_amount(l) >= 1 && item_amount(g) == 0){
take_storage(3, mt);
take_storage(1, g);
}
else if(item_amount(mt) == 0 && item_amount(l) == 0 && item_amount(g) >= 1){
take_storage(3, mt);
take_storage(1, l);
}
else if(item_amount(mt) == 1 && item_amount(l) >= 1 && item_amount(g) == 0){
take_storage(2, mt);
take_storage(1, g);
}
else if(item_amount(mt) == 2 && item_amount(l) >= 1 && item_amount(g) == 0){
take_storage(1, mt);
take_storage(1, g);
}
else if(item_amount(mt) >= 3 && item_amount(l) >= 1 && item_amount(g) == 0){
take_storage(1, g);
}
else if(item_amount(mt) == 1 && item_amount(l) == 0 && item_amount(g) >= 1){
take_storage(2, mt);
take_storage(1, l);
}
else if(item_amount(mt) == 2 && item_amount(l) == 0 && item_amount(g) >= 1){
take_storage(1, mt);
take_storage(1, l);
}
else if(item_amount(mt) >= 3 && item_amount(l) == 0 && item_amount(g) >= 1){
take_storage(1, l);
}
else if(item_amount(mt) == 0 && item_amount(l) >= 1 && item_amount(g) >= 1){
take_storage(3, mt);
}
else if(item_amount(mt) == 1 && item_amount(l) >= 1 && item_amount(g) >= 1){
take_storage(2, mt);
}
else if(item_amount(mt) == 2 && item_amount(l) >= 1 && item_amount(g) >= 1){
take_storage(1, mt);
}
else if(item_amount(mt) >= 3 && item_amount(l) >= 1 && item_amount(g) >= 1){
print("You have all of your drinks.");
}
else{
print("Something went wrong, line 323.");
}
}
}
else if(my_primestat() == $stat[moxie]){
if(item_amount(mw) == 0 && item_amount(jo) == 0 && item_amount(dvm) == 0){
take_storage(3, mw);
take_storage(1, jo);
take_storage(1, dvm);
}
else if(item_amount(mw) == 1 && item_amount(jo) == 0 && item_amount(dvm) == 0){
take_storage(2, mw);
take_storage(1, jo);
take_storage(1, dvm);
}
else if(item_amount(mw) == 2 && item_amount(jo) == 0 && item_amount(dvm) == 0){
take_storage(1, mw);
take_storage(1, jo);
take_storage(1, dvm);
}
else if(item_amount(mw) >= 3 && item_amount(jo) == 0 && item_amount(dvm) == 0){
take_storage(1, jo);
take_storage(1, dvm);
}
else if(item_amount(mw) == 0 && item_amount(jo) >= 1 && item_amount(dvm) == 0){
take_storage(3, mw);
take_storage(1, dvm);
}
else if(item_amount(mw) == 0 && item_amount(jo) == 0 && item_amount(dvm) >= 1){
take_storage(3, mw);
take_storage(1, jo);
}
else if(item_amount(mw) == 1 && item_amount(jo) >= 1 && item_amount(dvm) == 0){
take_storage(2, mw);
take_storage(1, dvm);
}
else if(item_amount(mw) == 2 && item_amount(jo) >= 1 && item_amount(dvm) == 0){
take_storage(1, mw);
take_storage(1, dvm);
}
else if(item_amount(mw) >= 3 && item_amount(jo) >= 1 && item_amount(dvm) == 0){
take_storage(1, dvm);
}
else if(item_amount(mw) == 1 && item_amount(jo) == 0 && item_amount(dvm) >= 1){
take_storage(2, mw);
take_storage(1, jo);
}
else if(item_amount(mw) == 2 && item_amount(jo) == 0 && item_amount(dvm) >= 1){
take_storage(1, mw);
take_storage(1, jo);
}
else if(item_amount(mw) >= 3 && item_amount(jo) == 0 && item_amount(dvm) >= 1){
take_storage(1, jo);
}
else if(item_amount(mw) == 0 && item_amount(jo) >= 1 && item_amount(dvm) >= 1){
take_storage(3, mw);
}
else if(item_amount(mw) == 1 && item_amount(jo) >= 1 && item_amount(dvm) >= 1){
take_storage(2, mw);
}
else if(item_amount(mw) == 2 && item_amount(jo) >= 1 && item_amount(dvm) >= 1){
take_storage(1, mw);
}
else if(item_amount(mw) >= 3 && item_amount(jo) >= 1 && item_amount(dvm) >= 1){
print("You have all of your drinks.");
}
else{
print("Something went wrong, line 390.");
}
}
else if(my_primestat() == $stat[mysticality]){
if(item_amount(ybr) == 0 && item_amount(c) == 0 && item_amount(s) == 0){
take_storage(3, ybr);
take_storage(1, c);
take_storage(1, s);
}
else if(item_amount(ybr) == 1 && item_amount(c) == 0 && item_amount(s) == 0){
take_storage(2, ybr);
take_storage(1, c);
take_storage(1, s);
}
else if(item_amount(ybr) == 2 && item_amount(c) == 0 && item_amount(s) == 0){
take_storage(1, ybr);
take_storage(1, c);
take_storage(1, s);
}
else if(item_amount(ybr) >= 3 && item_amount(c) == 0 && item_amount(s) == 0){
take_storage(1, c);
take_storage(1, s);
}
else if(item_amount(ybr) == 0 && item_amount(c) >= 1 && item_amount(s) == 0){
take_storage(3, ybr);
take_storage(1, s);
}
else if(item_amount(ybr) == 0 && item_amount(c) == 0 && item_amount(s) >= 1){
take_storage(3, ybr);
take_storage(1, c);
}
else if(item_amount(ybr) == 1 && item_amount(c) >= 1 && item_amount(s) == 0){
take_storage(2, ybr);
take_storage(1, s);
}
else if(item_amount(ybr) == 2 && item_amount(c) >= 1 && item_amount(s) == 0){
take_storage(1, ybr);
take_storage(1, s);
}
else if(item_amount(ybr) >= 3 && item_amount(c) >= 1 && item_amount(s) == 0){
take_storage(1, s);
}
else if(item_amount(ybr) == 1 && item_amount(c) == 0 && item_amount(s) >= 1){
take_storage(2, ybr);
take_storage(1, c);
}
else if(item_amount(ybr) == 2 && item_amount(c) == 0 && item_amount(s) >= 1){
take_storage(1, ybr);
take_storage(1, c);
}
else if(item_amount(ybr) >= 3 && item_amount(c) == 0 && item_amount(s) >= 1){
take_storage(1, c);
}
else if(item_amount(ybr) == 0 && item_amount(c) >= 1 && item_amount(s) >= 1){
take_storage(3, ybr);
}
else if(item_amount(ybr) == 1 && item_amount(c) >= 1 && item_amount(s) >= 1){
take_storage(2, ybr);
}
else if(item_amount(ybr) == 2 && item_amount(c) >= 1 && item_amount(s) >= 1){
take_storage(1, ybr);
}
else if(item_amount(ybr) >= 3 && item_amount(c) >= 1 && item_amount(s) >= 1){
print("You have all of your drinks.");
}
else{
print("Something went wrong, line 456.");
}
}
else{
print("WHAT?! You don't have a Main Stat? Are you an astral spirit?");
}
print("Booze gotten.");
}
}
#Getting Food
if(my_level() < 7){
print("You're too low of a level to eat this food, why should I get it?");
}
else if(my_fullness() >= 1){
print("You're too full for this food, why should I get it?");
}
else if(my_fullness() == 0 && my_level() >= 7){
print("Getting Food");
if(can_interact()){
if(my_primestat() == $stat[muscle]){
if(item_amount(hhm) == 0){
buy(3, hhm);
}
else if(item_amount(hhm) == 1){
buy(2, hhm);
}
else if(item_amount(hhm) == 2){
buy(1, hhm);
}
else if(item_amount(hhm) >= 3){
print("You have your food");
}
else{
print("Something went wrong, line 489.");
}
}
else if(my_primestat() == $stat[moxie]){
if(item_amount(slhm) == 0){
buy(3, slhm);
}
else if(item_amount(slhm) == 1){
buy(2, slhm);
}
else if(item_amount(slhm) == 2){
buy(1, slhm);
}
else if(item_amount(slhm) >= 3){
print("You have your food");
}
else{
print("Something went wrong, line 506.");
}
}
else if(my_primestat() == $stat[mysticality]){
if(item_amount(sphm) == 0){
buy(3, sphm);
}
else if(item_amount(sphm) == 1){
buy(2, sphm);
}
else if(item_amount(sphm) == 2){
buy(1, sphm);
}
else if(item_amount(sphm) >= 3){
print("You have your food");
}
else{
print("Something went wrong, line 523.");
}
}
else{
print("You don't have a class?!");
}
}
else{
if(my_primestat() == $stat[muscle]){
if(item_amount(hhm) == 0){
take_storage(3, hhm);
}
else if(item_amount(hhm) == 1){
take_storage(2, hhm);
}
else if(item_amount(hhm) == 2){
take_storage(1, hhm);
}
else if(item_amount(hhm) >= 3){
print("You have your food");
}
else{
print("Something went wrong, line 545.");
}
}
else if(my_primestat() == $stat[moxie]){
if(item_amount(slhm) == 0){
take_storage(3, slhm);
}
else if(item_amount(slhm) == 1){
take_storage(2, slhm);
}
else if(item_amount(slhm) == 2){
take_storage(1, slhm);
}
else if(item_amount(slhm) >= 3){
print("You have your food");
}
else{
print("Something went wrong, line 562.");
}
}
else if(my_primestat() == $stat[mysticality]){
if(item_amount(sphm) == 0){
take_storage(3, sphm);
}
else if(item_amount(sphm) == 1){
take_storage(2, sphm);
}
else if(item_amount(sphm) == 2){
take_storage(1, sphm);
}
else if(item_amount(sphm) >= 3){
print("You have your food");
}
else{
print("Something went wrong, line 579.");
}
}
else{
print("You don't have a class?!");
}
}
print("Food obtained.");
}
#Drinking the booze.
if(my_level() < 6){
print("Too low of a level to drink booze.");
}
else if(my_inebriety() >= 2){
print("You're too drunk to drink your drinks. Get a soberness pill.");
}
else if(!have_skill($skill[Liver of steel])){
print("You don't have you're liver of steel, why get overdrunk?");
}
else if(my_level() >= 6 && my_inebriety() <= 1 && have_skill($skill[Liver of steel])){
print("Drinking Booze");
if(my_primestat() == $stat[muscle]){
drink(3, mt);
if(item_amount(gt) == 0){
create(1, gt);
drink(1, gt);
}
else if(item_amount(gt) >= 1){
drink(1, gt);
}
else{
print("Something went wrong, line 610.")
}
}
else if(my_primestat() == $stat[moxie]){
drink(3, mw);
if(item_amount(v) == 0){
create(1, v);
drink(1, v);
}
else if(item_amount(v) >= 1){
drink(1, v);
}
else{
print("Something went wrong, line 624.");
}
}
else if(my_primestat() == $stat[mysticality]){
drink(3, ybr);
if(item_amount(ssd) == 0){
create(1, ssd);
drink(1, ssd);
}
else if(item_amount(ssd) >= 1){
drink(1, ssd);
}
else{
print("Something went wrong, line 637.");
}
}
else{
print("WHAT?! You don't have a Main Stat? Are you an astral spirit?");
}
print("Booze Drank");
}
#Eating...
if(my_level() < 7){
print("Too low of a level to eat.");
}
else if(my_fullness() >= 1){
print("You're too full to eat this food.");
}
else if(my_level() >= 7 && my_fullness() == 0){
print("Eating Food.");
if(my_primestat() == $stat[muscle]){
eat(3, hhm);
}
else if(my_primestat() == $stat[moxie]){
eat(3, slhm);
}
else if(my_primestat() == $stat[mysticality]){
eat(3, sphm);
}
else{
print("WHAT?! You don't have a Main Stat? Are you an astral spirit?");
}
print("Food Eaten.");
}
}
Thanks,
-Duff