need command for event

Results 1 to 5 of 5
  1. #1
    Member ifa9oool is offline
    MemberRank
    Jun 2014 Join Date
    74Posts

    need command for event

    hello i want command i dk command or what but in map ox i tip command and when they fall to bottom did

    anyone know this ?


  2. #2
    Member ifa9oool is offline
    MemberRank
    Jun 2014 Join Date
    74Posts

    Re: need command for event

    hello anyone here ?

  3. #3
    Apprentice suwaidy is offline
    MemberRank
    Dec 2013 Join Date
    23Posts

    Re: need command for event

    Hello Fa9ool,

    You seem quite new on P.servers you need countless amount of help.
    I might give you a hand.

    Add this to admin command :

    } else if (splitted[0].equals("!event")) { if (player.getClient().getChannelServer().eventOn == false) {
    int mapid = getOptionalIntArg(splitted, 1, c.getPlayer().getMapId());
    player.getClient().getChannelServer().eventOn = true;
    player.getClient().getChannelServer().eventMap = mapid;
    try {
    cserv.getWorldInterface().broadcastMessage(null, MaplePacketCreator.serverNotice(6, c.getChannel(), "Spoonfeeding Times :" + c.getChannel() + ". Times Left : " + player.getMapId() + "!").getBytes());
    } catch (RemoteException e) {
    cserv.reconnectWorld();
    }
    } else {
    player.getClient().getChannelServer().eventOn = false;
    try {
    cserv.getWorldInterface().broadcastMessage(null, MaplePacketCreator.serverNotice(6, c.getChannel(), "Bye").getBytes());
    } catch (RemoteException e) {
    cserv.reconnectWorld();
    }
    }
    This goes to your Player Command :

    } else if (splitted[0].equals("@leaveevent")) { if (player.getMapId() != c.getChannelServer().eventMap) {
    player.dropMessage("You may only use this to leave the event map!");
    //mc.dropMessage("You may only use this command in the Leaving the Event map.");
    return;
    }
    if (c.getChannelServer().eventOn == true) {
    MapleMap map = cserv.getMapFactory().getMap(c.getPlayer().getPreviousMap());


    player.changeMap(map, map.getPortal(0));
    c.getPlayer().setPreviousMap(0);
    } else {
    player.dropMessage("There is no active event at this time or has closed. Please try again later!");
    return;
    }

    One point is missing which is : getPreviousMap()
    Which is a simple function that has to be added in MapleCharacter
    Good Luck~

  4. #4
    Member ifa9oool is offline
    MemberRank
    Jun 2014 Join Date
    74Posts

    Re: need command for event

    Quote Originally Posted by suwaidy View Post
    Hello Fa9ool,

    You seem quite new on P.servers you need countless amount of help.
    I might give you a hand.

    Add this to admin command :



    This goes to your Player Command :




    One point is missing which is : getPreviousMap()
    Which is a simple function that has to be added in MapleCharacter
    Good Luck~

    but i need like a !random for number (1,100)

  5. #5
    Moderator Eric is offline
    ModeratorRank
    Jan 2010 Join Date
    DEV CityLocation
    3,188Posts

    Re: need command for event

    Quote Originally Posted by ifa9oool View Post
    but i need like a !random for number (1,100)
    PHP Code:
    case "randomnumber":
        
    int min 1max 100;
        
    Random rand = new Random();
        
    int num rand.nextInt(max min 1) + min;
        
    c.getCenter().getWorld(c.getWorld()).sendPacket(UserLocal.OnNoticeMsg("Random number: " num));
        break; 



Advertisement