Disenchant Dealer
-
Turbomuemmel
- Posts: 7
- Joined: Fri Jan 14, 2011 11:02 am
Disenchant Dealer
Hello
want from the dealer purchased true Disenchant
my waypoint file error reports
want from the dealer purchased true Disenchant
my waypoint file error reports
- Attachments
-
- testen.xml
- (962 Bytes) Downloaded 199 times
Re: Disenchant Dealer
I saw 3 problems.
1. You have the start of waypoint but then you do all the code in the onload.
2. There was no closing onload tag "</onLoad>".
3. We usually use the empty slots id (0) to count empties because the name "<EMPTY>" gets interpreted as a tag in xml files. You can use that in lua files but it's best to just get in the habit of using 0.
1. You have the start of waypoint but then you do all the code in the onload.
2. There was no closing onload tag "</onLoad>".
3. We usually use the empty slots id (0) to count empties because the name "<EMPTY>" gets interpreted as a tag in xml files. You can use that in lua files but it's best to just get in the habit of using 0.
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
player:openStore("Shamp", _option);
-- inventory:update() -- not needed. getItemCount updates the inventory.
-- while inventory:getItemCount("Lehrlingslangstiefel") > inventory:itemTotalCount(0,"bags")-- not sure what you mean here
while 1 > inventory:itemTotalCount(0,"bags") do -- fills bag with items
inventory:storeBuyItem("Lehrlingslangstiefel");
end
while ( inventory:getItemCount("Lehrlingslangstiefel") > 0 ) do
-- run disenchant macro... not sure what to use for this
-- Find some boots
local boots = inventory:findItem("Lehrlingslangstiefel")
-- Use Disenchant skill
RoMScript("UseSkill(1,3)") -- Make sure your Disenchant is on tab 1, skill 3.
-- Clicks the item
RoMScript("PickupBagItem("..boots.BagId..")")
rest( 3550 );
end
</onLoad>
</waypoints>- 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.”
- Ronald Reagan
Re: Disenchant Dealer
-
Last edited by startxkdm on Mon Dec 31, 2012 5:32 am, edited 1 time in total.
Re: Disenchant Dealer
The error message just means it finished the onload code and tried to go to a waypoint but there aren't any. If you are going to have an onload only waypoint file then the onload should never finish or it should end when it's finished with an "error" command.
I think what you want to do is put the whole thing a loop. You could just use a generic loop that loops for ever, egor
Or you could loop until you can't disenchant anymore. I'm not sure what you would check. Maybe if you run out of money or bag space because it's full of runes.
Try encircling the whole thing with
I think what you want to do is put the whole thing a loop. You could just use a generic loop that loops for ever, eg
Code: Select all
while true do
...
endCode: Select all
repeat
...
until falseTry encircling the whole thing with
Code: Select all
repeat
...
until inventory:itemTotalCount(0) == 0 or 10 > inventory.Money
error("Finished disenchanting")- 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.”
- Ronald Reagan
Re: Disenchant Dealer
-
Last edited by startxkdm on Mon Dec 31, 2012 5:33 am, edited 1 time in total.
Re: Disenchant Dealer
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
repeat
player:openStore("Mallor", _option);
-- inventory:update() -- not needed. getItemCount updates the inventory.
-- while inventory:getItemCount("Rusted Axe") > inventory:itemTotalCount(0,"bags")-- not sure what you mean here
while inventory:itemTotalCount(0,"bags") > 1 do -- fills bag with items
inventory:storeBuyItem("Rusted Axe");
end
while ( inventory:getItemCount("Rusted Axe") > 0 ) do
-- run disenchant macro... not sure what to use for this
-- Find some boots
local boots = inventory:findItem("Rusted Axe")
-- Use Disenchant skill
RoMScript("UseSkill(1,3)") -- Make sure your Disenchant is on tab 1, skill 3.
-- Clicks the item
RoMScript("PickupBagItem("..boots.BagId..")")
rest( 3550 );
end
until inventory:itemTotalCount(0) == 0 or 10 > inventory.Money
error("Finished disenchanting")
</onLoad>
</waypoints>I noticed a mistake with this line and fixed it.
Code: Select all
while 1 > inventory:itemTotalCount(0,"bags") do -- fills bag with items- 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.”
- Ronald Reagan
Re: Disenchant Dealer
-
Last edited by startxkdm on Mon Dec 31, 2012 5:33 am, edited 1 time in total.
Re: Disenchant Dealer
-
Last edited by startxkdm on Mon Dec 31, 2012 5:34 am, edited 1 time in total.
Re: Disenchant Dealer
I'm not sure why you got the "boot" issue. It's probably a matter of timing. You just need to check "boot before using it. Try changing the following
to
Code: Select all
-- Find some boots
local boots = inventory:findItem("Rusted Axe")
-- Use Disenchant skill
RoMScript("UseSkill(1,3)") -- Make sure your Disenchant is on tab 1, skill 3.
-- Clicks the item
RoMScript("PickupBagItem("..boots.BagId..")")
rest( 3550 );Code: Select all
-- Find some boots
local boots = inventory:findItem("Rusted Axe")
if boots then
-- Use Disenchant skill
RoMScript("UseSkill(1,3)") -- Make sure your Disenchant is on tab 1, skill 3.
-- Clicks the item
RoMScript("PickupBagItem("..boots.BagId..")")
rest( 3550 );
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.”
- Ronald Reagan
Re: Disenchant Dealer
-
Last edited by startxkdm on Mon Dec 31, 2012 5:38 am, edited 1 time in total.
Re: Disenchant Dealer
replace
with
Code: Select all
while inventory:itemTotalCount(0,"bags") > 1 do -- fills bag with items
inventory:storeBuyItem("Rusted Axe");
end
Code: Select all
local buy = inventory:itemTotalCount(0,"bags") - 1
store:buyItem("Rusted Axe", buy)
That means you messed up somewhere, can't tell you what is wrong unless you post all of the onload code.7:37pm - C:/micromacro/scripts/rom/classes/waypointlist.lua:83: Failed to compile and run Lua code for waypointlist onLoad event.
Remember no matter you do in life to always have a little fun while you are at it 
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Disenchant Dealer
-
Last edited by startxkdm on Mon Dec 31, 2012 5:38 am, edited 1 time in total.
Re: Disenchant Dealer
that will always crash 100%repeat
player:openStore("Mallor", _option);
-- inventory:update() -- not needed. getItemCount updates the inventory.
-- while inventory:getItemCount("Rusted Axe") > inventory:itemTotalCount(0,"bags")-- not sure what you mean here
local buy = inventory:itemTotalCount(0,"bags") - 1
store:buyItem("Rusted Axe", buy)
end
repeat
........
end
will never work
try this
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
repeat
player:openStore("Mallor", _option);
local buy = inventory:itemTotalCount(0,"bags") - 1
store:buyItem("Rusted Axe", buy)
while ( inventory:getItemCount("Rusted Axe") > 0 ) do
inventory:update()
local boots = inventory:findItem("Rusted Axe")
if boots then
-- Use Disenchant skill
RoMScript("UseSkill(1,3)") -- Make sure your Disenchant is on tab 1, skill 3.
-- Clicks the item
RoMScript("PickupBagItem("..boots.BagId..")")
rest( 3550 );
end
end
until inventory:itemTotalCount(0) == 0 or 10 > inventory.Money
error("Finished disenchanting")
</onLoad>
</waypoints>
Remember no matter you do in life to always have a little fun while you are at it 
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Disenchant Dealer
-
Last edited by startxkdm on Mon Dec 31, 2012 5:38 am, edited 2 times in total.
Re: Disenchant Dealer
-
Last edited by startxkdm on Mon Dec 31, 2012 5:38 am, edited 1 time in total.
Re: Disenchant Dealer
yeah I edited it, try it again with what is posted now.
Remember no matter you do in life to always have a little fun while you are at it 
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Disenchant Dealer
-
Last edited by startxkdm on Mon Dec 31, 2012 5:37 am, edited 1 time in total.
Re: Disenchant Dealer
I didn't get a compile error so maybe it's something else such as a userfunction or something.
- 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.”
- Ronald Reagan
Re: Disenchant Dealer
-
Last edited by startxkdm on Mon Dec 31, 2012 5:37 am, edited 1 time in total.
Re: Disenchant Dealer
-
Last edited by startxkdm on Mon Dec 31, 2012 5:37 am, edited 1 time in total.