My Kalin waypoints - How to use getZoneId ? (help)

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
mrtgtr
Posts: 67
Joined: Wed Mar 21, 2012 5:09 pm

My Kalin waypoints - How to use getZoneId ? (help)

#1 Post by mrtgtr » Wed Dec 12, 2012 7:13 pm

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>
I set, Char will invite party, set instance to normal and enter kalin than char will kill mobs on entry ( 5 slot ) and exit from kalin and go for sell items (when invertory is full ) and come back , repeat repeat repeat....
But bot say waypoint 1 is incorrect, how must be codes ?

User avatar
botje
Posts: 656
Joined: Wed Oct 27, 2010 7:17 am

Re: My Kalin waypoints - How to use getZoneId ? (help)

#2 Post by botje » Thu Dec 13, 2012 3:10 am

my god man, your a mod's worst nightmare...

so many threads, use the frikking search function man...

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: My Kalin waypoints - How to use getZoneId ? (help)

#3 Post by lisa » Thu Dec 13, 2012 4:08 am

I find myself typing out replies often and then hitting cancel, when ever I re-read what I typed I just start to sound mean =(
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 1 guest