(help) sell looted item and go back again
Posted: Thu Dec 30, 2010 2:58 pm
Is it possible to make my character to sell those looted item and go back to the farming zone again?
MicroMacro home
https://www.solarstrike.net/phpBB3/
If you go to the rombot wiki (see jduartedj signature) you can read about how player:merchant() works.andzon wrote:ok i saw in my createpath.lua im able to do everything myself by going to the merchant and press numpad 4 and stuff, but how do i make it autosell?
Also check player profile settings AUTOSELL .... anyway wiki SHOULD enlighten you.rock5 wrote:If you go to the rombot wiki (see jduartedj signature) you can read about how player:merchant() works.andzon wrote:ok i saw in my createpath.lua im able to do everything myself by going to the merchant and press numpad 4 and stuff, but how do i make it autosell?
what is 5-7_bugs_repair_back? if so... is it another waypoint file?Now you have to create a waypoint file, which leads your character to the repair NPC
e.g. '5-7_bugs_repair.xml'
<waypoints>
<!-- Thats a demo to interact with the NPC Tracy -->
<!-- # 1 --><waypoint x="-12282" z="11183"></waypoint>
<!-- # 2 --><waypoint x="-12391" z="10982"></waypoint>
<!-- # 3 --><waypoint x="-12529" z="10941"></waypoint>
<!-- # 4 --><waypoint x="-808" z="-6067">
player:merchant("Tracy");
loadPaths("5-7_bugs_repair_back");
</waypoint>
</waypoints>
The bot will use the waypoint file '5-7_bugs_repair_back' to find back the way to the original boting place.
General Autosell Options
There are some expert options for your profile if you want to automaticly sale items to the merchant NPC.
<option name="INV_AUTOSELL_ENABLE" value="true" />
<option name="INV_AUTOSELL_FROMSLOT" value="61" />
<option name="INV_AUTOSELL_TOSLOT" value="120" />
<option name="INV_AUTOSELL_QUALITY" value="white,green" />
<option name="INV_AUTOSELL_IGNORE" value="Pfeil,Elementar, III" />
INV_AUTOSELL_ENABLE Allows you to enable or disable the Auto Sell function. Valid values are true|false.
INV_AUTOSELL_FROMSLOT Starting bagslot for autosell. Bag 1 has slots 1-30, bag 2 has slots 31-60, ...
INV_AUTOSELL_TOSLOT Ending bagslot for autosell.
INV_AUTOSELL_QUALITY Enter the item qualities you want to sell. Recommended value is "white, green" ( white | green | blue | purple | orange | gold).
INV_AUTOSELL_IGNORE Enter items names (or parts of the names) or item-Ids (not parts of the tooltip text !), you don't want to sell. You can enter more than one item. Use commata as delimites.
Use the normal 'player:merchant()' function in your waypoint file to autosale your items. The bagslot are starting from the top left with 1, 2, 3, ... in the first row, 6, 7, 8, ... in the second row, ...
Well you don't have to but if you are a beginner, it helps to start by having a separate file that goes to the npc.andzon wrote:I actually read it over and over again and yet i still do not get it,
first question, am i suppose to make a new file and put this in player:merchant( npc_name );?
Well obviously. You can't interact with an npc that is out of range. Just go to the npc, execute the player:merchant command, then head back to your stomping grounds.andzon wrote:do i need to put my character near the merchant?
Yes. That user uses 3 waypoint files, the main working 1, 1 that goes to the npc and 1 that returns. Although you could probably have just the 1 file that goes to the npc and returns.andzon wrote:what is 5-7_bugs_repair_back? if so... is it another waypoint file?
That enables the automatic selling of items in your inventory when you use player:merchant. It, and the other related options, go in the options section of the profile with all the other lines that start with "<option name=".andzon wrote:what is this inv_autosell? where do i put it? in profile?
Code: Select all
if 5 > inventory:itemTotalCount(0) then -- if number of empty slots is less then 5
loadPaths("farm1_repair")
end
Code: Select all
loadPaths("farm1")
how am i suppose to do it? ok let's say it's waypoint 5 , i copy the coordinate for waypoint 5 and paste it in a new file ?2. Go to one of the waypoints from that file that is closest to the npc you want to go to. Let say it's waypoint 5.
I mean 'go to' the waypoint ie. walk there. A good idea is, when creating the first waypoint and reaching the spot you think is going to be the closest to the npc, take note of what waypoint number you just created and then take note of any landmarks around you like trees, hills or rocks so you can find your way back later. Then when you've finished the first waypoint file go find those landmarks and start your second waypoint file there.andzon wrote:how am i suppose to do it? ok let's say it's waypoint 5 , i copy the coordinate for waypoint 5 and paste it in a new file ?2. Go to one of the waypoints from that file that is closest to the npc you want to go to. Let say it's waypoint 5.
ok how do i combine the 2 waypoints? alright you mean the first way point is my farming and second way point is to find the nearest "first way point" to the npc and i move from that waypoint to the npc and come back to my farming zone thats my second way point?I mean 'go to' the waypoint ie. walk there. A good idea is, when creating the first waypoint and reaching the spot you think is going to be the closest to the npc, take note of what waypoint number you just created and then take note of any landmarks around you like trees, hills or rocks so you can find your way back later. Then when you've finished the first waypoint file go find those landmarks and start your second waypoint file there.
That's right. Continuing the example above, at waypoint 5 of the farm1 waypoint file it loads the path that goes to the npc. When loading a new path the bot automatically finds the closest waypoint to the player and starts there. In this case it should be the first waypoint of the farm1_repair waypoint file. When it comes back from the npc and reaches the last waypoint of the repair path, it reloads the farm1 path and moves to the nearest waypoint which should be waypoint 5 and continues farming. Of course, because it finds the nearest waypoint, you don't have to have the repair path go back to where it started. You could join up with the farm1 path somewhere else .eg point 10, and continue farming from there. It doesn't even need to be that accurate. As long as the repair path ends somewhere near the farming path so that when it goes to the closest point of the farming path, it doesn't encounter any obstacles, it should work.andzon wrote:ok how do i combine the 2 waypoints? alright you mean the first way point is my farming and second way point is to find the nearest "first way point" to the npc and i move from that waypoint to the npc and come back to my farming zone thats my second way point?
Ok, here's an example I created using my instructions above. It's just an example so the farming file only covers a small area.andzon wrote:hmm this is getting confusing, i starting to understand but do you think is possible for you to send me a example of a bot waypoint file farming and go to a npc and back again? then i would understand better and i could replace it.
Code: Select all
if 80 > inventory:getMainHandDurability() then
loadPaths("farm1_repair")
end
That's what you can use instead of checking for bag space so you would replace the code at waypoint 5.andzon wrote:ok another stupid question.. where do i put the code you just post above? below waypoint 5?
When you use the player:merchant command, besides repairing, it will buy and sell according to the buy and sell options in your profile.andzon wrote:and and mind posting the autosell code too? they can combine together right?
alright to active autosell, i have to copy paste these to my profile right? it could be anywhere right ?<option name="INV_AUTOSELL_ENABLE" value="true" />
<option name="INV_AUTOSELL_FROMSLOT" value="61" />
<option name="INV_AUTOSELL_TOSLOT" value="120" />
<option name="INV_AUTOSELL_QUALITY" value="white,green" />
<option name="INV_AUTOSELL_IGNORE" value="Pfeil,Elementar, III" />
do i still need to install add-ons?<option name="INV_AUTOSELL_NOSELL_DURA" value="110" />
<option name="INV_AUTOSELL_STATS_NOSELL" value=" X,XI" />
<option name="INV_AUTOSELL_STATS_SELL" value="IX" />
below it ( i copy from your farm 1)if 3 > inventory:itemTotalCount(0) then -- if number of empty slots is less then 5
loadPaths("repairandsell")
end
</waypoint>
below the waypoint near the npc and i putplayer:merchant("Dimar");
</waypoint>
at the end of the script.loadPaths("farm1") </waypoint>
No, they are options so need to be in the 'options' section. Just put them with the other lines that begin with <option name.andzon wrote:alright to active autosell, i have to copy paste these to my profile right? it could be anywhere right ?
To use the 'dura' and 'stats' options you do need to install the ingamefunctions.andzon wrote:so is this?do i still need to install add-ons?<option name="INV_AUTOSELL_NOSELL_DURA" value="110" />
<option name="INV_AUTOSELL_STATS_NOSELL" value=" X,XI" />
<option name="INV_AUTOSELL_STATS_SELL" value="IX" />