Trade items
Trade items
How can I trade items with my two accounts using micromacro?
Example: I farm 5 items and i need trade this 5 items to my other bot.
Example: I farm 5 items and i need trade this 5 items to my other bot.
Re: Trade items
Sending by mail is easy using my mail userfunction. The sender goes to the mail box and sends, then goes on about it's business. The receiver goes to the mailbox occasionally and checks for mail. Easy.
But trading is more difficult as there is no easy way to have 2 characters communicate. The 2 characters would have to be at the same place at the same time which can be tricky. Which probably explains why there is no trading userfunction. If you want a solution it will very much depend on what your characters are doing when you want them to trade.
So we will need some more information. Are they doing different things? Is one following the other? Are you using the party scripts?
But trading is more difficult as there is no easy way to have 2 characters communicate. The 2 characters would have to be at the same place at the same time which can be tricky. Which probably explains why there is no trading userfunction. If you want a solution it will very much depend on what your characters are doing when you want them to trade.
So we will need some more information. Are they doing different things? Is one following the other? Are you using the party scripts?
- 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: Trade items
To accept the trade you can use this addon: http://www.curse.com/addons/rom/autotrade
I use that when farming tempest height necklaces for guild quests to be used by my guild. I have one character standing in one spot OR I have it following my char, then whenever I get 30 necklaces (max) I trade it to my other char and keep farming.
Not sure how you would do that with the bot though.
I use that when farming tempest height necklaces for guild quests to be used by my guild. I have one character standing in one spot OR I have it following my char, then whenever I get 30 necklaces (max) I trade it to my other char and keep farming.
Not sure how you would do that with the bot though.
Here is my gathering waypoints: http://solarstrike.net/phpBB3/viewtopic.php?f=27&t=3603
Re: Trade items
Cool, so you only need to do one side of the trade. I should be able to come up with something.
Let me see... try this.Untested.
Let me see... try this.
Code: Select all
-- The code you use to find items to send can vary. This is a simple example to send just one item
local item = inventory:findItem("itemname")
local RecipientName = "MrSomething"
if item then -- Lets trade
local Recipient = player:findNearestNameOrId(RecipientName)
if Recipient then
repeat
player:target(Recipient) yrest(1000)
RoMScript("RequestTrade('target')")
yrest(5000) -- Not sure how long the addon needs to react and accept the trade but it will try again until it answers
until RoMScript("TradeFramne:IsVisible()")
yrest(1000)
item:use()
yrest(1000)
RoMScript("AcceptTrade('".. RecipientName .."')")
yrest(1000) -- Again not sure what pause is necessary for addon to react
RoMScript("AcceptTrade('".. RecipientName .."')")
end
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: Trade items
I tried to use this trade feature, but I couldn't make it work.
There is a small typo in: RoMScript("TradeFrame:IsVisible()"), but this was easy to fix.
The problem is that item:use() is like "right clicking" the item. This does not put
items into the trade frame. Either the char tries to equip this item, or you get the
message "item cannot be used" or special item like runes get highlighted, because
they expect you to click an item to embed the rune.
Seems some cursor based implementation is required.
There is a small typo in: RoMScript("TradeFrame:IsVisible()"), but this was easy to fix.
The problem is that item:use() is like "right clicking" the item. This does not put
items into the trade frame. Either the char tries to equip this item, or you get the
message "item cannot be used" or special item like runes get highlighted, because
they expect you to click an item to embed the rune.
Seems some cursor based implementation is required.
Re: Trade items
I looked for some other functions and now I got a working solution:
Code: Select all
function tradeTo(RecipientName,itemTable)
local tradeIndex = 1;
if itemTable then -- Lets trade
local Recipient = player:findNearestNameOrId(RecipientName)
if Recipient then
repeat
player:target(Recipient) yrest(500)
RoMScript("RequestTrade('target')")
yrest(500) -- Not sure how long the addon needs to react and accept the trade but it will try again until it answers
until RoMScript("TradeFrame:IsVisible()")
RoMScript("BagFrame:Show()");
yrest(500)
for j, element in pairs(itemTable) do
RoMScript("PickupBagItem("..tostring(element.SlotNumber)..")");
RoMScript("ClickTradeItem("..tostring(tradeIndex)..")");
tradeIndex = tradeIndex + 1;
if tradeIndex > 8 then
break;
end
yrest(200);
end
yrest(500)
RoMScript("AcceptTrade('".. RecipientName .."')")
yrest(500) -- Again not sure what pause is necessary for addon to react
RoMScript("AcceptTrade('".. RecipientName .."')")
end
end
end
Re: Trade items
in the above function, what does the part do? Not really sure how the j, element in pairs is supposed to work. I get
when running ' tradeTo(name,{"Dreamland Crystal Dust"}) '
Code: Select all
for j, element in pairs(itemTable) do
Code: Select all
6:48pm - IGF:\PickupBagItem(nil)\ [string "local a={PickupBagItem(nil)} return a
"]:1: bad argument #1 to 'PickupBagItem' (number expected, got nil)
Re: Trade items
I'm made a tradeTo userfunction.
http://solarstrike.net/phpBB3/viewtopic ... 208#p59208
http://solarstrike.net/phpBB3/viewtopic ... 208#p59208
- 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
Who is online
Users browsing this forum: Google [Bot] and 2 guests