Relogging speed is normal, sometimes customers get client crash, also get client crash when changing class or at any time, but only with This script, worked 100% Until modify , i have also loginnextchar and login userfunction
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onload>
function relog()
SetCharList({
{account=6 , chars= {1,1,1,1,1,1,1,1}},
{account=6 , chars= {1,1,1,1,1,1,1,1}},
{account=6 , chars= {1,1,1,1,1,1,1,1}},
{account=6 , chars= {1,1,1,1,1,1,1,1}},
{account=6 , chars= {1,1,1,1,1,1,1,1}},
{account=6 , chars= {1,1,1,1,1,1,1,1}},
{account=6 , chars= {1,1,1,1,1,1,1,1}},
{account=6 , chars= {1,1,1,1,1,1,1,1}},
{account=6 , chars= {1,1,1,1,1,1,1,1}},
{account=6 , chars= {1,1,1,1,1,1,1,1}},
{account=6 , chars= {1,1,1,1,1,1,1,1}},
{account=6 , chars= {1,1,1,1,1,1,1,1}},
{account=6 , chars= {1,1,1,1,1,1,1,1}},
{account=6 , chars= {1,1,1,1,1,1,1,1}},
{account=6 , chars= {1,1,1,1,1,1,1,1}},
{account=6 , chars= {1,1,1,1,1,1,1,1}},
{account=6 , chars= {1,1,1,1,1,1,1,1}},
{account=6 , chars= {1,1,1,1,1,1,1,1}},
{account=6 , chars= {1,1,1,1,1,1,1,1}},
{account=6 , chars= {1,1,1,1,1,1,1,1}},
{account=6 , chars= {1,1,1,1,1,1,1,1}},
{account=6 , chars= {1,1,1,1,1,1,1,1}},
{account=6 , chars= {1,1,1,1,1,1,1,1}},
{account=6 , chars= {1,1,1,1,1,1,1,1}},
})
LoginNextChar()
loadProfile()
loadPaths("sarlo1");
player:mount();
RoMScript("ChangeParallelID(1)");
player:update();
inventory:update();
end
swapClass = true;
minPlayerLevel = 80;
questItemId = 122252;
questGiverId = 122200;
runeSensor = 241035;
questid = 426381;
questName = GetIdName(questid);
questtype = "daily" -- "public" or "daily";
skipHouseMaid = true; -- If true, won't ride to Housemaid. Will be used dynamically in the WP (dontedit);
time = os.time(); -- Startingtime of Waypoint
__WPL:setForcedWaypointType("TRAVEL")
for k,v in pairs(settings.profile.skills) do
v.AutoUse = false
end
function swClass()
player:update();
RoMScript("ExchangeClass("..(player.Class2+1)..","..(player.Class1+1)..")");
yrest(250);
player:mount();
end
function questsDone()
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()");
if (dailyQuestCount==dailyQuestsPerDay) then
return true;
else
return false;
end
end
if getQuestStatus(questName) == "complete" then
direction = WPT_BACKWARD;
else
direction = WPT_FORWARD;
end
currentwp = __WPL:getNearestWaypoint(player.X, player.Z, player.Y);
if currentwp == 5 and direction == WPT_FORWARD then
currentwp = currentwp-1
elseif currentwp == 1 and direction == WPT_BACKWARD then
currentwp = currentwp+1
end
print ("current: "..currentwp);
__WPL:setWaypointIndex(currentwp);
__WPL:setDirection(direction);
changeProfileOption("WAYPOINT_DEVIATION",5);
booltable={};
booltable[true] ="yes";
booltable[false]="no";
addMessage ("Swap Class enabled: "..booltable[swapClass]);
function fetchQuest()
if questsDone() and questtype == "daily" then
cprintf (cli.pink,"Time spend for this daily: %s Minutes\n",(os.time()-time)/60);
else
inventory:update();
if getQuestStatus(questName) == "incomplete" and inventory:itemTotalCount(241035) == 0 then
print ("Aborting malfdormed Quest; missing QuestItem!");
CancelQuest(questName);
yrest(150);
fetchQuest();
elseif getQuestStatus(questName) ~="incomplete" or getQuestStatus(questName) =="not accepted" then
player:target_NPC(questGiverId);
yrest(150);
AcceptQuestByName(questName,questtype);
end
end
end
function completeQuest()
if getQuestStatus(questName) =="complete" then
player:target_NPC(questGiverId);
yrest(150);
CompleteQuestByName(questName);
end
end
</onload>
<!-- # 1 --><waypoint x="-18665" z="-2438" y="805" tag="questGiver">
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()");
if 10 == dailyQuestCount then
RoMScript("ChangeParallelID(3)");
yrest(30000);
relog();
end
direction = WPT_FORWARD;
__WPL:setDirection(direction)
if getQuestStatus(questName) ~= "complete" and minPlayerLevel > player.Level and swapClass then
addMessage ("Enabled riding to housemaid (#118)");
skipHouseMaid = false;
if not player.Mounted then player:mount(); end
else
direction = WPT_FORWARD;
__WPL:setDirection(direction);
completeQuest();
fetchQuest();
player:update();
if not player.Mounted then player:mount(); end
end
inventory:update();
if inventory:itemTotalCount(runeSensor) == 0 and skipHouseMaid then
addMessage("Failed to get "..GetIdName(runeSensor));
skipHouseMaid = false;
end
</waypoint>
<!-- # 2 --><waypoint x="-18326" z="-2650" tag="skip_housemaid_backward">
print ("WP_Tag: " .. __WPL.Waypoints[__WPL.CurrentWaypoint].Tag.."\n");
if direction == WPT_FORWARD then
if not swapClass or skipHouseMaid then
addMessage ("Skipping Housemaid");
__WPL:setWaypointIndex(__WPL:findWaypointTag("skip_housemaid_forward"));
elseif not skipHouseMaid then
addMessage ("Riding to Housemaid for Swapping Class! (#133)");
end
end
print ("2"); </waypoint>
<!-- # 3 --><waypoint x="-18045" z="-2703" tag="housemaid">
print ("WP_Tag: " .. __WPL.Waypoints[__WPL.CurrentWaypoint].Tag.."\n");
player:target_NPC(122481) -- Housemaid Momo Cidolph
yrest(150);
ChoiceOptionByName(getTEXT("SO_110581_1")); -- "I'd like to chance class"
yrest(150);
swClass();
skipHouseMaid=true;
addMessage("Back to QuestGiver (#146)");
direction = WPT_BACKWARD;
__WPL:setDirection(direction)
__WPL:setWaypointIndex(__WPL:findWaypointTag("skip_housemaid_backward"));
</waypoint>
<!-- # 4 --><waypoint x="-18163" z="-2765"> </waypoint>
<!-- # 5 --><waypoint x="-18234" z="-2877" tag="skip_housemaid_forward">
print ("WP_Tag: " .. __WPL.Waypoints[__WPL.CurrentWaypoint].Tag.."\n");
if direction == WPT_BACKWARD then
if not swapClass and skipHouseMaid then
addMessage ("Skipping Housemaid");
__WPL:setWaypointIndex(__WPL:findWaypointTag("skip_housemaid_backward"));
end
end
</waypoint>
<!-- # 6 --><waypoint x="-17875" z="-2942" tag="usingItem">
print ("WP_Tag: " .. __WPL.Waypoints[__WPL.CurrentWaypoint].Tag.."\n");
repeat
player:target_Object(questItemId);
yrest(500);
until getQuestStatus(questName) == "complete" or inventory:itemTotalCount(241035) == 0
yrest(200);
player:mount();
if getQuestStatus(questName) == "complete" and swapClass and player.Level > minPlayerLevel then
addMessage("enabled riding to Housemais (#174)");
skipHouseMaid = false
else
addMessage("disabled riding to Housemaid (#177)");
skipHouseMaid = true;
end
direction = WPT_BACKWARD;
__WPL:setDirection(direction);
</waypoint>
</waypoints>