Jump to content

Release: Hotkey Scripts


joecalis

Recommended Posts


  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  64
  • Reputation:   40
  • Joined:  03/26/12
  • Last Seen:  

*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

Edited by joecalis
Added manual download
  • Upvote 1
  • Love 2
  • Like 1
Link to comment
Share on other sites

  • 2 years later...

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  107
  • Reputation:   91
  • Joined:  01/19/12
  • Last Seen:  

I'm using this functions in my server, players can switch between 2 classes and now they recover the hot keys in each state.

Thanks, very useful.

Edited by Myzter
Link to comment
Share on other sites

  • 9 months later...

  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.11
  • Content Count:  349
  • Reputation:   12
  • Joined:  04/05/20
  • Last Seen:  

Does this script has revision for latest rathena version ?? Im getting error .. Thanks 

Quote

script.inc(141): error C2660: 'clif_hotkeys_send': function does not take 1 arguments

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...