well guess i posted this on the wrong thread, mybad.
i am using the correct file thou, so if you have a second could you please try this code out and let me know why it wont work
just copying and pasting my post from other thread since info was all correct but got no attention since i fail at posting.
rock5, sorry to bother u again but im still having no luck using this code
everything should be romscript'd that needs to be, for some reason printf(LogID) just gives me a 0 when i added it to a few lines so maybe its not a global var?
anyways here is my error and my code,
RoM windows size is 800x601, upper left corner at 4,30
Loading profile userdefault.xml
MACRO Test: ok
Ranged skill found: PRIEST_RISING_TIDE
[DEBUG] CPU Frequency 3579.545
Loaded waypoint path token.xml
No return path with default naming token_return.xml found.
We use the normal waypoint path token.xml now.
We changed the option 'COMBAT_DISTANCE' from '120' to '50'.
We changed the option 'COMBAT_RANGED_PULL' from 'true' to 'false'.
Moving to waypoint #1, (-614, -5816)
Your done 0 of 10
Not enough Sharp Bear Claw!
Not enough Boar Tusks!
CharacterName = ### Needs more Daily Items.. Im all out
7:33pm - [string "..."]:62: attempt to compare nil with number
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<OnLoad>
<!-- Invetory update. Are you full bags
player:update()
inventory:update();
if(1 > inventory:itemTotalCount(0) ) then
printf("Error. Not enough BagSpase. Clean Bag and Start again.");
nextplease()
end-->
-- Settings
local goldeggs = inventory:itemTotalCount(204792)
local bearclaw = inventory:itemTotalCount(200609)
local boartusk = inventory:itemTotalCount(200624)
local goodcake = inventory:itemTotalCount(204791)
<!-- local nobearclaw = "0"
local noboartusk = "0"-->
changeProfileOption("COMBAT_DISTANCE", 50)
changeProfileOption("COMBAT_RANGED_PULL", false)
-- Are you Prob not in zone
if player.Level > 50 then
printf("This character probably Is Not in zone going to next!\n");
sendMacro("}LoginNextToon=true;a={")
sendMacro("Logout();");
waitForLoadingScreen();
loadPaths("token");
end
<!-- Were you just a Farmer, do you have golden eggs to mail -->
function eggchecks()
<!--if goldeggs ~= 0 then
printf("I have Golden Eggs to Dump!\n");
loadPaths("maildump");
end-->
end
<!-- Are you out of daily items -->
function dailyitemz()
if 5>bearclaw then
nobearclaw = "1"
printf("Not enough Sharp Bear Claw!\n");
end
if 5>boartusk then
noboartusk = "1"
printf("Not enough Boar Tusks!\n");
end
if 5>bearclaw and 5>boartusk then
printf("CharacterName = "..player.Name.. " Needs more Daily Items.. Im all out\n");
nextplease()
<!--Single accout logout
sendMacro("}LoginNextToon=true;a={")
sendMacro("Logout();");
waitForLoadingScreen();
loadPaths("token"); -->
end
end
function checkDQCount()
local dailyQuestCount, dailyQuestsPerDay = RoMScript("Daily_count()");
-- Use a daily ticket
<!--if dailyQuestsPerDay - dailyQuestCount == 0 then
local reset = inventory:findItem(202434)
if reset then
reset:use()
end
end-->
if 10 == dailyQuestCount then
printf ("You did "..dailyQuestCount.." of " .. dailyQuestsPerDay .. " All Done Stop\n");
printf("CharacterName = "..player.Name.."\n");
else
printf("Your done "..dailyQuestCount.." of " .. dailyQuestsPerDay .. "\n");
end
end
<!-- Multi accout code -->
function nextplease()
local numChars = RoMScript("fastLoginNumChars")
local selectIndex = RoMScript("CHARACTER_SELECT.selectedIndex")
if numChars > selectIndex then
print("Loading next character on this account")
sendMacro("}LoginNextToon=true a={")
sendMacro("Logout()")
waitForLoadingScreen()
else
local nextAccount
if LogID == 1 then
nextAccount = 5
print("Loading Account 5")
elseif LogID == 2 then
nextAccount = 4
print("Loading Account 4")
end
printf("Switching now")
RoMScript("ChangeChar(1,nextAccount)")
waitForLoadingScreen();
sendMacro("}fastLoginRelog=false;a={")
end
yrest (4000)
loadPaths("token");
end
</OnLoad>
<!-- # 1 --><waypoint x="-613" z="-5812" y="24">
checkDQCount();
yrest(1000);
dailyitemz();
yrest(1000);
<!--Get quests -->
player:target_Object(110584); yrest(1000);
AcceptQuestByName("Collect Boar Tusks")
player:target_Object(110584); yrest(1000);
AcceptQuestByName("Sharp Bear Claw")
</waypoint>
<!-- # 6 --><waypoint x="-604" z="-5884" y="25">
if noboartusk == 1 then
__WPL:setWaypointIndex(__WPL:findWaypointTag("noboarskipit"))
end
</waypoint>
<!-- # 7 --><waypoint x="-627" z="-5957" y="26" > </waypoint>
<!-- # 8 --><waypoint x="-654" z="-6022" y="28">
player:target_NPC("Del"); yrest(1000);
CompleteQuestByName("Collect Boar Tusks"); yrest(1000);
<!--checkDQCount();
dailyitemz();
player:update(); -->
if nobearclaw == "1" then
__WPL:setWaypointIndex(__WPL:findWaypointTag("nobearskipit"))
end
</waypoint>
<!-- # 11 --><waypoint x="-657" z="-6089" y="21"> </waypoint>
<!-- # 12 --><waypoint x="-575" z="-6101" y="19" tag="noboarskipit">
player:target_NPC("Cid");
sendMacro("OnClick_QuestListButton(3, 1)"); yrest(1000);
sendMacro("CompleteQuest()"); yrest(1000);
<!--CompleteQuestByName("Sharp Bear Claw") -->
</waypoint>
<!-- # 15 --><waypoint x="-517" z="-6058" y="22" tag="nobearskipit"> </waypoint>
<!-- # 16 --><waypoint x="-550" z="-5949" y="24">
<!-- eggchecks()-->
if( math.random(100) > 60 ) then -- jump 40% of the time
keyboardPress(key.VK_UP);
keyboardPress(key.VK_SPACE);
keyboardPress(key.VK_UP);
end
</waypoint>
</waypoints>
let me know if anyone has any suggestions other then getting the account switch to work.
anything i try thou i cant get it to switch accounts. i am using the latest .zip on the frontpage.
i am also not sure when player:update() inventory:update(); checkDQCount(); would all need to be callled, afew are edited out atm
as i have been trying to figure out why the bot doesnt like the account switching code.