Thread: Teleporting via NPC

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 Teleporting via NPC 
    GFX
    PewGFX's Avatar
    Join Date
    Dec 2013
    Posts
    189
    Thanks given
    28
    Thanks received
    4
    Rep Power
    11
    Hi I'm almost done trying out my first npc teleportation but i get errors from this code and im not sure why? Can someone help please

    Code:
    Class<Dialogue> value43 = (Class<Dialogue>) Class
    					.forName(Mandrith.class.getCanonicalName());
    			handledDialogues.put("Mandrith", value43);
    For a FREE GFX service, click HERE


    Attached image
    Reply With Quote  
     

  2. #2  
    Registered Member _Andy's Avatar
    Join Date
    May 2013
    Age
    28
    Posts
    643
    Thanks given
    224
    Thanks received
    111
    Rep Power
    4
    handledDialogues.put("Mandrith", (Class<Dialogue>) Class.forName(Mandrith.class.getCanonicalName()));

    in DialogueHandler class
    quit
    Reply With Quote  
     

  3. #3  
    GFX
    PewGFX's Avatar
    Join Date
    Dec 2013
    Posts
    189
    Thanks given
    28
    Thanks received
    4
    Rep Power
    11
    Quote Originally Posted by I Lithium View Post
    handledDialogues.put("Mandrith", (Class<Dialogue>) Class.forName(Mandrith.class.getCanonicalName()));

    in DialogueHandler class
    still getting errors:/
    For a FREE GFX service, click HERE


    Attached image
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Feb 2011
    Posts
    1,143
    Thanks given
    545
    Thanks received
    110
    Rep Power
    87
    Make sure 43 isn't being used, and in the dialogue you have to name it mandrith

    Also, post the errors.

    Reply With Quote  
     

  5. #5  
    Banned

    Join Date
    Aug 2007
    Posts
    4,130
    Thanks given
    0
    Thanks received
    64
    Rep Power
    0
    post the error so we can help?
    Reply With Quote  
     

  6. #6  
    GFX
    PewGFX's Avatar
    Join Date
    Dec 2013
    Posts
    189
    Thanks given
    28
    Thanks received
    4
    Rep Power
    11
    Quote Originally Posted by word View Post
    post the error so we can help?


    it's just ongoing for 16 errors
    For a FREE GFX service, click HERE


    Attached image
    Reply With Quote  
     

  7. #7  
    Registered Member

    Join Date
    Feb 2011
    Posts
    1,143
    Thanks given
    545
    Thanks received
    110
    Rep Power
    87
    Well what you originally posted is not the issue. The issue is the teleported, post the code for the teleporter.

    Reply With Quote  
     

  8. #8  
    GFX
    PewGFX's Avatar
    Join Date
    Dec 2013
    Posts
    189
    Thanks given
    28
    Thanks received
    4
    Rep Power
    11
    Quote Originally Posted by falconpunch View Post
    Well what you originally posted is not the issue. The issue is the teleported, post the code for the teleporter.
    Sorted most of em and I think i've f'd the code lol



    Code:
    package com.rs.game.player.dialogues.impl;
    
    import com.rs.Settings;
    import com.rs.cache.loaders.NPCDefinitions;
    import com.rs.game.Animation;
    import com.rs.game.Graphics;
    import com.rs.game.WorldTile;
    import com.rs.game.player.content.PlayerLook;
    import com.rs.game.player.dialogues.Dialogue;
    import com.rs.game.tasks.WorldTask;
    import com.rs.game.tasks.WorldTasksManager;
    import com.rs.utils.ShopsHandler;
    
    public class Mandrith extends Dialogue {
    
    	public Mandrith() {
    	}
    
    	@Override
    	public void start() {
    		player.getHintIconsManager().removeUnsavedHintIcon();
    		sendMessage(
    				"Welcome to explicit! I can change your, look and",
    				"tell you some things about the server. If you're",
    				"interested, I have a few shops too you can look at.",
    				"So what would you like to do?");
    		stage = 0;
    	}
    	
    	@Override
    	public void run(int interfaceId, int componentId) {
    		if (stage == 0) {
    			sendOptionsDialogue(""+Settings.SERVER_NAME+" Mandrith Options",
    					"Skilling",
    					"Training",
    					"Bosses",
    					"PVP",
    					"Minigames");
    			stage = 1;
    		}
    		else if (stage == 1) {
    			if (componentId == OPTION_1) {
    				sendOptionsDialogue(""+Settings.SERVER_NAME+" - Skilling",
    					"Basic Skilling -70",
    					"Advanced Skilling +70");
    			stage = 1;
    		}
    			
    		if (stage == 2) {
    			if (componentId == OPTION_1) {
    				sendOptionsDialogue(""+Settings.SERVER_NAME+" - Basic Skilling -70",
    					"Woodcutting",
    					"Mining",
    					"Smithing",
    					"Fishing",
    					"Next Page");
    			stage = 1;
    		}
    		
    	}
    	
    	@Override
    	public void finish() {
    		player.getInterfaceManager().openGameTab(4);
    	}
    
    }
    For a FREE GFX service, click HERE


    Attached image
    Reply With Quote  
     

  9. #9  
    Registered Member
    medic's Avatar
    Join Date
    Sep 2013
    Posts
    1,581
    Thanks given
    821
    Thanks received
    560
    Rep Power
    1129
    you need a ; on line 63 (use eclipse)


    Reply With Quote  
     

  10. #10  
    Registered Member
    medic's Avatar
    Join Date
    Sep 2013
    Posts
    1,581
    Thanks given
    821
    Thanks received
    560
    Rep Power
    1129
    is your dialogue not meant to be in com.rs.game.player.dialogues instead of com.rs.game.player.dialogues.impl?


    Reply With Quote  
     

Page 1 of 2 12 LastLast

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. Adding multiple teleports via mage book.
    By savior I in forum Help
    Replies: 4
    Last Post: 03-24-2012, 07:13 AM
  2. Replies: 17
    Last Post: 10-27-2011, 05:06 AM
  3. [PI] Teleporting an NPC
    By purepout in forum Help
    Replies: 8
    Last Post: 04-19-2011, 07:13 PM
  4. poison via npcs?
    By sexyrussian in forum Help
    Replies: 4
    Last Post: 04-09-2010, 02:51 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •