*gethotkeys({<char_id>});
Gets all the target's current hotkeys. If <char_id> is not specified,
will attach to the current player.
Sets the following arrays:
@hotkey_type - Type of data in hotkey, 0 for items and 1 for skills
@hotkey_id - ID of the skill/item
@hotkey_lv - Skill Level/Item Amount
@hotkey_pos - Hotkey position
@hotkey_count - Returns the max hotkey count.
---------------------------------------
*updatehotkey(<type>,<id>,<lv>,<pos>{,<flag>,<char_id>});
Updates a player's hotkey.
<type> - 0 for item, 1 for skill
<id> - Skill Name/Skill ID/Item ID(will only store skills/items you have)
<lv> - Skill Level/Item Amount(will always store item amount player is holding)
<pos> - Position of the Hotkey(0 is the first hotkey)
<flag> - (Optional)
0 = Default
1 = Delete duplicate on the same row
2 = Delete duplicate on all rows
<char_id> - (Optional)Target's Character ID. If not specified, will attach to the current player
---------------------------------------
*clearhotkeys({<char_id>});
Clears the target's hotkeys. If <char_id> is not specified,
will attach to the current player.
Very useful for storing skill builds, can be used for custom atcommand to instantly change hotkey setup.
Can also be used to immediately equip given skills/items, for example:
NPC:
prontera,150,150,4 script InstantEquip 80,{
skill "SM_BASH",10,0;
updatehotkey(1,"SM_BASH",10,0); //Will Equip Bash to the first Hotkey
getitem 501,50;
.@flag = 1; //If 1 removes duplicate on the same hotkey row, if 2 removes duplicate on all the rows.
updatehotkey(0,501,50,1,.@flag); //Will Equip Item: Red Potion to the second Hotkey
end;
}
Items/Cards:
4044,Smokie_Card,Smokie Card,6,20,,10,,,,,,,,136,,,,,{ skill "TF_HIDING",1; updatehotkey(1,"TF_HIDING",1,2,1); },{},{ sc_end SC_HIDING; } //Sets Hide Lv1 skill on 3rd Hotkey
1135,Cutlas,Cutlus,5,20,,900,150,,1,0,0x000654E2,63,2,2,4,40,1,2,{ skill "SM_BASH",5; updatehotkey(1,"SM_BASH",5,1,1); bonus bStr,2; bonus bDef,1; },{},{} //Sets Bash Lv5 skill on 2nd Hotkey
The player must have the Skill or Item in order to show in the hotkey bar. The max hotkey positions depend on your server's MAX_HOTKEYS, the default for client versions above 2009-06-17 is 38. 38 = 9 skills x 4 bars & 2 Quickslots
Manual Download: hotkey_scripts.rar