Page 1 of 1

Drillground Survive

Posted: Tue Nov 12, 2013 4:01 pm
by Marlb0ro
Game: "I Want to Survive"
Goal: "Defeat 10 waves of mobs"
Why?: "More Honor Points per round then other WP's posted"

I've got the following code to get there:

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
    changeProfileOption("COMBAT_DISTANCE", 80)
    changeProfileOption("MAX_TARGET_DIST", 180)
    changeProfileOption("LOOT", false)
</onLoad>
	<!-- #  1 --><waypoint x="5121" z="2519" y="13" tag="start">
         	player:updateBuffs();
	 	if not player:hasBuff("Unbridled Enthusiasm") then
        	 inventory:useItem(207200);
	 	end
   	fly()
	</waypoint>
	<!-- #  2 --><waypoint x="5136" z="2566" y="130">	</waypoint>
	<!-- #  3 --><waypoint x="4625" z="3049" y="292">	</waypoint>
	<!-- #  4 --><waypoint x="2470" z="4243" y="292">	</waypoint>
	<!-- #  5 --><waypoint x="2088" z="4632" y="13">	</waypoint>
</waypoints>
At wp #5 the battle begins and 10 waves of mobs with 15 second pauses in between will aggro you.

I tried using a waitforloadingscreen() at #5 but indeed the character just waits and won't fight back. Is there a way I can:
- check if i'm back at wp #1 and continue? or
- check if the 10 waves are over and then waitforloadingscreen?

Re: Drillground Survive

Posted: Wed Nov 13, 2013 2:20 am
by rock5
The bot only fights between waypoint unless you add your own fight sequence.

Try this in waypoint 5.

Code: Select all

repeat
    yrest(500)
    if not isInGame() then -- Being teleported
        waitForLoadingScreen(10)
        rest(2000)
        player:update()
    else
        player:fight() -- Fight anything that attacks me. I think that's all that's needed unless you want to attack them before they attack you.
        player:update()
    end
until 100 >  distance(player.X,player.Z,5121,2519) -- At waypoint 1

Re: Drillground Survive

Posted: Wed Nov 13, 2013 5:10 am
by Marlb0ro
Eager to give that a shot, tho I'm still at work for the next 6 hours.

Am I right that function isInGame() basically checks if you are logged in game, and does not reffer to the minigame being played?

Re: Drillground Survive

Posted: Wed Nov 13, 2013 5:25 am
by rock5
Marlb0ro wrote:Am I right that function isInGame() basically checks if you are logged in game, and does not reffer to the minigame being played?
Correct.

Re: Drillground Survive

Posted: Wed Nov 13, 2013 3:57 pm
by Marlb0ro
That did the trick as intended, hope you have received my thanks.

game bug: after several reruns there is a chance the game won't teleport me back to the start.
So I made it leave Drill grounds and re-enter just to be on the safe side. (yet to be tested long term)

Figured since I'm outside anyway, why not sell my obtained loot to the Guild NPC at the vault. She however does not
function with player:merchant because of unusual options ("Open Honor Shop"). Is there a way to solve this?

Re: Drillground Survive

Posted: Wed Nov 13, 2013 10:17 pm
by rock5
Normally shops open with the first option (if it does jump straight to the shop) and that's what the bot uses. If it's not the first option you can specify the option using a second argument eg.

Code: Select all

player:merchant("name",3)

Re: Drillground Survive

Posted: Thu Nov 14, 2013 6:20 am
by Marlb0ro
Looks like it will work. I did a forumsearch for "merchant" and I've just never seen anyone use an extra argument with it.

The WP is up for final testing and cleaning up my horrible way of waypoint codes. I'm not sure if this will ever make it to the Userfunctions, Waypoints scripts section cause it's needs are somewhat specific (for example there is no guildshop unless you complete a couple of small quests first).

If it's interresting enough for you readers to get maximum (25000) Honor Points in just 2,5 hours I might put some more effort into it.

Re: Drillground Survive

Posted: Fri Nov 15, 2013 6:41 am
by kuripot
rock5 wrote:The bot only fights between waypoint unless you add your own fight sequence.

Try this in waypoint 5.

Code: Select all

repeat
    yrest(500)
    if not isInGame() then -- Being teleported
        waitForLoadingScreen(10)
        rest(2000)
        player:update()
    else
        player:fight() -- Fight anything that attacks me. I think that's all that's needed unless you want to attack them before they attack you.
        player:update()
    end
until 100 >  distance(player.X,player.Z,5121,2519) -- At waypoint 1

only now i notice that

Code: Select all

 player:fight() -- Fight anything that attacks me. I think that's all that's needed unless you want to attack them before they attack you.
what command i use when i want to attack them before they attack me?/

Re: Drillground Survive

Posted: Fri Nov 15, 2013 8:54 am
by rock5
You have to find them and target them first. Finding them depends on what will work in this case. Normal mobs you would find by using

Code: Select all

mob = player:findEnemy()
if mob then
    player:target(mob)
    player:fight()
end
findEnemy is affected by your profile options such as MAX_TARGET_DIST, mob and friends list, TARGET_LEVELDIF_ABOVE and TARGET_LEVELDIF_BELOW, etc.

If it causes you trouble you will have to use a different way to find your target.

Re: Drillground Survive

Posted: Fri Nov 15, 2013 9:30 am
by Marlb0ro
kuripot wrote: what command i use when i want to attack them before they attack me?/
Yeh there's a reason I haven't posted a complete WP yet. Rock's solution works fine for me, but I use a level 75 Mage/Priest with AoE as priority skills that will kill any wave in seconds. (sorry ppl, Mages shine here)

I tried this with my 72 Rogue, but he dies at mob wave 5-6. Perhaps reacting right when the mobs spawn will give a melee character a chance to survive it through
all 10 waves. No matter at what wave you die, you still get part of the Honor Points tho :D

Re: Drillground Survive

Posted: Fri Nov 15, 2013 9:59 am
by ZZZZZ
You can also just set it to travel and run in a circle around the outside....that's all i do when running manually, not sure what speed buffs you would need though.

Re: Drillground Survive

Posted: Fri Nov 15, 2013 10:12 am
by rock5
I think I did that once, flying not running, and they couldn't keep up. I don't know what score I got though. Wouldn't not killing them affect your score and honor point rewards or do you just have to survive?

Re: Drillground Survive

Posted: Fri Nov 15, 2013 1:57 pm
by Marlb0ro
Kiting or even just being back at the Drillground Instructor while the minigame is on will net you the full 840 Honor Points. (I did the kiting with Housemaid pot and Escape Artist title btw. Got a few dodged hits)

But the waypoints should not be too far apart then if you want to keep checking "until 100 > distance(player.X,player.Z,5121,2519)". If you get teleported out without reaching the wp, will the check ever be done?

I'm keeping this in attack mode for my Mage tho, these elites drop significant amounts of much wanted Guild Runes. And the extra buck from the drops arent bad either.

Re: Drillground Survive

Posted: Mon Nov 18, 2013 5:04 pm
by Marlb0ro
This was so easily modified for everyone to use if I just put common sense to it.

Waypoint can be downloaded here: http://www.solarstrike.net/phpBB3/viewt ... =27&t=5351

(still using your tips to actually farm the mobs Rock, my thanks for that)