guild = RoMScript("GetGuildInfo()")
if guild Herb > guild Wood and guild Ore > guild Wood then
--- get wood
elseif guild Wood > guild Herb and guild Ore > guild Herb then
---get herb
else
--- get ore
end
Not sure if its possible but hey, any advice would be great
Also wondering what info (API:GetGuildWarInfo) returns. I'm trying to figure out how to determine what side of siege you are on (blue side or red side) but am having no luck finding any functions other than the above that could be close to what i am after.
Ummm if you have 2 waypoints indexed with number 1, would using __WPL:setWaypointIndex(1) move it to the closest out of the 2? I'll test later if no one reply's.
The numbers in waypoint files are just comments. __WPL:setWaypointIndex(1) will send you to the first waypoint. Note: Normally, when starting a waypoint file, it will start at the nearest waypoint. So, for example, you could have 2 waypoint files in one.
That's because it calculates and sets the closest waypoint before the onload runs. You want it to calculate the closest waypoint after it arrives in zone 402. If you had started the waypoint file in zone 402 then it would find the correct closest waypoint but because you want to start the script outside you will have to calculate it yourself. You can do it like this.
Where do you get waypointtag and where do you get RED?
If you want to start at a particular waypoint we come back to my idea of checking your location. The castles are on the left and right, right? So if you can get an X value somewhere in the middle of the map then you can do
player:updateXYZ()
if player.X > midX then
__WPL:setWaypointIndex(__WPL:findWaypointTag("BLUERES"));
else
__WPL:setWaypointIndex(__WPL:findWaypointTag("REDRES"));
end
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.
<!-- # 9 --><waypoint x="2601" z="137" y="1804" tag='Gatebuff'> Buffgates()
</waypoint>
<!-- # 10 --><waypoint x="3638" z="16" y="2076" tag='Return'>Checkleave() </waypoint> --- run back after res
I have 2 sets of waypoints, 1 for each red gate and 1 for each blue side gate. Would putting __WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X,player.Z,player.Y)) in like so work to load the 'return to gate' waypoint?
function Buffgates()
gate = player:findNearestNameOrId(112064)
if gate then
player:target(gate.Address)
end
target = player:getTarget()
repeat
yrest(200);
if not target:hasBuff("High-Energy Barrier") then
RoMScript('CastSpellByName("High-Energy Barrier")')
end
until RoMScript("GetZoneID()") ~= 402 or not player.Alive
if RoMScript("GetZoneID()") ~= 402 then
player:sleep()
else
RoMScript("BrithRevive();");
waitForLoadingScreen(5)
yrest(5000)
------
player:updateXYZ()
__WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X,player.Z,player.Y))
------
end
end
Im just hoping to condense the 2 sets of way-points down into 1 so it is a lot easier to start them before siege.
That will continue the waypoint file from the closest waypoint wherever it is. If you have a waypoint near the revive location then it will continue from there.
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.