Results 1 to 7 of 7

Thread: How to find Experience Gained

  1. #1
    Join Date
    Sep 2007
    Posts
    73
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default How to find Experience Gained

    I want to know how much exp my script gained

  2. #2
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Math. Calculate how much exp you get from each...whatever you're doing, then multiple that by how many of them you've...made/gained/killed.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  3. #3
    Join Date
    Sep 2007
    Posts
    73
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok i am training combat, How to know I have killed a NPC

  4. #4
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by astoria1112000 View Post
    Ok i am training combat, How to know I have killed a NPC
    This may seem a but it's not! Use PixelShift like this.
    Simba Code:
    Function PixelCheck: Integer;
    var
      Player: TBox;
    begin
      Player.X1 := MSCX-10;//this sets the coordinates for the box around the player
      Player.X2 := MSCX+10;//
      Player.Y1 := MSCY-10;//
      Player.Y2 := MSCY+10;//
      Result := PixelShift(Player , RandomRange(100, 200));  //This waits a random amount of time and results the amount of pixels that have changed in that time
    end;

    Function IsFighting: Boolean;
    begin
      if (PixelCheck > 150) then   //this checks if the amount of pixels changed were higher than 150
        MarkTime(FightTime)      //this resets the fighting watch, FightTime. If pixelcheck is lower than 150, it is never refreshed
      else
      begin
        if (Check = 0) then  //Check is a global variable
        begin
          IncEx(Wait1, 150);   //this increases Wait1 by 150
          IncEx(Wait2, 200);   //this increased Wait 2 by 200
        end;                   //both waits are global variables. they are reset after each fight. these variables are used as double checks.
        Inc(Check); //this increases Chance, so it doesn't make a mistake with its detection
      end;
      Result := (TimeFromMark(FightTime) < RandomRange(Wait1, Wait2));   //this is basically saying "If the amount of time FightTime has been watching is higher than the amount of time we are waiting (wait1 and Wait2), then we are NOT fighting
    end;

    It's simply used as:
    Simba Code:
    while (InFight) do
      Antiban;
    Hope that helps a bit. If you need any help understanding, just ask.

  5. #5
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Your pixelshift is gonna rely heavily on what equipment & weapon you're using as well as what attack animation you're using.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  6. #6
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Your pixelshift is gonna rely heavily on what equipment & weapon you're using as well as what attack animation you're using.
    It's mainly for melee, unfortunately. I never made able it compatible with range/mage. Astoria, you can also use SRL's InFight. However, you'll have to include the Fighting.scar file yourself.

  7. #7
    Join Date
    Jan 2011
    Posts
    121
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Combat xp is a bit harder to deal with because you don't want to have to read all your hitsplats and the xp dealt for hits is split into tenths which you can't even see..

    Unfortunately GetXP currently does not work (it should find xp values for a skill and return as an integer). I wrote a fix but it has not yet been committed.

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
  •