toggleSpawen

Results 1 to 4 of 4
  1. #1
    Valued Member WantThat is offline
    MemberRank
    Feb 2013 Join Date
    137Posts

    toggleSpawen

    there is a way to toggle spawns of monsters by a function (prefer at MapleMap)
    there is some maps i want to stop them summon monster and make it back when i choose
    tnx a lot :D


  2. #2
    Proficient Member Firzen66 is offline
    MemberRank
    May 2010 Join Date
    190Posts

    Re: toggleSpawen

    at mapleMap add:
    PHP Code:
    private boolean respawnAllowed true;

    public 
    boolean toggleRespawn(){
        
    respawnAllowed = !respawnAllowed;
        return 
    respawnAllowed;

    under respawn() or respawnMap() idk which source you are using add this:
    PHP Code:
    if (!respawnAllowedreturh
    here is a use of this in a command:
    PHP Code:
    player.dropMessage("Repsawn is now " + (player.getMap().toggleRespawn() ? "on" "off") + "."); 

  3. #3
    $_SESSION['DEV']; hecari is offline
    MemberRank
    Dec 2008 Join Date
    336Posts

    Re: toggleSpawen

    PHP Code:
    public boolean toggleRespawn(){
        
    respawnAllowed = !respawnAllowed;
        return 
    respawnAllowed;
    }  
    // not neccessary, you can set it to a void return type. 
    PHP Code:
    public void toggleRespawn() {
         
    respawnAllowed = !respawnAllowed;


  4. #4
    Proficient Member Firzen66 is offline
    MemberRank
    May 2010 Join Date
    190Posts

    Re: toggleSpawen

    Quote Originally Posted by hecari View Post
    PHP Code:
    public boolean toggleRespawn(){
        
    respawnAllowed = !respawnAllowed;
        return 
    respawnAllowed;
    }  
    // not neccessary, you can set it to a void return type. 
    PHP Code:
    public void toggleRespawn() {
         
    respawnAllowed = !respawnAllowed;

    I made it that way so I won't have to use another method for the command.



Advertisement