GM Commands

Results 1 to 3 of 3
  1. #1
    Apprentice wey999 is offline
    MemberRank
    Jul 2012 Join Date
    8Posts

    GM Commands

    All 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:
    &addmoney 1000000
    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 , [] 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):
    -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)

    Credits!
    Thanks to all people who helped figuring out how the commands work (kLab, Sjikke, jg, zukota, exige, joeblow, BamBam, Kajack and everybody i forgot).

    Game related commands
    The following list contains those commands that influence the gameplay:
    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] - Delets 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 [slot],[row],[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],[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:&summon 789,10
    unhide - The opposite of hide - GM level:1 - Example:&unhide

    Server-Commands
    gamesvrstop [time] - Stops the gamrserver 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, infos 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[i][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 informations (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
    &summon 789
    It will stay until the GameServer is restarted. If it gets killed it will respawn after a few seconds! So be careful!
    If you summon mobs you can influence their behaviour with the AI parameter. For example:
    &summon 789,900000,0
    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 ?
    kick
    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(server files>resource>scripts>calculate) and search for:
    if item_event == 101 then
    Add_Item_Attr ( ITEMATTR_VAL_BaoshiLV , 10 )
    return
    end
    if item_event == 102 then
    Add_Item_Attr ( ITEMATTR_VAL_BaoshiLV , 20 )
    return
    end
    Replace it with:
    if item_event == 101 then
    Add_Item_Attr ( ITEMATTR_VAL_BaoshiLV , 10 )
    return
    elseif item_event == 102 then
    Add_Item_Attr ( ITEMATTR_VAL_BaoshiLV , 20 )
    return
    elseif item_event == 103 then
    Add_Item_Attr ( ITEMATTR_VAL_BaoshiLV , 30 )
    return
    elseif item_event == 104 then
    Add_Item_Attr ( ITEMATTR_VAL_BaoshiLV , 40 )
    return
    elseif item_event == 105 then
    Add_Item_Attr ( ITEMATTR_VAL_BaoshiLV , 50 )
    return
    elseif item_event == 106 then
    Add_Item_Attr ( ITEMATTR_VAL_BaoshiLV , 60 )
    return
    elseif item_event == 107 then
    Add_Item_Attr ( ITEMATTR_VAL_BaoshiLV , 70 )
    return
    elseif item_event == 108 then
    Add_Item_Attr ( ITEMATTR_VAL_BaoshiLV , 80 )
    return
    elseif item_event == 109 then
    Add_Item_Attr ( ITEMATTR_VAL_BaoshiLV , 90 )
    return
    end
    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-Command

    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.

    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.
    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)
    5-Reputation
    6-Attribute Points
    7-Skill Points
    8-Gold
    11-SLV
    12-Life-Skill Level
    13-Life-Skill Points
    15-EXP-When in boat-modus -> boat-exp
    50-STR
    51-ACC
    52-AGI
    53-CON
    54-SPR
    69-Movement-Speed-Values higher than 2000 aren't useful as you'll be moving faster than the screen scrolls!
    102-Attack Speed
    104-Min Attack
    105-Max AttacK
    106-Defence
    107-Max HP-Sets your max. number of HP
    108-Max SP
    109-Dodge
    110-Hit-Rate

    The &itemattr-Command

    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):

    0 -unknown- ITEMATTR_COUNT_BASE0
    1 -unknown- ITEMATTR_COE_STR
    2 -unknown- ITEMATTR_COE_AGI
    3 -unknown- ITEMATTR_COE_DEX
    4 -unknown- ITEMATTR_COE_CON
    5 -unknown- ITEMATTR_COE_STA
    6 -unknown- ITEMATTR_COE_LUK
    7 -unknown- ITEMATTR_COE_ASPD
    8 -unknown- ITEMATTR_COE_ADIS
    9 -unknown- ITEMATTR_COE_MNATK
    10 -unknown- ITEMATTR_COE_MXATK
    11 -unknown- ITEMATTR_COE_DEF
    12 -unknown- ITEMATTR_COE_MXHP
    13 -unknown- ITEMATTR_COE_MXSP
    14 -unknown- ITEMATTR_COE_FLEE
    15 -unknown- ITEMATTR_COE_HIT
    16 -unknown- ITEMATTR_COE_CRT
    17 -unknown- ITEMATTR_COE_MF
    18 -unknown- ITEMATTR_COE_HREC
    19 -unknown- ITEMATTR_COE_SREC
    20 -unknown- ITEMATTR_COE_MSPD
    21 -unknown- ITEMATTR_COE_COL
    22 -unknown- ITEMATTR_COE_PDEF
    25 -unknown- ITEMATTR_COUNT_BASE1
    26 -unknown- ITEMATTR_VAL_STR
    27 -unknown- ITEMATTR_VAL_AGI
    28 -unknown- ITEMATTR_VAL_DEX
    29 -unknown- ITEMATTR_VAL_CON
    30 -unknown- ITEMATTR_VAL_STA
    31 -unknown- ITEMATTR_VAL_LUK
    32 -unknown- ITEMATTR_VAL_ASPD
    33 -unknown- ITEMATTR_VAL_ADIS
    34 -unknown- ITEMATTR_VAL_MNATK
    35 -unknown- ITEMATTR_VAL_MXATK
    36 -unknown- ITEMATTR_VAL_DEF
    37 -unknown- ITEMATTR_VAL_MXHP
    38 -unknown- ITEMATTR_VAL_MXSP
    39 -unknown- ITEMATTR_VAL_FLEE
    40 -unknown- ITEMATTR_VAL_HIT
    41 -unknown- ITEMATTR_VAL_CRT
    42 -unknown- ITEMATTR_VAL_MF
    43 -unknown- ITEMATTR_VAL_HREC
    44 -unknown- ITEMATTR_VAL_SREC
    45 -unknown- ITEMATTR_VAL_MSPD
    46 -unknown- ITEMATTR_VAL_COL
    47 -unknown- ITEMATTR_VAL_PDEF
    49 -unknown- ITEMATTR_COUNT_BASE2
    50 -unknown- ITEMATTR_LHAND_VAL
    51 -unknown- ITEMATTR_MAXURE
    52 -unknown- ITEMATTR_MAXFORGE
    53 -unknown- ITEMATTR_MAXENERGY
    54 -unknown- ITEMATTR_URE
    55 -unknown- ITEMATTR_FORGE
    56 -unknown- ITEMATTR_ENERGY
    58 -unknown- ITEMATTR_MAX_NUM
    48 -unknown- ITEMATTR_CLIENT_MAX
    180 -unknown- ITEMATTR_COUNT_BASE3
    181 -unknown- ITEMATTR_VAL_PARAM1
    182 -unknown- ITEMATTR_VAL_PARAM2
    183 -unknown- ITEMATTR_VAL_LEVEL
    184 -unknown- ITEMATTR_VAL_FUSIONID

    Special Items
    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
    26-30-Attribute-Bonus (26=STR,...)-Sum these to get Pet-Level
    51-max. Stamina-Formula: (Stamina*50) --> so if you want 400 Stamina, use 20000 as value
    53-max. Growth-Formula: (Level*240) --> for level 15 you would use 3600 as value
    54-current Stamina

    Medal of Valor
    26-Honor Points
    27-Number of Kills
    28-Number of Deaths
    29-Number of PvP Matches
    30-Number of Wins
    51-Team-Contribution Points
    53-Chaos Points

    All gems
    53-Level of gem-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

    Regarding estop/delestop
    "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!

    Missing/Unknown commands
    The following commands are available but for some reason nobody could figure out what they do or how they work (or i simply hadn't got the time or motivation to check them). So if anybody has more informations 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 I've seen in the debugger!!!))

    delitem
    forge
    isblock
    itemvalid
    light
    pet
    qitem [some parameter]
    relive
    reload_ai
    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.
    Item-IDs: iteminfo.txt
    Mob-IDs: characterinfo.txt
    Skill-IDs: skillinfo.txt
    (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.).


    TOP/PKO forum development


  2. #2
    Member gundulapek is offline
    MemberRank
    Nov 2011 Join Date
    96Posts

    Re: GM Commands

    thanks for your share

  3. #3
    Novice OhhNerds is offline
    MemberRank
    Jul 2012 Join Date
    4Posts

    Re: GM Commands

    im gm and i type in argent for ex:&attr 2336,4567 then enter its fail and im lv100



Advertisement