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!

!str !dex etc etc command

Initiate Mage
Joined
May 12, 2008
Messages
87
Reaction score
0
well in my server the gm's i have want this command soo i think to release it if u think it will help you soo use if not soo now here

if u type !str amout it set your str to the amout

add in commandprocessor.java

place it under !jobperson command

PHP:
 else if (splitted[0].equals("!jobperson")) {
                              MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);  
                             victim.changeJob(MapleJob.getById(getOptionalIntArg(splitted, 2, 2)));
	}

here:

PHP:
 else if (splitted[0].equals("!str")) {
                            int max = Integer.parseInt(splitted[1]);
                            player.setStr(max);
                             player.updateSingleStat(MapleStat.STR, player.getStr());
        }else if (splitted[0].equals("!dex")) {
                            int max = Integer.parseInt(splitted[1]);
                            player.setDex(max);
                              player.updateSingleStat(MapleStat.DEX, player.getStr());
        }else if (splitted[0].equals("!luk")) {
                            int max = Integer.parseInt(splitted[1]);
                            player.setLuk(max);
                              player.updateSingleStat(MapleStat.LUK, player.getStr());
        } else if (splitted[0].equals("!int")) {
                            int max = Integer.parseInt(splitted[1]);
                            player.setInt(max);
                              player.updateSingleStat(MapleStat.INT, player.getStr());
        }

soo it will be like this

PHP:
 else if (splitted[0].equals("!jobperson")) {
                              MapleCharacter victim = cserv.getPlayerStorage().getCharacterByName(splitted[1]);  
                             victim.changeJob(MapleJob.getById(getOptionalIntArg(splitted, 2, 2)));
	} else if (splitted[0].equals("!str")) {
                            int max = Integer.parseInt(splitted[1]);
                            player.setStr(max);
                             player.updateSingleStat(MapleStat.STR, player.getStr());
        }else if (splitted[0].equals("!dex")) {
                            int max = Integer.parseInt(splitted[1]);
                            player.setDex(max);
                              player.updateSingleStat(MapleStat.DEX, player.getStr());
        } else if (splitted[0].equals("!luk")) {
                            int max = Integer.parseInt(splitted[1]);
                            player.setLuk(max);
                              player.updateSingleStat(MapleStat.LUK, player.getStr());
        } else if (splitted[0].equals("!int")) {
                            int max = Integer.parseInt(splitted[1]);
                            player.setInt(max);
                              player.updateSingleStat(MapleStat.INT, player.getStr());
        }
compile and you done
 
Last edited:
Initiate Mage
Joined
May 10, 2008
Messages
49
Reaction score
0
Re: [Small-release]!str !dex etc etc command

Nice rel, it'll come in handy :)
but dont you need to compile it o.o?
 
Initiate Mage
Joined
Jul 11, 2008
Messages
83
Reaction score
0
Re: [Small-release]!str !dex etc etc command

Ty Nice Release :p
 
Initiate Mage
Joined
May 12, 2008
Messages
87
Reaction score
0
Re: [Small-release]!str !dex etc etc command

yea u need to compile and thanks this my first release :)
 
Initiate Mage
Joined
Jun 1, 2008
Messages
85
Reaction score
0
Re: [Small-release]!str !dex etc etc command

Under what do you place that code?
 
Initiate Mage
Joined
May 12, 2008
Messages
87
Reaction score
0
Re: [Small-release]!str !dex etc etc command

u can place it under every thing but ok i will tall how
 
Initiate Mage
Joined
Jul 11, 2008
Messages
26
Reaction score
1
Re: [Small-release]!str !dex etc etc command

player.getStr?

also don't get what this does.

can you make it minimum?
 
Initiate Mage
Joined
Jun 19, 2008
Messages
65
Reaction score
9
Re: [Small-release]!str !dex etc etc command

Sets max STR eh?

You should just do !statsup, and place them all under 1 command. o_o
 
Initiate Mage
Joined
Jun 1, 2008
Messages
85
Reaction score
0
Re: [Release]!str !dex etc etc command

