Page 1 of 1

Wander and Sell

Posted: Thu Oct 15, 2015 1:26 am
by Tintenkiller96
Hi,

i have one question i use the function wander of your bot and was thinking about to use it and a sell function with a script which always path the char to a NPC where he can sell but i dont know how to write a script which includes once the start or use of the wander function ( because i dont know the code for it) but i would maybe have the idea how to write the if-script for the bag when full then and the path to the npc but i dont know how to include the wander function into it maybe u can help me :) :)

PS: what kind of item are purify runes and mix runes "others"? (= for the NONSELL_function because he still sells)

Re: Wander and Sell

Posted: Thu Oct 15, 2015 8:36 pm
by lisa
well easiest thing I can think of to do what you want is to simply do a check for bag space in the onleavecombat section of your profile and if bags are full then load another path that takes you to the NPC to sell and then back to your wander spot and load path wander.

in your profile you will fine this bit.

Code: Select all

	<onLeaveCombat><![CDATA[

	]]></onLeaveCombat>
just pop a check for bag space in there and if bags full then loadPath("wpname").
You will need to create your own waypoint file that will take you to the NPC and back to the farming spot.

That should at least give you an idea of how you can do it =)

Re: Wander and Sell

Posted: Fri Oct 16, 2015 1:38 am
by beanybabe
wander is really only useful in a small area with trees and rocks. its best to just use the create path. Stand somewere safe near the mobs you want to visit. the only 2 button on numpad you need are 1 and 3. press 1 to mark 3 to exit and save. strategy is to not mark same spot a mob is standing. m........1.........m.........1......m..........1.......m........1........m..... m is the mobs press 1 at locations between them. make the last mark the same spot as the first. i usually edit the file and change the end and start to the same number. this make it run more smooth.

I add a bit of code to the top of the file to have it rest if bag gets full in the safe spot. Use notepad to edit or look for lua/xml editor others use. this code could be added to a wander wp.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<waypoints>
  <onLoad>
changeProfileOption("MAX_TARGET_DIST", 100)       --- set near 50  in tight areas  increase 150 in wide flat areas.   100 works most of the time.
changeProfileOption("LOOT_DISTANCE" ,150)       adjust to not loot other players.
changeProfileOption("WAYPOINT_DEVIATION", 0)
changeProfileOption("COMBAT_DISTANCE", 150)   
changeOptionFriendMob("friend", "Rabbit", "Add");     --   annoying mobs   
changeOptionFriendMob("friend", "Hare", "Add");
changeOptionFriendMob("friend", "Scarlet Wing", "Add");
changeOptionFriendMob("friend", "Cavy", "Add");	
</onLoad>
	<!-- #  1 --><waypoint x="-123" z="-123" y="123">                 ---   replace waypoint this with the first waypoint in the file you created.    
		local empties = inventory:itemTotalCount(0);
		if 1 > empties then
			-- Wait for user to make some space in inventory.
			cprintf(cli.yellow,"Not much space left in inventory. Are you sure you want to continue with only %d spaces left?\n",empties)
			player:sleep();
		end;
	</waypoint>
There is a button to target a vendor, if you want to try making path run past a vendor. I have not used the vendor option for selling so hopefully someone suggests how that works for you.

Re: Wander and Sell

Posted: Fri Oct 16, 2015 9:33 am
by Tintenkiller96
Big thanks guys i will give it a try :))