-
Maxalu
- Posts: 19
- Joined: Wed Jun 25, 2014 7:34 am
#1
Post
by Maxalu » Wed Sep 17, 2014 12:50 pm
Hello i some problems with my code
Code: Select all
<!-- # 2 --><waypoint x="5121" z="2510" y="0">
if (getCurrency("honor") >= 25000) then
__WPL:setWaypointIndex(__WPL:findWaypointTag("wracamy")
fly()
</waypoint>
<!-- # 3 --><waypoint x="5070" z="2565" y="69"> </waypoint>
what is wrong with it ? it gets a LUA compilation and execut fail/stuck
any 1 can help me out?
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#2
Post
by rock5 » Wed Sep 17, 2014 1:08 pm
A basic '
if' statement should look like this
Notice the '
end' at the end.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:
- “They say hard work never hurt anybody, but I figure, why take the chance.”
-
Maxalu
- Posts: 19
- Joined: Wed Jun 25, 2014 7:34 am
#3
Post
by Maxalu » Wed Sep 17, 2014 2:11 pm
rock5 wrote:A basic '
if' statement should look like this
Notice the '
end' at the end.
i have tried with the '
end' at the end and without it still fails...
Code: Select all
<onLoad>
speed()
</onLoad>
<!-- # 1 --><waypoint x="5121" z="2510" y="0" tag="farma">
if (getCurrency("honor") >= 25000) then
__WPL:setWaypointIndex(__WPL:findWaypointTag("wracamy")
end
fly()
</waypoint>
<!-- # 2 --><waypoint x="5070" z="2565" y="69"> </waypoint>
<!-- # 3 --><waypoint x="4927" z="2684" y="158"> </waypoint>
<!-- # 4 --><waypoint x="4705" z="2834" y="267"> </waypoint>
<!-- # 5 --><waypoint x="4399" z="2971" y="282"> </waypoint>
<!-- # 6 --><waypoint x="3881" z="3126" y="307"> </waypoint>
<!-- # 7 --><waypoint x="3559" z="3213" y="313"> </waypoint>
<!-- # 8 --><waypoint x="3113" z="3443" y="311"> </waypoint>
<!-- # 9 --><waypoint x="2837" z="3743" y="321"> </waypoint>
<!-- # 10 --><waypoint x="2656" z="3945" y="318"> </waypoint>
<!-- # 11 --><waypoint x="2517" z="4102" y="301"> </waypoint>
<!-- # 12 --><waypoint x="2405" z="4236" y="234"> </waypoint>
<!-- # 13 --><waypoint x="2318" z="4346" y="171"> </waypoint>
<!-- # 14 --><waypoint x="2244" z="4435" y="119"> </waypoint>
<!-- # 15 --><waypoint x="2097" z="4603" y="35"> </waypoint>
<!-- # 16 --><waypoint x="2067" z="4461" y="118"> </waypoint>
<!-- # 17 --><waypoint x="2058" z="4333" y="185"> </waypoint>
<!-- # 18 --><waypoint x="2057" z="4202" y="217"> </waypoint>
<!-- # 19 --><waypoint x="2060" z="4014" y="233"> </waypoint>
<!-- # 20 --><waypoint x="2060" z="3794" y="249"> </waypoint>
<!-- # 21 --><waypoint x="2060" z="3622" y="263"> </waypoint>
<!-- # 22 --><waypoint x="2060" z="3374" y="281"> </waypoint>
<!-- # 23 --><waypoint x="2060" z="3176" y="297"> </waypoint>
repeat
this is the full wpt with code usage... wtf is wrong
-
BlubBlab
- Posts: 948
- Joined: Fri Nov 30, 2012 11:33 pm
- Location: My little Pony cafe
#4
Post
by BlubBlab » Wed Sep 17, 2014 2:14 pm
You missing a closing ) at least.
Code: Select all
if (getCurrency("honor") >= 25000) then
__WPL:setWaypointIndex(__WPL:findWaypointTag("wracamy"))
end
fly()
-
Maxalu
- Posts: 19
- Joined: Wed Jun 25, 2014 7:34 am
#5
Post
by Maxalu » Wed Sep 17, 2014 2:20 pm
BlubBlab wrote:You missing a closing ) at least.
Code: Select all
if (getCurrency("honor") >= 25000) then
__WPL:setWaypointIndex(__WPL:findWaypointTag("wracamy"))
end
fly()
im so DUMB
thx must be more focused as a new comoner
-
Maxalu
- Posts: 19
- Joined: Wed Jun 25, 2014 7:34 am
#6
Post
by Maxalu » Thu Sep 18, 2014 5:15 am
a question i can buy up to 58 items at once then i want 2 close the store use the items and start buying them again till i have less than 1k of honor is that possible?
Code:
if getCurrency("honor") > 1000 then
store:buyItem(x, 57)
yrest(5000)
RoMScript("CloseAllWindows()")
inventory:useItem(x)
yrest(2000)
until inventory:itemTotalCount(x) == 0
until 250 > getCurrency("honor") then
__WPL:setWaypointIndex(__WPL:findWaypointTag("kup"))
else
__WPL:setWaypointIndex(__WPL:findWaypointTag("lecim"))
end
end
end
i thought of smt like this but its get a compilation error coz i probobly ate somthing...
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#7
Post
by rock5 » Thu Sep 18, 2014 6:10 am
Try this
Code: Select all
while getCurrency("honor") > 1000 do
store:buyItem(x, 57)
yrest(5000)
RoMScript("CloseAllWindows()")
repeat
inventory:useItem(x)
yrest(2000)
until inventory:itemTotalCount(x) == 0
end
That will keep buying and using all the items until your honor is less than 1000. I don't understand the bit about 'kup' and 'lecim'. When do you want to go to kup and when do you want to go to lecim?
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:
- “They say hard work never hurt anybody, but I figure, why take the chance.”
-
Maxalu
- Posts: 19
- Joined: Wed Jun 25, 2014 7:34 am
#8
Post
by Maxalu » Thu Sep 18, 2014 6:29 am
rock5 wrote:Try this
Code: Select all
while getCurrency("honor") > 1000 do
store:buyItem(x, 57)
yrest(5000)
RoMScript("CloseAllWindows()")
repeat
inventory:useItem(x)
yrest(2000)
until inventory:itemTotalCount(x) == 0
end
That will keep buying and using all the items until your honor is less than 1000. I don't understand the bit about 'kup' and 'lecim'. When do you want to go to kup and when do you want to go to lecim?
i wanted 2 go to "kup" if my honor is above 1k( the tag was on the shop ) and "lecim" if its below 1000
thx for the code i will try it asap
Who is online
Users browsing this forum: Ahrefs [Bot] and 2 guests