Thread: OSBot Script to dump spawns from OSRS

Results 1 to 7 of 7
  1. #1 OSBot Script to dump spawns from OSRS 
    Banned

    Join Date
    May 2011
    Posts
    1,785
    Thanks given
    854
    Thanks received
    853
    Rep Power
    0
    Script file (place in User\OSBot\Scripts\):

    [Only registered and activated users can see links. ]

    Source:

    Code:
    
    import org.osbot.rs07.api.map.constants.Banks;
    import org.osbot.rs07.api.model.NPC;
    import org.osbot.rs07.script.Script;
    import org.osbot.rs07.script.ScriptManifest;
    
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileWriter;
    import java.util.ArrayList;
    
    import java.util.List;
    
    /**
     * Created by HaiderPC on 16-4-2016.
     */
    
    @ScriptManifest(name = "NpcSpawnDumper", author = "Poesy700", version = 1.0, info = "", logo = "http://i.imgur.com/36i4Y6m.png")
    public class NpcSpawnDumper extends Script {
    
    
        private ArrayList<Integer> dumpedSpawns = new ArrayList<Integer>();
    
    @Override
    public void onStart() {
           // walking.webWalk(Banks.FALADOR_EAST.getRandomPosition());
    }
    
    
        @Override
    public int onLoop() throws InterruptedException {
            List<NPC> nigga = getNpcs().getAll();
            for (NPC n : nigga) {
                dumpNPC(n);
    }
            return 100;
    }
    
        public boolean dumpNPC(NPC n) {
            try {
                if (dumpedSpawns.contains(n.getIndex()))
                    return false;
                if (n.getId() == -1)
                    return true;
                int npcId = n.getId();
                int x = n.getX();
                int y = n.getY();
                int z = n.getZ();
                int direction = n.getRotation()/512;
    
    File f = new File("C:\\Users\\HaiderPC\\Documents\\spawns", "spawns.txt");
    BufferedWriter w = new BufferedWriter(new FileWriter(f, true));
    textOnLine(w, "{");
    textOnLine(w, "\"id\": "+npcId+",");
    textOnLine(w, "\"position\": {");
    textOnLine(w, "\"x\": "+x+",");
    textOnLine(w, "\"y\": "+y+",");
    textOnLine(w, "\"z\": "+z);
    textOnLine(w, "},");
    textOnLine(w, "\"direction\": "+direction+",");
    textOnLine(w, "\"random-walk\": false,");
    textOnLine(w, "\"walk-radius\": 0");
    textOnLine(w, "},");
    
    w.flush();
    w.close();
    
    dumpedSpawns.add(n.getIndex());
    } catch (Exception e) {
                e.printStackTrace();
    }
            return true;
    }
    
        public void textOnLine(BufferedWriter w, String line) throws Exception {
            w.write(line);
    w.newLine();
    }
    
    }
    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Extreme Donator

    Kiana's Avatar
    Join Date
    May 2015
    Posts
    1,051
    Thanks given
    147
    Thanks received
    179
    Discord
    View profile
    Rep Power
    198
    Wow thanks
    Reply With Quote  
     

  4. #3  
    Banned

    Join Date
    Oct 2012
    Posts
    4,716
    Thanks given
    1,682
    Thanks received
    1,105
    Rep Power
    0
    Thanks
    Reply With Quote  
     

  5. #4  
    Banned

    Join Date
    Jan 2012
    Age
    22
    Posts
    2,705
    Thanks given
    907
    Thanks received
    628
    Rep Power
    0
    Quote Originally Posted by Poesy700 View Post
    Script file (place in User\OSBot\Scripts\):

    [Only registered and activated users can see links. ]

    Source:

    Code:
    
    import org.osbot.rs07.api.map.constants.Banks;
    import org.osbot.rs07.api.model.NPC;
    import org.osbot.rs07.script.Script;
    import org.osbot.rs07.script.ScriptManifest;
    
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileWriter;
    import java.util.ArrayList;
    
    import java.util.List;
    
    /**
     * Created by HaiderPC on 16-4-2016.
     */
    
    @ScriptManifest(name = "NpcSpawnDumper", author = "Poesy700", version = 1.0, info = "", logo = "http://i.imgur.com/36i4Y6m.png")
    public class NpcSpawnDumper extends Script {
    
    
        private ArrayList<Integer> dumpedSpawns = new ArrayList<Integer>();
    
    @Override
    public void onStart() {
           // walking.webWalk(Banks.FALADOR_EAST.getRandomPosition());
    }
    
    
        @Override
    public int onLoop() throws InterruptedException {
            List<NPC> nigga = getNpcs().getAll();
            for (NPC n : nigga) {
                dumpNPC(n);
    }
            return 100;
    }
    
        public boolean dumpNPC(NPC n) {
            try {
                if (dumpedSpawns.contains(n.getIndex()))
                    return false;
                if (n.getId() == -1)
                    return true;
                int npcId = n.getId();
                int x = n.getX();
                int y = n.getY();
                int z = n.getZ();
                int direction = n.getRotation()/512;
    
    File f = new File("C:\\Users\\HaiderPC\\Documents\\spawns", "spawns.txt");
    BufferedWriter w = new BufferedWriter(new FileWriter(f, true));
    textOnLine(w, "{");
    textOnLine(w, "\"id\": "+npcId+",");
    textOnLine(w, "\"position\": {");
    textOnLine(w, "\"x\": "+x+",");
    textOnLine(w, "\"y\": "+y+",");
    textOnLine(w, "\"z\": "+z);
    textOnLine(w, "},");
    textOnLine(w, "\"direction\": "+direction+",");
    textOnLine(w, "\"random-walk\": false,");
    textOnLine(w, "\"walk-radius\": 0");
    textOnLine(w, "},");
    
    w.flush();
    w.close();
    
    dumpedSpawns.add(n.getIndex());
    } catch (Exception e) {
                e.printStackTrace();
    }
            return true;
    }
    
        public void textOnLine(BufferedWriter w, String line) throws Exception {
            w.write(line);
    w.newLine();
    }
    
    }
    Nice work .
    Reply With Quote  
     

  6. #5  
    现场大

    tiller's Avatar
    Join Date
    Dec 2015
    Posts
    757
    Thanks given
    335
    Thanks received
    164
    Rep Power
    303
    You're amazing. thank you
    Reply With Quote  
     

  7. #6  
    Middleman Services
    Louis Vuitton's Avatar
    Join Date
    Oct 2014
    Posts
    491
    Thanks given
    53
    Thanks received
    66
    Rep Power
    30
    nice job haider
    Reply With Quote  
     

  8. #7  
    Owner of Ghreborn

    Sgsrocks's Avatar
    Join Date
    Mar 2014
    Posts
    837
    Thanks given
    35
    Thanks received
    91
    Rep Power
    84
    why not working?

    Discord: Sgsrocks#5004
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. Replies: 47
    Last Post: 12-12-2017, 02:29 AM
  2. How to dump info from clients (items, npcs, and objects)
    By Anthony-| in forum Informative Threads
    Replies: 46
    Last Post: 03-10-2011, 04:44 PM
  3. [req] How to dump models from 317 cache?
    By Insdeath in forum Help
    Replies: 1
    Last Post: 02-17-2010, 03:02 AM
  4. How to dump GFX from runescape?
    By Underoath in forum Requests
    Replies: 6
    Last Post: 08-25-2009, 11:49 AM
  5. Replies: 2
    Last Post: 05-07-2009, 10:49 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •