Thread: NPC Direction Issue

Results 1 to 8 of 8
  1. #1 NPC Direction Issue 
    Registered Member Beardo's Avatar
    Join Date
    Sep 2011
    Posts
    89
    Thanks given
    18
    Thanks received
    17
    Rep Power
    11
    Tried using this guide;
    http://www.rune-server.org/runescape...direction.html

    Got it down to one error and solved it, and it compiled and all. Logged in and my NPC's are still facing the default direction. Can anyone help me out? I'll post my NPCSpawning.java below-


    Code:
    package com.rs.utils.spawning;
    
    import com.rs.game.World;
    import com.rs.game.WorldObject;
    import com.rs.game.WorldTile;
    import com.rs.utils.Utils.EntityDirection;
    	
    public enum NPCSpawning {
    	
    		
    	
    	EDWARD(13727, 2673, 2665, 0, false, "south"),
    	MANAGER(13768, 3466, 2217, 0, false, "east"), 
    	GENERAL_STORE(529, 2647, 2664, 0, false, "east"), 
    	HERBLORE(587, 2682, 2672, 0, false, "south"),
    	CRAFTING(585, 2681, 2672, 0, false, "south"),
    	SLAYER(8467, 2654, 2656, 0, false, "north"), 
    	BOB(519, 2680, 2672, 0, false, "south"), 
    	PVM_STORE(6537, 2675, 2655, 0, false, "west"), 
    	POTIONS(576, 2679, 2672, 0, false, "south"), 
    	RANGED(575, 2664, 2660, 0, false, "west"), 
    	BARROWS(11683, 2644, 2677, 0, false, "east"), 
    	WEAPON_STORE(1303, 2645, 2675, 0, false, "east"),
    	LOW_LEVEL(1208, 2649, 2660, 0, false, "east"),  
    	HORVIK_ARMOR(14058, 2649, 2659, 0, false, "east"),
    	HUNTER(5112, 2525, 2915, 0, false, "north"),
    	FOOD_SHOP(8864, 2683, 2672, 0, false, "south"), 
    	MAGIC_SHOP(4513, 2658, 2654, 0, false, "north"), 
    	PURE_SHOP(2538, 2645, 2679, 0, false, "south"), 
    	SKILLCAPES(548, 2685, 2662, 0, false, "west"),
            PRESTIGE_SHOP(13959, 2682, 2656, 0, false, "north"),
    	ARCHAEOLOGIST(1918, 2247, 3314, 0, false, "east"),
    	PVP_SHOP(6539, 2673, 2655, 0, false, "east"),
    
    	FISHING_SPOT_1(327, 2604, 3419, 0, true, "east"),
    	FISHING_SPOT_2(6267, 2605, 3420, 0 , true, "east"),
    	FISHING_SPOT_3(312, 2605, 3421, 0, true, "east"),
    	FISHING_SPOT_4(313, 2604, 3422, 0, true, "east"),
    	FISHING_SPOT_5(952, 2603, 3422, 0, true, "east"),
    	FISHING_SPOT_6(327, 2604, 3423, 0, true, "east"),
    	FISHING_SPOT_7(6267, 2605, 3424, 0, true, "east"),
    	FISHING_SPOT_8(312, 2605, 3425, 0, true, "east"),
    	FISHING_SPOT_9(327, 2599, 3419, 0, true, "east"),
    	FISHING_SPOT_10(6267, 2598, 3422, 0, true, "east"),
    	FISHING_SPOT_11(8864, 2590, 3419, 0, true, "east"),
    	POLY_DUNG_SHOP(875, 4724, 5466, 0, false, "east"),
    	CORP_SHOP(13191, 2959, 4382, 2, false, "east"),
    	TZHAAR_1(2625, 2617, 5132, 0, false, "east"),
    	TZHAAR_2(2614, 4666, 5082, 0, false, "east"),
    	
    	/** DONOR ZONE NPCS **/
    	DONOR_ZONE_1(6892, 1605, 4508, 0, false, "east"),
    	DONOR_ZONE_2(1918, 1605, 4506, 0, false, "east"),
    	DONOR_ZONE_3(14854, 1605, 4505, 0, false, "east"),
    	DONOR_ZONE_4(537, 2598, 3162, 0, false, "east"),
    	DONOR_ZONE_5(6970, 2207, 5345, 0, false, "east");
    	
    	
    	private int npcId;
    	private int posX;
    	private int posY;
    	private int height;
    	private boolean spawned;
    	private String direction;
    
    	NPCSpawning(int id, int x, int y, int z, boolean spawned, String direction) {
    		this.npcId = id;
    		this.posX = x;
    		this.posY = y;
    		this.height = z;
    		this.spawned = spawned;
    
    	}
    	
    	public static void spawnNpcs() {
    		for (NPCSpawning spawn : NPCSpawning.values()) {
    			World.spawnNPC(spawn.npcId, new WorldTile(spawn.posX, spawn.posY, spawn.height), 0, spawn.spawned);
    		}
    		
    	}
    }
    Reply With Quote  
     

  2. #2  
    Learning Code
    Riddler's Avatar
    Join Date
    Oct 2012
    Posts
    338
    Thanks given
    10
    Thanks received
    16
    Rep Power
    13
    Use code tags please.




    Reply With Quote  
     

  3. #3  
    Donator

    Yuuji's Avatar
    Join Date
    Feb 2012
    Posts
    678
    Thanks given
    232
    Thanks received
    153
    Rep Power
    197
    Quote Originally Posted by Beardo View Post
    Tried using this guide;
    http://www.rune-server.org/runescape...direction.html

    Got it down to one error and solved it, and it compiled and all. Logged in and my NPC's are still facing the default direction. Can anyone help me out? I'll post my NPCSpawning.java below-


    package com.rs.utils.spawning;

    import com.rs.game.World;
    import com.rs.game.WorldObject;
    import com.rs.game.WorldTile;
    import com.rs.utils.Utils.EntityDirection;

    public enum NPCSpawning {



    EDWARD(13727, 2673, 2665, 0, false, "south"),
    MANAGER(13768, 3466, 2217, 0, false, "east"),
    GENERAL_STORE(529, 2647, 2664, 0, false, "east"),
    HERBLORE(587, 2682, 2672, 0, false, "south"),
    CRAFTING(585, 2681, 2672, 0, false, "south"),
    SLAYER(8467, 2654, 2656, 0, false, "north"),
    BOB(519, 2680, 2672, 0, false, "south"),
    PVM_STORE(6537, 2675, 2655, 0, false, "west"),
    POTIONS(576, 2679, 2672, 0, false, "south"),
    RANGED(575, 2664, 2660, 0, false, "west"),
    BARROWS(11683, 2644, 2677, 0, false, "east"),
    WEAPON_STORE(1303, 2645, 2675, 0, false, "east"),
    LOW_LEVEL(1208, 2649, 2660, 0, false, "east"),
    HORVIK_ARMOR(14058, 2649, 2659, 0, false, "east"),
    HUNTER(5112, 2525, 2915, 0, false, "north"),
    FOOD_SHOP(8864, 2683, 2672, 0, false, "south"),
    MAGIC_SHOP(4513, 2658, 2654, 0, false, "north"),
    PURE_SHOP(2538, 2645, 2679, 0, false, "south"),
    SKILLCAPES(548, 2685, 2662, 0, false, "west"),
    PRESTIGE_SHOP(13959, 2682, 2656, 0, false, "north"),
    ARCHAEOLOGIST(1918, 2247, 3314, 0, false, "east"),
    PVP_SHOP(6539, 2673, 2655, 0, false, "east"),

    FISHING_SPOT_1(327, 2604, 3419, 0, true, "east"),
    FISHING_SPOT_2(6267, 2605, 3420, 0 , true, "east"),
    FISHING_SPOT_3(312, 2605, 3421, 0, true, "east"),
    FISHING_SPOT_4(313, 2604, 3422, 0, true, "east"),
    FISHING_SPOT_5(952, 2603, 3422, 0, true, "east"),
    FISHING_SPOT_6(327, 2604, 3423, 0, true, "east"),
    FISHING_SPOT_7(6267, 2605, 3424, 0, true, "east"),
    FISHING_SPOT_8(312, 2605, 3425, 0, true, "east"),
    FISHING_SPOT_9(327, 2599, 3419, 0, true, "east"),
    FISHING_SPOT_10(6267, 2598, 3422, 0, true, "east"),
    FISHING_SPOT_11(8864, 2590, 3419, 0, true, "east"),
    POLY_DUNG_SHOP(875, 4724, 5466, 0, false, "east"),
    CORP_SHOP(13191, 2959, 4382, 2, false, "east"),
    TZHAAR_1(2625, 2617, 5132, 0, false, "east"),
    TZHAAR_2(2614, 4666, 5082, 0, false, "east"),

    /** DONOR ZONE NPCS **/
    DONOR_ZONE_1(6892, 1605, 4508, 0, false, "east"),
    DONOR_ZONE_2(1918, 1605, 4506, 0, false, "east"),
    DONOR_ZONE_3(14854, 1605, 4505, 0, false, "east"),
    DONOR_ZONE_4(537, 2598, 3162, 0, false, "east"),
    DONOR_ZONE_5(6970, 2207, 5345, 0, false, "east");


    private int npcId;
    private int posX;
    private int posY;
    private int height;
    private boolean spawned;
    private String direction;

    NPCSpawning(int id, int x, int y, int z, boolean spawned, String direction) {
    this.npcId = id;
    this.posX = x;
    this.posY = y;
    this.height = z;
    this.spawned = spawned;

    }

    public static void spawnNpcs() {
    for (NPCSpawning spawn : NPCSpawning.values()) {
    World.spawnNPC(spawn.npcId, new WorldTile(spawn.posX, spawn.posY, spawn.height), 0, spawn.spawned);
    }

    }
    }

    Use code tags

    Code:
    package com.rs.utils.spawning;
    
    import com.rs.game.World;
    import com.rs.game.WorldObject;
    import com.rs.game.WorldTile;
    import com.rs.utils.Utils.EntityDirection;
    
    public enum NPCSpawning {
    
    
    
    EDWARD(13727, 2673, 2665, 0, false, "south"),
    MANAGER(13768, 3466, 2217, 0, false, "east"), 
    GENERAL_STORE(529, 2647, 2664, 0, false, "east"), 
    HERBLORE(587, 2682, 2672, 0, false, "south"),
    CRAFTING(585, 2681, 2672, 0, false, "south"),
    SLAYER(8467, 2654, 2656, 0, false, "north"), 
    BOB(519, 2680, 2672, 0, false, "south"), 
    PVM_STORE(6537, 2675, 2655, 0, false, "west"), 
    POTIONS(576, 2679, 2672, 0, false, "south"), 
    RANGED(575, 2664, 2660, 0, false, "west"), 
    BARROWS(11683, 2644, 2677, 0, false, "east"), 
    WEAPON_STORE(1303, 2645, 2675, 0, false, "east"),
    LOW_LEVEL(1208, 2649, 2660, 0, false, "east"), 
    HORVIK_ARMOR(14058, 2649, 2659, 0, false, "east"),
    HUNTER(5112, 2525, 2915, 0, false, "north"),
    FOOD_SHOP(8864, 2683, 2672, 0, false, "south"), 
    MAGIC_SHOP(4513, 2658, 2654, 0, false, "north"), 
    PURE_SHOP(2538, 2645, 2679, 0, false, "south"), 
    SKILLCAPES(548, 2685, 2662, 0, false, "west"),
    PRESTIGE_SHOP(13959, 2682, 2656, 0, false, "north"),
    ARCHAEOLOGIST(1918, 2247, 3314, 0, false, "east"),
    PVP_SHOP(6539, 2673, 2655, 0, false, "east"),
    
    FISHING_SPOT_1(327, 2604, 3419, 0, true, "east"),
    FISHING_SPOT_2(6267, 2605, 3420, 0 , true, "east"),
    FISHING_SPOT_3(312, 2605, 3421, 0, true, "east"),
    FISHING_SPOT_4(313, 2604, 3422, 0, true, "east"),
    FISHING_SPOT_5(952, 2603, 3422, 0, true, "east"),
    FISHING_SPOT_6(327, 2604, 3423, 0, true, "east"),
    FISHING_SPOT_7(6267, 2605, 3424, 0, true, "east"),
    FISHING_SPOT_8(312, 2605, 3425, 0, true, "east"),
    FISHING_SPOT_9(327, 2599, 3419, 0, true, "east"),
    FISHING_SPOT_10(6267, 2598, 3422, 0, true, "east"),
    FISHING_SPOT_11(8864, 2590, 3419, 0, true, "east"),
    POLY_DUNG_SHOP(875, 4724, 5466, 0, false, "east"),
    CORP_SHOP(13191, 2959, 4382, 2, false, "east"),
    TZHAAR_1(2625, 2617, 5132, 0, false, "east"),
    TZHAAR_2(2614, 4666, 5082, 0, false, "east"),
    
    /** DONOR ZONE NPCS **/
    DONOR_ZONE_1(6892, 1605, 4508, 0, false, "east"),
    DONOR_ZONE_2(1918, 1605, 4506, 0, false, "east"),
    DONOR_ZONE_3(14854, 1605, 4505, 0, false, "east"),
    DONOR_ZONE_4(537, 2598, 3162, 0, false, "east"),
    DONOR_ZONE_5(6970, 2207, 5345, 0, false, "east");
    
    
    private int npcId;
    private int posX;
    private int posY;
    private int height;
    private boolean spawned;
    private String direction;
    
    NPCSpawning(int id, int x, int y, int z, boolean spawned, String direction) {
    this.npcId = id;
    this.posX = x;
    this.posY = y;
    this.height = z;
    this.spawned = spawned;
    
    }
    
    public static void spawnNpcs() {
    for (NPCSpawning spawn : NPCSpawning.values()) {
    World.spawnNPC(spawn.npcId, new WorldTile(spawn.posX, spawn.posY, spawn.height), 0, spawn.spawned);
    }
    
    }
    }

    Attached image
    Attached image
    Reply With Quote  
     

  4. #4  
    Donator
    Sake's Avatar
    Join Date
    Jan 2013
    Posts
    398
    Thanks given
    71
    Thanks received
    23
    Rep Power
    2
    Quote Originally Posted by k2 k0 View Post
    Use code tags

    Code:
    package com.rs.utils.spawning;
    
    import com.rs.game.World;
    import com.rs.game.WorldObject;
    import com.rs.game.WorldTile;
    import com.rs.utils.Utils.EntityDirection;
    
    public enum NPCSpawning {
    
    
    
    EDWARD(13727, 2673, 2665, 0, false, "south"),
    MANAGER(13768, 3466, 2217, 0, false, "east"), 
    GENERAL_STORE(529, 2647, 2664, 0, false, "east"), 
    HERBLORE(587, 2682, 2672, 0, false, "south"),
    CRAFTING(585, 2681, 2672, 0, false, "south"),
    SLAYER(8467, 2654, 2656, 0, false, "north"), 
    BOB(519, 2680, 2672, 0, false, "south"), 
    PVM_STORE(6537, 2675, 2655, 0, false, "west"), 
    POTIONS(576, 2679, 2672, 0, false, "south"), 
    RANGED(575, 2664, 2660, 0, false, "west"), 
    BARROWS(11683, 2644, 2677, 0, false, "east"), 
    WEAPON_STORE(1303, 2645, 2675, 0, false, "east"),
    LOW_LEVEL(1208, 2649, 2660, 0, false, "east"), 
    HORVIK_ARMOR(14058, 2649, 2659, 0, false, "east"),
    HUNTER(5112, 2525, 2915, 0, false, "north"),
    FOOD_SHOP(8864, 2683, 2672, 0, false, "south"), 
    MAGIC_SHOP(4513, 2658, 2654, 0, false, "north"), 
    PURE_SHOP(2538, 2645, 2679, 0, false, "south"), 
    SKILLCAPES(548, 2685, 2662, 0, false, "west"),
    PRESTIGE_SHOP(13959, 2682, 2656, 0, false, "north"),
    ARCHAEOLOGIST(1918, 2247, 3314, 0, false, "east"),
    PVP_SHOP(6539, 2673, 2655, 0, false, "east"),
    
    FISHING_SPOT_1(327, 2604, 3419, 0, true, "east"),
    FISHING_SPOT_2(6267, 2605, 3420, 0 , true, "east"),
    FISHING_SPOT_3(312, 2605, 3421, 0, true, "east"),
    FISHING_SPOT_4(313, 2604, 3422, 0, true, "east"),
    FISHING_SPOT_5(952, 2603, 3422, 0, true, "east"),
    FISHING_SPOT_6(327, 2604, 3423, 0, true, "east"),
    FISHING_SPOT_7(6267, 2605, 3424, 0, true, "east"),
    FISHING_SPOT_8(312, 2605, 3425, 0, true, "east"),
    FISHING_SPOT_9(327, 2599, 3419, 0, true, "east"),
    FISHING_SPOT_10(6267, 2598, 3422, 0, true, "east"),
    FISHING_SPOT_11(8864, 2590, 3419, 0, true, "east"),
    POLY_DUNG_SHOP(875, 4724, 5466, 0, false, "east"),
    CORP_SHOP(13191, 2959, 4382, 2, false, "east"),
    TZHAAR_1(2625, 2617, 5132, 0, false, "east"),
    TZHAAR_2(2614, 4666, 5082, 0, false, "east"),
    
    /** DONOR ZONE NPCS **/
    DONOR_ZONE_1(6892, 1605, 4508, 0, false, "east"),
    DONOR_ZONE_2(1918, 1605, 4506, 0, false, "east"),
    DONOR_ZONE_3(14854, 1605, 4505, 0, false, "east"),
    DONOR_ZONE_4(537, 2598, 3162, 0, false, "east"),
    DONOR_ZONE_5(6970, 2207, 5345, 0, false, "east");
    
    
    private int npcId;
    private int posX;
    private int posY;
    private int height;
    private boolean spawned;
    private String direction;
    
    NPCSpawning(int id, int x, int y, int z, boolean spawned, String direction) {
    this.npcId = id;
    this.posX = x;
    this.posY = y;
    this.height = z;
    this.spawned = spawned;
    
    }
    
    public static void spawnNpcs() {
    for (NPCSpawning spawn : NPCSpawning.values()) {
    World.spawnNPC(spawn.npcId, new WorldTile(spawn.posX, spawn.posY, spawn.height), 0, spawn.spawned);
    }
    
    }
    }
    Someone just told him that... If you're not going to help- leave.
    Reply With Quote  
     

  5. #5  
    Registered Member Beardo's Avatar
    Join Date
    Sep 2011
    Posts
    89
    Thanks given
    18
    Thanks received
    17
    Rep Power
    11
    Quote Originally Posted by revize View Post
    Someone just told him that... If you're not going to help- leave.
    You aren't exactly helping either so follow your own advice and leave.
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Nov 2009
    Posts
    122
    Thanks given
    3
    Thanks received
    1
    Rep Power
    23
    the spawned npc's in the "NPCSpawning.java" should look like this:
    Code:
    World.spawnNPC(530, new WorldTile(2957, 3390, 0), -1, false, EntityDirection.EAST);
    shows this at the bottom of the snippet
    Reply With Quote  
     

  7. #7  
    Registered Member Beardo's Avatar
    Join Date
    Sep 2011
    Posts
    89
    Thanks given
    18
    Thanks received
    17
    Rep Power
    11
    bump..
    Reply With Quote  
     

  8. #8  
    Donator
    Sake's Avatar
    Join Date
    Jan 2013
    Posts
    398
    Thanks given
    71
    Thanks received
    23
    Rep Power
    2
    bump- if someone has this done, can they just pm me their NpcSpawning.java?
    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. Range Npc Combat issue.[Delta]
    By omglolol in forum Help
    Replies: 0
    Last Post: 02-15-2010, 02:10 AM
  2. 525 npc combat issue
    By why teh fuc in forum Help
    Replies: 7
    Last Post: 07-19-2009, 05:42 PM
  3. Drops.CFG and NPC direction
    By Insayne in forum Help
    Replies: 6
    Last Post: 06-05-2009, 01:16 AM
  4. Release how to change npc direction facing?
    By AlexMason in forum RS2 Server
    Replies: 25
    Last Post: 05-08-2008, 12:48 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
  •