Page 1 of 1

Ostrich Farm

Posted: Sun Dec 02, 2012 5:18 pm
by Cindy
I don't know how to link my specific post, here is the thread

http://www.solarstrike.net/phpBB3/viewt ... 859#p44859


I added the skeletons of the Ostrich Farm script, hoping to stimulate a group effort to code the actual egg collection/farmer avoidance area.

As is, the bot will pause with player:sleep() you can manual, or do nothing, turn in at the end and go home. One item is better than zero for now.

Re: Ostrich Farm

Posted: Sun Dec 02, 2012 5:23 pm
by dr-nuker
Here comes my script.

It's bad, i know and still needs improvements but i'm open for suggestions!

don't wonder about the numbering it's just part of a big script that i use for the whole event.

Code: Select all

<onload>
function getEggsOnFarm()
	local target = player:findNearestNameOrId("Ostrich Egg");
	teleport(target.X+5, target.Z+5)
	yrest(25)
	player:target_Object("Ostrich Egg");
	player:update();
	RoMScript("UseExtraAction(1)")
	yrest(500)
	RoMScript("UseExtraAction(1)")
	yrest(500)
	RoMScript("UseExtraAction(2)")
	yrest(500)
end

function noautouseofbuffs()
	for k,v in pairs(settings.profile.skills) do
		if v.type == "buff" then
			v.AutoUse = false
		end
	end
end
</onload>
	<!-- # 97 --><waypoint x="-11" z="-35" y="91">
		noautouseofskills() 					-- do not try to use any skill
		-- This starts the game -.-	
		player:target_NPC("Kardly Auck");
		ChoiceOptionByName("Could you explain a little more clearly?")
		yrest(500)
		ChoiceOptionByName("I got it. Take me to the place!")

		repeat
			yrest(100)
			player:update()
		until (player:hasBuff("Disguise"))

		while (player:hasBuff("Disguise")) do
			getEggsOnFarm()
		end
		teleportToWP() 						-- so we might not get stuck in a fence
	</waypoint>

	<!-- #100 --><waypoint x="-5" z="-49" y="68">
		loadProfile()
		yrest(3000)					-- game is over so we can cast skills again
		noautouseofbuffs()					-- but buffs are not needed anyways
		yrest(1000)
		player:target_NPC("Kardly Auck");
		yrest(2000)
		ChoiceOptionByName("Give him the eggs.")
		yrest(1500)
		player:mount();
	</waypoint>
please feel free to give hints and constructive critic :P

edit: it gives me like 10 - 15 eggs

Re: Ostrich Farm

Posted: Sun Dec 02, 2012 5:28 pm
by Cindy
Update, you got to get one egg at least, else you get a transform potion

Re: Ostrich Farm

Posted: Sun Dec 02, 2012 9:21 pm
by grande
Worked out pretty nice, thanks for sharing. Between this and everything else posted on these boards that's about 5 easily runnable events that can also easily be strung together.. could even do a use transport portal rune and reset tickets to start it over.

Re: Ostrich Farm

Posted: Sun Dec 02, 2012 11:40 pm
by rock5
Cindy wrote:I don't know how to link my specific post
You can find a link to the specific post next to the title/subject of each post. It's a small icon that looks like this Image