Changes

Jump to navigation Jump to search

Client Key Bindings

5,102 bytes removed, 09:20, 14 December 2009
you don't delete the page; you redirect, which is what you partially did
#redirect[[Category:Technical Details]]==Introduction== The autorun.bsh fine defines the key bindings used by Wurm. The file should be in the directory you specified when you ran wurm for the first time. This is the directory containing the packs directory. Everything in the autorun.bsh file will be automatically executed when Wurm is started. If you ever mess up this file and need to reset it to the default values, just delete it and restart wurm. ==How to bind a command to a key== Open the autorun.bsh in your favorite text editer. Add a line in the following format:keys.bind(<key event>, "<command>");where <key event> is the key event and <command> is the command as defined below. for example:keys.bind(KeyEvent.VK_BACK_SPACE, "wurm.rebuildTextures()"); ==Wurm Commands==<font color="#FF0000">===Weather [OUTDATED]===* weather.bolt()* weather.showConsole()</font> ===Renderer===* renderer.dumpPerf()* renderer.lock() * renderer.rebuildTextures()* renderer.screenshot()* renderer.toggleHud()* renderer.toggleTorch() ===Console===* console.toggle()* console.toggleFullscreen()  ===In-Game Windows===* wurm.showInventory()* wurm.showSkills() ===Wurm Movement Commands===* wurm.toggleWalkProtection() Note that although these are called Keys they are actually commands. * Keys.KEY_MOVE_FRONT* Keys.KEY_MOVE_LEFT* Keys.KEY_MOVE_BACK* Keys.KEY_MOVE_RIGHT* Keys.KEY_TURN_LEFT* Keys.KEY_TURN_RIGHT* Keys.KEY_AUTO_RUN* Keys.KEY_CENTER_VIEW* Keys.KEY_STRAFE* Keys.KEY_TURN_UP* Keys.KEY_TURN_DOWN  ==Key events=====Letter keys===KeyEvent.VK_A ... KeyEvent.VK_Z ===Function keys===KeyEvent.VK_F1 ... KeyEvent.VK_F12 ===Arrow keys===* KeyEvent.VK_UP* KeyEvent.VK_DOWN* KeyEvent.VK_LEFT* KeyEvent.VK_RIGHT ===Other keys===* KeyEvent.VK_BACK_SPACE* KeyEvent.VK_END* KeyEvent.VK_INSERT* KeyEvent.VK_PAGE_UP* KeyEvent.VK_PAGE_DOWN ==Miscellaneous== From a comment in the wurm forums: For those of you having problems with textures getting broken: When 1.0.5a comes out, add the following to your autorun.bsh: keys.bind(KeyEvent.VK_BACK_SPACE, "wurm.rebuildTextures()"); that way you can press backspace to force all textures to get rebuilt ==Sample autorun.bsh==<pre>/** * Everything in this file will be automatically executed when Wurm is started. * If you ever mess up this file and need to reset it to the default values, * just delete it and restart wurm. */ import com.wurmonline.client.api.*; System.out.println("Running autorun.bsh");  // WASD movement keys.bind(KeyEvent.VK_W, Keys.KEY_MOVE_FRONT);keys.bind(KeyEvent.VK_A, Keys.KEY_MOVE_LEFT);keys.bind(KeyEvent.VK_S, Keys.KEY_MOVE_BACK);keys.bind(KeyEvent.VK_D, Keys.KEY_MOVE_RIGHT);keys.bind(KeyEvent.VK_Q, Keys.KEY_TURN_LEFT);keys.bind(KeyEvent.VK_E, Keys.KEY_TURN_RIGHT);keys.bind(KeyEvent.VK_X, Keys.KEY_AUTO_RUN);keys.bind(KeyEvent.VK_C, Keys.KEY_CENTER_VIEW); // Numpad/arrow movement keys.bind(KeyEvent.VK_UP, Keys.KEY_MOVE_FRONT);keys.bind(KeyEvent.VK_DOWN, Keys.KEY_MOVE_BACK);keys.bind(KeyEvent.VK_LEFT, Keys.KEY_TURN_LEFT);keys.bind(KeyEvent.VK_RIGHT, Keys.KEY_TURN_RIGHT);keys.bind(KeyEvent.VK_PAGE_UP, Keys.KEY_AUTO_RUN);keys.bind(KeyEvent.VK_PAGE_DOWN, Keys.KEY_CENTER_VIEW);keys.bind(KeyEvent.VK_HOME, Keys.KEY_TURN_UP);keys.bind(KeyEvent.VK_END, Keys.KEY_TURN_DOWN);keys.bind(KeyEvent.VK_INSERT, Keys.KEY_STRAFE); // For those of you having problems with textures getting broken:// you can press F7 to force all textures to get rebuiltkeys.bind(KeyEvent.VK_F7, "renderer.rebuildTextures()"); keys.bind(KeyEvent.VK_B, "weather.bolt()");keys.bind(KeyEvent.VK_F8, "console.toggleFullscreen()");keys.bind(KeyEvent.VK_F9, "weather.showConsole()");keys.bind(KeyEvent.VK_F10, "renderer.toggleHud()");keys.bind(KeyEvent.VK_F11, "renderer.screenshot()");</pre> ==New Bind file == <pre>// If you ever manage to mess up this file, just delete it, and wurm with// replace it with a new one.   // Default movement keys. Allows both WASD and arrow key movement// You can bind these keys to any KeyEvent.VK_* key// (see http://java.sun.com/j2se/1.4.2/docs/api/java/awt/event/KeyEvent.html)bind w move_forwardbind s move_backbind a move_leftbind d move_rightbind q turn_leftbind e turn_rightbind x autorunbind z center_view bind up move_forwardbind down move_backbind left turn_leftbind right turn_rightbind page_up autorunbind page_down center_viewbind insert strafebind home turn_upbind end turn_down bind numpad8 move_forwardbind numpad2 move_backbind numpad4 turn_leftbind numpad6 turn_rightbind numpad9 autorunbind numpad3 center_viewbind numpad0 strafebind numpad7 turn_upbind numpad1 turn_down // Misc keysbind enter toggle_chatbind t toggle_chatbind tab next_tabbind f12 "quit" // Window togglesbind f1 "toggle console"bind f2 "toggle skills"bind f3 "toggle inventory" // Some various toggles we want to enabletoggle keyboard_hints// toggle stats ==little tips == ok heres my little top addbind i "toggle inventory"bind c "toggle skills"</pre>to autorun so you can use i for inventory etc much easier than using the f keys :)]
1,465

edits

Navigation menu