Page 1 of 4 123 ... LastLast
Results 1 to 25 of 92

Thread: [AL] AeroFighter (lite version)

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

    Default [AL] AeroFighter (lite version)


    AeroFighter Lite
    By Flight
    Current version: 0.1
    Current revision: 0

    Core features:
    • Auto-fights user-defined NPCs in OSRS
    • Any client; SMART/OSRS official, ect...
    • NPC target files are loaded via text files
    • Auto-eating common fish
    • Loot grabbing
    • Location detection & optional walk-back system
    • Hop worlds if players detected nearby (optional)
    • Recognition of no ammo/runes or a completed Slayer task
    • Break system
    • 100% color


    Requirements:


    Creating an NPC file:

    To make the script truly AIO and to save on clutter, this script loads txt-based NPC files from a directory created by the script. Once this directory (Simba/AeroFighter/) is created you can save your NPC files there. To create your own you'll want to open up a simple text-editor, like Notepad and use this format for your NPC file:
    Code:
    [NPC_Obj_Main]
    ObjCount=
    XPMod=
    
    [NPCObj_0]
    Name=
    UpText(C)=
    UpText[0]=
    ColI=
    TolI=
    
    [GI_Array_Main]
    GICount=
    CheckNotedItems=
    
    [Map_Settings]
    UseMap=
    UseDots=
    Defining your NPC:

    The first section of the file is where you define the NPC itself, such as name, uptext and XP per kill. For this example we'll use a level 13 Minotaur found in the Security Stronghold Dungeon. So let's fill in the blanks:
    Code:
    [NPC_Obj_Main]
    ObjCount=1
    XPMod=40
    
    [NPCObj_0]
    Name=Minotaur
    UpText(C)=3
    UpText[0]=ck Min
    UpText[1]=Minot
    UpText[2]=otaur
    ColI=9082518
    TolI=10
    hModI=0.16
    sModI=0.15
    • ObjCount refers to the number of TMSObjects you'll use to find your NPC
    • XPMod is the XP you'll receive from a single kill (excluding Hitpoints/Slayer XP)
    • [NPCObj_0] 0 begin the array index of the TMSObject. In this case, only 1 TMSObject is used so only need [NPCObj_0]. If you had 2 then you'd make another section labeled "[NPCObj_1]", and so on...
    • UpText(C) the number of uptext to search for when targeting an NPC
    • UpText[...] the first uptext in the array. Follow the format for additional uptext


    The rest in that section is your TColEx info, which if you're not familiar with you can refer to this tutorial. If you want a more precise TMSObject for your NPC including "MinCount", Height, Width, and SizeTol" then just add them to the bottom of that, like so:
    Code:
    MinCount=30
    Height=30
    Width=20
    SizeTol=15
    And if you're using dual-colors then add your "OuterCol" immediately after your main "InnerCol", like so:
    Code:
    ColI=9082518
    TolI=10
    hModI=0.16
    sModI=0.15
    ColO=9079445
    TolO=12
    hModO=0.16
    sModO=0.15
    MinCount=5
    Height=15
    Width=15
    SizeTol=10
    Defining your loot (ground items):

    The section [GI_Array_Main] refers to the ground items associated with your NPC. Again, looting items is optional but here's how to create your own ground items for the script to pick up.
    Code:
    [GI_Array_Main]
    GICount=1
    CheckNotedItems=True
    
    NotedGIText(C)=1
    NotedGIText[0]=ke Rune
    
    [GIObj_0]
    Name=Arrows
    GIText=ke Iron
    ColI=670304
    TolI=3
    hModI=0.09
    sModI=0.94
    MinCount=30
    Height=20
    Width=30
    SizeTol=15
    • GICount is the number of ground items the script will search for
    • CheckNotedItems True for checking all noted items on the ground, False to ignore them
    • NotedGIText(C) if checking noted items, the number of right-click options to search for
    • [GIObj_...] index of each ground item and its TMSObject. Layout identical to NPC's TMSObject



    Map settings:

    If you'd like to use RSWalker to walk back to an area populated with the NPC you're targeting you can easily add this option to the NPC file, as in the example:
    Code:
    [Map_Settings]
    UseMap=True
    UseDots=False
    MapName=SecurityStronghold
    MapX=254
    MapY=120
    • UseMap use a loaded map file or not
    • UseDots if not using a map, walk to nearest NPC on the mini-map when no free NPC is found?
    • MapName name of the map (if any) to load (should be placed in Includes/AeroLib/maps/)
    • MapX/MapY the X and Y coordinate of the tile to walk to if no free NPCs are found


    And you're all done. Now just save it as the NPC name (MUST BE LOWER CASE) as a normal text file.


    Example Minotaur file (Simba/AeroFighter/minotaur.txt)

    Code:
    [NPC_Obj_Main]
    ObjCount=1
    XPMod=88
    
    [NPCObj_0]
    Name=Minotaur
    UpText(C)=3
    UpText[0]=ck Min
    UpText[1]=Minot
    UpText[1]=otaur
    ColI=9082518
    TolI=10
    hModI=0.16
    sModI=0.15
    
    [GI_Array_Main]
    GICount=2
    CheckNotedItems=False
    
    [GIObj_0]
    Name=Arrows
    GIText=ke Iron
    ColI=670304
    TolI=3
    hModI=0.09
    sModI=0.94
    MinCount=30
    Height=20
    Width=30
    SizeTol=15
    
    [GIObj_1]
    Name=Arrows
    GIText=ke Iron
    ColI=670304
    TolI=3
    hModI=0.09
    sModI=0.94
    MinCount=30
    Height=30
    Width=20
    SizeTol=15
    
    [Map_Settings]
    UseMap=True
    UseDots=False
    MapName=SecurityStronghold
    MapX=254
    MapY=120
    Attached Files Attached Files

    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..."


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

    Default

    Additional NPC files

    Chicken
    Code:
    [NPC_Obj_Main]
    ObjCount=2
    XPMod=12
    
    [NPCObj_0]
    Name=Chicken
    UpText(C)=3
    UpText[0]=ck Chi
    UpText[1]=Chicken
    UpText[2]=el-1
    ColI=7247532
    TolI=13
    hModI=0.03
    sModI=0.68
    Height=20
    Width=20
    SizeTol=10
    
    [NPCObj_1]
    Name=Chicken
    UpText(C)=3
    UpText[0]=ck Chi
    UpText[1]=Chicken
    UpText[2]=el-1
    ColI=2576752
    TolI=7
    hModI=0.05
    sModI=1.71
    Height=20
    Width=20
    SizeTol=10
    
    [GI_Array_Main]
    GICount=0
    CheckNotedItems=False
    
    [Map_Settings]
    UseMap=True
    UseDots=False
    MapName=WorldMap
    MapX=4541
    MapY=3257
    Ankou
    Code:
    [NPC_Obj_Main]
    ObjCount=1
    XPMod=260
    
    [NPCObj_0]
    Name=Ankou
    UpText(C)=3
    UpText[0]=ck Ankou
    UpText[1]=Ankou
    UpText[2]=el-82
    ColI=4076391
    TolI=5
    hModI=0.64
    sModI=2.07
    
    [GI_Array_Main]
    GICount=2
    CheckNotedItems=True
    
    NotedGIText(C)=2
    NotedGIText[0]=essen
    NotedGIText[1]=ke Mith
    
    [GIObj_0]
    Name=Death rune
    GIText=ke Dea
    ColI=14803428
    TolI=15
    ColO=9079445
    TolO=12
    hModO=0.16
    sModO=0.15
    MinCount=5
    Height=15
    Width=15
    SizeTol=10
    
    [GIObj_1]
    Name=Blood rune
    GIText=ke Blo
    ColI=1121675
    TolI=15
    ColO=9079445
    TolO=12
    hModO=0.16
    sModO=0.15
    MinCount=5
    Height=15
    Width=15
    SizeTol=10
    
    [Map_Settings]
    UseMap=True
    UseDots=False
    MapName=StrongholdSlayerCave
    MapX=515
    MapY=265
    Bloodveld
    Code:
    [NPC_Obj_Main]
    ObjCount=1
    XPMod=484
    
    [NPCObj_0]
    Name=Bloodveld
    UpText(C)=2
    UpText[0]=ck Blood
    UpText[1]=veld (L
    ColI=7044011
    TolI=12
    hModI=0.05
    sModI=0.73
    
    [GI_Array_Main]
    GICount=2
    CheckNotedItems=False
    
    [GIObj_0]
    Name=Blood rune
    GIText=ke Blo
    ColI=1121675
    TolI=15
    ColO=9079445
    TolO=12
    hModO=0.16
    sModO=0.15
    MinCount=5
    Height=15
    Width=15
    SizeTol=10
    
    [GIObj_1]
    Name=Rune med helm
    GIText=ke Rune
    ColI=6708293
    TolI=12
    hModI=0.04
    sModI=0.09
    MinCount=5
    Height=10
    Width=10
    SizeTol=5
    
    [Map_Settings]
    UseMap=True
    UseDots=False
    MapName=StrongholdSlayerCave
    MapX=475
    MapY=133
    Fire giant
    Code:
    [NPC_Obj_Main]
    ObjCount=1
    XPMod=444
    
    [NPCObj_0]
    Name=Fire giant
    UpText(C)=2
    UpText[0]=ck Fire
    UpText[1]=iant (L
    ColI=3426177
    TolI=5
    hModI=0.26
    sModI=1.23
    
    [GI_Array_Main]
    GICount=1
    CheckNotedItems=False
    
    [GIObj_0]
    Name=Rune scimitar
    GIText=ke Rune
    ColI=6576964
    TolI=5
    hModI=0.14
    sModI=0.25
    MinCount=5
    Height=10
    Width=20
    SizeTol=10
    
    [Map_Settings]
    UseMap=True
    UseDots=False
    MapName=StrongholdSlayerCave
    MapX=195
    MapY=382
    Kurask
    Code:
    [NPC_Obj_Main]
    ObjCount=1
    XPMod=404
    
    [NPCObj_0]
    Name=Kurask
    UpText(C)=3
    UpText[0]=ck Kura
    UpText[1]=urask
    UpText[2]=el-106
    ColI=1075543
    TolI=12
    hModI=0.12
    sModI=2.22
    
    [GI_Array_Main]
    GICount=4
    CheckNotedItems=True
    
    NotedGIText(C)=5
    NotedGIText[0]=ke Big
    NotedGIText[1]=ke Papa
    NotedGIText[2]=ke White
    NotedGIText[3]=ke Limp
    NotedGIText[4]=ke Coc
    
    [GIObj_0]
    Name=Nature rune
    GIText=ke Nat
    ColI=1411857
    TolI=3
    ColO=9079445
    TolO=12
    hModO=0.16
    sModO=0.15
    MinCount=5
    Height=15
    Width=15
    SizeTol=10
    
    [GIObj_1]
    Name=Rune axe
    GIText=ke Rune
    ColI=6116415
    TolI=3
    hModI=0.19
    sModI=0.34
    ColO=942723
    TolO=5
    hModO=0.05
    sModO=0.50
    
    [GIObj_2]
    Name=Rune Longsword
    GIText=ke Rune
    ColI=6116415
    TolI=3
    hModI=0.19
    sModI=0.34
    ColO=942723
    TolO=5
    hModO=0.05
    sModO=0.50
    
    [GIObj_3]
    Name=Leaf-bladed sword
    GIText=ke Lea
    ColI=7369081
    TolI=7
    hModI=0.27
    sModI=0.05
    MinCount=15
    Height=22
    Width=13
    SizeTol=8
    
    [Map_Settings]
    UseMap=True
    UseDots=False
    MapName=FremennikSlayerDungeon
    MapX=180
    MapY=301
    Turoth
    Code:
    [NPC_Obj_Main]
    ObjCount=1
    XPMod=324
    
    [NPCObj_0]
    Name=Turoth
    UpText(C)=3
    UpText[0]=ck Turo
    UpText[1]=Turoth
    UpText[2]=el-8
    ColI=8027564
    TolI=7
    hModI=0.07
    sModI=1.52
    
    [GI_Array_Main]
    GICount=2
    CheckNotedItems=False
    
    [GIObj_0]
    Name=Nature rune
    GIText=ke Nat
    ColI=1411857
    TolI=3
    ColO=9079445
    TolO=12
    hModO=0.16
    sModO=0.15
    MinCount=5
    Height=15
    Width=15
    SizeTol=10
    
    [GIObj_1]
    Name=Leaf-bladed sword
    GIText=ke Lea
    ColI=7369081
    TolI=7
    hModI=0.27
    sModI=0.05
    MinCount=15
    Height=22
    Width=13
    SizeTol=8
    
    [Map_Settings]
    UseMap=True
    UseDots=False
    MapName=FremennikSlayerDungeon
    MapX=275
    MapY=275
    Last edited by Flight; 07-23-2017 at 06:03 PM.

    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
    Oct 2012
    Posts
    1,258
    Mentioned
    40 Post(s)
    Quoted
    588 Post(s)

    Default

    Very nice job man. Looks like a great script for people to learn from.

  4. #4
    Join Date
    Oct 2016
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Hi Flight, is it correct that the areolib simba file has the 1.2 version as a variable / constant named in the include file instead of 2.0?

    Code:
    Const
      AL_VERSION_MAIN = 1.2;
      AL_VERSION_SUB  = 6;
      AL_GITURL       = 'https://github.com/J-Flight/AeroLib';

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

    Default

    Quote Originally Posted by EduardSB123 View Post
    Hi Flight, is it correct that the areolib simba file has the 1.2 version as a variable / constant named in the include file instead of 2.0?

    Code:
    Const
      AL_VERSION_MAIN = 1.2;
      AL_VERSION_SUB  = 6;
      AL_GITURL       = 'https://github.com/J-Flight/AeroLib';
    Nah that's the GitHub version. This script requires 2.0 which I just very recently released here.

    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
    Aug 2016
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Had a problem with AeroLib 2.0, fixed issue. I will update with reactions to the script.

  7. #7
    Join Date
    Jul 2017
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Keep getting
    Simba Code:
    Error: Expected variable of type "Int32", got "Extended" at line 571
    Compiling failed.

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

    Default

    Quote Originally Posted by ham22 View Post
    Keep getting
    Simba Code:
    Error: Expected variable of type "Int32", got "Extended" at line 571
    Compiling failed.
    Is this error within the script or the AeroLib include? Make sure you're using AL 2.0 or higher and the newest version of Simba. I'd recommend this one.

    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..."


  9. #9
    Join Date
    Aug 2016
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Script runs really well, great job! I've been able to make new NPC scripts and add items successfully.

    Issues:

    1.Sometimes attacks a new NPC without killing the last one attacked. I'd say about 1/10 kills it may do this. Might be the timings, I'm still testing new ones. Isn't a big deal in multi.

    2.Picking up items. As it is color, if another player is wearing rune armor, the script will check several times on the player's armor for a rune scimitar drop. Same issue when a drop triggers a color but text doesn't match, the script will continuously right click on the color/drop. I need to watch for this drop issue more but the scripts stops checking the drop after 1-2 kills I believe (Could be timed to end?). Maybe add a delay if a drop isn't found after 1-3 checks? I'm not sure how to implement that.

    3.When logging out the script attempts to logout within 10 seconds of combat, the script then stops attempting to logout before the player is allowed to logout.

    4.and finally

    Simba Code:
    Error: Expected variable of type "Int32", got "Extended" at line 571
    Compiling failed.

    relates to

    Simba Code:
    until(T.timeElapsed() > min ((COMBATTIME * 1000), 3600));

    I solved this issue by calculating comabtitme*1000 myself.

    Simba Code:
    until(T.timeElapsed() > min(2500, 3600));

    I'm using Simba 1.1
    Last edited by klerx; 07-24-2017 at 07:58 PM.

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

    Default

    Quote Originally Posted by klerx
    Script runs really well, great job! I've been able to make new NPC scripts and add items successfully.

    Issues:

    1.Sometimes attacks a new NPC without killing the last one attacked. I'd say about 1/10 kills it may do this. Might be the timings, I'm still testing new ones. Isn't a big deal in multi.
    A difficult issue to accurately overcome with a color-based auto-fighter when fighting near other players. To fix this problem you might try adjusting BarDist (line 62) which is your variable to check within the given distance, from your player, of the nearest HP bar, excluding your own. It's default set to 70 but you can increase that some if you're fighting solo, however fighting near other players it might pick up them/their target being in combat and mistake it for your own player. It's a trade-off and I knew it would be, that's why I made it easy for the user to adjust to their liking.

    Quote Originally Posted by klerx
    2.Picking up items. As it is color, if another player is wearing rune armor, the script will check several times on the player's armor for a rune scimitar drop. Same issue when a drop triggers a color but text doesn't match, the script will continuously right click on the color/drop. I need to watch for this drop issue more but the scripts stops checking the drop after 1-2 kills I believe (Could be timed to end?). Maybe add a delay if a drop isn't found after 1-3 checks? I'm not sure how to implement that.
    You can make this much more accurate by giving your ground item a size and mincount restriction. Say a rune helmet on the ground, it will have a small height and width and definitely a small amount of "rune color" visible versus a player wearing rune armor. Use that logic to define your ground item and give it a smaller size and mincount, or just a size or just a mincount. The script will accept all variations of NPC/ground items TMSObjects.

    Quote Originally Posted by klerx
    3.When logging out the script attempts to logout within 10 seconds of combat, the script then stops attempting to logout before the player is allowed to logout.
    That was supposed to be fixed a while back in AeroLib itself but it appears I'll need to take a look at it. Either way, that's an include issue rather than the script. For a temporary work-around you could just do a combat check before logging out the player. If you're in combat then wait until it's stopped, then log out.

    Quote Originally Posted by klerx
    4.and finally

    Simba Code:
    Error: Expected variable of type "Int32", got "Extended" at line 571
    Compiling failed.

    relates to

    Simba Code:
    until(T.timeElapsed() > min ((COMBATTIME * 1000), 3600));

    I solved this issue by calculating comabtitme*1000 myself.

    Simba Code:
    until(T.timeElapsed() > min(2500, 3600));

    I'm using Simba 1.1
    That's probably fixed by using the newest version of Simba. For what it's worth, I recommend the 32-bit version as I've had problems with the 64.

    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..."


  11. #11
    Join Date
    Jan 2015
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Hey Flight, great script. I've ran it for a while and it seems relatively stable for one that's so new. Would it be possible to implement banking (walk or tele) in the future? I'm willing to work on it but as I'm kind of inexperienced with scripting, I'm not sure how well it would pan out. On a totally unrelated (and much easier to script) note, a small QoL change could be a "loot all" option, where it picks up all drops from a dead npc, so we don't have to worry about typing out the entire loot table.

  12. #12
    Join Date
    May 2012
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    20 Post(s)

    Default

    Just wondered before I start using this script -

    Does anyone have the setup .txt file for Giant rats?

  13. #13
    Join Date
    Oct 2006
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    I added a function that automatically takes any antipoison in your inventory. I've also included the DTM's:

    Code:
    procedure takeAntipoison();
    var
      i,x,y,slot : Integer;
      iBox       : TBox;
      iPoint     : TPoint;
    begin
      writeln('Im Poisoned! Searching for antipoisons');
      for i:=0 to high(Antipoisons) do
      begin
      if Antipoisons[i].inInventory() then
        begin
          slot := Antipoisons[i].getSlot();
          iBox := invBox(slot);
          iPoint := Point(randomRange(iBox.x1, iBox.x2), randomRange(iBox.y1, iBox.y2));
          humanMMouse(iPoint, 4, 4);
          Wait(200 + Random(300));
          if isUpTextMulti(['Use', 'Vial', 'ial']) then
          begin
            writeln('Empty vial found. Dropping...');
            Antipoisons[i].interact('Drop');
            Continue;
          end
          else
          begin
            writeln('Antipoison found! Drinking...');
            if Antipoisons[i].interact('Drink') then break else Continue;
          end
        end
        else Continue;
      end;
    end;
    And the DTM's (to be put in your loadVars function, declared as Array of TItem):

    Code:
    //Declared somewhere above with other variables
    Antipoisons  : Array of TItem;
    
    
    begin
      setArrayLength(Antipoisons, 8);
      //Normal Antipoisons
      Antipoisons[0].DTM := DTMFromString('m1gAAAHic42KAgF//////CcQ/gPg7lAbxfwMxG1CeEaqOCYhZgBgkxgHEXEDMA8S8UMwHxOXlFVCV+LEI1FxqYQQAANzqHbw=');
      Antipoisons[1].DTM := DTMFromString('m1gAAAHic42KAgF//////CcQ/gPg7lAbxfwMxG1CeEaqOCYhZgBgkxgHEXEDMA8S8UMwHxGVl5VCV+LEI1FxqYQQAANtnHbk=');
      Antipoisons[2].DTM := DTMFromString('m1gAAAHic42KAgF//////CcQ/gPg7lAbxfwMxG1CeEaqOCYhZgBgkxgHEXEDMA8S8UMwHxCWXJKAq8WMRqLnUwggAANk/HbQ=');
      Antipoisons[3].DTM := DTMFromString('m1gAAAHic42KAgF//////CcQ/gPg7lAbxfwMxG1CeEaqOCYhZgBgkxgHEXEDMA8S8UMwHxG23naAq8WMRqLnUwggAAPvsHfk=');
      //Super Antipoisons
      Antipoisons[4].DTM := DTMFromString('m1gAAAHic42KAgF//////CcQ/gPg7lAbxfwMxG1CeEaqOCYhZgBgkxgHEXEDMA8S8UMwHxBUVlVCV+LEI1FxqYQQAAN5tHb8=');
      Antipoisons[5].DTM := DTMFromString('m1gAAAHic42KAgF//////CcQ/gPg7lAbxfwMxG1CeEaqOCYhZgBgkxgHEXEDMA8S8UMwHxGVl5VCV+LEI1FxqYQQAANtnHbk=');
      Antipoisons[6].DTM := DTMFromString('m1gAAAHic42KAgF//////CcQ/gPg7lAbxfwMxG1CeEaqOCYhZgBgkxgHEXEDMA8S8UMwHxJekCqAq8WMRqLnUwggAANhDHbI=');
      Antipoisons[7].DTM := DTMFromString('m1gAAAHic42KAgF//////CcQ/gPg7lAbxfwMxG1CeEaqOCYhZgBgkxgHEXEDMA8S8UMwHxLddW6Aq8WMRqLnUwggAAPyAHfo=');
     end
    I placed the check in checkHealth() with the following two lines:

    Code:
        poisoned := isPoisoned();
        if poisoned then takeAntipoison();
    Last edited by Captin_55; 08-19-2017 at 08:36 PM.

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

    Default

    Quote Originally Posted by dandandan View Post
    Hey Flight, great script. I've ran it for a while and it seems relatively stable for one that's so new. Would it be possible to implement banking (walk or tele) in the future? I'm willing to work on it but as I'm kind of inexperienced with scripting, I'm not sure how well it would pan out. On a totally unrelated (and much easier to script) note, a small QoL change could be a "loot all" option, where it picks up all drops from a dead npc, so we don't have to worry about typing out the entire loot table.
    It's possible yes but I doubt I'll be modifying the script that heavily. And looting-all... with an accurate target-tracking system that can be accomplished, and I'm actually about to implement a form of this in my developer version of the script. I recently and successfully added object-tracking to a few mining scripts so carrying over the basic idea this script shouldn't be too difficult. Should it be successful I'll update the script, possibly with the option to loot-all from a slain target. It would also open the door to a viable killer & looter for ironman accounts.

    Quote Originally Posted by Smalfinn View Post
    Just wondered before I start using this script -

    Does anyone have the setup .txt file for Giant rats?
    For the giant rats behind Lumbridge Castle:
    Code:
    [NPC_Obj_Main]
    ObjCount=1
    XPMod=20
    
    [NPCObj_0]
    Name=Giant rat
    UpText(C)=2
    UpText[0]=ck Gia
    UpText[1]=ant ra
    ColI=9934475
    TolI=18
    hModI=0.08
    sModI=0.12
    
    [GI_Array_Main]
    GICount=0
    CheckNotedItems=False
    
    [Map_Settings]
    UseMap=True
    UseDots=False
    MapName=WorldMap
    MapX=4586
    MapY=3631

    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..."


  15. #15
    Join Date
    Jan 2012
    Location
    Sydney, Australia
    Posts
    877
    Mentioned
    12 Post(s)
    Quoted
    368 Post(s)

    Default

    Quote Originally Posted by Captin_55 View Post
    I added a function that automatically takes any antipoison in your inventory. I've also included the DTM's:

    Code:
    procedure takeAntipoison();
    var
      i,x,y,slot : Integer;
      iBox       : TBox;
      iPoint     : TPoint;
    begin
      writeln('Im Poisoned! Searching for antipoisons');
      for i:=0 to high(Antipoisons) do
      begin
      if Antipoisons[i].inInventory() then
        begin
          slot := Antipoisons[i].getSlot();
          iBox := invBox(slot);
          iPoint := Point(randomRange(iBox.x1, iBox.x2), randomRange(iBox.y1, iBox.y2));
          humanMMouse(iPoint, 4, 4);
          Wait(200 + Random(300));
          if isUpTextMulti(['Use', 'Vial', 'ial']) then
          begin
            writeln('Empty vial found. Dropping...');
            Antipoisons[i].interact('Drop');
            Continue;
          end
          else
          begin
            writeln('Antipoison found! Drinking...');
            if Antipoisons[i].interact('Drink') then break else Continue;
          end
        end
        else Continue;
      end;
    end;
    And the DTM's (to be put in your loadVars function, declared as Array of TItem):

    Code:
    //Declared somewhere above with other variables
    Antipoisons  : Array of TItem;
    
    
    begin
      setArrayLength(Antipoisons, 8);
      //Normal Antipoisons
      Antipoisons[0].DTM := DTMFromString('m1gAAAHic42KAgF//////CcQ/gPg7lAbxfwMxG1CeEaqOCYhZgBgkxgHEXEDMA8S8UMwHxOXlFVCV+LEI1FxqYQQAANzqHbw=');
      Antipoisons[1].DTM := DTMFromString('m1gAAAHic42KAgF//////CcQ/gPg7lAbxfwMxG1CeEaqOCYhZgBgkxgHEXEDMA8S8UMwHxGVl5VCV+LEI1FxqYQQAANtnHbk=');
      Antipoisons[2].DTM := DTMFromString('m1gAAAHic42KAgF//////CcQ/gPg7lAbxfwMxG1CeEaqOCYhZgBgkxgHEXEDMA8S8UMwHxCWXJKAq8WMRqLnUwggAANk/HbQ=');
      Antipoisons[3].DTM := DTMFromString('m1gAAAHic42KAgF//////CcQ/gPg7lAbxfwMxG1CeEaqOCYhZgBgkxgHEXEDMA8S8UMwHxG23naAq8WMRqLnUwggAAPvsHfk=');
      //Super Antipoisons
      Antipoisons[4].DTM := DTMFromString('m1gAAAHic42KAgF//////CcQ/gPg7lAbxfwMxG1CeEaqOCYhZgBgkxgHEXEDMA8S8UMwHxBUVlVCV+LEI1FxqYQQAAN5tHb8=');
      Antipoisons[5].DTM := DTMFromString('m1gAAAHic42KAgF//////CcQ/gPg7lAbxfwMxG1CeEaqOCYhZgBgkxgHEXEDMA8S8UMwHxGVl5VCV+LEI1FxqYQQAANtnHbk=');
      Antipoisons[6].DTM := DTMFromString('m1gAAAHic42KAgF//////CcQ/gPg7lAbxfwMxG1CeEaqOCYhZgBgkxgHEXEDMA8S8UMwHxJekCqAq8WMRqLnUwggAANhDHbI=');
      Antipoisons[7].DTM := DTMFromString('m1gAAAHic42KAgF//////CcQ/gPg7lAbxfwMxG1CeEaqOCYhZgBgkxgHEXEDMA8S8UMwHxLddW6Aq8WMRqLnUwggAAPyAHfo=');
     end
    I placed the check in checkHealth() with the following two lines:

    Code:
        poisoned := isPoisoned();
        if poisoned then takeAntipoison();
    Nice addition. The DTMs can be handled with one DTM though (the 1 dose potion). I create the center point of the potion in the middle of the potion and put the tolerance to 255, then create the second point at the bottom of the potion, where there is color, and set the tol to 40 or 50, then create black outlines to make it unique. Since these colors exist in 4/4, 3/4, 2/4 and 1/4, it will track them all.

    You could also cut down the slot interaction to something like:

    Pick first in inventory:
    Simba Code:
    procedure takeAntipoison();
    begin
      AntiPoison.interact(MOUSE_MOVE);
      if isUpTextMulti(['Use', 'Vial', 'ial']) then
        FastClick(MOUSE_LEFT);
    end;

    Pick random from inventory:
    Simba Code:
    procedure takeAntipoison();
    var
      PotArray:TIntegerArray;
      i, RandSlot:integer;
    begin
      PotArray := AntiPoison.getSlots();
      RandSlot := Randomrange(low(PotArray), high(PotArray));
      InteractSlot(PotArray[RandSlot], MOUSE_MOVE);
      if isUpTextMulti(['Use', 'Vial', 'ial']) then
        FastClick(MOUSE_LEFT);
    end;

  16. #16
    Join Date
    Oct 2006
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by Dan the man View Post
    ...
    Thanks! Both great idea's I'll have a go at adding them later tonight.

    Also I modified the targeting procedure to accomidate right clicking higher level mobs:

    Code:
    ...(about line 786)
      for i:=0 to min(3,high(fPnts)) do
      begin
        missMouse(fPnts[i], 3, 3);
        if waitUpTextMulti(['alk h', '/ 2', '/ 1', '/ 3', '/ 4', '/', 'ore', 'tions', 'More', 'Options'], 200) then break;
        if waitUpTextMulti(NPC_Targets[0].MSObj.UpText, 150) then break;
      end;
    
      if not isUpTextMulti(NPC_Targets[0].MSObj.UpText) then
        begin
        if not isPlayerFighting() then
          begin
            fastClick(MOUSE_RIGHT);
            if optionExistsMulti(NPC_Targets[0].MSObj.UpText) then chooseOptionMulti(['ttack', 'ack', 'Attack'])
              else Exit;
          end
        end
      else
        begin
        if not isPlayerFighting() then
          fastClick(MOUSE_LEFT);
        end
    ...

  17. #17
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by Captin_55 View Post
    Thanks! Both great idea's I'll have a go at adding them later tonight.

    Also I modified the targeting procedure to accomidate right clicking higher level mobs:

    Code:
    ...(about line 786)
      for i:=0 to min(3,high(fPnts)) do
      begin
        missMouse(fPnts[i], 3, 3);
        if waitUpTextMulti(['alk h', '/ 2', '/ 1', '/ 3', '/ 4', '/', 'ore', 'tions', 'More', 'Options'], 200) then break;
        if waitUpTextMulti(NPC_Targets[0].MSObj.UpText, 150) then break;
      end;
    
      if not isUpTextMulti(NPC_Targets[0].MSObj.UpText) then
        begin
        if not isPlayerFighting() then
          begin
            fastClick(MOUSE_RIGHT);
            if optionExistsMulti(NPC_Targets[0].MSObj.UpText) then chooseOptionMulti(['ttack', 'ack', 'Attack'])
              else Exit;
          end
        end
      else
        begin
        if not isPlayerFighting() then
          fastClick(MOUSE_LEFT);
        end
    ...
    you can go to settings on rs, and select the option to give npc always an attack option.

  18. #18
    Join Date
    Oct 2006
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by Hoodz View Post
    you can go to settings on rs, and select the option to give npc always an attack option.
    Wild lol, haven't been back to rs in too long. I guess just another layer of antiban then.

  19. #19
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by Captin_55 View Post
    Wild lol, haven't been back to rs in too long. I guess just another layer of antiban then.
    i dont think thats how banning works lol

  20. #20
    Join Date
    Apr 2015
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Hey!
    I'm kinda a simba nub.
    When running this script i get this error:
    Error: Unknown declaration "hoverSkills" at line 313
    Compiling failed.
    Would like to get help on this
    cheers,
    pkeri

    edit:
    I changed the aerolib from aerolib-master to the aerolib from aerolib2.0 and now i get this error:
    Error: Expected variable of type "Int32", got "Extended" at line 571
    Compiling failed.
    Last edited by pkeri; 08-28-2017 at 01:19 PM.

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

    Default

    Quote Originally Posted by pkeri View Post
    Hey!
    I'm kinda a simba nub.
    When running this script i get this error:

    Would like to get help on this
    cheers,
    pkeri

    edit:
    I changed the aerolib from aerolib-master to the aerolib from aerolib2.0 and now i get this error:
    Good catch, I'll fix & upload the new version. Until then, change line 571 to this:
    Simba Code:
    until(T.timeElapsed() > min(round((COMBATTIME * 1000)), 3600));

    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..."


  22. #22
    Join Date
    Apr 2015
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Thanks a lot!
    Now I have the problem the script gets stuck when it wants to change to a f2p world from a p2p world.
    This is the output where it gets stuck.
    [AL] Switching to a F2P world
    [AL] Logging player in...
    [AL] Members world
    [AL] Changing worlds; current world:389
    When I manually choose an f2p world it finally logs in.
    When I use the default Minotaurs.txt file and change the default script food to trout, the scripts does not recognize the food.
    [SCRIPT] Out of food
    Hope you can help!
    cheers!

    edit:
    then i have another question.
    How does the coordinate system of the npc file works?
    Last edited by pkeri; 08-31-2017 at 07:07 AM.

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

    Default

    Quote Originally Posted by pkeri View Post
    Thanks a lot!
    Now I have the problem the script gets stuck when it wants to change to a f2p world from a p2p world.
    This is the output where it gets stuck.

    When I manually choose an f2p world it finally logs in.
    When I use the default Minotaurs.txt file and change the default script food to trout, the scripts does not recognize the food.

    Hope you can help!
    cheers!

    edit:
    then i have another question.
    How does the coordinate system of the npc file works?
    I'll take a look at the TItem for trouts to make sure they're detected properly; it's possible it may have a broken DTM however unlikely.

    The coordinate system in the NPC file just acts as a player walk-back tool. Should your player venture further from the NPC coordinate than you defined in the script as the MAPDIST, then the script will walk you back to that coordinate. Also, if no free NPC targets are found then the script will walk you back to that coordinate, provided you're further than 7 tiles away. For a bit more info check out the Map settings section of the OP, near the bottom.

    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..."


  24. #24
    Join Date
    Aug 2017
    Posts
    26
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    Trying to run this, getting this error
    Error: No default value for parameter 2 found at line 89
    Compiling failed.
    Which is the line warn('AeroFighter directory not found, creating it now...');
    And there's not a directory saving to simba for me. Any ideas? I've got the up to date aerolib and simba

  25. #25
    Join Date
    Jun 2017
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    It seems to me like the COMBATTIME or COMBATCYCLE one of them seems off, It will click to attack a target, and after i am in combat, it will go and click to attack another NPC no matter what they are set to wait for.

Page 1 of 4 123 ... LastLast

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
  •