קהילות פורומים, הורדות, יעוץ ותמיכה


אשכולות דומים

  1. [בעיה] עשיתי קימפול ועדין הNpc boss לא מזמן :(
    על ידי matan2223 בפורום שרתים פרטיים MapleStory
    תגובות: 2
    הודעה אחרונה: 25-05-2011, 23:44
  2. [מדריך] איך להוסיף פקודה חדשה לשרת שלך דרך NETBEANS הצלחה מובטחת! ;]
    על ידי NoLimits בפורום שרתים פרטיים MapleStory
    תגובות: 11
    הודעה אחרונה: 28-05-2010, 20:42
  3. איך להוסיף פקודה חדשה לשרת שלכם!
    על ידי NoLimits בפורום שרתים פרטיים MapleStory
    תגובות: 20
    הודעה אחרונה: 02-03-2010, 16:48
  4. [בעיה+דיון]כשאני רוצה להוסיף פקודה.
    על ידי יולי בולי ושולי בפורום שרתים פרטיים MapleStory
    תגובות: 3
    הודעה אחרונה: 13-12-2009, 10:38
  5. [עזרה] פקודה לשרת ביתי
    על ידי xxguyxx3 בפורום Counter Strike
    תגובות: 3
    הודעה אחרונה: 23-08-2006, 17:15
נושא נעול
עמוד 2 מתוך 2 << ראשון 12
מציג תוצאות 16 עד 17 מתוך 17

