Page 1 of 1

[Addon] Commander - Automated trade

Posted: Mon Nov 01, 2010 11:36 pm
by romvn
You might wonder how automated trade can be done. I think there are some ways to do and one of them is using this addon, Commander. The idea behind it is very simple, Text messaging. The bot character will give commands to the others (might be bot or non-bot) by whispering them.

You can use my predefined commands or make your own commands, it's up to you but you SHOULD change MAGICWORD to prevent another players from controling your characters :D

Below is a sample script that does automated trade. You want to trade an item from slot 1 on character1 to character2. Character1 has to run bot, character2 doesn't have to do so. These 2 characters are in the same party.

Code: Select all

trader = RoMScript("GetPartyMember(1);");
-- these 3 belows vars map to 3 commands in Commander addon
magicWord = "MAGICWORD";
agreeTrade = "AgreeTrade";
acceptTrade = "AcceptTrade";

cmdAgreeTrade = "SendChatMessage('" .. magicWord .. " " .. agreeTrade .. "', 'WHISPER', 0, '" .. trader .. "');";
cmdAcceptTrade = "SendChatMessage('" .. magicWord .. " " .. acceptTrade .. "', 'WHISPER', 0, '" .. trader .. "');";
sendMacro("RequestTrade('party1');");
yrest(1000);
sendMacro(cmdAgreeTrade);
yrest(1000);
sendMacro("PickupBagItem(GetBagItemInfo(1))"); -- I use slot 1 for demonstration
yrest(1000);
sendMacro("ClickTradeItem(1)") ;
yrest(1000);
sendMacro(cmdAcceptTrade);
yrest(1000);
sendMacro("AcceptTrade('');");
yrest(1000);
sendMacro(cmdAcceptTrade);
yrest(1000);
sendMacro("AcceptTrade('');");
yrest(1000);
Obviously, you can use this addon to do various tasks. Just put more commands and write scripts for them.
Happy botting !

Re: [Addon] Commander - Automated trade

Posted: Tue Nov 02, 2010 3:21 am
by caramel
Algorithm and way to proceed very inspired on :
http://www.rompros.com/rom-guides/2137- ... emote.html