Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- # 1 --><waypoint x="-18630" z="12180" y="-739">
<!-- [Housemaid potions]
This checks if we have housemaid potion buff.
If we dont have that buff then bot drinks potion if we have
potions on inventory and it is set to use it.
Bugs:
- It uses luck potion randomly sometimes.
- Maybe add timer into check so it would try to use another in 1.45h or so.
Version history:
1.2 - New food: Special Spicy Meatsauce Burrito and little remade code.
Buff names can all be seen once and change if needed.
1.1 - Corrected Luck potion buff name
1.0 - Added time after using potions so it would use all potions after first kill.
It was using all too fast. Potions get cooldown after using one so it skips others.
0.9 - Added Housekeeper Special Caviar Sandwich to list
0.8 - Remade code. Now it uses only 1 if to check all and if all conditions are true then it uses potion.
Its easier to add potions later if needed.
-->
<!-- User setting starts here -->
<!-- Define these if you want to use something. True uses it and false ignores it. -->
local useSpeed = true; -- Housemaid speed potion
local useFrog = false; -- Housemaid frog potion
local useLuck = true; -- Housemaid luck potion
local useSaltedFish = true; -- Housemaid food
local useCaviarSandwich = true; -- Housemaid food
local useSpecialMeatsauceBurrito = true; -- Housemaid food
<!-- Potions id and its buff name. If using other than english client then change buff name. -->
local pot1ID = 207200; -- Unbridled Enthusiasm
local buff1Name = "Unbridled Enthusiasm";
local pot2ID = 207201; -- Princely Look
local buff2Name = "Princely Look";
local pot3ID = 207203; -- Turn of Luck Powder Dust
local buff3Name = "Turn of Luck Powder Dust";
local pot4ID = 207213; -- Special Spicy Meatsauce Burrito
local buff4Name = "Spicy Meatsauce Burrito";
local pot5ID = 207211;
local buff5Name = "Caviar Sandwich";
local pot6ID = 207209;
local buff6Name = "Salted Fish with Sauce";
<!-- User settings end here -->
<!-- Unbridled Enthusiasm potion -->
if not player:hasBuff(buff1Name) and inventory:itemTotalCount(pot1ID) >= 1 and useSpeed == true then
inventory:useItem(pot1ID);
inventory:update();
yrest(750);
end
<!-- Princely looking potion -->
if not player:hasBuff(buff2Name) and inventory:itemTotalCount(pot2ID) >= 1 and useFrog == true then
inventory:useItem(pot2ID);
yrest(900); -- Lets wait till we cast. After that we loot. I don't know if we could loot before casting.
inventory:update();
end
<!-- Lucky Target potion -->
if not player:hasBuff(buff3Name) and inventory:itemTotalCount(pot3ID) >= 1 and useLuck == true then
inventory:useItem(pot3ID);
inventory:update();
yrest(750);
end
<!-- Special Spicy Meatsauce Burrito -->
if not player:hasBuff(buff4Name) and inventory:itemTotalCount(pot4ID) >= 1 and useSpecialMeatsauceBurrito == true then
inventory:useItem(pot4ID);
inventory:update();
yrest(750);
end
<!-- Special Caviar Sandwich -->
if not player:hasBuff(buff5Name) and inventory:itemTotalCount(pot5ID) >= 1 and useCaviarSandwich == true then
inventory:useItem(pot5ID);
inventory:update();
yrest(750);
end
<!-- Special Salted Fish with Sauce -->
if not player:hasBuff(buff6Name) and inventory:itemTotalCount(pot6ID) >= 1 and useSaltedFish == true then
inventory:useItem(pot6ID);
inventory:update();
yrest(750);
end
</waypoint>
<!-- # 2 --><waypoint x="-18625" z="12200" y="-739">
RoMScript("InviteByName('Char name to here');");
yrest(1250)
RoMScript("SetInstanceLevel('normal')");
yrest(1000)
</waypoint>
<!-- # 3 --><waypoint x="-18558" z="12504" y="-738">
waitForLoadingScreen();
yrest(2000)
player:update();
if getZoneId() == 6 then
__WPL:setWaypointIndex(__WPL.LastWaypoint - 1)
end
</waypoint>
<!-- # 4 --><waypoint x="4713" z="911" y="679"> </waypoint>
<!-- # 5 --><waypoint x="4569" z="908" y="679"> </waypoint>
<!-- # 6 --><waypoint x="4377" z="906" y="679"> </waypoint>
<!-- # 7 --><waypoint x="4371" z="979" y="679"> </waypoint>
<!-- # 8 --><waypoint x="4368" z="821" y="679"> </waypoint>
<!-- # 9 --><waypoint x="4205" z="795" y="679"> </waypoint>
<!-- # 10 --><waypoint x="4202" z="997" y="679"> </waypoint>
<!-- # 11 --><waypoint x="4420" z="917" y="679"> </waypoint>
<!-- # 12 --><waypoint x="4713" z="928" y="679"> </waypoint>
<!-- # 13 --><waypoint x="4711" z="776" y="679">
waitForLoadingScreen();
yrest(2000)
player:update();
if getZoneId() == 107 then
__WPL:setWaypointIndex(__WPL.LastWaypoint - 1)
end
</waypoint>
<!-- # 14 --><waypoint x="-18622" z="12196" y="-778">
player:update();
RoMScript("LeaveParty()");
yrest(500)
function settings.profile.events.onSkillCast()
inventory:update()
if 1 > inventory:itemTotalCount(0) then
loadPaths("fromkalinselltonpc.xml");
end
</waypoint>
</waypoints>
But bot say waypoint 1 is incorrect, how must be codes ?