Page 1 of 1

Lvl 92 xp/tp farm

Posted: Fri Aug 21, 2015 12:13 pm
by sauhard
So an exp/tp event just started, so i decided to share a small waypoint for farming xp/tp.

Instructions:
1. It starts at: 59.0, 49.5 The mobs i farm are Skeleton Soldiers. They also drop good amount of blend runes.
2. Since i am a mage so i have put in the food id and housemaid pot id which i want to be on everytime. You can edit the food you wanna use in the script depending upon your class.

The script should work well, but there are 2 problems which i face need to be removed for being perfect:

1. Although i built the waypoints far away from any obstacles, but the bot targets a the mob in between through a building and ends up wasting 10 sec there. It does un stick but meh i don't like it :P If anyone can help me out there.
2. Auto repair using simple hammers. I have been looking for this long since i am way too afraid to put the bot on all night and end up having broken weapon, so if anyone could help me out there aswell.

Re: Lvl 92 xp/tp farm

Posted: Fri Aug 21, 2015 2:04 pm
by beanybabe
I use this when in cluttered area to help not get stuck. 80 to 120 seems to work on mage you need to have good gear if mobs are close together with this set.

<waypoints>
<onLoad>
changeProfileOption("MAX_TARGET_DIST", 80)

Re: Lvl 92 xp/tp farm

Posted: Fri Aug 21, 2015 5:50 pm
by Bill D Cat
I probably would have commented the onload section a bit to indicate which buffs you were checking. You might also want to use the IDs for mobs, just in case someone wants to use it with a client that isn't using English by default. Here's a quick edit to show you what I mean. I'm not sure which ID is right for the Skeleton Soldier, but it shouldn't matter. If one of them isn't in the area, the bot can't attack it anyway.

Code: Select all

<onload>
settings.profile.mobs = {"105433,108502"} -- Skeleton Soldier
   oldOnLeaveCombat = settings.profile.events.onLeaveCombat
   function settings.profile.events.onLeaveCombat()
      if oldOnLeaveCombat then
         oldOnLeaveCombat()
      end
      if (not player:hasBuff("506684")) then inventory:useItem(207200) end -- Unbridled Enthusiasm
      if (not player:hasBuff("507068")) then inventory:useItem(207649) end -- Ham Sandwich
      if (not player:hasBuff("506686")) then inventory:useItem(207202) end -- Clear Thought
      if (not player:hasBuff("506685")) then inventory:useItem(207201) end -- Princely Look
      if (not player:hasBuff("501337")) then inventory:useItem(200277) end -- Hero Potion
      if (not player:hasBuff("506271")) then inventory:useItem(206874) end -- Grassland Mix
      if (not player:hasBuff("623776")) then inventory:useItem(241965) end -- Elegant Cuisine Delicacy
      if (not player:hasBuff("623773")) then inventory:useItem(241962) end -- Royal Radiance Cocktail
   end
</onload>

Re: Lvl 92 xp/tp farm

Posted: Fri Aug 21, 2015 7:15 pm
by lisa

Code: Select all

	inventory:update()
	local hammer = inventory:itemTotalCount(201967);
	if ( 50 > inventory:getMainHandDurability() ) then 
		if hammer > 0 then
			cprintf(cli.lightred,"repairing mainhand....");
			inventory:useItem(201967);
			RoMScript("PickupEquipmentItem(15)");
			cprintf(cli.yellow,"done!\n");
			inventory:update();
		else
			cprintf(cli.lightred,"No simple rapair hammers in bag!\n");
			--player:clearTarget();
			player:sleep();
		end
	end

Re: Lvl 92 xp/tp farm

Posted: Sat Aug 22, 2015 1:03 am
by beanybabe
Nice code Lisa I was missing the check for 0 hammers and that caused problems now and then.
if hammer > 0 then

Someone may be able to fix these to be language independent.

Code: Select all

-- heal up	
if (player.Class1 or player.Class2 == CLASS_DRUID) and (player:hasBuff("Corrosion")) then  player:cast("DRUID_ANTIDOTE") end
if (player.Class1 or player.Class2 == CLASS_DRUID) and ( 15 > player.HP/player.MaxHP*100 ) then  player:cast("DRUID_RECOVER") end
if (player.Class1 == CLASS_ROGUE) and (not player:hasBuff("500675")) and shouldhide == "true" then player:cast("ROGUE_HIDE"); end 

Code: Select all