!jobperson doesn't exist in my CommandProcessor.
Any other? I've tried adding it under !job but I got:

NetBeans said:
init:
deps-clean:
Deleting directory C:\Documents and Settings\Linus\Skrivbord\HaidoMS\build
Deleting directory C:\Documents and Settings\Linus\Skrivbord\HaidoMS\dist
clean:
init:
deps-jar:
Created dir: C:\Documents and Settings\Linus\Skrivbord\HaidoMS\build\classes
Compiling 308 source files to C:\Documents and Settings\Linus\Skrivbord\HaidoMS\build\classes
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1598: illegal start of type
return false;
^
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1598: ';' expected
return false;
^
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1601: class, interface, or enum expected
private static ResultSet getReports(){
^
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1604: class, interface, or enum expected
PreparedStatement ps = dcon.prepareStatement("SELECT * FROM reports");
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1605: class, interface, or enum expected
return ps.executeQuery();
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1607: class, interface, or enum expected
} catch(Exception ex) {}
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1610: class, interface, or enum expected
}
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1614: class, interface, or enum expected
PreparedStatement ps = dcon.prepareStatement("DELETE FROM reports WHERE id = ?");
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1615: class, interface, or enum expected
ps.setInt(1, id);
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1616: class, interface, or enum expected
ps.executeUpdate();
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1617: class, interface, or enum expected
ps.close();
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1620: class, interface, or enum expected
} catch(Exception ex) {}
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1627: class, interface, or enum expected
PreparedStatement ps = dcon.prepareStatement("SELECT * FROM reports where id = ?");
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1628: class, interface, or enum expected
ps.setInt(1, id);
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1629: class, interface, or enum expected
return ps.executeQuery();
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1631: class, interface, or enum expected
} catch(Exception ex) {}
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1633: class, interface, or enum expected
}
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1637: class, interface, or enum expected
PreparedStatement ps = dcon.prepareStatement("UPDATE reports SET status = ? WHERE id = ?");
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1638: class, interface, or enum expected
ps.setString(1, status);
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1639: class, interface, or enum expected
ps.setInt(2, id);
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1640: class, interface, or enum expected
ps.executeUpdate();
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1641: class, interface, or enum expected
ps.close();
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1644: class, interface, or enum expected
} catch(Exception ex) {}
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1651: class, interface, or enum expected
PreparedStatement ps = dcon.prepareStatement("SELECT * FROM characters where id = ?");
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1652: class, interface, or enum expected
ps.setInt(1, id);
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1653: class, interface, or enum expected
ResultSet rs = ps.executeQuery();
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1654: class, interface, or enum expected
if(rs.next())
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1657: class, interface, or enum expected
} catch(Exception ex) {}
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1660: class, interface, or enum expected
}
29 errors
BUILD FAILED (total time: 4 seconds)
 
Initiate Mage
Joined
May 12, 2008
Messages
87
Reaction score
0
Re: [Release]!str !dex etc etc command

try to delete the space before else and than compile
dont know i dont get this errors
try do clean and build
 
Junior Spellweaver
Joined
Jul 19, 2008
Messages
151
Reaction score
0
Re: [Release]!str !dex etc etc command

isn't there already a setall command where it sets all your stats to it's max?

anyways, it's still a nice release considering this allows you to set individual stats to it's max.
 
LeviathanStory
Joined
Apr 21, 2007
Messages
251
Reaction score
0
Re: [Release]!str !dex etc etc command

You could've just used grogorn[or something's] commands and changed the @ to !s
 
Junior Spellweaver
Joined
Jul 19, 2008
Messages
151
Reaction score
0
Re: [Release]!str !dex etc etc command

You could've just used grogorn[or something's] commands and changed the @ to !s

actually, qwerty's @str and @dex stuff is to add stats. This guy's commands max it.

note this part:
Code:
player.setStr(max);

Also, I think qwerty made the !setall or that was airflow or it could be someone else :O!
 
Experienced Elementalist
Joined
Jul 8, 2008
Messages
246
Reaction score
0
Re: [Release]!str !dex etc etc command

