-
Notifications
You must be signed in to change notification settings - Fork 2
/
AutoStronghold.py
167 lines (134 loc) · 5.54 KB
/
AutoStronghold.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
import Character
import Context
import DataType
import Field
import Inventory
import Key
import Npc
import Packet
import Quest
import Terminal
import time
# created by: leroy.jenkins93
# https://strategywiki.org/wiki/MapleStory/Quests/Gate_to_the_Future#Lost_Emblem
################################### NOTES ###################################
# The purpose of this script is to let your bots enter stronghold
# automatically when they reach level 165+
# if you want, you can add on more quests so that it finishes the
# empress prequests too, but idk anyone who actually does empress anymore
# so I decided to leave it out.
#
# If a lot of you end up commenting in favor of adding empress, I might
# do it depending on how free I am
#############################################################################
Terminal.SetRushByLevel(False)
while True:
time.sleep(1)
currentMap = Field.GetID()
jobid = Character.GetJob()
level = Character.GetLevel()
#-----------------------
# quest ID and states
#-----------------------
exploringFuture = Quest.GetQuestState(31103)
chiefAlex = Quest.GetQuestState(31104)
henesysInRuins = Quest.GetQuestState(31105)
fallOfCygnus = Quest.GetQuestState(31106)
scoutingStronghold = Quest.GetQuestState(31124)
piercingDefenses = Quest.GetQuestState(31125)
lostEmblem = Quest.GetQuestState(31126)
# after the above quests, you can enter stronghold
if jobid == -1 or level == -1:
#not in game
continue
if Terminal.IsRushing():
time.sleep(1)
continue
if level >= 165:
# if character is above level 165, rush to future henesys
# this will automatically accept Exploring the future
if currentMap == 271010000:
Character.Teleport(-596, 154)
# if this quest is not completed,
if exploringFuture != 2:
if currentMap != 271010000:
Terminal.Rush(271010000)
continue
# if we are in the map, hand in the quest to alex
Quest.CompleteQuest(31103, 2142001)
elif chiefAlex != 2:
# if not in map, rush to it
if currentMap != 271010000:
Terminal.Rush(271010000)
continue
if chiefAlex == 0:
Quest.StartQuest(31104, 2142001)
elif Quest.CheckCompleteDemand(31104, 2142001) == 0:
# answer his quiz
Npc.ClearSelection()
Npc.RegisterSelection("Kerning City")
Npc.RegisterSelection("You were a runaway")
Npc.RegisterSelection("Stan")
Npc.RegisterSelection("An old golden watch")
Quest.CompleteQuest(31104, 2142001)
elif henesysInRuins != 2:
if currentMap != 271010000:
Terminal.Rush(271010000)
continue
if henesysInRuins == 0:
Quest.StartQuest(31105, 2142001)
elif Quest.CheckCompleteDemand(31105, 2142002) == 0:
Quest.CompleteQuest(31105, 2142002)
elif fallOfCygnus != 2:
if currentMap != 271010000:
Terminal.Rush(271010000)
continue
if fallOfCygnus == 0:
Quest.StartQuest(31106, 2142002)
elif Quest.CheckCompleteDemand(31106, 2142002) == 0:
Quest.CompleteQuest(31106, 2142002)
elif scoutingStronghold != 2:
if scoutingStronghold == 0:
Terminal.Rush(271010000)
time.sleep(1)
# and then accept from alex
Quest.StartQuest(31124, 2142001)
continue
elif Quest.CheckCompleteDemand(31124,2142001) == 0:
Terminal.Rush(271010000)
time.sleep(1)
Quest.CompleteQuest(31124, 2142001)
else:
# quest is in progress, rush to stronghold entrance
if currentMap == 271030010:
Character.Teleport(867, 148)
time.sleep(2)
Character.EnterPortal()
else:
Terminal.Rush(271030010)
elif piercingDefenses != 2:
if piercingDefenses == 0:
Terminal.Rush(271010000)
time.sleep(1)
# and then accept from alex
Quest.StartQuest(31125, 2142001)
continue
elif Quest.CheckCompleteDemand(31125, 2142001) == 0:
Terminal.Rush(271010000)
time.sleep(1)
Quest.CompleteQuest(31125, 2142001)
else:
# not done yet
if currentMap != 271030010 or currentMap != 271030000:
Terminal.Rush(271030010)
else:
# we are in the map to get the item
# im assuming you have stable kill settings on
emblem = Field.FindItem(4032922)
if emblem.valid:
Character.Teleport(emblem.x, emblem.y)
time.sleep(2)
Character.LootItem()
time.sleep(2)
else:
Terminal.SetRushByLevel(True)