The Ultimate GM Handbook Author: SnowCrash GM Commands Overview:
This little guide is the most comprehensive GM-guide for PKO you will find. It contains pretty much everything I know about the GM-commands and everything I found on different forums.
How to enter commands
This is really easy. All commands must be entered into the chat-field. And you must add a leading & to the command. For example:
gives you a million gold To use the commands your account must be a GM-account. This means that you must edit the "GM" field in the database (accounts-table in the GameDB) and set it to a value > 0. To use all commands you must set GM to 99!
A little note on GM-Level: Lv = 0 (Normal Players, no rights), Lv 1-98 (GM, limited commands), Lv 99 (full GM, all commands) --- I can't remember exactly what values but I think if you put Lv25-30 for a player, he has the same rights as Lv1-98 but instead of "GM", "HD" is displayed above his head.
Parameters in  are optional! For example: addkb <capacity>, [<char-id>] means: you can type "addkb 48" or "addkb 48,1234" Important!
There are only 3 important things you need to know besides the obvious (don't mess with stuff you don't understand *lol*):
all commands using char/mob-names (like &kick, &call, ...) are case-sensitive*
not all commands work when you or the target are at sea! (for example you can't &call/&goto chars on sea if you're on land, etc. - looks like &goto can be used if you and the target are on sea and if you add the ship-name to the name)
some commands only work if you're on the same map/gameserver as your target (for example &attr - see there for more infos)
case-sensitive: Must respect the capital letters, space, everything counts, one wrong character and the whole string will fail. Game Related Commands: GM Commands:
addcess <points> - Changes your commerce rate. Setting this to 10000 gives you a 0.01% commerce rate. - GM level:99 - Example:&addcess 1000000
addexp <exp> - Adds exp to your experience - GM level:99 - Example:&addexp 1000000
addkb <capacity>,[<char id>] - Sets the inventory capacity to [capacity] - GM level:99 - Example:&addkb 48
addmission <id1>,<id2> - Adds a quest. Syntax is similar to DefineMission used in the Missionscript??.lua files.For example if the lua contains: DefineMission( 5138, "Goodbye to 7th Gate", 1546 ).You can add this mission with &addmission 1546, 5138- GM level:99 - Example:&addmission 1546,5138
addmoney <gold> - Gives your char some gold. - GM level:99 - Example:&addmoney 1000000
addsailexp <exp> - Gives your current ship EXP / gives you Rebirth EXP (seems to depend on what version you are using) - GM level:99 - Example:&addsailexp 1000000
attr <attribute>,<value>,[<charid>] - Set a certain attribute of a char (see below) - GM Level:99 - Example:&attr 4,9
call <char name> - Teleports the given char to your position - GM Level:1 - Example:&call AnotherUser
clearmission <id> - Removes a mission - GM Level:99 - Example:&clearmission 1456
delmission <id> - Deletes mission?Seems to be the same as clearmission - GM Level:99 - Example:&delmission 810
goto <char name> - Teleports you to the position of the given char - GM Level:1 - Example:&goto AnotherUser
hide - Hides your char from other players - GM Level:1 - Example:&hide
itemattr <2>,<Slot-1>,<attr>,<value> - Set a certain attribute of an item (see below for more infos) - GM Level:99 - Example:&itemattr 2,1,53,9
kick <char name> - Kicks the given user (sometimes it d/c surrounding players!) - GM Level:1 - Example:&kick AnotherUser
make <item id>,<count>,[<quality>] - Gives you a certain item (see below for more infos) - GM Level:99 - Example:&make 1092,99
misclear - Clears your quest triggers, etc - GM Level:99 - Example:&misclear
move <x>,<y>,[<map name>] - Moves your char to the given position (see below for more infos) - GM Level:1 - Example:&move 2000,2000,garner
notice <text> - Displays text in the system-notice windows - GM Level:1 - Example:¬ice Hello World
qcha <char name> - Returns information about the given char (coords, etc) - GM Level:99 - Example:&qcha AnotherUser
seeattr <attribute>,<char id> - Display a certain attribute of a char - GM Level:99 - Example:&seeattr 6,1234
setrecord <id> - Set quest record. For example: if a quest-definition contains something like:TriggerCondition( 1, HasRecord, 330 );in the LUA files, you could use &setrecord 330 to obtain that record (btw. 330 is Language Barrier) - GM Level:99 - Example:&setrecord 330
skill <skill id>,<level> - Learn skill #[skill] at level[level] - GM Level:99 - Example:&skill 284,10
summon <mob id>,[<time in ms>],[<ai>] - Summons the given mob - GM Level:99 - Example:&summon 789
summonex <mob id>,<count>,[<time in ms>],[<ai>] - Summons the given mob multiple times (be careful - summoning too many mobs will crash the server) - GM Level:99 - Example:&summonex 789,10
unhide - The opposite of hide - GM level:1 - Example:&unhide
The following list contains those commands that influence the server itself:
gamesvrstop [<time>] - Stops the gameserver in [time] seconds - GM Level:99 - Example:&gamesvrstop
getping - Displays the current ping - GM Level:99 - Example:&getping
harmlog=1 / harmlog=0 - Enables/disables the harmlog. If on, info's on who is attacking whom are displayed - GM Level:99 - Example:&harmlog=1
lua <command> - Executes [command] on the gameserver your char is on.Haven't found any useful command, yet - GM Level:99 - Example:&lua print("Hello world!")
lua_all <command> - The same as &lua put command is executed on all gameservers - GM Level:99 - Example:&lua_all print("Hello world!")
missdk - Reloads the SDK files - GM Level:99 - Example:&missdk
misreload - Reloads all NPC-dialogues and quests (same as updateall) - GM Level:99 - Example:&misreload
reload <mode> - Reloads certain scripts/definitions.Possible values for mode:alltable,characterinfo,skillinfo,iteminfo,monsterrefresh - GM Level:99 - Example:&reload alltable
send data <value 1>,<value 2> - Sends data.Whatever that means... - GM Level:99 - Example:&senddata 123,123
setping <value> - Sets the ping? Seems to do nothing!? - GM Level:99 - Example:&setping 100
setpinginfo<value 1>,<value 2> - Whatever... - GM Level:99 - Example:&setpinginfo 100,100
updateall - Reloads all NPC-dialogues and quests.(same as misreload) - GM Level:99 - Example:&updateall
Additional information (summon, kick, etc.)
I'll explain some things that are "good to know" in the next few paragraphs... summon & summonex
When summoning mobs you have to take some things into account: lets say you summon a BD with
it will stay until the GameServer is restarted. If it gets killed it will re-spawn after a few seconds! So be careful!
If you summon mobs you can influence their behavior with the AI parameter. For example:
summons a BD which stays for 900s and doesn't attack. 0,1,2,4,5,10 and 11 are valid values. I'm not 100% sure but they should have the following meanings:
0 - do nothing
1 - move around but don't attack
2 - tries to run away if attacked?
4 - follow the master ?
5 - counterattack after being attacked
10 - attacks
11 - attacks, flees and does ranged attacks ?
Be careful if you kick somebody from the server. In my experience, chars near the char you kick will be kicked, too. make
If you use the third parameter with the &make-command you can create certain types of items. If anybody is really bored he can check the AttrCalculate.lua file. The function "Creat_Item_Tattr" defines the special effect. As far as i can see, the following values are possible:
1, 2, 3, 4, 7, 9, 11, 20, 22, 23, 24, 25, 26, 27, 29, 46, 49, 50, 59, 65, 68, 69, 70, 71, 101, 102
101 -> Gem Lv1 (pointless)
102 -> Gem Lv2
103-109 -> aren't working on all servers (if it works on yours, it creates Lv3-Lv9 gems)
If 103-109 aren't working on your server you can add them yourself. Open AttrCalculate.lua and search for
if item_event == 101 then
Add_Item_Attr ( ITEMATTR_VAL_BaoshiLV , 10 ) --±¦Ê¯
item_event == 102 then
Add_Item_Attr ( ITEMATTR_VAL_BaoshiLV , 20 ) --±¦Ê¯
replace it with
if item_event == 101 then
Add_Item_Attr ( ITEMATTR_VAL_BaoshiLV , 10 )
elseif item_event == 102 then
Add_Item_Attr ( ITEMATTR_VAL_BaoshiLV , 20 )
elseif item_event == 103 then
Add_Item_Attr ( ITEMATTR_VAL_BaoshiLV , 30 )
elseif item_event == 104 then
Add_Item_Attr ( ITEMATTR_VAL_BaoshiLV , 40 )
elseif item_event == 105 then
Add_Item_Attr ( ITEMATTR_VAL_BaoshiLV , 50 )
elseif item_event == 106 then
Add_Item_Attr ( ITEMATTR_VAL_BaoshiLV , 60 )
elseif item_event == 107 then
Add_Item_Attr ( ITEMATTR_VAL_BaoshiLV , 70 )
elseif item_event == 108 then
Add_Item_Attr ( ITEMATTR_VAL_BaoshiLV , 80 )
elseif item_event == 109 then
Add_Item_Attr ( ITEMATTR_VAL_BaoshiLV , 90 )
and they should work. move
Using &move you can teleport to any position. If you use the 3rd parameter you can specify the map to which you want to teleport. Just search for *.atr to find all valid map-names (garner, darkblue, magicsea, jialebi, and so on) Other stuff
By pressing Alt+P in-game you can send system-messages to all users. Those messages appear in the upper center of the screen. After pressing Alt+P a cursor appears above the Hotkey-Bar. You can enter your message there. After pressing Enter, the message is displayed and will disappear after some time by itself.
The &attr Commands Overview
The &attr command is one of the most powerful in the game. It can be used to modify the attributes of all logged in characters.
The syntax for this command is:
&attr <attribute>, <value>, [<char-id>]
where <char-id> is an optional parameter. If you don't add it, the command influences your currently logged in character. The following list shows all possible values for "attribute" and what you can do by modifying them (very incomplete at the moment) Important!
Sometimes, when you're on a different map than the char you want to modify the server will reply with an error to your &attr commands. I hadn't got the chance yet to test it properly but I think it is either related to the other char being on a different map or to them being on a different gameserver. So if you get an error message saying that the char doesn't exist and you're sure it does, try teleporting near them and modifying their attributes! Normally, this fixes the problem. List Of Known Functional Attributes:
0-Level-Pretty obvious: modify the level of the char
1-HP-You can't set a higher value than the max. HP your char has - so &attr 1,999999999 will only give you as much HP as your char actually has
2-SP-same rules apply as for HP
4-Class-Use this to change your class. The following values are useful:
0 - Newbie
1 - Swordsman
2 - Hunter
4 - Explorer
5 - Herbalist
8 - Cahmpion
9 - Crusader
12 - Sharpshooter
13 - Cleric
14 - Seal Master
16 - Voyager
(actually you can set any value between 0 and 16 but only the above classes are really implemented)
15-EXP-When in boat-modus -> boat-exp
69-Movement-Speed-Values higher than 2000 aren't useful as you'll be moving faster than the screen scrolls!
107-Max HP-Sets your max. number of HP
List Of Unknown Attributes:
10-unknown-Possibly char-type -> NPC, etc.
The &itemattr Commands Overview
The &itemattr command is similar to the &attr command but it works on items instead of chars.
The syntax for this command is:
&itemattr <slot>, <row>, <attribute>, <value>
The following list shows all possible values for "attribute" and what you can do by modifying them (very incomplete at the moment):
For some items, PKO abuses some of the above attributes to store different values. Which fields are used for what will be described on the next few paragraphs: Pets
Item attr: 26/30 Description: Attribute-Bonus Remark: Sum these to get Pet-Level
Item attr: 51 Description: max. Stamina Remark: Formula: (Stamina*50) --> so if you want 400 Stamina, use 20000 as value
Item attr: 53 Description: max. Growth Remark: Formula: (Level*240) --> for level 15 you would use 3600 as value
Item attr: 54 Description: current Stamina Remark: Non
Medal Of Valor
Item attr:26 Description: Honor Points
Item attr:27 Description: Number of Kills
Item attr:28 Description: Number of Deaths
Item attr:29 Description: Number of PVP Matches
Item attr:30 Description: Number of Wins
Item attr:51 Description: Team-Contribution Pts
Item attr:53 Description: Chaos Points
Item attr: 53 Description: Level of the gem Remark: Use 1-9 to set the level of any gem
The @@ Commands Overview
There are some additional commands with a slightly different sysntax (all credits go to jgreever for finding these). Some of them work without any GM-level-restriction (so you can use them on official servers with a Newbie - only the char-level-restrictions for talkin in certain channels apply).
You use them by typing "@@ command" (@@ followed by a blank) into the chatbox.
bbs <[interval x 10 secs>,<time>,<content> - similar to ¬ice, but timed - GM Level:? - Example: @@ bbs 5,5,hello
estop <char name>,<time> - Mutes the given char for [time] seconds (important info below!) - GM Level:1 - Example: @@ estop SnowMan,60
delestop <char name> - Unmutes the given character (important info below!) - GM Level:1 - Example: @@ delestop SnowMan,60
disable <char id>,1 - Kicks user without kicking people around him - GM Level:?? - Example: @@ disable 1234,1
getuserconnection <char name> - Shows connection info for the given character - GM Level:?? - Example: @@ getuserconnection SnowMan
getusernum+ - Displays number of users online and number of logins - GM Level:0 -Example: @@ getusernum+
getlastconnection - Displays your last connection info - GM Level:0 - Example: @@ getlastconnection
ping <char name> - Pings the given character - GM Level:?? - Example: @@ ping SnowMan
"estop" works a little bit different from what most people expect. lets say you mute somebody for 60 minutes, then this character has to be online for 60 minutes for the mute to wear off. If he just logs off and comes back 2 hours later he will still be muted! So be careful if you mute people for several days as it will probably take them weeks until they can talk again if they are online for a few hours each day.
To unmute somebody, the person has to be online! You can't "delestop" characters who aren't logged in!
The following commands are available but for some reason nobody could figure out what they do or how they work. So if anybody has more information or is bored and can try them out, feel free to post your findings in this thread!
(Most of the time the parameters are just a guess from what has been seen in the debugger)
qitem <some parameter>
setflag <id>, <flag> - Sets a quest history flag. whatever that means. - GM Level:?? - Example:&setflag 1,1
Regarding IDs for items, mobs, skills, etc. Where to find them
OK, normally this shouldn't be necessary as in my humble opinion everybody running an own server should be intelligent enough to take at least one look at the files for himself (otherwise he should just delete his files as he is not worth running a server):
All Skill-IDs, Item-IDs, etc. can be found in the txt-files in the resource directory of your GameServer.
(there are more, but those are the most important) - if you view the files in any text-editor you'll see a lot of columns with data. In all files the first column contains the ID and the second the name of the item/mob/skill. (Even in all other files, the first column is always the ID and in 99% of all cases, the second row contains names)
Regarding Security On GM-Servers
Basically, I think running a GM-server is a waste of time. You will always have the problem that there are idiots who think its funny to do things like summon thousands of mobs, etc.
If you really want to run a GM-server I would recommend to modify the GameServer.exe and rename certain commands. For example gamesvrstop, summonex, etc. - you can do so by using any HEX-editor (like HXD, XVI32, etc.).