findmob command

Status
Not open for further replies.
Newbie Spellweaver
Joined
Jan 17, 2008
Messages
66
Reaction score
6
Thought id release 1 thing of the ton ive been working on

lets you find monsters by name
doesnt steal bandwith from mapletip
here it is
IMPORTS:
PHP:
import java.util.List;
import java.util.LinkedList;
import java.util.ArrayList;
import java.io.File;

import net.sf.odinms.client.MapleClient;
import net.sf.odinms.client.messages.Command;
import net.sf.odinms.client.messages.CommandDefinition;
import net.sf.odinms.client.messages.IllegalCommandSyntaxException;
import net.sf.odinms.client.messages.MessageCallback;
import net.sf.odinms.net.channel.ChannelServer;
import net.sf.odinms.server.MapleItemInformationProvider;
import net.sf.odinms.tools.Pair;
import net.sf.odinms.tools.StringUtil;

import net.sf.odinms.provider.MapleData;
import net.sf.odinms.provider.MapleDataProvider;
import net.sf.odinms.provider.MapleDataTool;
import net.sf.odinms.provider.MapleDataProviderFactory;
CODE
PHP:
if (splitted[0].equals("!findmob")){
            String search = StringUtil.joinStringFrom(splitted, 1);
            List<String> retMobs = new ArrayList<String>();
            MapleData data = null;
            MapleDataProvider dataProvider = MapleDataProviderFactory.getDataProvider(new File(System.getProperty("net.sf.odinms.wzpath") + "/String.wz"));
            data = dataProvider.getData("Mob.img");
            List<Pair<Integer, String>> mobPairList = new LinkedList<Pair<Integer, String>>();
           mobPairList.add(new Pair<Integer, String>(0, "CREATED BY SNOW/SUPERRAZ777");
    for(MapleData mobIdData : data.getChildren()) {
        int mobIdFromData = Integer.parseInt(mobIdData.getName());
        String mobNameFromData = MapleDataTool.getString(mobIdData.getChildByPath("name"), "NO-NAME");
        mobPairList.add(new Pair<Integer, String>(mobIdFromData, mobNameFromData));
    }
    for(Pair<Integer, String> mobPair : mobPairList) {
    if(mobPair.getRight().toLowerCase().contains(search.toLowerCase())) {
        retMobs.add(mobPair.getLeft() + " - " + mobPair.getRight());
    }
    }
    if(retMobs != null && retMobs.size() > 1) {
            for(String singleRetMob : retMobs) {
                mc.dropMessage(singleRetMob);
            }
            } else {
            mc.dropMessage("No mobs fit your search criteria");
            }
}
 
Re: [Release] !findmob command

Oh well have fun using a gay command that steals BW from mapletip
this is run loclally and uses no internet
 
Re: [Release] !findmob command

for you information if ur internet is not on9 u can't use that as it uses mapletip to search if u dun noe go to ur commandprocessor.java and CTR+F mapletip u should see they website they are browsing on
 
Status
Not open for further replies.
Back