Thread: [PI] Adding a minigame area

Results 1 to 3 of 3
  1. #1 [PI] Adding a minigame area 
    Registered Member
    Join Date
    Jun 2014
    Posts
    46
    Thanks given
    2
    Thanks received
    0
    Rep Power
    13
    Fixed.
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Oct 2013
    Posts
    775
    Thanks given
    48
    Thanks received
    104
    Rep Power
    14
    Just add a check in your teleport method. Something like

    if (c.inGame()) {
    c.sendMessage("You can't teleport in this area");
    return;
    }

    To disable prayer, call th resetPrayer method from where you have them start/begin the game. You should also add a check in your activatePrayer method

    if (c.inGame()) {
    c.sendMessage("You're unable to activate prayers in this minigame");
    c.getCombat().resetPrayers();
    return;
    }

    Spawning item is relatively simple. Just add the items using the addItem method in itemassistants for when they begin the minigame

    The other thing is simple aswell, just need to add the area check with a check that checks the players inventory and equipment, but I forgot what was used to check inv and equipment. I know you'll have to loop through something
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Mar 2012
    Posts
    411
    Thanks given
    58
    Thanks received
    19
    Rep Power
    11
    stop teleporting from an area
    Code:
    	public boolean in****() {
    	if((absX >= **** && absX <= **** && absY >= **** && absY <= ****))
    	 {
    	return true;
    	}
    	return false;
    	}
    in your teleport method add
    Code:
            if (c.in****()) {
                c.sendMessage("You cannot teleport from ****!");
                return;
            }
    the same can be done in you're openbank method which will stop banking and teleporting while in this area.
    Code:
            if (c.in****()) {
                c.sendMessage("You cannot bank from ****!");
                return;
            }
    or add somthing like this
    public int ingame; < to player.java make it save also
    add
    Code:
    		if (c.ingame == 1) {
                c.sendMessage("You cannot teleport while in this minigame!");
                return;
            }
    and when u enter the mini game simple add this to your entry method > "c.ingame = 1;"
    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: 44
    Last Post: 04-22-2012, 11:31 AM
  2. [PI] Adding my maze minigame [PI]
    By vural in forum Tutorials
    Replies: 26
    Last Post: 06-29-2011, 04:20 PM
  3. Adding Multi Combat Area's
    By Itz_ in forum Snippets
    Replies: 0
    Last Post: 12-25-2009, 10:57 AM
  4. Adding coool training area
    By Socket Head in forum Tutorials
    Replies: 18
    Last Post: 06-02-2009, 09:40 PM
  5. [Help] Moving / Adding to drawing area
    By discipl3 in forum Help
    Replies: 0
    Last Post: 04-10-2009, 02:23 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
  •