Page 1 of 2

(help) sell looted item and go back again

Posted: Thu Dec 30, 2010 2:58 pm
by andzon
Is it possible to make my character to sell those looted item and go back to the farming zone again?

Re: (help) sell looted item and go back again

Posted: Thu Dec 30, 2010 6:04 pm
by jduartedj
Yes! see loadpaths() in the wiki for more info.

Re: (help) sell looted item and go back again

Posted: Fri Dec 31, 2010 1:43 am
by andzon
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?

Re: (help) sell looted item and go back again

Posted: Fri Dec 31, 2010 7:42 am
by rock5
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?
If you go to the rombot wiki (see jduartedj signature) you can read about how player:merchant() works.

Re: (help) sell looted item and go back again

Posted: Fri Dec 31, 2010 8:07 am
by jduartedj
rock5 wrote:
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?
If you go to the rombot wiki (see jduartedj signature) you can read about how player:merchant() works.
Also check player profile settings AUTOSELL .... anyway wiki SHOULD enlighten you.

Re: (help) sell looted item and go back again

Posted: Fri Dec 31, 2010 2:16 pm
by andzon
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 );?

do i need to put my character near the merchant?
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.
what is 5-7_bugs_repair_back? if so... is it another waypoint file?


and
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, ...

what is this inv_autosell? where do i put it? in profile?

Re: (help) sell looted item and go back again

Posted: Fri Dec 31, 2010 8:23 pm
by rock5
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 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:do i need to put my character near the merchant?
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:what is 5-7_bugs_repair_back? if so... is it another waypoint file?
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 this inv_autosell? where do i put it? in profile?
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=".

So the basic steps to doing this are:
1. Create your main waypoint file that kills or harvests or whatever, making sure the last waypoint is somewhere near the first one. Lets call it 'farm1'.
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.
3. Create another waypoint file that starts from there, goes to the npc, executes player:merchant, then returns to that waypoint. Make sure that the last waypoint is not closer the start than the first waypoint. Let's call it 'farm1_repair'.
4. Now at waypoint 5 of the first waypoint file 'farm1' you could just go to repair each time you reached it by using loadPaths("farm1_repair") but probably what you want is to check some conditions first. eg. if your bag is too full or your weapons dura is too low or you've collected x number of a certain item or any combination. For example you could have,

Code: Select all

if 5 > inventory:itemTotalCount(0) then -- if number of empty slots is less then 5
    loadPaths("farm1_repair")
end 
5. At the last waypoint of 'farm1_repair' reload the main file

Code: Select all

loadPaths("farm1")
Hope that helps.

Re: (help) sell looted item and go back again

Posted: Sat Jan 01, 2011 12:51 am
by andzon
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.
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 ?

Re: (help) sell looted item and go back again

Posted: Sat Jan 01, 2011 2:51 am
by rock5
andzon wrote:
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.
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 ?
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.

Re: (help) sell looted item and go back again

Posted: Sat Jan 01, 2011 4:38 am
by andzon
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.
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?

Re: (help) sell looted item and go back again

Posted: Sat Jan 01, 2011 8:34 pm
by rock5
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?
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.

Re: (help) sell looted item and go back again

Posted: Sun Jan 02, 2011 12:22 am
by andzon
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.

Re: (help) sell looted item and go back again

Posted: Sun Jan 02, 2011 3:50 am
by rock5
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.
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.

Re: (help) sell looted item and go back again

Posted: Sun Jan 02, 2011 6:00 am
by andzon
THANK YOU ROCK! IT MAKES PERFECT SENSE NOW!

now the only question would be how do i make it auto repair using this waypoint? I know the wiki says using steamline.. i downloaded it but where should i put the folder? and how do i make it activate?

and how do i set it to repair only the durability is low?

Re: (help) sell looted item and go back again

Posted: Sun Jan 02, 2011 8:03 am
by rock5
When you use player:merchant, it will automatically click "Repair All". You don't need an addon.

If you want to check your durability before loading the repair file you can use.

Code: Select all

if 80 > inventory:getMainHandDurability() then
    loadPaths("farm1_repair")
end 
This way it will only go for repairs if your main hand durability falls below 80%.

Re: (help) sell looted item and go back again

Posted: Sun Jan 02, 2011 10:51 am
by andzon
ok another stupid question.. where do i put the code you just post above? below waypoint 5?

and and mind posting the autosell code too? they can combine together right?

Re: (help) sell looted item and go back again

Posted: Sun Jan 02, 2011 7:53 pm
by rock5
andzon wrote:ok another stupid question.. where do i put the code you just post above? below waypoint 5?
That's what you can use instead of checking for bag space so you would replace the code at waypoint 5.
andzon wrote:and and mind posting the autosell code too? they can combine together right?
When you use the player:merchant command, besides repairing, it will buy and sell according to the buy and sell options in your profile.

Re: (help) sell looted item and go back again

Posted: Mon Jan 03, 2011 12:52 am
by andzon
<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" />
alright to active autosell, i have to copy paste these to my profile right? it could be anywhere right ?

so is this?
<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" />
do i still need to install add-ons?



btw i did what u told and i got all these errors..

Image


may i know whats the problem?


What i did:
1) I created my own waypoints around the map and from the waypoints which is nearest to the npc i put
if 3 > inventory:itemTotalCount(0) then -- if number of empty slots is less then 5
loadPaths("repairandsell")
end
</waypoint>
below it ( i copy from your farm 1)

2) then i create another waypoint from my farm to the npc and back to my farm and i put
player:merchant("Dimar");
</waypoint>
below the waypoint near the npc and i put
loadPaths("farm1") </waypoint>
at the end of the script.

And i got this problem....

Re: (help) sell looted item and go back again

Posted: Mon Jan 03, 2011 8:11 am
by jduartedj
An XML tag is incorrect or missing try posting the whole file.

Re: (help) sell looted item and go back again

Posted: Mon Jan 03, 2011 12:16 pm
by rock5
andzon wrote:alright to active autosell, i have to copy paste these to my profile right? it could be anywhere right ?
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:so is this?
<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" />
do i still need to install add-ons?
To use the 'dura' and 'stats' options you do need to install the ingamefunctions.