-- this one you need an alarm.wav  put in same folder in folder Runes Of Magic\interface\addons\ingamefunctions\
while ((CountPlayers()) and (CountPlayers(nil,true, true) > 0)) do
	if (player.Class1 or player.Class2 == CLASS_DRUID) and (not player:hasBuff("Corrosion")) then player:cast("DRUID_ANTIDOTE") end
	if (player.Class1 == CLASS_ROGUE) and (not player:hasBuff("500675")) and shouldhide == "true" then player:cast("ROGUE_HIDE");	end  
	playalarm()
	print("1 or more players found. Don't bot. Wait")
	rest(10000);
end;	

Re: Lvl 92 xp/tp farm

Posted: Sat Aug 22, 2015 2:08 am
by lisa
beanybabe wrote:Nice code Lisa
Pretty sure I didn't even write it, it was posted on forum somewhere.

Re: Lvl 92 xp/tp farm

Posted: Sat Aug 22, 2015 2:17 am
by sauhard
beanybabe wrote:I use this when in cluttered area to help not get stuck. 80 to 120 seems to work on mage you need to have good gear if mobs are close together with this set.

<waypoints>
<onLoad>
changeProfileOption("MAX_TARGET_DIST", 80)
Uhm i tried with it, but then bot stops using some ranged skills like Flame.

Re: Lvl 92 xp/tp farm

Posted: Sat Aug 22, 2015 9:20 am
by beanybabe
Sorry this will work better for mage

changeProfileOption("COMBAT_DISTANCE", 80)
changeProfileOption("MAX_TARGET_DIST", 150)
changeProfileOption("LOOT_DISTANCE", 155)
changeProfileOption("LOOT_IN_COMBAT", "false")
changeProfileOption("LOOT_ALL", "true")

Re: Lvl 92 xp/tp farm

Posted: Sat Aug 22, 2015 10:18 am
by rock5
If you still want to do ranged attacks but just don't want it to take so long unsticking, you can use the unstick functions. I'm surprised Lisa didn't mention it as they are her baby. http://www.solarstrike.net/phpBB3/viewt ... 427#p33427

I'm not sure how easy it is to break from a fight though. I think you have to set break_fight = true. But it might try to fight the same mob again immediately so you might have to add them to the ignore list. eg.

Code: Select all

unstick3()
	if player.Fighting and not player.Battling then
		player:addToMobIgnoreList(player.TargetPtr)
		break_fight = true
	end
end
That might work.

Re: Lvl 92 xp/tp farm

Posted: Fri Sep 25, 2015 6:17 pm
by sauhard
Ok i recently made a new waypoint for farming mobs. I tried to incorporate the simple repair hammer with that.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onload>

changeProfileOption("MAX_TARGET_DIST", 50)
changeProfileOption("LOOT_DISTANCE", 50)
function WC()
 inventory:update()
   local hammer = inventory:itemTotalCount(201967);
   if ( 100 > inventory:getMainHandDurability() ) then 
      if hammer > 0 then
         cprintf(cli.lightred,"repairing mainhand....");
         inventory:useItem(201967);
         RoMScript("PickupEquipmentItem(15)");
         cprintf(cli.yellow,"done!\n");
         inventory:update();
      else
         cprintf(cli.lightred,"No simple rapair hammers in bag!\n");
         --player:clearTarget();
         player:sleep();
      end
   end
end
   
   oldOnLeaveCombat = settings.profile.events.onLeaveCombat
   
   function settings.profile.events.onLeaveCombat()
      if oldOnLeaveCombat then
         oldOnLeaveCombat()
      end
      if (not player:hasBuff("506684")) then
         inventory:useItem(207200);           ------- Unbridled Enthusiasm
      end

      if (not player:hasBuff("623770")) then
         inventory:useItem(241959);end          ------- Wedding Food
   
      if (not player:hasBuff("506685")) then
         inventory:useItem(207201);end          -------- Princely Look      
		 if (not player:hasBuff("506271")) then
         inventory:useItem(206874);end            -------  Grassland Mix
		 if (not player:hasBuff("506687")) then   --------  Luck Pot
         inventory:useItem(207203);end
		 if (not player:hasBuff("623767")) then  -------  Meaningful Love Cake Slice
         inventory:useItem(202895);end
   end
</onload>
	<!-- #  1 --><waypoint x="-9153" z="-15107" y="155"> WC()	</waypoint>
