Dissassemble Materials
Dissassemble Materials
someone can write a small or short macro to dissassemble materials:
has like right click the material (object or item), wait 1sec then right click again (loop it for 999 times)
trying something out, but im missing lot, no idea how start it.
UseItem("Dark Crystal Sand")
wait 1
has like right click the material (object or item), wait 1sec then right click again (loop it for 999 times)
trying something out, but im missing lot, no idea how start it.
UseItem("Dark Crystal Sand")
wait 1
Re: Dissassemble Materials
I Use this:
Change itemname to suit
Code: Select all
<waypoints type="TRAVEL">
<onLoad>
itemname ="Sinners Palm Sap"
RoMScript("CloseAllWindows()") -- Don't want to accidentaly sell stuff!
while inventory:getItemCount(itemname) > 0 do
for i, item in pairs(inventory.BagSlot) do
if item.Name == itemname then
item:use() -- Breaks it up
yrest(1200)
end
end
end
</onLoad>
</waypoints>
Re: Dissassemble Materials
where u place this in?ratzuk wrote:I Use this:Change itemname to suitCode: Select all
<waypoints type="TRAVEL"> <onLoad> itemname ="Sinners Palm Sap" RoMScript("CloseAllWindows()") -- Don't want to accidentaly sell stuff! while inventory:getItemCount(itemname) > 0 do for i, item in pairs(inventory.BagSlot) do if item.Name == itemname then item:use() -- Breaks it up yrest(1200) end end end </onLoad> </waypoints>
Re: Dissassemble Materials
is it possible to make an addon macro of this? so u can activate dissassemble materials ingame by type /Start Dissassemble and maybe possible change item name ingame too. So diff materials can be done ingame, without editing file constantly.
Gave it a try write myself, but gues some probs in it:
Lua file
Xml file
Gave it a try write myself, but gues some probs in it:
Lua file
Code: Select all
local activate = true -- Starting value
SLASH_DissMats1 = "/DissambleMaterials"
SLASH_DissMats2 = "/DM" -- Add as many variations as you like just increment the number
SlashCmdList["DissMats"] = function(editBox, msg)
if msg then
msg = string.lower(msg)
if msg == "start" then -- start
activate = true
elseif msg == "stop" then -- stop
activate = false
else
activate = not activate -- Toggles addon if 'start' or 'stop' is not used.
end
if activate then
itemname ="Dark Crystal Ingot"
RoMScript("CloseAllWindows()") -- Don't want to accidentaly sell stuff!
while inventory:getItemCount(itemname) > 0 do
for i, item in pairs(inventory.BagSlot) do
if item.Name == itemname then
item:use() -- Breaks it up
yrest(1200)
end
end
end
else
SendSystemChat("Dissambling Materials has been stopped")
end
end
end
local DissMats = {} -- the AddOn namespace, all your functions should be placed inside here instead of as globals.
_G.DissMats = DissMats -- expose it to the global scope
local time_remaining = 0.5 -- in seconds
function DissMats:OnUpdate(elapsed)
if activate == false then
return
end
end
Code: Select all
<Ui xmlns="http://www.runewaker.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.runewaker.com/UI.xsd">
<Frame name="DissambleMaterials_Frame">
<Scripts>
<OnUpdate>
DissMats:OnUpdate(elapsed)
</OnUpdate>
</Scripts>
</Frame>
</Ui>
Re: Dissassemble Materials
You can't use rombot functions such as RoMScript and inventory:itemTotalCount in a game addon. You would have to use only in game function.
- 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: Dissassemble Materials
but its still possible? what functions should be needed then
Re: Dissassemble Materials
Try this for your lua. No guarantee it will work though.
I've set it to stop when it runs out of items so you need to start it after getting the items.
Code: Select all
local activate = true -- Starting value
local itemname ="Dark Crystal Ingot"
SLASH_DissMats1 = "/DissambleMaterials"
SLASH_DissMats2 = "/DM" -- Add as many variations as you like just increment the number
SlashCmdList["DissMats"] = function(editBox, msg)
if msg then
msg = string.lower(msg)
if msg == "start" then -- start
activate = true
elseif msg == "stop" then -- stop
activate = false
else
activate = not activate -- Toggles addon if 'start' or 'stop' is not used.
end
end
end
local time_remaining = 1.2 -- in seconds
function DissMats:OnUpdate(elapsed)
if activate = false then
return
end
time_remaining = time_remaining - elapsed
if time_remaining > 0 then
-- cut out early, we're not ready yet
return
end
-- Search for item
local item, name, found
for slot = 1,60 do
index, _, name = GetBagItemInfo(slot)
if name == itemname then
found = index
break
end
end
if found then
StoreFrame:Hide()
UseBagItem(found)
else
activate = false
end
time_remaining = 2 -- reset to 2 seconds
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: Dissassemble Materials
can u also adjust itemname function change, with typing ingame what material u want dissamble?
Re: Dissassemble Materials
its not working so far, will have look tommrow what could be wrong
Re: Dissassemble Materials
Maybe its missing the right click function, or i read somewhere they use: UseItemByName(".....")
added: end at bottom and my program also give maybe error part at
added: end at bottom and my program also give maybe error part at
Code: Select all
function DissMats:OnUpdate(elapsed)
if activate = false then
return
end
Re: Dissassemble Materials
UseBagItem and UseItemByName is basically the same thing done 2 different ways. You could try using UseItemByName but I suspect it's not working because the function is disabled in addons. A lot of functions are disabled in addons and can't be used.Draakje wrote:Maybe its missing the right click function, or i read somewhere they use: UseItemByName(".....")
I think my code is missing an 'end'. I'll update the above code and put the extra 'end' in the right place.Draakje wrote:added: end at bottom and my program also give maybe error part at
- 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: Dissassemble Materials
hmm still not working
Re: Dissassemble Materials
Then I don't think it's possible.
- 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: Dissassemble Materials
I have this message when I start this waypoint : No waypoints to go to waypoint file.
can someone help me please?
thanks
can someone help me please?
thanks
-
- Posts: 527
- Joined: Fri Aug 31, 2012 1:15 pm
Re: Dissassemble Materials
Probably the best bet for Draakje at this point would be to create a script similar to the "createpath" Lua file where it would bring up a menu and you could use the numpad keys to select which item you want to break down. You'd have to build out the menus to where when you select the item you want to breakdown, the lua would set the variable to the correct item name and run the function that loops through the bag items.
Seems like a lot of work though versus the other option... Create a subfolder and make copies of the waypoint file that breaks an item down. Each copy could easily be named by the item it breaks down. That way all those same scripts are in the same location and they all do the same thing. They just each have a different item name in the variable.
Just some thoughts.
Seems like a lot of work though versus the other option... Create a subfolder and make copies of the waypoint file that breaks an item down. Each copy could easily be named by the item it breaks down. That way all those same scripts are in the same location and they all do the same thing. They just each have a different item name in the variable.
Just some thoughts.
Re: Dissassemble Materials
I think the easiest would be to add an option to the slash command eg.
or even easier, to have it disassemble any mat in slot 1 of the bag, by default. Then you wouldn't even need to type the name. Just put the item you want to disassemble into slot 1 and it disassembles all items of that name.
Code: Select all
/DM Start "Dark Crystal Ingot"
- 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: Dissassemble Materials
I don't understand one thing, this code :
Thanks for help
it's a waypoint or I need to put in an other file?<waypoints type="TRAVEL">
<onLoad>
itemname ="Sinners Palm Sap"
RoMScript("CloseAllWindows()") -- Don't want to accidentaly sell stuff!
while inventory:getItemCount(itemname) > 0 do
for i, item in pairs(inventory.BagSlot) do
if item.Name == itemname then
item:use() -- Breaks it up
yrest(1200)
end
end
end
</onLoad>
</waypoints>
Thanks for help
Re: Dissassemble Materials
Yes it is definately a waypoint and needs to be the only code inside the wp, easiest thing to do would be to copy an existing WP and then rename it. Then open it and delete all existing code in the new file and paste in the code that was posted here, then save and give it a try.<waypoints type="TRAVEL">
=)
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
Who is online
Users browsing this forum: No registered users and 1 guest