Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

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");
            }
}
 
Newbie Spellweaver
Joined
May 29, 2008
Messages
39
Reaction score
0
Re: [Release] !findmob command

nice..^^
bt the !search is better~
 
Skilled Illusionist
Joined
Apr 29, 2008
Messages
310
Reaction score
1
Re: [Release] !findmob command

ahhhhh u can also find mobs with !search
 
Newbie Spellweaver
Joined
Jun 6, 2008
Messages
17
Reaction score
0
Re: [Release] !findmob command

Nice, this'll be useful when working on a server while offline :)
 
Newbie Spellweaver
Joined
Jan 17, 2008
Messages
66
Reaction score
6
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
 
Junior Spellweaver
Joined
May 26, 2008
Messages
195
Reaction score
0
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

Im sure Stephen of mapletip would be happy that someone is trying to save him bandwith :)
Thanks for the release.
 
Elite Diviner
Joined
Apr 24, 2008
Messages
416
Reaction score
2
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
Top