|
Script Summary:
Enables keypresses for Pardus screens Version: 1.8 |
This script has no discussions. |
This script has no reviews. |
Approval Status
APPROVED by the Pardus Admins!Description
This script allows a user to map key presses to actions in Pardus.Keypresses are not captured for the following screens: CHAT NEWS DIPLOMACY HACK BOUNTY_BOARD MYALLIANCE FORUM
//default Key Bindings
KEY_C[0] = COLLECT;
KEY_D[0] = DIPLOMACY;
KEY_F[0] = FILL_UP_TANK;
KEY_H[0] = HACK;
KEY_J[0] = JOBS;
KEY_L[0] = DEFAULT_ACTION; //[L]ands on Planet, SB, or Building
KEY_M[0] = MESSAGES;
KEY_N[0] = NAV;
KEY_O[0] = OVERVIEW;
KEY_P[0] = OPTIONS;
KEY_S[0] = STATISTICS;
KEY_T[0] = CALCULATED_TRADE;
KEY_W[0] = NEWS;
KEY_BACKTICK[0] = ENABLE_DISABLE;
//menu.php Key Bindings
KEY_B[1] = BULLETIN_BOARD;
KEY_D[1] = DIPLOMACY;
KEY_E[1] = SHIP_EQUIPMENT;
KEY_F[1] = FILL_UP_TANK;
KEY_M[1] = MESSAGES;
KEY_O[1] = OVERVIEW;
KEY_P[1] = OPTIONS;
KEY_S[1] = STATISTICS;
KEY_T[1] = CALCULATED_TRADE;
KEY_W[1] = warp or NEWS;
//*trade.php Key Bindings
KEY_D[2] = DEACTIVATE_MAG;
KEY_M[2] = ACTIVATE_MAG;
KEY_N[2] = NAV;
KEY_T[2] = 'js:submitForm("' + CALCULATED_TRADE_FORM + '")';
//combat.php Key Bindings
KEY_R[3] = CLICK_FIRST_BUTTON;
KEY_A[3] = Use [ROBOTS_AMT1] Robots (Default = 1)
KEY_S[3] = Use [ROBOTS_AMT2] Robots (Default = 2)
KEY_D[3] = Use [ROBOTS_AMT3] Robots (Default = 5)
KEY_F[3] = Use [ROBOTS_AMT4] Robots (Default = 10)
KEY_G[3] = Use [ROBOTS_AMT5] Robots (Default = 25)
KEY_Z[3] = Use [DRUGS_AMT1] Drugs (Default = 1)
KEY_X[3] = Use [DRUGS_AMT2] Drugs (Default = 2)
KEY_C[3] = Use [DRUGS_AMT3] Drugs (Default = 3)
KEY_V[3] = Use [DRUGS_AMT4] Drugs (Default = 4)
KEY_B[3] = Use [DRUGS_AMT5] Drugs (Default = 5)
if(premium_user) {
KEY_1[3] = 'js:clickButton("button1")';
KEY_2[3] = 'js:clickButton("button2")';
KEY_3[3] = 'js:clickButton("button3")';
KEY_4[3] = 'js:clickButton("button4")';
KEY_5[3] = 'js:clickButton("button5")';
}
//ship_equipment.php Key Bindings
KEY_P[4] = PLANET_MENU;
KEY_R[4] = 'js:clickButton("Repair all")';
Version 0.5
This is a BETA version. Though I'm confident it won't screw you up at all, I haven't done a great amount of testing, and the actions that can be mapped are minimal. In this version, you can set keys to perform separate actions for the Main/Nav page, the Trade pages, and the Combat screen. See the description for the default-mapped keys.Version 0.8
This is still a BETA version of the script. I changed the method of finding the type of tile a ship is on to accommodate non-premium users.Version 0.9
This is still a BETA version of the script. Added the ability to map a key to enable and disable Keyboard Actions. This allows you to type on a page without triggering actions. By default, this action is mapped to the Backtick key (`) (not to be confused with the Apostrophe ('))Version 0.10
This is still a BETA version of the script. The cookie handling was changed to use GreaseMonkey values instead of cookies.Version 1.0
The script is NO LONGER beta. I've added default keys for pages that are not specified, and changed some default keys.Version 1.1
Added support for premium users -- on combat screen, numbers 1-5 will process the number of combat rounds associated with your quick-link buttons. If you are a premium user, edit the top of the script and change the "premium_user = false;" to "premium_user = true;"Also changed/added some defaults.
Version 1.2
Added a new Default Key -- 'L' will Land on a Planet, SB, or Building when you are on one of those tiles.Version 1.2.1
The Main Screen is now given the Focus when a page loads. This means that you no longer have to click the main nav screen for keypresses to work.Version 1.2.2
Keypresses are no longer captured if on the Chat screen.Version 1.2.3
Keypresses are no longer captured if on the following screens:NEWS
DIPLOMACY
HACK
BOUNTY_BOARD
MYALLIANCE
Version 1.3
Version 1.3 Changes:- Bugfix: Keypresses are no longer captured on the Diplomacy page
- Keypresses are no longer captured on the Forum pages
- On the Combat Page: Keypresses are disabled when the "Use Robots" or "Use Drugs" textboxes get the focus, and are re-enabled when the focus is lost.
Version 1.3.1
Keypresses are disabled when a textbox gets the focus an re-enabled when focus is lost on all screens except trade screens.Version 1.4
Removed code that was supposed to provide persistence of enable/disable button (backtick) since it caused other bugs and didn't work.Version 1.5
Updated script to work with new variable-sized nav grids.Version 1.6
Updated script -- On the Nav screen, the 'K' key will now Cloak *and* uncloak.Version 1.7
Updated script:On the Combat screen, the 'A', 'S', 'D', 'F', and 'G' keys will use robots (default amounts are A = 1t, S = 2t, D = 5t, F = 10t, G = 25t)
Also on the Combat screen, the 'Z', 'X', 'C', 'V', and 'B' keys use Drugs (default amounts are Z = 1t, X = 2t, C = 3t, V = 4t, and B = 5t)
This can be disabled by changing:
var enableRobotButtons = true;
var enableDrugButtons = true;
to
var enableRobotButtons = false;
var enableDrugButtons = false;





