|
|
@ -123,7 +123,7 @@ convert_list = ["Ion-Pack","Ion-Decay","Cheese","Nuclear-thong","Skull","Bottle- |
|
|
|
|
|
|
|
|
farm_sell_list = ["Gold-Chunck","Nuclear-Rock","Nuclear-Waste"] |
|
|
farm_sell_list = ["Gold-Chunck","Nuclear-Rock","Nuclear-Waste"] |
|
|
|
|
|
|
|
|
farm_stock_list = ["Nuclear-Decay","Troll-Skin","Invisible-Cloth","Eazy-Armor","Hell-Blade"] |
|
|
|
|
|
|
|
|
farm_stock_list = ["Nuclear-Decay","Eazy-Armor","Hell-Blade"] |
|
|
|
|
|
|
|
|
friend_list = ["Epilectrik","ImBait","Mtron","Im","IonJunkies-Merc","Robin-Hood","Doctor","Assassin","Mercenary"] |
|
|
friend_list = ["Epilectrik","ImBait","Mtron","Im","IonJunkies-Merc","Robin-Hood","Doctor","Assassin","Mercenary"] |
|
|
|
|
|
|
|
|
@ -777,18 +777,23 @@ class mutant(QWidget): |
|
|
self.status += result |
|
|
self.status += result |
|
|
if result.find(">") != -1: |
|
|
if result.find(">") != -1: |
|
|
self.stat_parsed = True |
|
|
self.stat_parsed = True |
|
|
|
|
|
|
|
|
|
|
|
#Retally items, convert extras |
|
|
if self.stat_parsed and self.status != "": |
|
|
if self.stat_parsed and self.status != "": |
|
|
for item_l in farm_sell_list: |
|
|
for item_l in farm_sell_list: |
|
|
x = self.status.count(item_l) |
|
|
x = self.status.count(item_l) |
|
|
for i in range(x): |
|
|
for i in range(x): |
|
|
self.sell_list.append(item_l) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if i < 3: |
|
|
|
|
|
self.sell_list.append(item_l) |
|
|
|
|
|
else: |
|
|
|
|
|
self.command_str.emit("con "+item_l+"\r\n") |
|
|
|
|
|
|
|
|
for item_l in farm_stock_list: |
|
|
for item_l in farm_stock_list: |
|
|
x = self.status.count(item_l) |
|
|
x = self.status.count(item_l) |
|
|
for i in range(x): |
|
|
for i in range(x): |
|
|
self.stock_list.append(item_l) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if i < 3: |
|
|
|
|
|
self.stock_list.append(item_l) |
|
|
|
|
|
else: |
|
|
|
|
|
self.command_str.emit("con "+item_l+"\r\n") |
|
|
#HP |
|
|
#HP |
|
|
if self.status.find("Hit Points :") != -1: |
|
|
if self.status.find("Hit Points :") != -1: |
|
|
start_index = self.status.index('Hit Points : ') + 15 |
|
|
start_index = self.status.index('Hit Points : ') + 15 |
|
|
@ -880,8 +885,6 @@ class mutant(QWidget): |
|
|
year_str = year_str[:end_index] |
|
|
year_str = year_str[:end_index] |
|
|
#print("Year:" + year_str) |
|
|
#print("Year:" + year_str) |
|
|
self.farm_year = int(year_str) |
|
|
self.farm_year = int(year_str) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self.status = "" |
|
|
self.status = "" |
|
|
|
|
|
|
|
|
#index area |
|
|
#index area |
|
|
@ -946,6 +949,23 @@ class mutant(QWidget): |
|
|
|
|
|
|
|
|
self.area = "" |
|
|
self.area = "" |
|
|
|
|
|
|
|
|
|
|
|
#drop |
|
|
|
|
|
def exit_game(self): |
|
|
|
|
|
self.in_combat=False |
|
|
|
|
|
self.heal = False |
|
|
|
|
|
self.wander = False |
|
|
|
|
|
self.auto_farm = False |
|
|
|
|
|
self.auto_combat = False |
|
|
|
|
|
self.in_play = False |
|
|
|
|
|
self.hunt = False |
|
|
|
|
|
|
|
|
|
|
|
self.ac_check.setChecked(False) |
|
|
|
|
|
self.af_check.setChecked(False) |
|
|
|
|
|
self.ai_check.setChecked(False) |
|
|
|
|
|
self.me_check.setChecked(False) |
|
|
|
|
|
self.ba_check.setChecked(False) |
|
|
|
|
|
self.hu_check.setChecked(False) |
|
|
|
|
|
|
|
|
#Main game loop |
|
|
#Main game loop |
|
|
def mutants(self,result): |
|
|
def mutants(self,result): |
|
|
#update farm year text box |
|
|
#update farm year text box |
|
|
@ -1035,7 +1055,7 @@ class mutant(QWidget): |
|
|
|
|
|
|
|
|
#scrapers |
|
|
#scrapers |
|
|
if result.find("(N)onstop, (Q)uit, or (C)ontinue?") != -1: |
|
|
if result.find("(N)onstop, (Q)uit, or (C)ontinue?") != -1: |
|
|
self.command_str.emit("C\r\n") |
|
|
|
|
|
|
|
|
self.command_str.emit("C") |
|
|
|
|
|
|
|
|
#ion starvation |
|
|
#ion starvation |
|
|
if result.find("You're starving for IONS!") != -1: |
|
|
if result.find("You're starving for IONS!") != -1: |
|
|
@ -1077,6 +1097,7 @@ class mutant(QWidget): |
|
|
#Exit game if.. |
|
|
#Exit game if.. |
|
|
if self.in_combat and result.find("You're not carrying a "+self.weapon.lower()) != -1: |
|
|
if self.in_combat and result.find("You're not carrying a "+self.weapon.lower()) != -1: |
|
|
self.command_str.emit("x\r\n") |
|
|
self.command_str.emit("x\r\n") |
|
|
|
|
|
self.exit_game() |
|
|
|
|
|
|
|
|
#GTFO |
|
|
#GTFO |
|
|
if self.wander and (((result.find("It's too dark to see anything!") != -1 and self.path_step == 0) or |
|
|
if self.wander and (((result.find("It's too dark to see anything!") != -1 and self.path_step == 0) or |
|
|
@ -1182,16 +1203,7 @@ class mutant(QWidget): |
|
|
self.mqtt_str.emit(self.user+" has died") |
|
|
self.mqtt_str.emit(self.user+" has died") |
|
|
self.mqtt_str_quiet.emit(self.user," has died") |
|
|
self.mqtt_str_quiet.emit(self.user," has died") |
|
|
print("MQTT signal emitted") |
|
|
print("MQTT signal emitted") |
|
|
self.in_combat=False |
|
|
|
|
|
self.heal = False |
|
|
|
|
|
self.wander = False |
|
|
|
|
|
self.auto_farm = False |
|
|
|
|
|
self.auto_combat = False |
|
|
|
|
|
self.in_play = False |
|
|
|
|
|
self.ac_check.setChecked(False) |
|
|
|
|
|
self.af_check.setChecked(False) |
|
|
|
|
|
self.ai_check.setChecked(False) |
|
|
|
|
|
self.me_check.setChecked(False) |
|
|
|
|
|
|
|
|
self.exit_game() |
|
|
|
|
|
|
|
|
#farm items |
|
|
#farm items |
|
|
if len(self.local_items) > 0 and not self.in_combat and not self.path_step: |
|
|
if len(self.local_items) > 0 and not self.in_combat and not self.path_step: |
|
|
@ -1367,7 +1379,7 @@ class mutant(QWidget): |
|
|
self.command_str.emit(self.password+"\r\n") |
|
|
self.command_str.emit(self.password+"\r\n") |
|
|
|
|
|
|
|
|
if result == "(N)onstop, (Q)uit, or (C)ontinue?": |
|
|
if result == "(N)onstop, (Q)uit, or (C)ontinue?": |
|
|
self.command_str.emit("Q\r\n") |
|
|
|
|
|
|
|
|
self.command_str.emit("Q") |
|
|
|
|
|
|
|
|
if result == "Make your selection (G,T,F,M,S,? for help, or X to exit): ": |
|
|
if result == "Make your selection (G,T,F,M,S,? for help, or X to exit): ": |
|
|
self.command_str.emit("G\r\n") |
|
|
self.command_str.emit("G\r\n") |
|
|
|