ERROR:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<waypoints>
<onLoad>
--== User Option ==--
local RunningSpeed = 59
local MaxHonor = 25000
local NPCID = 115407
local StoreOption = 3
local ObjectBuy = 242263
local AmountBuy = 555
local LimitGold = 1000000
--=================--
function check()
EventMonitorStart("CHECK","CHAT_MSG_SYSTEM")
repeat
yrest(100)
local time, moreToCome, msg = EventMonitorCheck("CHECK", "1")
until msg and string.find(msg,"10")
EventMonitorStop("CHECK")
yrest(25000)
end
--=================--
function StaticPopup()
if RoMScript("StaticPopup1:IsVisible()") then
sendMacro('StaticPopup_OnClick(StaticPopup1, 1);')
end
end
--=================--
function clearScreenn()
local _, _, x, y = getConsoleAttributes();
for j = 1, y do
printf(string.rep(' ', x));
end
clearScreen();
end
--=================--
local offsets = {addresses.charPtr_offset, addresses.pawnSwim_offset1, addresses.pawnSwim_offset2}
local active = 4
function flyDG()
memoryWriteString(getProc(), addresses.swimAddress, string.rep(string.char(0x90),#addresses.swimAddressBytes));
memoryWriteIntPtr(getProc(), addresses.staticbase_char, offsets, active);
end
function flyoffDG()
memoryWriteString(getProc(), addresses.swimAddress, string.char(unpack(addresses.swimAddressBytes)));
end
local playerAddress = memoryReadIntPtr(getProc(), addresses.staticbase_char, addresses.charPtr_offset);
if playerAddress ~= 0 then
memoryWriteFloat(getProc(), playerAddress + 0x40, RunningSpeed);
end
unregisterTimer("timedSetWindowName");
unregisterTimer("window")
local function comma_value(n)
local left,num,right = string.match(n,'^([^%d]*%d)(%d*)(.-)$')
return left..(num:reverse():gsub('(%d%d%d)','%1,'):reverse())
end
local _starttime = os.time()
local startxp = getCurrency("honor")
local function _window()
local amount = getCurrency("honor")
local _charname = string.sub(player.Name,1,7)
local _timepassed = (os.time() - _starttime)/3600
local _printtime = string.sub(_timepassed,1,4)
local _xpreceived = amount - startxp
local _xpperhour = string.sub((_xpreceived/_timepassed),1,8)
setWindowName(getHwnd(),sprintf(_charname.." Current Honor: "..comma_value(amount).." Honor per hour: "
..comma_value(_xpperhour).." Time passed: ".._printtime))
end
registerTimer("window", secondsToTimer(30), _window);
_window()
--=================--
local CurrentGold = RoMScript('GetPlayerMoney("copper");')
function CheckGold()
if LimitGold >= CurrentGold then
cprintf(cli.red,"\n GOLD : %s \n Gold limit established. \n\n", comma_value(CurrentGold))
player:sleep()
player:update()
end
end
--=================--
clearScreenn()
CheckGold()
--=================--
if getZoneId() == 6 then
cprintf(cli.lightblue,"\n ZONE ID : %s \n\n", getZoneId())
travelTo("ObsidianCastle")
player:target_NPC(111731)
sendMacro("ChoiceOption(2);");
waitForLoadingScreen(10)
end
--=================--
if getZoneId() == 401 then
cprintf(cli.lightblue,"\n ZONE ID : %s \n\n", getZoneId())
GotoGuild("Drill Ground")
player:target_Object("Drill Ground");
sendMacro("ChoiceOption(1);");
waitForLoadingScreen(10)
end
--=================--
if getZoneId() == 354 then
clearScreenn()
cprintf(cli.lightblue,"\n ZONE ID : %s \n\n", getZoneId())
if MaxHonor > getCurrency("honor") then
repeat
flyDG()
player:moveTo(CWaypoint(5121,2515,13),true)
player:moveTo(CWaypoint(5121,2651,111),true)
player:moveTo(CWaypoint(4754,2954,430),true)
player:moveTo(CWaypoint(2609,4302,430),true)
player:moveTo(CWaypoint(2120,4644,13),true)
player:moveTo(CWaypoint(2665,4160,430),true)
player:moveTo(CWaypoint(3443,4016,430),true)
check()
cprintf(cli.lightgreen,"\n TOTAL HONOR : %s \n\n", getCurrency("honor"))
until getCurrency("honor") == MaxHonor
else
clearScreenn()
flyoffDG()
player:target_NPC(112066)
sendMacro("ChoiceOption(7);");
waitForLoadingScreen(10)
if LimitGold >= CurrentGold then
cprintf(cli.red,"\n GOLD : %s \n Gold limit established. \n\n", comma_value(CurrentGold))
GotoGuild("Guild Mailbox")
UMM_TakeMail()
end
GotoGuild("Guild Castle Transport Point")
player:moveTo(CWaypoint(80,-568,6),true)
StaticPopup()
waitForLoadingScreen(10)
end
end
--=================--
if getZoneId() == 6 then
travelTo("MercenarySquare")
end
--=================--
if getZoneId() == 6 then
cprintf(cli.lightblue,"\n ZONE ID : %s \n\n", getZoneId())
player:moveTo(CWaypoint(-22062,3654,-179),true)
player:target_NPC(NPCID)
yrest(500)
if StoreOption == 1 then
sendMacro("ChoiceOption(1);");
elseif StoreOption == 2 then
sendMacro("ChoiceOption(2);");
elseif StoreOption == 3 then
sendMacro("ChoiceOption(3);");
end
yrest(1000)
store:buyItem(ObjectBuy, AmountBuy)
yrest(500)
RoMScript("CloseAllWindows()")
GuildDonate("all", "green")
yrest(1000)
end
--=================--
travelTo("ObsidianCastle")
loadPaths(__WPL.FileName);
--=================--
</onLoad>
</waypoints>