[Release] Admins only commands

Experienced Elementalist
Joined
Apr 8, 2008
Messages
294
Reaction score
0
this release will give u the ability that there will be ADMINS commands only that regular gms cant use...




so this is how it goes:




go to MapleCharacter.java

look for:
private ScheduledFuture<?> beholderBuffSchedule;

press ENTER after the ; and add this:
private int Admin;

look for:
ret.meso.set(rs.getInt("meso") );

press ENTER after the ; and add this:
ret.Admin = rs.getInt("gm");

look for :
ret.level = 1;

press ENTER after the ; and add this:

ret.Admin = 0;


look for:
public boolean isGM() {

return gmLevel > 0;
}​
yes u have to look for both and add after the } this:
public int Admin() {

save and press quit

go to CommandProcessor.java and look for :
and
if (player.Gm() >= 1) {
synchronized (gmlog) {
gmlog.add(new Pair<MapleCharacter, String>(player, line));​

after ; add this:
if(c.getPlayer().Admin() >= 2) {
and this:
if (AdminCommand.executeAdminComm and(c,mc,line,log,gmlog,persis ter)) {
return true;
}
}​


save and quit
go to src\net\sf\odinms\client\messages
and open a new file called AdminCommand.java
inside you first add this:
/*
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 < >.
*/
package net.sf.odinms.client.messages;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.lang.management.ManagementFactory;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import javax.script.Compilable;
import javax.script.CompiledScript;
import javax.script.Invocable;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineFactory;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
import net.sf.odinms.client.MapleCharacter;
import net.sf.odinms.client.MapleClient;
import net.sf.odinms.client.SkillFactory;
import net.sf.odinms.client.messages.commands.HelpCommand;
import net.sf.odinms.database.DatabaseConnection;
import net.sf.odinms.net.channel.ChannelServer;
import net.sf.odinms.net.channel.handler.GeneralchatHandler;
import net.sf.odinms.server.TimerManager;
import net.sf.odinms.server.maps.MapleMap;
import net.sf.odinms.tools.ClassFinder;
import net.sf.odinms.tools.MockIOSession;
import net.sf.odinms.tools.Pair;
import net.sf.odinms.tools.StringUtil;
import net.sf.odinms.client.MapleStat;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

and then after that u add the commands that u want to be ADMINS only



FAQ:
Q: how do i make myself an admin?
A:go to MYSQL and in the characters field look for gm
instead of 1 make it 2 and you will become an admin

Q:do i have to compile to make it work?
A:ofcourse

Q: i cant use the regular gm commands!!!!@!#@$@#^#$%^ what do i do?
A:I would suggest u copying ALL of the commands from commandProcessor.java to your AdminCommand.java and then add me if u like.. or delete some of the regular gms commands


HAVE FUN!
 
You could of done this in a way easier method...
But it would of taken more time though
 
♠Markii♠;4442427 said:
Stop spamming thread just to make your post count go up

he did do a nice job


Look who's talking, no offense >_>

And also, nice job.


@tooktook, just shut up and try making something of your own.

Moogra has this too, but this is nice for the v60, and everything else. :D
 
This is awsome now I know how to edit sinems to make regulargmcmd.java and only put like some commands because gm level 2 in sine is too godly I want to remove !sql and make it admin =]
 
1. he didnt make it
2. noobs cannot just add the command after it
3. i did made something by my own
4. he copyied it from another repack and just changed the name
5. this
public int Admin() {

}
should be this
public int Admin() {
return admin;


and im not sure if there is a function Gm o.O
u can add, but some ppl cant.
so stfu.
 
Back