Secret Garden Ideas
Posted: Mon Mar 24, 2014 5:39 am
I've been working on a file for the Secret Garden / Treasure Riot and have reached my limit on how to make it better.
I've created a file with predefined travel waypoints at each of the chests and once RoMScript("TimeKeeperFrame:IsVisible()") start calling the function getchests() at each waypoint and then checks the TimeKeeperFrame to see if it should go get the last five chests.
This works fine to get ~35 chests in the event, although by manual play I've gotten up to 50.
Opportunities for improvement:
-Using a table and letting it loot the closest chest seemed slower but may be my limit on how code/sort the list.
-Teleporting to the next waypoint seems slower than running with speed over 100. Any way to increase very short distance teleport speed.
-Once speed is increased over ~150, it starts to overshoot the waypoint and has trouble looting the correct chest.
-In manual play you can click to move on to the next chest slightly before the previous chest is done opening, any way to simulate this like move on when cast bar is 90% full.
I've created a file with predefined travel waypoints at each of the chests and once RoMScript("TimeKeeperFrame:IsVisible()") start calling the function getchests() at each waypoint and then checks the TimeKeeperFrame to see if it should go get the last five chests.
This works fine to get ~35 chests in the event, although by manual play I've gotten up to 50.
Opportunities for improvement:
-Using a table and letting it loot the closest chest seemed slower but may be my limit on how code/sort the list.
-Teleporting to the next waypoint seems slower than running with speed over 100. Any way to increase very short distance teleport speed.
-Once speed is increased over ~150, it starts to overshoot the waypoint and has trouble looting the correct chest.
-In manual play you can click to move on to the next chest slightly before the previous chest is done opening, any way to simulate this like move on when cast bar is 90% full.
Code: Select all
function evalClickable(address)
local chest = memoryReadRepeat("byte", getProc(), address + 0x2F0) or 0
if chest ~= 0 then
return true
else
return false
end
end
function getchests()
local chest
chest = player:findNearestNameOrId(123536,nil,evalClickable)
local mydistance = distance(chest, player)
if chest and 50 > mydistance then
player:target_Object(chest.Id, nil, nil, true, evalClickable);
end
end