Andor Trainig Range
Re: Andor Trainig Range
I'm still running the exact same scripts with no crashes
*shrug*
*shrug*
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Andor Trainig Range
Note how I added a line of code to print the objSize (should be objlistSize). See attached screenshot for the failure. The number actually went up even though things were destroyed.
Code: Select all
local function one(ID)
print("targeting: "..ID)
local objectList = CObjectList();
objectList:update();
local objSize = objectList:size()
for i = 0,objSize do
printf("List size:"..objSize)
obj = objectList:getObject(i)
if (obj.Id == ID or ID == 106885) and checkclicked(obj.Address) then
player:target(obj)
RoMScript("UseExtraAction(1)")
yrest(25)
player:target(obj)
RoMScript("UseExtraAction(1)")
if ID == 106883 then
yrest(25)
player:target(obj)
RoMScript("UseExtraAction(1)")
end
yrest(100)
end
end
end
Re: Andor Trainig Range
Is it possible to do reverse loop in lua?
for i = objSize, 0 do
...
end
Or... what else is in the object list? I was hoping just the mobs to kill.. in that case couldnt we do a
while objsize ~= 0 do
--code to kill
--code to refresh objsize
end
for i = objSize, 0 do
...
end
Or... what else is in the object list? I was hoping just the mobs to kill.. in that case couldnt we do a
while objsize ~= 0 do
--code to kill
--code to refresh objsize
end
Re: Andor Trainig Range
objectlist is every "object"
This includes, NPC's, characters, candles, doors, portals, etc, etc, etc
Seeing the list size get bigger doesn't shock me, would need to do prints of each ID, name, coords to work out why the list gets bigger though.
It might be that the fast turtle that gives you skills is loaded at some stage but stays invisible.
It might be that an "object" appears after each wave, for what ever reason.
Things like that are good to save to a log file so you can have a good look at them later.
You could add the entire object list to a table and then re-sort the table in order of ID (for easy reading) and then save it to a log file.
That might tell you why the extra objects after each wave.
This includes, NPC's, characters, candles, doors, portals, etc, etc, etc
Seeing the list size get bigger doesn't shock me, would need to do prints of each ID, name, coords to work out why the list gets bigger though.
It might be that the fast turtle that gives you skills is loaded at some stage but stays invisible.
It might be that an "object" appears after each wave, for what ever reason.
Things like that are good to save to a log file so you can have a good look at them later.
You could add the entire object list to a table and then re-sort the table in order of ID (for easy reading) and then save it to a log file.
That might tell you why the extra objects after each wave.
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Andor Trainig Range
Uhhh, okay I got it to kinda work....game crashed this time. What part of the waypoint determines speed? I get the feeling the bot is casting WAY too fast, faster than necessary.
Edit: Also is there a way to have it cast on each target based on primary importance, or based on target movement speed, like if the object is moving faster towards the line than others? Like killing all the newts first, then the turtles, then the hares then the armored bug?
Edit: Also is there a way to have it cast on each target based on primary importance, or based on target movement speed, like if the object is moving faster towards the line than others? Like killing all the newts first, then the turtles, then the hares then the armored bug?
Last edited by Tamyra on Tue Nov 13, 2012 7:01 pm, edited 1 time in total.
Re: Andor Trainig Range
all of the skill casting is done here
to slow down the skill casting just increase the value of the yrest which are in miliseconds, so 1000 would be 1 second.
there are 3 yrest in total
Code: Select all
if (obj.Id == ID or ID == 106885) and checkclicked(obj.Address) then
player:target(obj)
RoMScript("UseExtraAction(1)")
yrest(10)
player:target(obj)
RoMScript("UseExtraAction(1)")
if ID == 106883 then
yrest(10)
player:target(obj)
RoMScript("UseExtraAction(1)")
end
yrest(100)
end
there are 3 yrest in total
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Andor Trainig Range
this part determines the order things are killed.Tamyra wrote:Edit: Also is there a way to have it cast on each target based on primary importance, or based on target movement speed, like if the object is moving faster towards the line than others? Like killing all the newts first, then the turtles, then the hares then the armored bug?
Code: Select all
one(106882)
one(106882)
one(106881)
one(106883)
one(106884)
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Andor Trainig Range
Lisa, why are you attacking 106882 twice?lisa wrote:Ok this function just scored 1900 and got to round 13, I just call it when it says go.
It does do some "casts" to turtles that have already dissappeared but it is fast enough to just keep up. There is probably an indicator that the "mob" has already been cast on and is in the process of dissappearing.Code: Select all
function tort() local function one(ID) local objectList = CObjectList(); objectList:update(); local objSize = objectList:size() for i = 0,objSize do obj = objectList:getObject(i) if obj.Id == ID or ID == 106885 then print(obj.Name) player:target(obj) RoMScript("UseExtraAction(1)") yrest(10) player:target(obj) RoMScript("UseExtraAction(1)") if ID == 106883 then yrest(10) player:target(obj) RoMScript("UseExtraAction(1)") end yrest(20) end end end one(106882) one(106882) one(106881) one(106883) one(106884) end
(This is why coding standards ask for meaningful names
Code: Select all
tortoiseID = 106881;
newtID = 106882;
armoredbugID = 106883;
rabbitID = 106884;
ammunitionturtleID = 106885;
Re: Andor Trainig Range
Because when I set up a WP it would sometimes try to attack before the blue swirly veil would be out of the way, can't kill them while it is active.
It is also a double check to make sure the newts are all dead, if they are all dead when the second "one" is called it literally takes a few milliseconds, so no great waste of time.
Could probably do all of them twice I guess.
Also sometimes it takes a couple of attacks to kill them, I have had it when manually playing I have had to attack the same mob 4 or 5 times before it died.
It is also a double check to make sure the newts are all dead, if they are all dead when the second "one" is called it literally takes a few milliseconds, so no great waste of time.
Could probably do all of them twice I guess.
Also sometimes it takes a couple of attacks to kill them, I have had it when manually playing I have had to attack the same mob 4 or 5 times before it died.
Original code posted had them all listed, just got deleted at some stage I guess.This is why coding standards ask for meaningful names
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Andor Trainig Range
So far so good with slowing it down, but now I've only scored 900-ish points. Still got 500 guild runes, or the equivalent....so next question would be what's the minimum score required to get 500 of anything good? Also is it random that the rubies are gained or do you have to get a specific score to get those?
Re: Andor Trainig Range
I run it on 3 acc and rewards look totally random. A set score to 3,5k and only difference is that i sometimes get 2 packages as a reword and sometimes 3, but don't know why...
Re: Andor Trainig Range
Okay, I just ran it on another character after adjusting the speed, and the game crashed mid way through round 3, dont think it broke more than 500 points, maybe not even 400, I waited to close the game until after I thought the remaining mobs in that wave would have crossed the line and then logged back in. I got 5x Teardrop Ruby aka 500 rubies when I logged in. So now the question is, when you guys get more than one package, do you mean you can get more than 5 of any one item? Or 5 of one and 5 of another?
Re: Andor Trainig Range
You can get 1 x 5 or 2 x 5 or 3 x 5. The best is when you get 3 x 5 Teardrop Ruby but its extremely rare.
Re: Andor Trainig Range
ah got it... i noticed the one ending in 5 is missing, is that by design?lisa wrote:Because when I set up a WP it would sometimes try to attack before the blue swirly veil would be out of the way, can't kill them while it is active.
It is also a double check to make sure the newts are all dead, if they are all dead when the second "one" is called it literally takes a few milliseconds, so no great waste of time.
Could probably do all of them twice I guess.
Also sometimes it takes a couple of attacks to kill them, I have had it when manually playing I have had to attack the same mob 4 or 5 times before it died.
Original code posted had them all listed, just got deleted at some stage I guess.This is why coding standards ask for meaningful names
Re: Andor Trainig Range
Cindy wrote: ah got it... i noticed the one ending in 5 is missing, is that by design?
Code: Select all
if obj.Id == ID or ID == 106885 then
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Andor Trainig Range
I got 46 points on an alt earlier and got the best reward i have seen. Got 3 certs and 500 rubies....so rewards are definitely random.
Re: Andor Trainig Range
yupZZZZZ wrote:I got 46 points on an alt earlier and got the best reward i have seen. Got 3 certs and 500 rubies....so rewards are definitely random.
Seems very random to me, you could probably score 500 and still get same loot as scoring 4000.lisa wrote:Ok this function easily scores 4000+ and you don't actually get any exciting items, loot seems same as scoring 1800ish.
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
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: Andor Trainig Range
Progress: I made one crash go away, the stupid printf after the event with buffed.Level. I will test when I get a chance with a character that hasn't done it yet, and see if I can figure out what else is crashing it...
Codemod:
Codemod:
Code: Select all
<!-- # 2 --><waypoint x="53" z="411" y="963">
repeat
tort()
printf("Updating...\n")
player:update()
buffed = player:getBuff(622402)
local lvl = 1
if (buffed == nil) then
printf(" Not Buffed ?!?!? \n")
lvl = 3555
player:sleep()
else
local lvl = buffed.Level
end
printf("Level: "..lvl.."\n")
yrest(250)
until (not RoMScript("TimeKeeperFrame:IsVisible()")) or (buffed and lvl >= 3123)
print("Event finished, end score was "..lvl)
</waypoint>
Re: Andor Trainig Range
So I did this:
And it got horribly slow, its printing still, 5 min after the game crashed after I tried to manually play it for a while.
Code: Select all
local function one(ID)
print("targeting: "..ID)
local objectList = CObjectList();
objectList:update();
local objSize = objectList:size()
for i = 0,objSize do
--printf("List size:"..objSize)
obj = objectList:getObject(i)
if (obj.Id ~= 0 and obj.Type ~= -1) then
if (obj.Id == ID or ID == 106885) and checkclicked(obj.Address) then
player:target(obj)
printf(obj.Id.." Obj: "..obj.Name.."\n")
yrest(100)
if obj.Attackable then RoMScript("UseExtraAction(1)") end
yrest(100)
player:target(obj)
yrest(100)
if obj.Attackable then RoMScript("UseExtraAction(1)") end
if ID == 106883 then
yrest(100)
player:target(obj)
yrest(100)
if obj.Attackable then RoMScript("UseExtraAction(1)") end
end
yrest(100)
end
end
end
end
Re: Andor Trainig Range
I think it was mentioned previously that some of them explode or something and take out other mobs? If so, some of the mobs may no longer exist as you are going through the list. Try adding an "obj:update()" after "obj = objectList:getObject(i)". If the object no longer exists then the update will reset the id to 0 so it will be skipped. I think I mentioned this already.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:- “They say hard work never hurt anybody, but I figure, why take the chance.”
- Ronald Reagan
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 1 guest