</waypoints>
I am facing few problems:
1. It behaves weird when the function is used. For ex- i tried changing the dura value to 108, my wep had dura of 113. Now when i start the waypoint it uses hammer as soon as dura falls to 111 or so. Any idea?
2. I farm mobs which are in combat with each other. If you remember event area near KBN where npc used be in fight with some mobs. So the problem is i can't use Changeprofileoption(MOB). If i do that bot won't target those mobs as they are in combat with npc already.
3. What are the Equipment id for rings necklace and other things?'


EDIT: Tried this, but this didn't work either

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onload>

changeProfileOption("MAX_TARGET_DIST", 50)
changeProfileOption("LOOT_DISTANCE", 50)   
   oldOnLeaveCombat = settings.profile.events.onLeaveCombat
    inventory:update()
   local hammer = inventory:itemTotalCount(201967);
   if ( 108 > inventory:getMainHandDurability() ) then 
      if hammer > 0 then
         cprintf(cli.lightred,"repairing mainhand....");
         inventory:useItem(201967);
         RoMScript("PickupEquipmentItem(15)");
         cprintf(cli.yellow,"done!\n");
         inventory:update();
      else
         cprintf(cli.lightred,"No simple rapair hammers in bag!\n");
         --player:clearTarget();
         player:sleep();
      end
   end
   function settings.profile.events.onLeaveCombat()
      if oldOnLeaveCombat then
         oldOnLeaveCombat()
      end
      if (not player:hasBuff("506684")) then
         inventory:useItem(207200);           ------- Unbridled Enthusiasm
      end

      if (not player:hasBuff("623770")) then
         inventory:useItem(241959);end          ------- Wedding Food
   
      if (not player:hasBuff("506685")) then
         inventory:useItem(207201);end          -------- Princely Look      
		 if (not player:hasBuff("506271")) then
         inventory:useItem(206874);end            -------  Grassland Mix
		 if (not player:hasBuff("506687")) then   --------  Luck Pot
         inventory:useItem(207203);end
		 if (not player:hasBuff("623767")) then  -------  Meaningful Love Cake Slice
         inventory:useItem(202895);end
   end
</onload>
	<!-- #  1 --><waypoint x="-9153" z="-15107" y="155"> </waypoint>
</waypoints>

Re: Lvl 92 xp/tp farm

Posted: Sat Sep 26, 2015 2:09 am
by rock5
It returns the percent durability. So for 108 of 113 is 108/113*100 = 95.57%. So try 95.

Re: Lvl 92 xp/tp farm

Posted: Sat Sep 26, 2015 4:49 am
by sauhard
rock5 wrote:It returns the percent durability. So for 108 of 113 is 108/113*100 = 95.57%. So try 95.
Ah yes oercentage worked :D
Any idea about 2nd and 3rd issue?

Re: Lvl 92 xp/tp farm

Posted: Sat Sep 26, 2015 6:39 am
by rock5
2. I think this has been covered before. Not sure I remember how we dealt with it. Maybe try changing ANTI_KS in the profile to false? That should allow it to attack targets already fighting someone else.

3. There is a section of the getInventoryRange function that deals with the equipments slots. You should find it about line 767 of inventory.lua. Here are a few lines as an example.

Code: Select all

	elseif rangeLower == "head" then
		return 0, 0, "equipment"
	elseif rangeLower == "hands" then
		return 1, 1, "equipment"
	elseif rangeLower == "feet" then
		return 2, 2, "equipment"
	elseif rangeLower == "chest" then
		return 3, 3, "equipment"
So Head is 0, Hands are 1, Feet are 2, etc.

Re: Lvl 92 xp/tp farm

Posted: Sat Sep 26, 2015 8:43 am
by Bill D Cat
sauhard wrote:3. What are the Equipment id for rings necklace and other things?'
Here is a list of equipment items and what slot number they correspond to:
0 Head
1 Hands
2 Feet
3 Upper Body
4 Lower Body
5 Cape
6 Belt
7 Shoulders
8 Necklace
9 Ammunition
10 Ranged Weapon
11 Ring 1
12 Ring 2
13 Earring 1
14 Earring 2
15 Main hand
16 Off-hand
17 Gathering tools
18 Amulet 1
19 Amulet 2
20 Amulet 3
21 Back (Wings)

Re: Lvl 92 xp/tp farm

Posted: Sun Sep 27, 2015 2:21 am
by rock5
The bot has slot 17 list as "unknown", probably because we couldn't figure out what it was. Where did you get "Gathering tools" from?

Re: Lvl 92 xp/tp farm

Posted: Sun Sep 27, 2015 9:25 am
by Bill D Cat