Also, I think qwerty made the !setall or that was airflow or it could be someone else :O!

he did make it on my request, not that i coulndt make it
but its not very stable since you can @str -20 ect and then spoil the balance
I wont want to reveal too much but its fishy
 
Initiate Mage
Joined
Jun 1, 2008
Messages
85
Reaction score
0
Re: [Release]!str !dex etc etc command

try to delete the space before else and than compile
dont know i dont get this errors
try do clean and build
Ok. Lemme try that. Btw, at:

else if (splitted[0].equals("!str")) {
int max = Integer.parseInt(splitted[1]);
player.setStr(max);
player.updateSingleStat(MapleStat.STR, player.getStr());
}else if (splitted[0].equals("!dex")) {
int max = Integer.parseInt(splitted[1]);
player.setDex(max);
player.updateSingleStat(MapleStat.DEX, player.getStr());
}else if (splitted[0].equals("!luk")) {
int max = Integer.parseInt(splitted[1]);
player.setLuk(max);
player.updateSingleStat(MapleStat.LUK, player.getStr());
} else if (splitted[0].equals("!int")) {
int max = Integer.parseInt(splitted[1]);
player.setInt(max);
player.updateSingleStat(MapleStat.INT, player.getStr());
}

Check the else if at the top. Isn't that supposed to be } else if?

Edit:
I deleted the space at } else if so it looks like this:
} else if (splitted[0].equals("!job")) {
c.getPlayer().changeJob(MapleJob.getById(Integer.parseInt(splitted[1])));
}else if (splitted[0].equals("!str")) {
int max = Integer.parseInt(splitted[1]);
player.setStr(max);
player.updateSingleStat(MapleStat.STR, player.getStr());
}else if (splitted[0].equals("!dex")) {
int max = Integer.parseInt(splitted[1]);
player.setDex(max);
player.updateSingleStat(MapleStat.DEX, player.getStr());
}else if (splitted[0].equals("!luk")) {
int max = Integer.parseInt(splitted[1]);
player.setLuk(max);
player.updateSingleStat(MapleStat.LUK, player.getStr());
}else if (splitted[0].equals("!int")) {
int max = Integer.parseInt(splitted[1]);
player.setInt(max);
player.updateSingleStat(MapleStat.INT, player.getStr());
}
Yet, I get these errors when compiling:
init:
deps-clean:
Deleting directory C:\Documents and Settings\Linus\Skrivbord\HaidoMS\build
clean:
init:
deps-jar:
Created dir: C:\Documents and Settings\Linus\Skrivbord\HaidoMS\build\classes
Compiling 308 source files to C:\Documents and Settings\Linus\Skrivbord\HaidoMS\build\classes
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1597: illegal start of type
return false;
^
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1597: ';' expected
return false;
^
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1600: class, interface, or enum expected
private static ResultSet getReports(){
^
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1603: class, interface, or enum expected
PreparedStatement ps = dcon.prepareStatement("SELECT * FROM reports");
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1604: class, interface, or enum expected
return ps.executeQuery();
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1606: class, interface, or enum expected
} catch(Exception ex) {}
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1609: class, interface, or enum expected
}
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1613: class, interface, or enum expected
PreparedStatement ps = dcon.prepareStatement("DELETE FROM reports WHERE id = ?");
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1614: class, interface, or enum expected
ps.setInt(1, id);
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1615: class, interface, or enum expected
ps.executeUpdate();
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1616: class, interface, or enum expected
ps.close();
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1619: class, interface, or enum expected
} catch(Exception ex) {}
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1626: class, interface, or enum expected
PreparedStatement ps = dcon.prepareStatement("SELECT * FROM reports where id = ?");
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1627: class, interface, or enum expected
ps.setInt(1, id);
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1628: class, interface, or enum expected
return ps.executeQuery();
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1630: class, interface, or enum expected
} catch(Exception ex) {}
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1632: class, interface, or enum expected
}
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1636: class, interface, or enum expected
PreparedStatement ps = dcon.prepareStatement("UPDATE reports SET status = ? WHERE id = ?");
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1637: class, interface, or enum expected
ps.setString(1, status);
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1638: class, interface, or enum expected
ps.setInt(2, id);
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1639: class, interface, or enum expected
ps.executeUpdate();
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1640: class, interface, or enum expected
ps.close();
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1643: class, interface, or enum expected
} catch(Exception ex) {}
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1650: class, interface, or enum expected
PreparedStatement ps = dcon.prepareStatement("SELECT * FROM characters where id = ?");
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1651: class, interface, or enum expected
ps.setInt(1, id);
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1652: class, interface, or enum expected
ResultSet rs = ps.executeQuery();
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1653: class, interface, or enum expected
if(rs.next())
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1656: class, interface, or enum expected
} catch(Exception ex) {}
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:1659: class, interface, or enum expected
}
29 errors
BUILD FAILED (total time: 0 seconds)
 
