Thread: Troll invasion

Results 1 to 2 of 2
  1. #1 Troll invasion 
    Learning Code
    Riddler's Avatar
    Join Date
    Oct 2012
    Posts
    338
    Thanks given
    10
    Thanks received
    16
    Rep Power
    13
    I use this tutorail to add Troll invasion minigame

    http://www.rune-server.org/runescape...-minigame.html

    My question Is How do I start the minigame when the player joins in? How do I get the player to join the Minigame?




    Reply With Quote  
     

  2. #2  
    Coder in training
    Alienware's Avatar
    Join Date
    Oct 2011
    Age
    27
    Posts
    517
    Thanks given
    35
    Thanks received
    58
    Rep Power
    12
    You need to make an object or npc dialogue to start the controler.
    Example:
    Code:
    	@Override
    	public void start() {
    		sendDialogue("Would you like to start the Troll Invasion minigame?");
    	}
    
    	@Override
    	public void run(int interfaceId, int componentId) {
    		if (stage == -1) {
    			stage = 0;
    			sendOptionsDialogue(SEND_DEFAULT_OPTIONS_TITLE,
    					"Yes, I'm fearless.", "No way, that's scary!");
    		} else if (stage == 0) {
    			if (componentId == OPTION_1) 
    				player.setNextWorldTile(new WorldTile(Xcoord, Ycoord, 0));
    			        player.getControlerManager().startControler("TrollInvasion");
    			end();
    		}
    	}
    
    	@Override
    	public void finish() {
    
    	}
    (Red text is the controler starter.)
    Don't forget your imports:
    Code:
    import com.rs.game.player.controlers.TrollInvasion;
    Quote Originally Posted by Alienware
    The heart of a server is its community.
    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. Troll Invasion Minigame
    By TimeNRS3 in forum Show-off
    Replies: 23
    Last Post: 11-14-2012, 04:44 AM
  2. Battlescape Trolls
    By Skizzle in forum RS 503+ Client & Server
    Replies: 14
    Last Post: 08-08-2008, 08:25 PM
  3. Invasion
    By Trytohaxme in forum Showcase
    Replies: 3
    Last Post: 06-12-2008, 04:43 AM
  4. Sea Troll Queen (Npc)
    By Mikey` in forum Configuration
    Replies: 2
    Last Post: 03-18-2008, 08:37 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
  •