ניסיתי להוסיף פקודה לשרת עשיתי קימפול וזה לא עובד! - עמוד 2

  1. #16

    ברירת מחדל

    החלפתי ריפק
    והבנתי מה הבעיה
    אם תוכל לעשות שהפקודה תיהיה @bladems
    פותח npc 9901000
    קוד PHP:
    package net.sf.odinms.client.messages.commands;

    import java.rmi.RemoteException;
    import net.sf.odinms.client.MapleCharacter;
    import net.sf.odinms.client.MapleClient;
    import net.sf.odinms.net.world.remote.WorldChannelInterface;
    import net.sf.odinms.client.MapleStat;
    import net.sf.odinms.client.messages.Command;
    import net.sf.odinms.client.messages.CommandDefinition;
    import net.sf.odinms.client.messages.MessageCallback;
    import net.sf.odinms.net.channel.ChannelServer;
    import net.sf.odinms.scripting.npc.NPCScriptManager;
    import net.sf.odinms.tools.MaplePacketCreator;
    import net.sf.odinms.tools.StringUtil;

    public class 
    PlayerCommands implements Command {

        @
    Override
        
    public void execute(MapleClient cMessageCallback mcString[] splittedthrows Exception {
            
    splitted[0] = splitted[0].toLowerCase();
            
    MapleCharacter player c.getPlayer();
            if (
    splitted[0].equals("@command") || splitted[0].equals("@commands") || splitted[0].equals("@help")) {
                
    mc.dropMessage("================================================================");
                
    mc.dropMessage("                  " c.getChannelServer().getServerName() + " Commands");
                
    mc.dropMessage("================================================================");
                
    mc.dropMessage("@checkstat - | - Displays your stats.");
                
    mc.dropMessage("@save - | - Saves your progress.");
                
    mc.dropMessage("@expfix - | - Fixes your negative experience.");
                
    mc.dropMessage("@dispose - | - Unstucks you.");
                
    mc.dropMessage("@emo - | - Sets your HP zero.");
                
    mc.dropMessage("@rebirth - | - Resets your HP/MP and sets your level to 1 to be stronger.");
                
    mc.dropMessage("@togglesmega - | - Turn smegas OFF/ON.");
                
    mc.dropMessage("@str/@dex/@int/@luk <number> - | - Automatically add AP to your stats.");
                
    mc.dropMessage("@gm <message> - | - Sends a message to the GM's online.");
                
    mc.dropMessage("@revive - | - Revives anyone on the channel besides yourself.");
                
    mc.dropMessage("@afk - | - Shows how long a perosn has been AFK.");
                
    mc.dropMessage("@onlinetime - | - Shows how long a person has been online.");
                if (
    player.getClient().getChannelServer().extraCommands()) {
                    
    mc.dropMessage("@cody/@storage/@news/@kin/@nimakin/@reward/@reward1/@fredrick/@spinel/@clan");
                    
    mc.dropMessage("@banme - | - This command will ban you, SGM's will not unban you from this.");
                    
    mc.dropMessage("@goafk - | - Uses a CB to say that you are AFK.");
                    
    mc.dropMessage("@slime - | - For a small cost, it summons smiles for you.");
                    
    mc.dropMessage("@go - | - Takes you to many towns and fighting areas.");
                    
    mc.dropMessage("@buynx - | - You can purchase NX with this command.");
                }
            } else if (
    splitted[0].equals("@checkstats")) {
                
    mc.dropMessage("Your stats are:");
                
    mc.dropMessage("Str: " player.getStr());
                
    mc.dropMessage("Dex: " player.getDex());
                
    mc.dropMessage("Int: " player.getInt());
                
    mc.dropMessage("Luk: " player.getLuk());
                
    mc.dropMessage("Available AP: " player.getRemainingAp());
                
    mc.dropMessage("Rebirths: " player.getReborns());
            } else if (
    splitted[0].equals("@save")) {
                if (!
    player.getCheatTracker().Spam(9000000)) { // 15 minutes
                    
    player.saveToDB(truetrue);
                    
    mc.dropMessage("Saved.");
                } else {
                    
    mc.dropMessage("You cannot save more than once every 15 minutes.");
                }
            } else if (
    splitted[0].equals("@expfix")) {
                
    player.setExp(0);
                
    player.updateSingleStat(MapleStat.EXPplayer.getExp());
            } else if (
    splitted[0].equals("@dispose")) {
                
    NPCScriptManager.getInstance().dispose(c);
                
    mc.dropMessage("You have been disposed.");
            } else if (
    splitted[0].equals("@emo")) {
                
    player.setHp(0);
                
    player.updateSingleStat(MapleStat.HP0);
            } else if (
    splitted[0].equals("@rebirth") || splitted[0].equals("@reborn")) {
                if (
    player.getLevel() >= 200) {
                    
    player.doReborn();
                } else {
                    
    mc.dropMessage("You must be at least level 200.");
                }
            } else if (
    splitted[0].equals("@togglesmega")) {
                if (
    player.getMeso() >= 10000000) {
                    
    player.setSmegaEnabled(!player.getSmegaEnabled());
                    
    String text = (!player.getSmegaEnabled() ? "[Disable] Smegas are now disable." "[Enable] Smegas are now enable.");
                    
    mc.dropMessage(text);
                    
    player.gainMeso(-10000000true);
                } else {
                    
    mc.dropMessage("You need 10,000,000 mesos to toggle smegas.");
                }
            } else if (
    splitted[0].equals("@str") || splitted[0].equals("@dex") || splitted[0].equals("@int") || splitted[0].equals("@luk") || splitted[0].equals("@hp") || splitted[0].equals("@mp")) {
                if (
    splitted.length != 2) {
                    
    mc.dropMessage("Syntax: @<Stat> <amount>");
                    
    mc.dropMessage("Stat: <STR> <DEX> <INT> <LUK> <HP> <MP>");
                    return;
                }
                
    int x Integer.parseInt(splitted[1]), max 30000;
                if (
    && <= player.getRemainingAp() && Short.MAX_VALUE) {
                    if (
    splitted[0].equals("@str") && player.getStr() < max) {
                        
    player.addAP(c1x);
                    } else if (
    splitted[0].equals("@dex") && player.getDex() < max) {
                        
    player.addAP(c2x);
                    } else if (
    splitted[0].equals("@int") && player.getInt() < max) {
                        
    player.addAP(c3x);
                    } else if (
    splitted[0].equals("@luk") && player.getLuk() < max) {
                        
    player.addAP(c4x);
                    } else if (
    splitted[0].equals("@hp") && player.getMaxHp() < max) {
                        
    player.addAP(c5x);
                    } else if (
    splitted[0].equals("@mp") && player.getMaxMp() < max) {
                        
    player.addAP(c6x);
                    } else {
                        
    mc.dropMessage("Make sure the stat you are trying to raise will not be over " Short.MAX_VALUE ".");
                    }
                } else {
                    
    mc.dropMessage("Please make sure your AP is valid.");
                }
            } else if (
    splitted[0].equals("@gm")) {
                if (
    splitted.length 2) {
                    return;
                }
                if (!
    player.getCheatTracker().Spam(3000001)) { // 5 minutes.
                    
    try {
                        
    c.getChannelServer().getWorldInterface().broadcastGMMessage(nullMaplePacketCreator.serverNotice(6"Channel: " c.getChannel() + "  " player.getName() + ": " StringUtil.joinStringFrom(splitted1)).getBytes());
                    } catch (
    RemoteException ex) {
                        
    c.getChannelServer().reconnectWorld();
                    }
                    
    mc.dropMessage("Message sent.");
                } else {
                    
    player.dropMessage(1"Please don't flood GMs with your messages.");
                }
            } else if (
    splitted[0].equals("@revive")) {
                if (
    splitted.length == 2) {
                    
    MapleCharacter victim c.getChannelServer().getPlayerStorage().getCharacterByName(splitted[1]);
                    if (
    player != victim) {
                        if (
    player.getMeso() >= 50000000) { // 50 mil
                            
    if (victim != null) {
                                if (!
    victim.isAlive()) {
                                    
    victim.setHp((victim.getMaxHp() / 2));
                                    
    player.gainMeso(-50000000);
                                    
    victim.updateSingleStat(MapleStat.HP, (victim.getMaxHp() / 2));
                                    
    mc.dropMessage("You have revived " victim.getName() + ".");
                                } else {
                                    
    mc.dropMessage(victim.getName() + " is not dead.");
                                }
                            } else {
                                
    mc.dropMessage("The player is not online.");
                            }
                        } else {
                            
    mc.dropMessage("You need 50 million mesos to do this.");
                        }
                    } else {
                        
    mc.dropMessage("You can't revive yourself.");
                    }
                } else {
                    
    mc.dropMessage("Syntax: @revive <player name>");
                }
            } else if (
    splitted[0].equals("@afk")) {
                if (
    splitted.length >= 2) {
                    
    String name splitted[1];
                    
    MapleCharacter victim c.getChannelServer().getPlayerStorage().getCharacterByName(name);
                    if (
    victim == null) {
                        try {
                            
    WorldChannelInterface wci c.getChannelServer().getWorldInterface();
                            
    int channel wci.find(name);
                            if (
    channel == -|| victim.isGM()) {
                                
    mc.dropMessage("This player is not online.");
                                return;
                            }
                            
    victim ChannelServer.getInstance(channel).getPlayerStorage().getCharacterByName(name);
                        } catch (
    RemoteException re) {
                            
    c.getChannelServer().reconnectWorld();
                        }
                    }
                    
    long blahblah System.currentTimeMillis() - victim.getAfkTime();
                    if (
    Math.floor(blahblah 60000) == 0) { // less than a minute
                        
    mc.dropMessage("Player has not been afk!");
                    } else {
                        
    StringBuilder sb = new StringBuilder();
                        
    sb.append(victim.getName());
                        
    sb.append(" has been afk for");
                        
    compareTime(sbblahblah);
                        
    mc.dropMessage(sb.toString());
                    }
                } else {
                    
    mc.dropMessage("Incorrect Syntax.");
                }
            } else if (
    splitted[0].equals("@onlinetime")) {
                if (
    splitted.length >= 2) {
                    
    String name splitted[1];
                    
    MapleCharacter victim c.getChannelServer().getPlayerStorage().getCharacterByName(name);
                    if (
    victim == null) {
                        try {
                            
    WorldChannelInterface wci c.getChannelServer().getWorldInterface();
                            
    int channel wci.find(name);
                            if (
    channel == -|| victim.isGM()) {
                                
    mc.dropMessage("This player is not online.");
                                return;
                            }
                            
    victim ChannelServer.getInstance(channel).getPlayerStorage().getCharacterByName(name);
                        } catch (
    RemoteException re) {
                            
    c.getChannelServer().reconnectWorld();
                        }
                    }
                    
    long blahblah System.currentTimeMillis() - victim.getLastLogin();
                    
    StringBuilder sb = new StringBuilder();
                    
    sb.append(victim.getName());
                    
    sb.append(" has been online for");
                    
    compareTime(sbblahblah);
                    
    mc.dropMessage(sb.toString());
                } else {
                    
    mc.dropMessage("Incorrect Syntax.");
                }
            }
        }

        private 
    void compareTime(StringBuilder sblong timeDiff) {
            
    double secondsAway timeDiff 1000;
            
    double minutesAway 0;
            
    double hoursAway 0;

            while (
    secondsAway 60) {
                
    minutesAway++;
                
    secondsAway -= 60;
            }
            while (
    minutesAway 60) {
                
    hoursAway++;
                
    minutesAway -= 60;
            }
            
    boolean hours false;
            
    boolean minutes false;
            if (
    hoursAway 0) {
                
    sb.append(" ");
                
    sb.append((int) hoursAway);
                
    sb.append(" hours");
                
    hours true;
            }
            if (
    minutesAway 0) {
                if (
    hours) {
                    
    sb.append(" -");
                }
                
    sb.append(" ");
                
    sb.append((int) minutesAway);
                
    sb.append(" minutes");
                
    minutes true;
            }
            if (
    secondsAway 0) {
                if (
    minutes) {
                    
    sb.append(" and");
                }
                
    sb.append(" ");
                
    sb.append((int) secondsAway);
                
    sb.append(" seconds !");
            }
        }

        @
    Override
        
    public CommandDefinition[] getDefinition() {
            return new 
    CommandDefinition[]{
                new 
    CommandDefinition("command"0),
                new 
    CommandDefinition("commands"0),
                new 
    CommandDefinition("help"0),
                new 
    CommandDefinition("checkstats"0),
                new 
    CommandDefinition("save"0),
                new 
    CommandDefinition("expfix"0),
                new 
    CommandDefinition("dispose"0),
                new 
    CommandDefinition("emo"0),
                new 
    CommandDefinition("rebirth"0),
                new 
    CommandDefinition("reborn"0),
                new 
    CommandDefinition("togglesmega"0),
                new 
    CommandDefinition("str"0),
                new 
    CommandDefinition("dex"0),
                new 
    CommandDefinition("int"0),
                new 
    CommandDefinition("luk"0),
                new 
    CommandDefinition("hp"0),
                new 
    CommandDefinition("mp"0),
                new 
    CommandDefinition("gm"0),
                new 
    CommandDefinition("revive"0),
                new 
    CommandDefinition("afk"0),
                new 
    CommandDefinition("onlinetime"0)
            };
        }


  2. קישורים ממומנים

  3. #17
    אוי אלוהי אוי אלוהים סמן לי דרך חיים האוואטר של KirMa
    שם פרטי
    אביהו ツ
    תאריך הצטרפות
    03/2010
    גיל
    34
    הודעות
    5,740
    לייקים
    27
    נקודות
    114
    משפט מחץ
    יהודי תחייך אתה בן של מלך ערבי תזיל דמע אתה בן זו*ה
    מין: זכר

    ברירת מחדל

    נעול בגלל דאבל
    מתן אתה תנוח קצת מחוץ לפורום


    אך מתי כבר תבחיני
    בין הטוב והרע ותביני
    אני לא אלוהים לא אינני
    אני רק בן-אדם אוהב הנני


    מי שצריך עזרה שיצטט או ישלח פרטית

נושא נעול
עמוד 2 מתוך 2 << ראשון 12


הרשאות פרסום

  • אין באפשרותך לפרסם נושאים חדשים
  • אין באפשרותך לפרסם תגובות
  • אין באפשרותך לצרף קבצים
  • אין באפשרותך לערוך את הודעותיך


כל הזמנים הם לפי GMT +3. השעה כרגע היא 12:05.
מופעל על ידי vBulletin™ © גרסה 4.1, 2011 vBulletin Solutions, Inc. כל הזכויות שמורות.
פעילות הגולשים
אומנות וגרפיקה
מוזיקה
ספורט
סדרות טלוויזיה
סרטים וקולנוע
קנייה ומכירה
רשתות חברתיות
הבורר 3
פורומי פנאי ובידור
סרטים
סדרות
משחקים
דיבורים
אקטואליה
בעלי חיים
בדיחות והומור
משחקי ספורט
הבורר
מחשבים וטכנולוגיה
תמיכה טכנית
חומרה ומודינג
תוכנות להורדה
סלולארי וגאדג'טים
רקעים למחשב
ציוד הקפי למחשב
אבטחת מידע
תכנות ובניית אתרים
כסף ברשת
אייפון
בריאות ואורח חיים
כושר ופיתוח גוף
דיאטה
צבא וגיוס
יעוץ מיני
מה שבלב
אומנות הפיתוי
יהדות
מיסטיקה ורוחניות
אתאיזם ודתות

נושאים: 2,473,047 | הודעות: 8,173,634 | משתמשים: 315,603 | המשתמש החדש ביותר: upizijoj | עיצוב גרפי: סטודיו עודד בביוף | קידוד: rellect