Page 1 of 2

Halloween Event - Sugarcane Candy collect

Posted: Fri Nov 02, 2012 7:18 am
by Ego95
Halloween Event - Sugarcane Candy collect

I've written a small waypoint file to collect the Sugarcane Candys of the "Celt" family. You can get 2 titles for them. First title, if you trade 20 Sugarcane Candys and second one if you trade 300. You can only get 20 per day and it's really annoying to go to these npc's every day because you have to go to logar, varanas, aslan-valley, ystra and to the obsidian-stronghold.

What do you need?

-rock5's travelTo userfunction
-some housemaid potions "Potion: Princely Look" (if you have 10 it's okay I think)

Just start the waypoint file in front of the varanas bridge.

Have fun ;)

Ego95
Halloween_Event.xml
v 2
improved support for all languages
(18.45 KiB) Downloaded 276 times

Re: Halloween Event - Sugarcane Candy collect

Posted: Fri Nov 02, 2012 8:10 am
by dr-nuker
Hello honeypuffs!

I made something similar and just had a test today.

My script also works (at least for me) but it is for the english client!

You will need the teleport addon and the worldtraveler function!
You also need a frog transform pot from the event. You get it from the suspicious ghost at varanas central!
If you want you can change to another pot...

Teleport is only used once in aslan house at mailbox so we dont stuck at the door.
Dont wonder about how i use the worldtraveler function. I just do it step by step because if the game crashes you can easily restart the bot at any position.

Basically this script runs around and collects candies.
Additionally it goes to dalanis (i had to insert rests since my rom loves to crash there... you might want to remove those...)
and gets the transformation pots from the big pumpkinhead.
Another little addon is that it tries to scare people in varanas west for the ghost. It is extraordinary bad and failurous in that but it gets one coin for a bit of running...

This script should be started right on the bridge. Since I have multiple points at the girl there I decided to shift point #1 a bit more onto the bridge...

Right now i`m doing a script for the pranksters in dalanis. If i get it to work a bit more smoothly i will also attach it here.

I also made something for the farms with the midnight pumpkin which i will test later.

Anyone managed to program something for the evenr malatina dungeon or the mad fires?

br
nuker

Re: Halloween Event - Sugarcane Candy collect

Posted: Fri Nov 02, 2012 8:13 am
by Ego95
lol, mine is better :P

Re: Halloween Event - Sugarcane Candy collect

Posted: Fri Nov 02, 2012 8:59 am
by dr-nuker
AlterEgo95 wrote:lol, mine is better :P
might be...

Hope you manage one for mad fires, to proof ;)

Re: Halloween Event - Sugarcane Candy collect

Posted: Sat Nov 03, 2012 7:23 am
by Edamh
I used dr-nuker's version since it was for English client. I had to tweak it a couple of places. I added the following:

I changed the waypoint type to TRAVEL since the bot was aggroing on some mobs

Code: Select all

<waypoints type="TRAVEL">
I changed the check for the costume to check for either housemaid frog potion or the frog transformation potion from the suspiscious ghost

Code: Select all

	function frog()
		player:update()
		if not player:hasBuff("506685") then
			if inventory:itemTotalCount(207201) > 0 then	-- Potion: Princely Look	
				inventory:useItem(207201)
			else 
					-- check if have Transformation Potion - Frog
					if (not player:hasBuff("Transformation Potion - Frog")) then   -- am I a frog?
						inventory:useItem(203085); -- become a frog?!
						yrest(4000)
					end
			end
			yrest(2000)
		end
	end
sometimes the bot would transport too fast and not catch the Loading Screen and just sit there and wait; I removed the wait and added a pause instead

Code: Select all

<!-- waitForLoadingScreen(); --> yrest(5000)
Thank you for both your waypoint files!

Re: Halloween Event - Sugarcane Candy collect

Posted: Sat Nov 03, 2012 7:49 am
by dr-nuker
Good to read that.

Sorry about the Travel, i did not concider lower chars to use that ;)

Also a question:

Anyone knows a way how to restrict targeting of an Object by a distance.

like:
Target_Object("blablabla")
if its closer than 50 in x-,y- and z-direction then move otherwise clear target and go to next waypoint...

any ideas? :P

or is there something like target.x, target.y and so on?`also for player? player.x so i calculate the distance amniually... :O

Re: Halloween Event - Sugarcane Candy collect

Posted: Sat Nov 03, 2012 8:06 am
by rock5
target_Object is limited by HARVEST_DISTANCE. So if you don't mind changing that value you could do

Code: Select all

settings.profile.options.HARVEST_DISTANCE=100 -- For example, or any value you like
player:target_Object("blablabla")
It will only target "blablabla" if within the range specified.

You could calculate the distance like you were saying but I believe the above example is more efficient because it's checking the distance as it searches for the object.

Re: Halloween Event - Sugarcane Candy collect

Posted: Sun Nov 04, 2012 9:17 pm
by dr-nuker
rock5 wrote:target_Object is limited by HARVEST_DISTANCE. So if you don't mind changing that value you could do

Code: Select all

settings.profile.options.HARVEST_DISTANCE=100 -- For example, or any value you like
player:target_Object("blablabla")
It will only target "blablabla" if within the range specified.

You could calculate the distance like you were saying but I believe the above example is more efficient because it's checking the distance as it searches for the object.
Thanks a lot!

Now I`m just lacking one last sprinkle of sugar...

Any idea how to identify in which direction a mob is facing?
So ideally i want to teleport in the back of a mob but i`m too blind to find the correct function to find that out...

Re: Halloween Event - Sugarcane Candy collect

Posted: Sun Nov 04, 2012 11:53 pm
by rock5
I believe Lisas telefollow userfunction does that.
http://www.solarstrike.net/phpBB3/viewt ... 668#p36668

