Results 1 to 3 of 3

Thread: Problems calculating earned XP

  1. #1
    Join Date
    Jun 2012
    Posts
    122
    Mentioned
    0 Post(s)
    Quoted
    40 Post(s)

    Default Problems calculating earned XP

    I have a script: https://villavu.com/forum/showthread.php?t=109817

    It unlocks the safes at the Rogues Den.

    When a safe is unlocked sucessfully two possibilities may occur:
    • You get a gem.
    • You get money.


    How can I detect when the user gains XP? (for proggy).

    What I tried:

    Code:
    // Checks for a new gem in inventory.
    b := tabBackPack.waitForShift(5000);
    // Checks for money gained.
    b2 := findColorTolerance(x, y, 14868703, 924, 813, 933, 825, 1);
    
    if b = true OR b2 = true
    then xpGained := xpGained + 70;
    Only the gem part works, the other check is not being detected.

  2. #2
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    use chatBox.getXP(), the one asha wrote (look in his scripts, I think I use it in monkey pilferer too).


    Simba Code:
    var
      startXP:integer;
    begin

      startXP := chatBox.getXP();

      stealStuff();

      if chatBox.getXP() <> startXP then
        writeLn('Must have stole something');

  3. #3
    Join Date
    Jun 2012
    Posts
    122
    Mentioned
    0 Post(s)
    Quoted
    40 Post(s)

    Default

    Quote Originally Posted by The Mayor View Post
    use chatBox.getXP(), the one asha wrote (look in his scripts, I think I use it in monkey pilferer too).


    Simba Code:
    var
      startXP:integer;
    begin

      startXP := chatBox.getXP();

      stealStuff();

      if chatBox.getXP() <> startXP then
        writeLn('Must have stole something');
    That's awesome! Thank you.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •