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!

L2J All OF GM COMMANDS HERE LOOK

Status
Not open for further replies.
Newbie Spellweaver
Joined
Apr 24, 2004
Messages
8
Reaction score
0
=.= some code about GM command

From L2J server, i did not change anything :p

----------------------------------------
if(text.startsWith("."))
{
String command = text.substring(1);
if(command.equals("help"))
{
NpcHtmlMessage adminCommands = new NpcHtmlMessage(5);
StringBuffer html1 = new StringBuffer("<html><title>AdminCommands</title>");
html1.append("<body>");
html1.append("<br><a action=\"bypass -h spawn_monster\">spawn monster</a>");
html1.append("<br><a action=\"bypass -h come_here\">force target to move here</a>");
html1.append("<br><a action=\"bypass -h attack_me\">force target to attack</a>");
html1.append("<br><a action=\"bypass -h stats\">show statistics</a>");
html1.append("</body></html>");
adminCommands.setHtml(html1.toString());
con.sendPacket(adminCommands);
** else
if(command.startsWith("teleport"))
{
StringTokenizer st = new StringTokenizer(command);
st.nextToken();
String x1 = st.nextToken();
int x = Integer.parseInt(x1);
String y1 = st.nextToken();
int y = Integer.parseInt(y1);
String z1 = st.nextToken();
int z = Integer.parseInt(z1);
CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), "teleporting to " + x + " " + y + " " + z);
con.sendPacket(cs);
TeleportToLocation tele = new TeleportToLocation(activeChar, x, y, z);
con.sendPacket(tele);
activeChar.setX(x);
activeChar.setY(y);
activeChar.setZ(z);
** else
if(command.startsWith("buy"))
{
int listId = 0;
try
{
listId = Integer.parseInt(command.substring(3));
**
catch(NumberFormatException e) { **
net.sf.l2j.gameserver.model.L2BuyList list = TradeController.getInstance().getBuyList(listId);
if(list != null)
{
BuyList bl = new BuyList(list, activeChar.getAdena());
con.sendPacket(bl);
** else
{
System.out.println("no buylist with id:" + listId);
**
** else
if(command.equals("money"))
{
activeChar.addAdena(0x186a0);
ItemList il = new ItemList(activeChar, true);
con.sendPacket(il);
** else
if(command.equals("mob"))
{
net.sf.l2j.gameserver.templates.L2Npc goblin = NpcTable.getInstance().getTemplate(3);
L2NpcInstance mob = new L2NpcInstance(goblin);
mob.setObjectId(IdFactory.getInstance().getNextId());
mob.setX(activeChar.getX());
mob.setY(activeChar.getY());
mob.setZ(activeChar.getZ());
mob.setCurrentHp(80D);
mob.setMaxHp(198);
mob.setHeading(activeChar.getHeading());
mob.setUnknown1(1.0800000000000001D);
mob.setUnknown2(0.99836639999999999D);
NpcInfo ni = new NpcInfo(mob);
con.sendPacket(ni);
L2World.getInstance().storeObject(mob);
** else
if(command.startsWith("movehere"))
{
net.sf.l2j.gameserver.model.L2Object target1 = activeChar.getTarget();
if(target1 instanceof L2NpcInstance)
{
L2NpcInstance temp = (L2NpcInstance)target1;
temp.moveTo(activeChar.getX(), activeChar.getY(), activeChar.getZ(), 0);
**
** else
if(command.startsWith("sethere"))
{
net.sf.l2j.gameserver.model.L2Object target1 = activeChar.getTarget();
if(target1 instanceof L2NpcInstance)
{
L2NpcInstance temp = (L2NpcInstance)target1;
temp.setTo(activeChar.getX(), activeChar.getY(), activeChar.getZ(), activeChar.getHeading());
**
** else
if(command.startsWith("stopmove"))
{
net.sf.l2j.gameserver.model.L2Object target1 = activeChar.getTarget();
if(target1 instanceof L2NpcInstance)
{
L2NpcInstance temp = (L2NpcInstance)target1;
temp.stopMove();
**
** else
if(command.startsWith("stat"))
{
int val = Integer.parseInt(command.substring(4));
System.out.println("changing stat: " + val);
StatusUpdate su = new StatusUpdate(activeChar.getObjectId());
su.addAttribute(val, 234);
con.sendPacket(su);
** else
if(command.startsWith("exp"))
{
int val = Integer.parseInt(command.substring(4));
System.out.println("setting exp to: " + val);
activeChar.setExp(val);
UserInfo ui = new UserInfo(activeChar);
con.sendPacket(ui);
** else
if(command.startsWith("level"))
{
int val = Integer.parseInt(command.substring(6));
System.out.println("setting level to: " + val);
activeChar.setLevel(val);
UserInfo ui = new UserInfo(activeChar);
con.sendPacket(ui);
** else
if(command.startsWith("doorinfo"))
{
System.out.println("creating door ");
L2DoorInstance door = new L2DoorInstance();
door.setObjectId(0x48302222);
door.setX(activeChar.getX());
door.setY(activeChar.getY());
door.setZ(activeChar.getZ());
DoorInfo di = new DoorInfo(door);
con.sendPacket(di);
DoorStatusUpdate ds = new DoorStatusUpdate(door);
con.sendPacket(ds);
**
** else
{
CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
con.sendPacket(cs);
**
 
Upvote 0
Newbie Spellweaver
Joined
May 3, 2003
Messages
81
Reaction score
0
well i bin

well i been playin about with them all day now when i do .money insted of gettin 10000 i get 100,0000 hehehe i also playin about with the classid it tells u everynumber for every npc , 0 fight 16 bisop etc i copey it n paste it later when i get bk from mates
 
Upvote 0
Newbie Spellweaver
Joined
Apr 24, 2004
Messages
8
Reaction score
0
i test .buy with the tw client, it doesn't work.(btw i am from China mainland)
=.=
and we can do some html work to make a nice command windows like the .help
useful for test and other function
 
Upvote 0
Newbie Spellweaver
Joined
May 3, 2003
Messages
81
Reaction score
0
does

hmm well i been playing about with all these class files, just need bit of help if anyone know java, ive asked one of my mates to try recomplaie the class but keep getting erros :mad::mad:


o well if any of u know how to complie then let me know thx
 
Upvote 0
Banned
Banned
Joined
May 8, 2004
Messages
44
Reaction score
0
If you press .buy12 you will get a DC .. If you press .stat / .stats you will get a DC that is what happend to me -_-
 
Upvote 0
Newbie Spellweaver
Joined
May 3, 2003
Messages
81
Reaction score
0
lol

i dont get dc, only get dc when my mum a pain in the a$$ and starts to download and courses me to coem out the game wiv the lag lol


lol dw MR

all that he pasted was out of
Say2.class :D it shows you all the commands thats where i found them all, plus if i knew how to complie class file again, i should be able to change alot of things after reading thru them

like the money one i can make it go to 1000000 only if i knew how to complie the say2.class again :-( lol
 
Upvote 0
Banned
Banned
Joined
May 8, 2004
Messages
44
Reaction score
0
The Money thing is really useless if we can't even go to the shops to buy better armor.. the .buy 1 - 16 only lets us buy newbish armor..
 
Upvote 0
Newbie Spellweaver
Joined
May 3, 2003
Messages
81
Reaction score
0
.stat

heres sumof the .stat commands

.stat1 - give a heck lot of exp
.stat2 - Exp full
.stat3 - Str 234
.stat4 - Dex 234
.stat5 - Con 234
.stat6 - Int 234
.stat7 - Wit 234
.stat8 - Men 234
.stat9 & .stat10- Hp 234/234
.stat11 & .stat12 - MP 234/234
.stat13 SP 234
.stat14 weight in bag"sack" 1%
.stat15 weight in bag"sack" Full

i would got more for you but to many to try just keep goin up one n see wht it changes :p
 
Upvote 0
Newbie Spellweaver
Joined
Nov 12, 2004
Messages
15
Reaction score
0
Guach.. i cant get any commands to work... can anyone help...? i've changed the acsess thingy to 101 is that the problem or what ? >_>
 
Upvote 0
Status
Not open for further replies.
Back
Top