Experienced Elementalist
Joined
Jul 8, 2008
Messages
246
Reaction score
0
Re: [Release]!str !dex etc etc command

Ok. Lemme try that. Btw, at:



Check the else if at the top. Isn't that supposed to be } else if?

no since its opened previously on the command on top

EDIT: You do realise that this can only be used by gm's
Having Players use it is much better
 
Initiate Mage
Joined
Jun 1, 2008
Messages
85
Reaction score
0
Re: [Release]!str !dex etc etc command

If I delete the } I get:

init:
deps-clean:
Deleting directory C:\Documents and Settings\Linus\Skrivbord\HaidoMS\build
clean:
init:
deps-jar:
Created dir: C:\Documents and Settings\Linus\Skrivbord\HaidoMS\build\classes
Compiling 308 source files to C:\Documents and Settings\Linus\Skrivbord\HaidoMS\build\classes
C:\Documents and Settings\Linus\Skrivbord\HaidoMS\HaidoMs\src\net\sf\odinms\client\messages\CommandProcessor.java:503: 'else' without 'if'
else if (splitted[0].equals("!job")) {
1 error
BUILD FAILED (total time: 0 seconds)
 
Experienced Elementalist
Joined
Jul 8, 2008
Messages
246
Reaction score
0
Re: [Release]!str !dex etc etc command

whats under and on top of else if (splitted[0].equals("!job")) {
 
Initiate Mage
Joined
Jun 1, 2008
Messages
85
Reaction score
0
Re: [Release]!str !dex etc etc command

This is what command is above and below.
} else if (splitted[0].equals("!say")) {
if (splitted.length > 1) {
MaplePacket packet = MaplePacketCreator.serverNotice(6, "[" + c.getPlayer().getName() + "] " + StringUtil.joinStringFrom(splitted, 1));
try {
ChannelServer.getInstance(c.getChannel()).getWorldInterface().broadcastMessage(
c.getPlayer().getName(), packet.getBytes());
} catch (RemoteException e) {
c.getChannelServer().reconnectWorld();
}
} else {
mc.dropMessage("Syntax: !say <message>");
}
} else if (splitted[0].equals("!job")) {
c.getPlayer().changeJob(MapleJob.getById(Integer.parseInt(splitted[1])));
}else if (splitted[0].equals("!str")) {
int max = Integer.parseInt(splitted[1]);
player.setStr(max);
player.updateSingleStat(MapleStat.STR, player.getStr());
}else if (splitted[0].equals("!dex")) {
int max = Integer.parseInt(splitted[1]);
player.setDex(max);
player.updateSingleStat(MapleStat.DEX, player.getStr());
}else if (splitted[0].equals("!luk")) {
int max = Integer.parseInt(splitted[1]);
player.setLuk(max);
player.updateSingleStat(MapleStat.LUK, player.getStr());
}else if (splitted[0].equals("!int")) {
int max = Integer.parseInt(splitted[1]);
player.setInt(max);
player.updateSingleStat(MapleStat.INT, player.getStr());
}

} else if (splitted[0].equals("!clock")) {
player.getMap().broadcastMessage(MaplePacketCreator.getClock(getOptionalIntArg(splitted, 1, 60)));
 
Back
Top