Re: Halloween Event - Sugarcane Candy collect

Posted: Mon Nov 05, 2012 5:26 pm
by Cindy
This is a nice WP, ty, without it I wouldn't have bothered with this event :)

Now I'm hooked, looking forward to the other stuff to come.

Also, near the end, in Dalanis, i added a piece to talk to Pumpkinhead, accept a quest

Code: Select all

	<!-- # 23 --><waypoint x="-5370" z="5469" y="42">		
		player:target_NPC(116034);
		yrest(250)
		ChoiceOptionByName("Trick or treat! I'd like to have my Lil' Reward now!")
		AcceptQuestByName("Those Naughty Kids")
	</waypoint>
Then turn it in by the npc near the snoop

Code: Select all

<!-- # 31 --><waypoint x="-4288" z="5085" y="7">		
		--player:target_NPC("Snoop");
		--player:sleep();
	</waypoint>
	<!-- #  1 --><waypoint x="-4165" z="4952" y="14">	</waypoint>
	<!-- #  2 --><waypoint x="-4154" z="4873" y="14">	</waypoint>
	<!-- #  3 --><waypoint x="-4235" z="4829" y="13">	
		player:target_NPC("Belle Rossly");
		yrest(1500)
		CompleteQuestByName("Those Naughty Kids");
		yrest(899)
		AcceptQuestByName("Pumpkin Pranksters");
		player:sleep();
	</waypoint>

Re: Halloween Event - Sugarcane Candy collect

Posted: Mon Nov 05, 2012 6:33 pm
by dr-nuker
I think you might get a little problem with the pumpkinhead.
At least on the server im playing on the quest is not always there so basically you can only accept at specific times.

To improve the gathering at the ghost in varans west i'd love to find out if scaring kids is still successfull or if it fails.
I thought about counting the stacked buff before scaring and afterwards if it stacked one kids are still scarable if not it is good to go scare adults.
But i have not found out how to get the amount of stacked buffs. Another possibility is to read the red text "Kid's screams don't satisfy you anymore!" but i'm too non-programmer to make that work. Help would be great ;)


I added my file for the Pranksters in Dalanis.
It starts where the trick or treat waypoints end. Unfortunally it is bugged a bit.
For given reason I'm not smart enought to 100% sure start the run once the pumpkins spawn.
If anyone knows how to fix that i would love to see the results here ;)

Basically it runs around clicking and catching the pranksters. It also tries to trade chocolate and lollipops at the moving prankster....

br
nuker

Re: Halloween Event - Sugarcane Candy collect

Posted: Mon Nov 05, 2012 7:37 pm
by Cindy
I got a lot of "Kids arent good enough scare some adults" red messages. I asked a question about how to read red text a week or so ago, haven't yet figured it out.

The pumpkinhead, it works fine when its not there, i am not sure what gets the quests to show up.

How about the Pumpkin Prankster? he appears at different spots.. and sometimes he gives me stuff, and sometimes he scares me away... not sure what you need for that either...

Re: Halloween Event - Sugarcane Candy collect

Posted: Mon Nov 05, 2012 7:53 pm
by dr-nuker
Cindy wrote:I got a lot of "Kids arent good enough scare some adults" red messages. I asked a question about how to read red text a week or so ago, haven't yet figured it out.

The pumpkinhead, it works fine when its not there, i am not sure what gets the quests to show up.

How about the Pumpkin Prankster? he appears at different spots.. and sometimes he gives me stuff, and sometimes he scares me away... not sure what you need for that either...
To me it looks like:

He trades you milk chocolate and lolipops (both bound ones) for event stuff like fireworks. If you cant supply him with candies anymore, but talk to him, he gives you a debuff and lets you run around.

Re: Halloween Event - Sugarcane Candy collect

Posted: Tue Nov 06, 2012 12:13 am
by rock5
dr-nuker wrote:But i have not found out how to get the amount of stacked buffs
You could use "getBuff" but it might be easier to use "hasBuff". Even though it is typically used to return a true or false answer, it does also return a the buff count. So you could do

Code: Select all

__, beforecount = player:hasBuff("buff name")
...
scare kid
...
__, aftercount = player:hasBuff("buff name")

if beforecount == aftercount then
   -- Failed to scare kid
else
   -- Successfully scared kid
end

Re: Halloween Event - Sugarcane Candy collect

Posted: Tue Nov 06, 2012 6:19 pm
by dr-nuker
Thanks Rock5,

but i`m not smart enought to make that work...

I think I'll try without that piece of extra code.

Re: Halloween Event - Sugarcane Candy collect

Posted: Tue Nov 06, 2012 7:17 pm
by japanac
EN version of 1st waypoint.

Re: Halloween Event - Sugarcane Candy collect

Posted: Fri Nov 09, 2012 11:55 am
by xrozhija
Any way to force it to start from waypoint #1? As for me, it randomly starts with waypoints and many other waypoints, but never #1, even if I start it right next to snoop at Varanas, then it jumps to waypoint #44.

Re: Halloween Event - Sugarcane Candy collect

Posted: Fri Nov 09, 2012 12:32 pm
by MinMax
Insert as last file in the onload session ==> __WPL:setWaypointIndex(1);
and start near Sturebold .

Re: Halloween Event - Sugarcane Candy collect

Posted: Thu Oct 31, 2013 8:16 am
by nerf
I tried all the waypoints and do not work, someone has a updated version?

Re: Halloween Event - Sugarcane Candy collect

Posted: Thu Oct 31, 2013 8:39 am
by Ego95
What did not work? Maybe I'm going to edit that version, but I'm on holidays atm so I didnt actually played the newest patch. What I saw, there is something in my file which should be deleted. In the first lines there's something with "Renumber". You should delete this line.