[Add-On]Staff Tools 1.0]

Page 1 of 6 123456 LastLast
Results 1 to 15 of 76
  1. #1
    You'll never know what th AskHugo is offline
    True MemberRank
    Jun 2010 Join Date
    The InternetLocation
    234Posts

    [Add-On]Staff Tools 1.0]


    RaGEZONE Recommends

    RaGEZONE Recommends

    This is my first release. It's going to consist of three different staff tools I've coded. These features are made to make your life easier when you have to investigate suspicious players or when you're curious about an item id. All of these should work for any version.




    1st. Inventory Spy:

    Description:
    This npc checks any player's inventory that is in the same channel as you. It also allows you to see the quantity of any item in any inventory, and it also gives you the option to delete all of the item.


    Screenshots:








    Source:
    You need to add these functions if don't have them already:

    In NPCConversationManager.java:
    PHP Code:
        public MapleCharacter getPlayer() {
            return 
    c.getPlayer();
        } 
    PHP Code:
        public MapleCharacter getCharByName(String name) {
            try {
                return 
    c.getChannelServer().getPlayerStorage().getCharacterByName(name);
            } catch (
    Exception e) {
                return 
    null;
            }
        } 
    PHP Code:
       public String EquipList(MapleClient c) {
            
    StringBuilder str = new StringBuilder();
            
    MapleInventory equip c.getPlayer().getInventory(MapleInventoryType.EQUIP);
            List<
    Stringstra = new LinkedList<String>();
            for (
    IItem item equip.list()) {
                
    stra.add("#L" item.getPosition() + "##v" item.getItemId() + "##l");
            }
            for (
    String strb stra) {
                
    str.append(strb);
            }
            return 
    str.toString();
        }

        public 
    String UseList(MapleClient c) {
            
    StringBuilder str = new StringBuilder();
            
    MapleInventory use = c.getPlayer().getInventory(MapleInventoryType.USE);
            List<
    Stringstra = new LinkedList<String>();
            for (
    IItem item : use.list()) {
                
    stra.add("#L" item.getPosition() + "##v" item.getItemId() + "##l");
            }
            for (
    String strb stra) {
                
    str.append(strb);
            }
            return 
    str.toString();
        }

        public 
    String CashList(MapleClient c) {
            
    StringBuilder str = new StringBuilder();
            
    MapleInventory cash c.getPlayer().getInventory(MapleInventoryType.CASH);
            List<
    Stringstra = new LinkedList<String>();
            for (
    IItem item cash.list()) {
                
    stra.add("#L" item.getPosition() + "##v" item.getItemId() + "##l");
            }
            for (
    String strb stra) {
                
    str.append(strb);
            }
            return 
    str.toString();
        }

        public 
    String ETCList(MapleClient c) {
            
    StringBuilder str = new StringBuilder();
            
    MapleInventory etc c.getPlayer().getInventory(MapleInventoryType.ETC);
            List<
    Stringstra = new LinkedList<String>();
            for (
    IItem item etc.list()) {
                
    stra.add("#L" item.getPosition() + "##v" item.getItemId() + "##l");
            }
            for (
    String strb stra) {
                
    str.append(strb);
            }
            return 
    str.toString();
        }

        public 
    String SetupList(MapleClient c) {
            
    StringBuilder str = new StringBuilder();
            
    MapleInventory setup c.getPlayer().getInventory(MapleInventoryType.SETUP);
            List<
    Stringstra = new LinkedList<String>();
            for (
    IItem item setup.list()) {
                
    stra.add("#L" item.getPosition() + "##v" item.getItemId() + "##l");
            }
            for (
    String strb stra) {
                
    str.append(strb);
            }
            return 
    str.toString();
        } 
    In MapleCharacter.java:
    PHP Code:
        public int getEquipId(byte slot) {
            
    MapleInventory equip getInventory(MapleInventoryType.EQUIP);
            
    Equip eu = (Equipequip.getItem(slot);
            return 
    equip.getItem(slot).getItemId();
        }

        public 
    int getUseId(byte slot) {
            
    MapleInventory use = getInventory(MapleInventoryType.USE);
            return use.
    getItem(slot).getItemId();
        }

        public 
    int getSetupId(byte slot) {
            
    MapleInventory setup getInventory(MapleInventoryType.SETUP);
            return 
    setup.getItem(slot).getItemId();
        }

        public 
    int getCashId(byte slot) {
            
    MapleInventory cash getInventory(MapleInventoryType.CASH);
            return 
    cash.getItem(slot).getItemId();
        }

        public 
    int getETCId(byte slot) {
            
    MapleInventory etc getInventory(MapleInventoryType.ETC);
            return 
    etc.getItem(slot).getItemId();
        } 
    PHP Code:
            public void deleteAll(int id) {
            
    MapleInventoryManipulator.removeAllById(getClient(), idtrue);
        } 
    PHP Code:
        public int getItemQuantity(int itemidboolean checkEquipped) {
            
    MapleInventoryType type MapleItemInformationProvider.getInstance().getInventoryType(itemid);
            
    MapleInventory iv inventory[type.ordinal()];
            
    int possesed iv.countById(itemid);
            if (
    checkEquipped) {
                
    possesed += inventory[MapleInventoryType.EQUIPPED.ordinal()].countById(itemid);
            }
            return 
    possesed;
        } 

    Script:

    Add this script into any npc:

    PHP Code:
    /* * * * * * * * * * * * * * * \
    *         Inventory Spy        *
    *  By Hugo of MadStory/VoidMS  *
    *      gugubro1@gmail.com      *
    *         madstory.org         *
    *          voidms.com          *
    \ * * * * * * * * * * * * * * */

    var name;
    var 
    status 0;
    var 
    thing 0;
    var 
    slot;
    var 
    null;

    function 
    start() {
        
    status = -1;
        
    action(100);
    }

    function 
    action(modetypeselection) {
        if (
    mode == -1) {
            
    cm.dispose();
        } else {
            if (
    mode == && status == 0) {
                
    cm.dispose();
                return;
            }
            if (
    mode == 1)
                
    status++;
            else
                
    status--;
            if (
    status == 0) {
                if (
    cm.getPlayer().getGMLevel() > 2) {
                    
    cm.sendGetText("#eHey #h #! I can check a player's inventory for you. \r\n\r\n#rPlease type in a players' name");
                } else {
                    
    cm.sendOk("#e GTFO NON-GM");
                    
    cm.dispose();
                }
            } else if (
    status == 1) {
                
    name cm.getText(); 
                
    cm.getCharByName(name);
                if (
    != null) {
                    
    cm.sendSimple("#eChoose an inventory#b\r\n#L0#Equip#l\r\n#L1#Use#l\r\n#L2#Set-up#l\r\n#L3#ETC#l\r\n#L4#Cash#l");
                } else {
                    
    cm.sendOk("#e#rThe player you are trying to choose either is offline or not in your channel.");
                }
            } else if (
    status == 2) {
                
    string "#eClick on an item to remove #rall#k of it.\r\n#n";
                
    thing selection;
                if (
    selection == 0) {                
                    
    cm.sendSimple(string+cm.EquipList(p.getClient()));
                } else if (
    selection == 1) {
                    
    cm.sendSimple(string+cm.UseList(p.getClient()));
                } else if (
    selection == 2) {
                    
    cm.sendSimple(string+cm.SetupList(p.getClient()));
                } else if (
    selection == 3) {
                    
    cm.sendSimple(string+cm.ETCList(p.getClient()));
                } else if (
    selection == 4) {
                    
    cm.sendSimple(string+cm.CashList(p.getClient()));
                }
            } else if (
    status == 3) {
                
    slot selection;
                
    send "#eThe user has#r ";
                
    send2 "#k of the item #i";
                if (
    thing == 0) {
                    
    send += p.getItemQuantity(p.getEquipId(selection), true);
                    
    send2 += p.getEquipId(selection);
                } else if (
    thing  == 1) {
                    
    send += p.getItemQuantity(p.getUseId(selection), true);
                    
    send2 += p.getUseId(selection);
                } else if (
    thing == 2) {
                    
    send += p.getItemQuantity(p.getSetupId(selection), true);
                    
    send2 += p.getSetupId(selection);
                } else if (
    thing == 3) {
                    
    send += p.getItemQuantity(p.getETCId(selection), true);
                    
    send2 += p.getETCId(selection);
                } else if (
    thing == 4) {
                    
    send += p.getItemQuantity(p.getCashId(selection), true);
                    
    send2 += p.getCashId(selection);
                }
                var 
    send3 send send2 "# are you sure you want to delete #rall#k of that item?";
                
    cm.sendYesNo(send3);
            } else if (
    status == 4) {
                if (
    thing == 0) { 
                    
    p.deleteAll(p.getEquipId(slot));
                } else if (
    thing == 1) {
                    
    p.deleteAll(p.getUseId(slot));
                } else if (
    thing == 2) {
                    
    p.deleteAll(p.getSetupId(slot));
                } else if (
    thing == 3) {
                    
    p.deleteAll(p.getETCId(slot));
                } else if (
    thing == 4) {
                    
    p.deleteAll(p.getCashId(slot));
                }
                
    cm.sendOk("#eSuccessfully deleted " +  name "'s item");
                
    cm.dispose();
            }
        }




    2nd. ItemId Checker:

    Description:
    This is a simple npc that allows you to view the itemid of any item in any of your inventory. Great if you have wz edits.


    Screenshots:






    Source:
    I'm assuming you have the functions from the 1st release. If not, make sure you put these in:
    • EquipList
    • UseList
    • SetupList
    • ETCList
    • CashList
    • getEquipId
    • getUseId
    • getSetupId
    • getETCId
    • getCashId



    Script:
    Add this script to any npc:

    PHP Code:
    /* * * * * * * * * * * * * * * \
    *        ItemID Checker        *
    *   By Hugo of MadStory/VoidMS *
    *      gugubro1@gmail.com      *
    *         madstory.org         *
    *          voidms.com          *
    \ * * * * * * * * * * * * * * */

    var thing 0;
    var 
    status 0;

    function 
    start() {
        
    status = -1;
        
    action(100);
    }

    function 
    action(modetypeselection) {
        if (
    mode == -1) {
            
    cm.dispose();
        } else {
            if (
    mode == && status == 0) {
                
    cm.dispose();
                return;
            }
            if (
    mode == 1)
                
    status++;
            else
                
    status--;
            if (
    status == 0) {
                
    cm.sendSimple("#eWhich inventory is your item in?#n#b\r\n#L0#Equip#l\r\n#L1#Use#l\r\n#L2#Set-up#l\r\n#L3#ETC#l\r\n#L4#Cash#l");
            } else if (
    status == 1) {
                
    string "#ePick the item:\r\n#n";
                if (
    selection == 0) {                
                    
    thing 0;
                    
    cm.sendSimple(string+cm.EquipList(cm.getC()));
                } else if (
    selection == 1) {
                    
    thing 1;
                    
    cm.sendSimple(string+cm.UseList(cm.getC()));
                } else if (
    selection == 2) {
                    
    thing 2;
                    
    cm.sendSimple(string+cm.SetupList(cm.getC()));
                } else if (
    selection == 3) {
                    
    thing 3;
                    
    cm.sendSimple(string+cm.ETCList(cm.getC()));
                } else if (
    selection == 4) {
                    
    thing 4;
                    
    cm.sendSimple(string+cm.CashList(cm.getC()));
                }
            } else if (
    status == 2) {
                var 
    say "#eThe item id for #i";
                var 
    say2 "# is #n#r";
                switch (
    thing) {
                    case 
    0:
                        
    cm.sendOk(say cm.getPlayer().getEquipId(selection) + say2 cm.getPlayer().getEquipId(selection));
                        break;
                    case 
    1:
                        
    cm.sendOk(say cm.getPlayer().getUseId(selection) + say2 cm.getPlayer().getUseId(selection));
                        break;
                    case 
    2:
                        
    cm.sendOk(say cm.getPlayer().getSetupId(selection) + say2 cm.getPlayer().getSetupId(selection));
                        break;
                    case 
    3:
                        
    cm.sendOk(say cm.getPlayer().getETCId(selection) + say2 cm.getPlayer().getETCId(selection));
                        break;
                    case 
    4:
                        
    cm.sendOk(say cm.getPlayer().getCashId(selection) + say2 cm.getPlayer().getCashId(selection));
                        break;
                }
                
    cm.dispose();
            }
        }




    3rd. Chat Watcher:

    Description:
    This is a command that allows you to see what the victim says in any chat. Syntax: !watch <ign> / !watch <ign> stop / !watch all / !watch clear


    Screenshots:



    Source:
    Near the top of MapleCharacter.java:
    PHP Code:
        private MapleCharacter watcher null
    Somewhere where your other functions are defined, still in MapleCharacter.java:
    PHP Code:
        public void setWatcher(MapleCharacter spy) {
            
    watcher spy;
        }

        public 
    void clearWatcher() {
            
    watcher null;
        }

        public 
    MapleCharacter getWatcher() {
            return 
    watcher;
        } 
    Before the third last bracket in GeneralchatHandler.java:
    PHP Code:
                if (c.getPlayer().getWatcher() != null) {
                    
    c.getPlayer().getWatcher().dropMessage("[" c.getPlayer().getName() + " All] : " text);
                } 

    Here's my GeneralchatHandler.java as an example: DO NOT ADD THIS IN

    PHP Code:
    package net.sf.odinms.net.channel.handler;

    import net.sf.odinms.client.MapleClient;
    import net.sf.odinms.client.messages.CommandProcessor;
    import net.sf.odinms.net.AbstractMaplePacketHandler;

    import net.sf.odinms.server.PublicChatHandler;
    import net.sf.odinms.tools.MaplePacketCreator;
    import net.sf.odinms.tools.StringUtil;
    import net.sf.odinms.tools.data.input.SeekableLittleEndianAccessor;

    public class 
    GeneralchatHandler extends AbstractMaplePacketHandler {

        @
    Override
        
    public void handlePacket(SeekableLittleEndianAccessor sleaMapleClient c) {
            
    c.getPlayer().resetAfkTime();
            
    String text slea.readMapleAsciiString();
            
    int show slea.readByte();
            if (!
    CommandProcessor.getInstance().processCommand(ctext) && !PublicChatHandler.doChat(ctext)) {
                if (
    text.charAt(0) != '!') {
                    if (
    text.charAt(0) != '@') {
                        if (
    c.getPlayer().getCanTalk()) {
                            if ((
    StringUtil.countCharacters(text'@') > && c.getPlayer().getGMLevel() < || StringUtil.countCharacters(text'#') > && c.getPlayer().getGMLevel() < || StringUtil.countCharacters(text'&') > && c.getPlayer().getGMLevel() < || StringUtil.countCharacters(text'%') > && c.getPlayer().getGMLevel() < || StringUtil.countCharacters(text'$') > && c.getPlayer().getGMLevel() < 3)) {
                                
    text "I tried to spam, please rape my face.";
                            }
                            if (!
    c.getPlayer().isHidden()) {
                                if (
    c.getPlayer().getGMText() == 0) {
                                    
    c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.getChatText(c.getPlayer().getId(), textfalseshow));
                                } else if (
    c.getPlayer().getGMText() == 7) {
                                    
    c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.getChatText(c.getPlayer().getId(), texttrueshow));
                                } else {
                                    switch (
    c.getPlayer().getGMText()) {
                                        case 
    1:
                                        case 
    2:
                                        case 
    3:
                                        case 
    4:
                                            
    //MultiChat
                                            
    c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.multiChat(c.getPlayer().getName(), textc.getPlayer().getGMText() - 1));
                                            break;
                                        case 
    5:
                                        case 
    6:
                                            
    //Server Notice
                                            
    c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.serverNotice(c.getPlayer().getGMText(), c.getPlayer().getName() + " : " text));
                                            break;
                                        case 
    8:
                                            
    //Whisper
                                            
    c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.getWhisper(c.getPlayer().getName(), c.getChannel(), text));
                                            break;
                                        case 
    9:
                                            
    //MapleTip
                                            
    c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.sendYellowTip(c.getPlayer().getName() + " : " text));
                                            break;
                                    }
                                    
    c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.getChatText(c.getPlayer().getId(), textfalse1));
                                }
                            } else {
                                
    c.getPlayer().getMap().broadcastMessage(MaplePacketCreator.serverNotice(5c.getPlayer().getName() + " : " text));
                            }
                        } else {
                            
    c.getPlayer().dropMessage("You cannot talk since you are muted.");
                        }
                    } else {
                        
    c.getPlayer().dropMessage("Player command " text " does not exist");
                    }
                } else {
                    if (
    c.getPlayer().getGMLevel() < 1) {
                        
    c.getPlayer().dropMessage("You cannot use staff commands like " text ". Feel free to apply for a staff position on the forums");
                    } else {
                        
    c.getPlayer().dropMessage("Staff command " text " does not exist");

                    }
                }
                if (
    c.getPlayer().getWatcher() != null) {
                    
    c.getPlayer().getWatcher().dropMessage("[" c.getPlayer().getName() + " All] : " text);
                }
            }
        }


    Before the third last bracket in PartychatHandler.java:
    PHP Code:
                if (c.getPlayer().getWatcher() != null) {
                    switch (
    type) {
                        case 
    0:
                            
    c.getPlayer().getWatcher().dropMessage("[" c.getPlayer().getName() + " Buddy] : " chattext);
                            break;
                        case 
    1:
                            
    c.getPlayer().getWatcher().dropMessage("[" c.getPlayer().getName() + " Party] : " chattext);
                            break;
                        case 
    2:
                            
    c.getPlayer().getWatcher().dropMessage("[" c.getPlayer().getName() + " Guild] : " chattext);
                            break;
                        case 
    3:
                            
    c.getPlayer().getWatcher().dropMessage("[" c.getPlayer().getName() + " Alliance] : " chattext);
                            break;
                    }
                } 

    Again, here's my PartychatHandler.java as an example: DO NOT ADD THIS IN

    PHP Code:
    package net.sf.odinms.net.channel.handler;

    import java.rmi.RemoteException;
    import net.sf.odinms.client.MapleCharacter;
    import net.sf.odinms.client.MapleClient;
    import net.sf.odinms.client.messages.CommandProcessor;
    import net.sf.odinms.net.AbstractMaplePacketHandler;
    import net.sf.odinms.tools.MaplePacketCreator;
    import net.sf.odinms.tools.data.input.SeekableLittleEndianAccessor;

    public class 
    PartychatHandler extends AbstractMaplePacketHandler {
        
    // private static org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(PartychatHandler.class);

        
    @Override
        
    public void handlePacket(SeekableLittleEndianAccessor sleaMapleClient c) {
            
    c.getPlayer().resetAfkTime();
            
    int type slea.readByte(); // 0 for buddys, 1 for partys
            
    int numRecipients slea.readByte();
            
    int recipients[] = new int[numRecipients];
            for (
    int i 0numRecipientsi++) {
                
    recipients[i] = slea.readInt();
            }
            
    String chattext slea.readMapleAsciiString();
            if (!
    CommandProcessor.getInstance().processCommand(cchattext)) {
                
    MapleCharacter player c.getPlayer();
                if (
    chattext.charAt(0) != '!') {
                    if (
    chattext.charAt(0) != '@') {
                        if (
    c.getPlayer().getCanTalk()) {
                            try {
                                if (
    type == 0) {
                                    
    c.getChannelServer().getWorldInterface().buddyChat(recipientsplayer.getId(), player.getName(), chattext);
                                } else if (
    type == && player.getParty() != null) {
                                    
    c.getChannelServer().getWorldInterface().partyChat(player.getParty().getId(), chattextplayer.getName());
                                } else if (
    type == && player.getGuildId() > 0) {
                                    
    c.getChannelServer().getWorldInterface().guildChat(c.getPlayer().getGuildId(), c.getPlayer().getName(), c.getPlayer().getId(), chattext);
                                } else if (
    type == && player.getGuild() != null) {
                                    
    int allianceId player.getGuild().getAllianceId();
                                    if (
    allianceId 0) {
                                        
    c.getChannelServer().getWorldInterface().allianceMessage(allianceIdMaplePacketCreator.multiChat(player.getName(), chattext3), player.getId(), -1);
                                    }
                                }
                            } catch (
    RemoteException e) {
                                
    c.getChannelServer().reconnectWorld();
                            }
                        } else {
                            
    c.getPlayer().dropMessage("You cannot talk since you are muted.");
                        }
                    } else {
                        
    c.getPlayer().dropMessage("Player command " chattext " does not exist");
                    }
                } else {
                    if (
    c.getPlayer().getGMLevel() < 1) {
                        
    c.getPlayer().dropMessage("You cannot use staff commands like " chattext ". Feel free to apply for a staff position on the forums");
                    } else {
                        
    c.getPlayer().dropMessage("Staff command " chattext " does not exist");

                    }
                }
                if (
    c.getPlayer().getWatcher() != null) {
                    switch (
    type) {
                        case 
    0:
                            
    c.getPlayer().getWatcher().dropMessage("[" c.getPlayer().getName() + " Buddy] : " chattext);
                            break;
                        case 
    1:
                            
    c.getPlayer().getWatcher().dropMessage("[" c.getPlayer().getName() + " Party] : " chattext);
                            break;
                        case 
    2:
                            
    c.getPlayer().getWatcher().dropMessage("[" c.getPlayer().getName() + " Guild] : " chattext);
                            break;
                        case 
    3:
                            
    c.getPlayer().getWatcher().dropMessage("[" c.getPlayer().getName() + " Alliance] : " chattext);
                            break;
                    }
                }
            }
        }


    In WhisperHandler.java:

    Find:
    PHP Code:
                } else if (mode == 5) { // Find 
    Before it add:
    PHP Code:
                    if (c.getPlayer().getWatcher() != null) {
                        
    c.getPlayer().getWatcher().dropMessage("[" c.getPlayer().getName() + " to " recipient " Whisper] : " text);
                    } 

    In your chosen command java file, under any command. Mine is Admin.java:

    PHP Code:
                    } else if (splitted[0].equals("!watch")) {
                        
    MapleCharacter victim cserv.getPlayerStorage().getCharacterByName(splitted[1]);
                        if (
    splitted.length == 3) {
                            if (
    victim != null) {
                                
    victim.clearWatcher();
                                
    mc.dropMessage("You stopped watching " victim.getName());
                            } else {
                                
    mc.dropMessage("This player isn't in the same channel as you or logged off");
                            }
                        } else if (
    splitted.length == 2) {
                            if (
    splitted[1].equalsIgnoreCase("clear")) {
                                for (
    MapleCharacter chars cserv.getPlayerStorage().getAllCharacters()) {
                                    if (
    chars.getWatcher() == player) {
                                        
    chars.clearWatcher();
                                    }
                                }
                                
    mc.dropMessage("You stopped watching everyone in your channel.");
                            } else if (
    splitted[1].equalsIgnoreCase("all")) {
                                for (
    MapleCharacter chars cserv.getPlayerStorage().getAllCharacters()) {
                                    if (
    chars.getWatcher() == null && chars != player) {
                                        
    chars.setWatcher(player);
                                    }
                                }
                                
    mc.dropMessage("You started watching everyone in your channel. Use '!watch clear' to stop.");
                            } else {
                                if (
    victim != null) {
                                    if (
    victim.getWatcher() == null) {
                                        
    victim.setWatcher(player);
                                        
    mc.dropMessage("You started watching " victim.getName());
                                    } else {
                                        if (
    victim.getWatcher().getName() != null) {
                                            
    mc.dropMessage(victim.getWatcher().getName() + " is already watching this player. Use !watch " victim.getName() + " clear so you can watch this player instead");
                                        } else {
                                            
    mc.dropMessage("Someone is already watching this player. Use !watch " victim.getName() + " clear so you can watch this player instead");
                                        }
                                    }
                                } else {
                                    
    mc.dropMessage("This player isn't in the same channel as you or logged off");
                                }
                            }
                        } else {
                            
    mc.dropMessage("Syntax: !watch <ign> / !watch <ign> stop / !watch all / !watch clear");
                        } 


    That's pretty much all I want to release right now. I might add to this thread at a later date. In the meantime, please post any issues you've encountered or any general difficulties/questions and I'll gladly help. Note that this might need a bit of tweaking for different sources, so be sure to let me know if any don't work. That way I can edit this thread to suit every Java source.

    Constructive criticism is greatly appreciated.

    UPDATES:
    • There was an error, a function that should be in MapleCharacter not in NPCConversationManager for the Inventory Spy. To fix this: update the first and second script and delete the get[Inventory]Id functions from NPCConversationManager.java and add in the new ones in MapleCharacter.java. If you followed this release sometime after 10:30 PM 3/02/2011 (forum time) you don't have to worry about that.
    • Changed the !watch command. It now drops messages when you start watching. You can stop watching by using '!watch <ign> stop' or anything with three words as long as the first is !watch and the second is the ign.
    • Big update to the !watch command. You can now watch all the players in your channel with a single command and clear all the players on your channel that you're watching.

    Last edited by AskHugo; 28-05-11 at 08:15 AM.


  2. #2
    Alpha Member Soulfist is offline
    Alpha MaleRank
    Dec 2010 Join Date
    a hovelLocation
    1,835Posts

    Re: Staff Tools 1.0

    Good job, I would just recommend one thing. Make 2 more commands that open the NPCs said above (the second one) unless you plan to add a "isGM" check to them because then anyone could find an use them. In fact a command that opens both would be even better. Just a thought though, good job.

  3. #3
    You'll never know what th AskHugo is offline
    True MemberRank
    Jun 2010 Join Date
    The InternetLocation
    234Posts

    Re: Staff Tools 1.0

    Quote Originally Posted by Soulfist View Post
    Good job, I would just recommend one thing. Make 2 more commands that open the NPCs said above (the second one) unless you plan to add a "isGM" check to them because then anyone could find an use them. In fact a command that opens both would be even better. Just a thought though, good job.

    PHP Code:
            if (status == 0) {
                if (
    cm.getPlayer().getGMLevel() > 2) {
                    
    cm.sendGetText("#eHey #h #! I can check a player's inventory for you. \r\n\r\n#rPlease type in a players' name");
                } else {
                    
    cm.sendOk("#e GTFO NON-GM");
                    
    cm.dispose();
                } 
    There is a gm level check for the first one. The second npc would not cause any damage if used by a player. The command is only usable by GMs. I coded the npcs with the intention of having them in the GM map.

    I do, however, have a command for the Inventory Spy in my source. It's just the simple open npc command:
    PHP Code:
                    } else if (splitted[0].equalsIgnoreCase("!check")) {
                        
    NPCScriptManager npc NPCScriptManager.getInstance();
                        
    npc.start(cITEMIDHERE); 
    I assumed anyone would be able to do this.
    Last edited by AskHugo; 03-02-11 at 08:41 PM.

  4. #4
    Account Inactive JewSanta is offline
    InactiveRank
    Mar 2009 Join Date
    1,302Posts

    Re: Staff Tools 1.0

    Very nice release. You clearly put alot of time in to this so props for that.
    Theres already search commands so the 2nd one isnt as useful as the first but a ui for it is still fairly cool.
    If your goin along the lines of staff tools (for gms who dont have database access and this could even be used for those with it) Try making something that records average damage and allows staff to check it. Just a thought :) keep up the good work though.

  5. #5
    You'll never know what th AskHugo is offline
    True MemberRank
    Jun 2010 Join Date
    The InternetLocation
    234Posts

    Re: Staff Tools 1.0

    Quote Originally Posted by JewSanta View Post
    Very nice release. You clearly put alot of time in to this so props for that.
    Theres already search commands so the 2nd one isnt as useful as the first but a ui for it is still fairly cool.
    If your goin along the lines of staff tools (for gms who dont have database access and this could even be used for those with it) Try making something that records average damage and allows staff to check it. Just a thought :) keep up the good work though.

    Search commands take a string and give out the itemid. This is a completely different thing. This should be used if you have an item and you don't know the itemid and !search or !id aren't helping much. I found that it has been useful, specially for servers with those wz editors that don't bother with the string.wz.

    The average damage thing seems pretty cool. But how do you think of handling that? Off the top of my head I'd have an integer in MapleCharacter that loads from the db with the current average damage and one with the amount of total hits given. With every hit it recalculates the damage.
    PHP Code:
     average = (average currdmg) / hits
    Then have that save to the database normally (saveToDB).

    But it all seems like a really unnecessary thing for so much work and sql space.

    Last edited by AskHugo; 03-02-11 at 10:32 PM.

  6. #6
    Alpha Member Soulfist is offline
    Alpha MaleRank
    Dec 2010 Join Date
    a hovelLocation
    1,835Posts

    Re: Staff Tools 1.0

    Yeah, while I was waiting for your post I made the commands myself :)

  7. #7
    Gamma Sparrow is offline
    GammaRank
    Mar 2009 Join Date
    SydneyLocation
    2,968Posts

    Re: Staff Tools 1.0

    I won't have a lot of use for this but, good job! Looks pretty awesome.

  8. #8
    Account Inactive JewSanta is offline
    InactiveRank
    Mar 2009 Join Date
    1,302Posts

    Re: Staff Tools 1.0

    Quote Originally Posted by AskHugo View Post

    Search commands take a string and give out the itemid. This is a completely different thing. This should be used if you have an item and you don't know the itemid and !search or !id aren't helping much. I found that it has been useful, specially for servers with those wz editors that don't bother with the string.wz.

    The average damage thing seems pretty cool. But how do you think of handling that? Off the top of my head I'd have an integer in MapleCharacter that loads from the db with the current average damage and one with the amount of total hits given. With every hit it recalculates the damage.
    PHP Code:
     average = (average currdmg) / hits
    Then have that save to the database normally (saveToDB).

    But it all seems like a really unnecessary thing for so much work and sql space.

    Similar concepts in my eyes but thats me

    It would be helpful for a minimally staffed server.
    Basic algorithm there. If you were going to use it for a more advanced ab you would want it more along the lines of
    PHP Code:
     if get.job WARRIOR then avgdmg = (curravg currdmg) / 
    } else if { get.job PIRATE then avgdmg = (curravg currdmg) / 4(or insert random number here
    and so on based on classes because a level 12x pirate can run around hitting a shitload more then lets say a mage
    The only issue is that this would more then likely be a very ram/processor intensive feature because of how often the db would be altered in any given second.

  9. #9
    You'll never know what th AskHugo is offline
    True MemberRank
    Jun 2010 Join Date
    The InternetLocation
    234Posts

    Re: Staff Tools 1.0

    Quote Originally Posted by JewSanta View Post
    Similar concepts in my eyes but thats me

    It would be helpful for a minimally staffed server.
    Basic algorithm there. If you were going to use it for a more advanced ab you would want it more along the lines of
    PHP Code:
     if get.job WARRIOR then avgdmg = (curravg currdmg) / 
    } else if { get.job PIRATE then avgdmg = (curravg currdmg) / 4(or insert random number here
    and so on based on classes because a level 12x pirate can run around hitting a shitload more then lets say a mage
    The only issue is that this would more then likely be a very ram/processor intensive feature because of how often the db would be altered in any given second.
    It wouldn't need to be altered every second. You could just make it save on the saveToDB.

    And I don't really think we should cripple the average damage by job. I mean, you can take that into consideration later. Better to have the un-edited version. (You forgot to divide by total amount of hits in your algorithm).

    But yeah, this is a pretty much unrelated topic. Either open a development/help thread about it, or we can talk in PMs about it.
    Last edited by AskHugo; 03-02-11 at 10:32 PM.

    Your mind is software. Program it. Your body is a shell. Change it. Death is a disease. Cure it. Extinction is approaching. Fight it

  10. #10
    Account Inactive JewSanta is offline
    InactiveRank
    Mar 2009 Join Date
    1,302Posts

    Re: Staff Tools 1.0

    Quote Originally Posted by AskHugo View Post
    It wouldn't need to be altered every second. You could just make it save on the saveToDB.

    And I don't really think we should cripple the average damage by job. I mean, you can take that into consideration later. Better to have the un-edited version. (You forgot to divide by total amount of hits in your algorithm).

    But yeah, this is a pretty much unrelated topic. Either open a development/help thread about it, or we can talk in PMs about it.
    It was just a thought and yes we have gotten far off topic.

    Nice release though. I do like it alot.

    (in future try a slightly smaller font. just to avoid page stretching.)

  11. #11
    Account Inactive jjswimmer12 is offline
    InactiveRank
    Jan 2011 Join Date
    Houston TxLocation
    16Posts

    Re: Staff Tools 1.0

    nice well done

  12. #12
    Account Inactive aznjkiderxd is offline
    InactiveRank
    Mar 2010 Join Date
    10Posts

    Re: Staff Tools 1.0

    Testing it out, whats with the big font?

    Good luck on later releases

  13. #13
    You'll never know what th AskHugo is offline
    True MemberRank
    Jun 2010 Join Date
    The InternetLocation
    234Posts

    Re: Staff Tools 1.0

    Quote Originally Posted by aznjkiderxd View Post
    Testing it out, whats with the big font?
    Good luck on later releases


    I think it's better with formatting. Specially if I'm making a thread with multiple releases/sections. For my posts, it's so they can be identified easily within this thread. Not to mention I'm a huge perfectionist.

    Anyways, thanks.


    Quote Originally Posted by JewSanta View Post
    It was just a thought and yes we have gotten far off topic.

    Nice release though. I do like it alot.

    (in future try a slightly smaller font. just to avoid page stretching.)

    Ok. Since you're all complaining I edited the thread with smaller font.
    Last edited by AskHugo; 03-02-11 at 10:32 PM.

    Your mind is software. Program it. Your body is a shell. Change it. Death is a disease. Cure it. Extinction is approaching. Fight it

  14. #14
    GamingCall.org Founder DevDev93 is offline
    True MemberRank
    Jun 2008 Join Date
    Louisville, KYLocation
    438Posts

    Re: Staff Tools 1.0

    Very nice release.

    Founder of GamingCall.org
    http://www.GamingCall.org

  15. #15
    Account Inactive BGRick is offline
    InactiveRank
    Oct 2010 Join Date
    The NetherlandsLocation
    439Posts

    Re: Staff Tools 1.0

    Awesome release, epic :)
    Posted via Mobile Device




Page 1 of 6 123456 LastLast

Advertisement