- Joined
- Aug 13, 2009
- Messages
- 76
- Reaction score
- 20
In this thread I will give you a few usefull commands for your server their not difficult to put in so just standard things.
Im not telling you where to put in this script (in every repack it could be different) or how to compile with netbeans or w/e!
- A command script that connects you to a npc!
okey its really easy the pink text you have to change where npc id stays you put the 'npc id' you want to be opened, where '@commandhere' stays you need to put what text/command you want to be opened (like @cody or w/e).
- A command script that shows you a list of a text (useable for your commands on your server or information)
the only thing you have to do is chaning the pink texts so where it says '@commandhere' you change the text to your command you want and where it says 'text here' you need to change it to the text you want when you typ the command.
Now I know I will get 1000 of quetsions if its possible to get more text?
yes that is possible! here Ill show you
under this in your script:
you put again this:
of course you can change that text to and so you do it again and again if you want more text!
- A command script to let you spawn (@go command)
I don't have really much to say about this just paste it in your command file
when you typ @go <mapname> you spawn to that place.
You could change the pink made text but I don't think that's neccesary.
btw: if ur a advanced scripter you could at more spawns.
- A command script that checks your stats (IDK if this works for all repacks for my chaoticms repack or based one it works!)
This script checks your stats when you typ the command if you want you could change the command to w/e you like (I made it pink!)
Im not telling you where to put in this script (in every repack it could be different) or how to compile with netbeans or w/e!
- A command script that connects you to a npc!
Code:
} else if (splitted[0].equalsIgnoreCase("[COLOR="rgb(255, 0, 255)"]@commandhere"[/COLOR])) {
NPCScriptManager.getInstance().start(c, [COLOR="Magenta"]npc id[/COLOR]);
okey its really easy the pink text you have to change where npc id stays you put the 'npc id' you want to be opened, where '@commandhere' stays you need to put what text/command you want to be opened (like @cody or w/e).
- A command script that shows you a list of a text (useable for your commands on your server or information)
Code:
} else if (splitted[0].equalsIgnoreCase("@commands") || splitted[0].equalsIgnoreCase("[COLOR="rgb(255, 0, 255)"]@commandhere[/COLOR]")) {
mc.dropMessage("============================================================");
mc.dropMessage(" " + c.getChannelServer().getServerName() + " Commands");
mc.dropMessage("============================================================");
mc.dropMessage("[COLOR="Magenta"]text here![/COLOR]");
;
the only thing you have to do is chaning the pink texts so where it says '@commandhere' you change the text to your command you want and where it says 'text here' you need to change it to the text you want when you typ the command.
Now I know I will get 1000 of quetsions if its possible to get more text?
yes that is possible! here Ill show you
under this in your script:
Code:
mc.dropMessage("text here!");
you put again this:
Code:
mc.dropMessage("text here!");
of course you can change that text to and so you do it again and again if you want more text!
- A command script to let you spawn (@go command)
Code:
}else if (splitted[0].equals("@go")) {
//Map name array
int[] gotomapid = {
100000000, //henesys
101000000, //ellinia
102000000, //perion
103000000, //kerning
104000000, //lith
105040300, //sw
110000000, //florina
200000000, //orbis
209000000, //happyville
211000000, //elnath
220000000, //ludi
230000000, //aqua
240000000, //leafre
250000000, //mulung
251000000, //herb
221000000, //omega
222000000, //korean (Folk Town)
600000000, //nlc (New Leaf City)
990000000, //excavation (Sharenian/Excavation Site)
801000000, //showa
200000301, //guildHQ
800000000, //Shrine (Mushroom Shrine)
910000000, //Fm
240040511, //Skelegons
100040002, //Silver Slimes
109020001, // PVP
};
String[] gotomapname = {
"henesys",
"ellinia",
"perion",
"kerning",
"lith",
"sleepywood",
"florina",
"orbis",
"happyville",
"elnath",
"ludi",
"aqua",
"leafre",
"mulung",
"herb",
"omega",
"korean",
"nlc",
"excavation",
"showa",
"guild",
"shrine",
"fm",
"skelegons",
"silver",
"pvp",
};
if (splitted.length < 2) { //If no arguments, list options.
mc.dropMessage("[COLOR="rgb(255, 0, 255)"]Syntax: @go <mapname> mapname is one of:[/COLOR]");
mc.dropMessage("s[COLOR="rgb(255, 0, 255)"]ilver, henesys, ellinia, perion, kerning, lith, sleepywood, florina,[/COLOR]");
mc.dropMessage("[COLOR="rgb(255, 0, 255)"]orbis, happyville, elnath, ludi, aqua, leafre, mulung, herb, omega, korean, nlc, excavation,[/COLOR]");
mc.dropMessage("[COLOR="Magenta"]showa, guild, shrine, fm, skelegons, pvp[/COLOR]");
} else {
for (int i = 0; gotomapid[i] != 0 && gotomapname[i] != null; ++i) { //for every array which isn't empty
if (splitted[1].equals(gotomapname[i])) { //If argument equals name
MapleMap target = cserv.getMapFactory().getMap(gotomapid[i]);
MaplePortal targetPortal = target.getPortal(0);
if (splitted.length < 3) { //If no target name, continue
player.changeMap(target, targetPortal);
}
}
}
}
I don't have really much to say about this just paste it in your command file
when you typ @go <mapname> you spawn to that place.
You could change the pink made text but I don't think that's neccesary.
btw: if ur a advanced scripter you could at more spawns.
- A command script that checks your stats (IDK if this works for all repacks for my chaoticms repack or based one it works!)
Code:
} else if (splitted[0].equalsIgnoreCase("[COLOR="Magenta"]@checkstats[/COLOR]")) {
mc.dropMessage("Your stats are:");
mc.dropMessage("Str: " + player.getStr());
mc.dropMessage("Dex: " + player.getDex());
mc.dropMessage("Int: " + player.getInt());
mc.dropMessage("Luk: " + player.getLuk());
mc.dropMessage("Available AP: " + player.getRemainingAp());
mc.dropMessage("Rebirths: " + player.getReborns());
This script checks your stats when you typ the command if you want you could change the command to w/e you like (I made it pink!)
Last edited: