diff --git a/README.md b/README.md index f6ccc83..e0d600a 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ These scripts are the official scripts for CloudBot. | 60+ | [Dark Cathedral -2](dark_cathedral/setup.json) | :star: | :star: :star: :star: | | 70+ | Ancient Scarab Khazel | :star: :star: | :star: :star: | | 80+ | [Stonerefiner](stonerefiner/setup_ek.json) | :star: :star: :star: | :star: :star: :star: | +| 80+ | [Wyrms LB Hills - good if nice skills](lb_wyrm_hills/setup_ek.json) | :star: :star: :star: | :star: :star: :star: | | 90+ | Mother of Scarab | :star: :star: | :star: :star: | | 90+ | [Killer Caimans](killer_caimans/setup.json) | :star: :star: :star: | :star: :star: | | 100+ | [Giant Spider Port Hope](giant_spider_cave/setup_ek.json) | :star: :star: | :star: :star: :star: | diff --git a/lb_wyrm_hills/setup_ek.json b/lb_wyrm_hills/setup_ek.json new file mode 100644 index 0000000..2943266 --- /dev/null +++ b/lb_wyrm_hills/setup_ek.json @@ -0,0 +1,85 @@ +{ +"general": +{ + "loot_type":"auto", + "loot_priority":"first" +}, +"script_options": { + "hours_leave": [9], + "skill_train":"sword", + "sort_deposit": {"alexander":6, "lailene":6, "tamoril":8, "rashid": 9, "green_djinn": 10, "blue_djinn":6} +}, +"containers": +{ + "gold_bp":"Brocade Backpack", + "loot_bp":"Blue Backpack" +}, +"tools":{}, +"items": +{ + "mana potion": {"hotkey":"f12", "id":268, "use":"self"}, + "great health potion": {"hotkey":"f10", "id":239, "use":"self"}, + "brown mushroom": {"hotkey":"f11", "id":3725, "use":"use"} +}, +"spells": +{ + "exura ico":"f1", + "exori ico":"f2", + "exori hur":"f3", + "utura": "f9", + "utani hur": "v", + "exeta res": "x", + "exori gran":"f6", + "exori min":"f7", + "exori":"f4" +}, +"healing": +[ + {"type":"hp", "below_percent":50, "use_item":"great health potion", "priority":3}, + {"type":"hp", "below_percent":85, "use_spell":"exura ico", "min_mana_percent":20, "priority":2}, + {"type":"mp", "below_percent":70, "use_item":"mana potion", "priority":1} +], +"hunt_config": { + "cap_leave": 50, + "mana_name": "mana potion", + "take_mana": 650, + "mana_leave": 145, + "health_name": "great health potion", + "take_health": 100, + "health_leave": 25 +}, +"label_actions": [], +"persistent_actions": +[ +{ + "action": "stop_target_no_supplies", + "interval": 10, + "args": { + "mana": true, + "health": false, + "ammo": false, + "time": false + } + }, + {"action":"cast_spell_if_monsters", "use_in_battle":true, "interval":5, "args":{"spell_hotkey":"x", "min_mp":20, "monsters_count":1, "selected_monsters":["Wyrm"]}}, + {"action":"drop_vials", "interval":30}, + {"action":"haste", "interval":40, "args":{"hotkey":"v"}}, + {"action":"recover_full_mana", "interval":20, "args":{"hotkey":"f9"}}, + {"action":"anti_paralyze", "interval":1, "args":["f1"]}, + {"action":"eat_food", "interval":60, "args":{"hotkey":"f11"}} +], +"target_monsters": +[ + {"name":"Wyrm", "action":"follow", "priority":1, "loot":true}, + {"name":"Energy Elemental", "action":"follow", "priority":1, "loot":false} +], +"target_spells": +[ + {"name":"exori", "min_mana_percent":30, "priority":3, "min_monster_count":2, "cooldown":4, "monsters":["Wyrm", "Energy Elemental"]}, + {"name":"exori gran", "min_mana_percent":65, "priority":5, "min_monster_count":3, "cooldown":6, "monsters":["Wyrm", "Energy Elemental"]}, + {"name":"exori min", "min_mana_percent":50, "priority":4, "min_monster_count":2, "cooldown":6, "monsters":["Wyrm", "Energy Elemental"]}, + {"name":"exori ico", "min_mana_percent":20, "priority":1, "cooldown":6, "monsters":["Wyrm", "Energy Elemental"]}, + {"name":"exori hur", "min_mana_percent":20, "priority":2, "cooldown":6, "monsters":["Wyrm", "Energy Elemental"]} +], +"loot": [] +} diff --git a/lb_wyrm_hills/waypoints.in b/lb_wyrm_hills/waypoints.in new file mode 100644 index 0000000..72ec09f --- /dev/null +++ b/lb_wyrm_hills/waypoints.in @@ -0,0 +1,149 @@ +label start +node (32330, 32835, 7) +stand (32336, 32839, 7) +stand (32336, 32838, 7) +stand (32331, 32835, 6) +label deposit +action deposit +action refill +stand (32336, 32838, 6) +stand (32339, 32836, 7) +label bank +action bank +node (32341, 32837, 7) +node (32340, 32826, 7) +node (32340, 32815, 7) +node (32346, 32814, 7) +stand (32345, 32810, 7) +action sell +action buy_potions +node (32341, 32815, 7) +node (32340, 32827, 7) +node (32343, 32835, 7) +node (32336, 32841, 7) +action check_supplies +label go_hunt +node (32342, 32837, 7) +node (32340, 32825, 7) +node (32350, 32815, 7) +node (32369, 32804, 7) +node (32371, 32784, 7) +node (32370, 32772, 7) +stand (32372, 32770, 7) +stand (32373, 32770, 7) +stand (32377, 32768, 6) +stand (32378, 32768, 6) +stand (32379, 32768, 5) +stand (32380, 32768, 5) +stand (32381, 32768, 4) +stand (32382, 32768, 4) +label hunt +node (32386, 32768, 3) +node (32387, 32758, 3) +node (32384, 32749, 3) +node (32381, 32736, 3) +node (32380, 32733, 3) +node (32390, 32729, 3) +node (32400, 32724, 3) +node (32412, 32724, 3) +node (32418, 32734, 3) +node (32424, 32743, 3) +node (32432, 32748, 3) +node (32435, 32758, 3) +node (32431, 32769, 3) +node (32420, 32779, 3) +node (32407, 32778, 3) +node (32397, 32772, 3) +node (32389, 32768, 3) +node (32387, 32755, 3) +node (32384, 32744, 3) +node (32385, 32735, 3) +node (32392, 32737, 3) +node (32397, 32736, 3) +node (32403, 32735, 3) +node (32410, 32738, 3) +node (32412, 32746, 3) +node (32419, 32753, 3) +node (32421, 32761, 3) +node (32410, 32763, 3) +node (32404, 32759, 3) +node (32396, 32755, 3) +node (32394, 32749, 3) +node (32392, 32741, 3) +stand (32380, 32733, 3) +action check +label leave +stand (32376, 32732, 3) +stand (32375, 32732, 4) +stand (32373, 32731, 4) +stand (32372, 32731, 5) +stand (32371, 32731, 5) +stand (32370, 32731, 6) +stand (32368, 32729, 6) +stand (32367, 32729, 7) +node (32368, 32742, 7) +node (32364, 32753, 7) +node (32362, 32763, 7) +node (32362, 32770, 7) +node (32358, 32778, 7) +node (32351, 32783, 7) +node (32340, 32794, 7) +node (32340, 32809, 7) +node (32340, 32819, 7) +node (32342, 32827, 7) +node (32342, 32835, 7) +node (32338, 32837, 7) +node (32329, 32835, 7) +action check_time +label train +node (32323, 32836, 7) +node (32310, 32847, 7) +node (32310, 32860, 7) +node (32306, 32866, 7) +ladder (32306, 32868, 7) +node (32297, 32873, 6) +node (32280, 32873, 6) +node (32275, 32885, 6) +node (32277, 32893, 6) +node (32283, 32892, 6) +action travel_edron +node (33177, 31766, 6) +node (33175, 31774, 6) +stand (33175, 31775, 6) +node (33180, 31777, 7) +node (33191, 31779, 7) +node (33191, 31790, 7) +node (33180, 31790, 7) +action check_train +label magic +ladder (33181, 31793, 7) +action end +label distance +ladder (33178, 31793, 7) +action end +label club +ladder (33176, 31790, 7) +action end +label sword +ladder (33178, 31787, 7) +action end +label axe +ladder (33181, 31787, 7) +action end +label start trainer +node (33192, 31789, 7) +node (33185, 31778, 7) +stand (33175, 31776, 7) +ladder (33175, 31775, 7) +node (33175, 31772, 6) +node (33175, 31765, 6) +action travel_liberty_bay +node (32281, 32892, 6) +node (32276, 32884, 6) +node (32289, 32872, 6) +node (32305, 32872, 6) +stand (32306, 32868, 6) +node (32311, 32860, 7) +node (32312, 32840, 7) +node (32323, 32835, 7) +stand (32328, 32835, 7) diff --git a/lib.py b/lib.py index 04154b2..35e5f52 100644 --- a/lib.py +++ b/lib.py @@ -326,7 +326,14 @@ def anti_drunk(client, item_equip, item_unequip=None, slot='ring'): else: print('[Action] Equip', item_unequip) client.hotkey(unequip_hotkey) - + +# Cast spell if hp is low +def cast_spell_if_lowhp(client, hotkey, hppercent): + spell_hotkey = hotkey + hp_percentage, mp_percentage = client.status_bar.get_percentage() + if hp_percentage < hppercent: + client.hotkey(spell_hotkey) + # Cast spell if mana full def cast_spell(client, hotkey='v'): spell_hotkey = hotkey