Page 1 of 1
Festival Event
Posted: Sun Feb 03, 2013 2:04 am
by ZZZZZ
Just trying to get a script working to repeat the Rose throwing event from the current festival.
Have this so far.
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- # 5 --><waypoint x="3073" z="155" y="44" tag='GETBUFF'>
player:target_NPC("Waysie Stainbrick");
yrest(200);
sendMacro("ChoiceOption(2);");
yrest(300);
sendMacro("ChoiceOption(1);");
yrest(500);
if not player:hasBuff("Elegant Proof of Purchase") then
__WPL:setWaypointIndex(__WPL:findWaypointTag("GETBUFF"));
end
</waypoint>
<!-- # 2 --><waypoint x="3011" z="121" y="44"> </waypoint>
<!-- # 3 --><waypoint x="3027" z="113" y="44">
player:target_Object("Mr Swallowtail's Toss of Elegance");
--Kokomo 120386
--Baabaa Sheep 120384
-- 120385
ignoreOldObj=nil
while true do
creatures={120386,120385,120384}
mytarget=nil
for k,id in pairs(creatures) do
if ignoreOldObj==nil then
mytarget=player:findNearestNameOrId(id)
else
mytarget=player:findNearestNameOrId(id,ignoreOldObj)
end
if mytarget~=nil then
player:target(mytarget)
RoMScript("UseExtraAction(1)");
ignoreOldObj=mytarget.Address;
yrest(99);
break;
end
end
repeat
player:update();
until player.Casting==false
end
</waypoint>
<!-- # 4 --><waypoint x="3012" z="124" y="44"> </waypoint>
<!-- # 5 --><waypoint x="3073" z="155" y="44"> player:target_NPC("Waysie Stainbrick");
sendMacro("ChoiceOption(2);");
</waypoint>
</waypoints>
I got the part that does the actual rose throwing from another thread, my issue is after it completes the game it doesn't continue back to the NPC to hand it in and restart.
Any help would be great, thanks
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Re: Festival Event
Posted: Sun Feb 03, 2013 3:52 am
by rock5
You never exit the "while true do" loop. You need some condition that the event is finished and then break from the loop.
Re: Festival Event
Posted: Sun Feb 03, 2013 4:53 am
by ZZZZZ
ok, is there any way to detect when the ExtraAction(1) disappears? That is the only indicator that i can think of.
Re: Festival Event
Posted: Sun Feb 03, 2013 6:19 am
by lisa
you usually get a buff when doing an event like this, so maybe check if you have a buff next time you do it =)
Re: Festival Event
Posted: Sun Feb 03, 2013 3:23 pm
by Ego95
I tried to make somthing like this too, lisa. You don't get any buffs. The only buff you get is after you have paid a transport rune. The buff i like a "ticket" you need to do the event. After you start the event the buff disappears and you get the extra skill. It ends after six waves of mobs or after your extra skill disappears.
AlterEgo95
Re: Festival Event
Posted: Sun Feb 03, 2013 3:58 pm
by dr-nuker
Lazy as I am I just check if a certain time has passed.
So I might loose some seconds in total, but who cares?
it's like:
Code: Select all
time = os.time()
while(120 > (time.os()-time)) do
game here
end
nothing more, nothing less. So it builds empty tables but well, still works for lazybones
Re: Festival Event
Posted: Mon Feb 04, 2013 1:50 am
by Mer-Ki-Vah
Use this lins:
Code: Select all
while RoMScript("ExtraActionBarFrame:IsVisible()") do
..........
RoMScript("UseExtraAction(1)");
.........
end
Re: Festival Event
Posted: Mon Feb 04, 2013 5:21 am
by runehemma
i try too put this on
while RoMScript("ExtraActionBarFrame:IsVisible()") do
..........
RoMScript("UseExtraAction(1)");
.........
end
but i dont get it too re run
Re: Festival Event
Posted: Mon Feb 04, 2013 5:39 am
by lisa
probably because you actually did the
while RoMScript("ExtraActionBarFrame:IsVisible()") do
before it was visible.
Basically you want something like this.
Code: Select all
function doevent(_arg)
local function aquaevent(machineID)
local ignoreOldObj, mytarget
local creatures={120386,120385,120384}
repeat
player:target(player:findNearestNameOrId(machineID))
Attack()
yrest(200)
until RoMScript("ExtraActionBarFrame:IsVisible()")
while RoMScript("ExtraActionBarFrame:IsVisible()") do
for k,id in pairs(creatures) do
if ignoreOldObj==nil then
mytarget=player:findNearestNameOrId(id)
else
mytarget=player:findNearestNameOrId(id,ignoreOldObj)
end
if mytarget~=nil then
player:target(mytarget)
RoMScript("UseExtraAction(1)");
ignoreOldObj = mytarget.Address;
break;
end
yrest(1)
end
repeat
yrest(500)
player:updateCasting()
until player.Casting == false
end
end
for k,v in pairs(settings.profile.skills) do
v.AutoUse = false
end
player:moveTo(CWaypoint(3080,161))
player:target_NPC(120380);
yrest(500);
sendMacro("ChoiceOption(2);");
yrest(500);
sendMacro("ChoiceOption(1);");
yrest(500);
if _arg == 1 then
player:moveTo(CWaypoint(3044,117))
aquaevent(120392)
elseif _arg == 2 then
player:moveTo(CWaypoint(3041,61))
aquaevent(120392)
else
player:moveTo(CWaypoint(3038,11))
aquaevent(120393)
end
player:moveTo(CWaypoint(3080,161))
player:target_NPC(120380);
yrest(500);
sendMacro("ChoiceOption(2);");
end
Stand near the NPC for the event.
Start bot with commandline and then look at which machine is empty, 1 being closest to NPC, 3 being furthest.
If you decide you want to use the middle machine just type
doevent(2)
at the command line.
Scores 40-55, usually around 45.
Re: Festival Event
Posted: Mon Feb 04, 2013 8:49 am
by runehemma
Command> doevent
Invalid Command
Command> doevent(2)
onLoad error: [string "doevent(2)"]:1: attempt to call global 'doevent' (a nil v
Re: Festival Event
Posted: Mon Feb 04, 2013 9:07 am
by lisa
that code I posted needs to be put into a userfunction.
Something like this.
Re: Festival Event
Posted: Mon Feb 04, 2013 11:36 am
by tajnyuser
lisa wrote:
Scores 40-55, usually around 45.
Haha, it's joke? Without micromacro i have 80+ points, only with ingame macro.
Re: Festival Event
Posted: Mon Feb 04, 2013 5:51 pm
by lisa
tajnyuser wrote:Haha, it's joke? Without micromacro i have 80+ points, only with ingame macro.
Nope no joke, I never bothered to make it more efficient, end of the day all I wanted was the festival tickets and I am not short of dias. So I set it to repeat the userfunction 60 times and I go do other things while the bot does all the "work" for me.
I do notice you say things about the code I shared but you never shared your in game macro for others.
Re: Festival Event
Posted: Mon Feb 04, 2013 6:01 pm
by runehemma
lisa were you change too run more and 1 time
Re: Festival Event
Posted: Mon Feb 04, 2013 6:20 pm
by lisa
on the commandline instead of just doing
use
that will just repeat the code 60 times, change the 60 number to what ever you want. Keep in mind it isn't checking for other people so only do a huge number if you think no one else will try to use the same game spot.
Re: Festival Event
Posted: Mon Feb 04, 2013 7:22 pm
by Ego95
tajnyuser, share your macro
If we get less than 80 points we will lol you
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Re: Festival Event
Posted: Mon Feb 04, 2013 8:09 pm
by lisa
AlterEgo95 wrote:tajnyuser, share your macro
If we get less than 80 points we will lol you
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Simple mathmatics really, 6 rounds, 7 mobs each round.
It seems random but even best case round you get, 1 X 4 point, 2 X 2 points, 4 X 1 point, 12 points per round. 6 X 12 = 72.
Average overall would be around 10 points a round.
Even if you hit every single mob getting more than 80 points would be a rare occasion.
Concidering a cast time of 1 second, 10 seconds a round, you could manage to hit every single mob if you have a ping under 200, anyone with a ping over 350 would struggle to score more than 60.
Re: Festival Event
Posted: Wed Feb 06, 2013 8:13 am
by Budzer
My PB is 76 points.... And you can lower the cast by housekeeper potion and Curse runes... Of course other speed cast buffs works too. But it is much matter of luck, misses no green mobs etc..... My scores varies from 40 to PB
![Razz :P](./images/smilies/icon_razz.gif)
Usually round 65.