[Userfunction] coconutshy() - Flowerfestival

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Post Reply
Message
Author
Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

[Userfunction] coconutshy() - Flowerfestival

#1 Post by Rickster »

When I was writing this to the userfunction forum, I saw that there already is a function for this event by kkulesza. Maybe you also want to give his function a try.

Index I release this as beta, because no one else has tested this jet. For me it easily scores up to 50+.
Feel free to report your feedback.

Description
This function does the coconutshy from the flower event on varanas bridge.
!!! Take care, that the userfunction actually does not do the questhandling for you. The event starts at the npc Waysie Fleckstein.
I will not provide a WP file for questhandling, as I do not need it myself.

Start this function manually or from a wp file and then start the event manually.
As soon as the mobs appear it automatically starts to throw at them.
Targeting is priority based, as some mobs give more points.
After the event has finished, the userfunctions stops automatically.

As a starting point there is a WP file attached, which calls the userfunction. Just run the wp file, then manually start the event.

Installation
Put the file "userfunction_coconutshy.lua" in the folder "MM\scripts\rom\userfunctions".
Then you can call the function from every wp file with

Code: Select all

coconutshy()
Additionally you can put the wp file "e_flower_coconut.xml" in the folder "MM\scripts\rom\waypoints".
Then you just have to run this wp file right before starting the event.

Configuration
There are a bunch of options on top of the userfunction. You can change them if you like. On my side it runs fine with the default settings.

Download
userfunction_coconutshy.lua
Version 0.03 beta
(6.56 KiB) Downloaded 225 times
e_flower_coconut.xml
WP file for starting
(137 Bytes) Downloaded 236 times
Last edited by Rickster on Sun Feb 17, 2013 8:54 am, edited 1 time in total.
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: [Userfunction] coconutshy() - Flowerfestival

#2 Post by lisa »

Rickster wrote:After the event has finished, you manually have to break the script.
you can do this when standing at the bench
since there are 3 machines you need to use the specific ID for that machine,
closest to NPC is 120391
middle is 120392
furthest is 120393

I'll just use ID for middle one in this example

Code: Select all

		repeat	
		player:target(player:findNearestNameOrId(120392)) -- ID here for which bench you use
		Attack()
			yrest(200)
		until RoMScript("ExtraActionBarFrame:IsVisible()")
then you can do a while loop and checking for the same thing to dissappear before continuing'

Code: Select all

		while RoMScript("ExtraActionBarFrame:IsVisible()") do
-- code to throw roses
		end
you can then get it to move to the NPC and get the reward

Code: Select all

	player:moveTo(CWaypoint(3080,161))
	
	player:target_NPC(120380);
	yrest(500);
	sendMacro("ChoiceOption(2);");
Hope this helps.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Rickster
Posts: 291
Joined: Sun Oct 24, 2010 4:23 pm

Re: [Userfunction] coconutshy() - Flowerfestival

#3 Post by Rickster »

Thanx Lisa!

New version in OP.
I changed the userfunction, so it automatically stops, when the event finishes.

There are a bunch of options on top of the userfunction. You can change them if you like. On my side it runs fine with the default settings.

I will not provide a WP file for questhandling, as I do not need it myself.

Ric
delay84
Posts: 8
Joined: Fri Jul 20, 2012 12:34 pm

Re: [Userfunction] coconutshy() - Flowerfestival

#4 Post by delay84 »

Nice work! Thank you!

If don't want to restart the bot each time just use that code:

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>
	while true do
		player:target_Object(120391)
		yrest(1000)
		coconutshy()
		player:target_NPC(120380)
		yrest(1000)
		sendMacro("ChoiceOption(2);");
		yrest(1000)
		player:target_NPC(120380)
		yrest(1000)
		sendMacro("ChoiceOption(2);");
		yrest(1000)
		sendMacro("ChoiceOption(1);");
	end
			
</onLoad>
</waypoints>
Attention: It uses one transport rune to reset the game each time
Post Reply