<!-- # 8 --><waypoint x="-14" z="-125" y="5">
-- Check Main Fortress Gate
local FortressGate = player:findNearestNameOrId(111577);
if FortressGate then
local GateState = memoryReadRepeat("byte", getProc(), FortressGate.Address + 0x2F0) or 0
cprintf(cli.white, "GateState: %s\n", GateState);
if GateState ~= 0 then
player:target_Object(111577); -- Главные крепостные ворота
yrest(3000);
end
end;
</waypoint>
castleGate = function(from, to)
local success = player:moveTo(CWaypoint(GuildPoints[to].X,GuildPoints[to].Z),true)
if success == false then
player:target_NPC(GetIdName(111577))
yrest(3000)
success = player:moveTo(CWaypoint(GuildPoints[to].X,GuildPoints[to].Z),true)
end
return success
end