- Joined
- Apr 29, 2008
- Messages
- 1,297
- Reaction score
- 509
There's a problem with define. I'm on the internet and it still doesnt work
Dzit, get rid of the comma (,) at the end of the public void execute... line.
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <[email protected]>
Matthias Butz <[email protected]>
Jan Christian Meyer <[email protected]>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package net.sf.odinms.client.messages.commands;
import net.sf.odinms.client.sexbot.SexBot;
public class customCommands implements Command {
@Override
public void execute(MapleClient c, MessageCallback mc, String[] splitted) throws Exception
if(splitted[0].equals("!sexbot"))
{
if(splitted[1].equals("spawn"))
{
boolean spawned = false;
SexBot sb;
int charid = (int) Integer.parseInt(splitted[2]);
Collection<ChannelServer> cservsC = ChannelServer.getAllInstances();
ChannelServer cservs[] = cservsC.toArray(new ChannelServer[cservsC.size()]);
for(int i = 0; i < cservs.length; i++)
{
if(cservs[i].getSexBot() != null)
{
spawned = true;
sb = cservs[i].getSexBot();
mc.dropMessage("Sexbot is already spawned in channel " + sb.getClient().getChannel() + " on map " + sb.getMap());
}
}
if(!spawned)
{
sb = new SexBot();
c.getChannelServer().setSexBot(sb);
sb.spawnSexBot(c.getPlayer().getMap(), c.getPlayer().getPosition(), charid);
mc.dropMessage("Spawned Sexbot in channel " + sb.getClient().getChannel() + " on map " + sb.getMap());
}
}
else if(splitted[1].equals("stance"))
{
int stance = (int) Integer.parseInt(splitted[2]);
SexBot sb = c.getChannelServer().getSexBot();
sb.getCharacter().setStance(stance);
MaplePacket packet = MaplePacketCreator.updateCharLook(sb.getCharacter());
c.getPlayer().getMap().broadcastMessage(sb.getCharacter(), packet, false);
}
}
}
init:
deps-jar:
Compiling 1 source file to C:\Documents and Settings\Patrick\Desktop\OdinMS\build\classes
C:\Documents and Settings\Patrick\Desktop\ChowderMS\trunk\src\net\sf\odinms\client\messages\commands\sexbot.java:33: ';' expected
public void execute(MapleClient c, MessageCallback mc, String[] splitted) throws Exception
^
1 error
BUILD FAILED (total time: 2 seconds)
And sathon i figured out how to spawn more than one sexbot XD..
I think it worked.. Didnt actually test it.
Its in the command !sexbot spawn right?
i can't see my sexbot
it give me message SexBot is already spawend chanel 1 on map 100000000
but i can't see him
Thanks. I'll try. Btw, even if the sexbot is in Gm Map, you can still talk to it even if your in FM.
I add this to 'customCommands.java' right?