Neues Sippenevent? Wer Vorschläge/Feedback zu Termin oder Inhalt hat, schreibt bitte in den betreffenden Thread. Oder bewegt eure Offis ein Event im Raidplaner zu erstellen, oder gibt es da eventuel schon ein Event was euch interessiert? Wen ja versucht es dauch aus:) Bis dann Hithu und Elarid

Hallo zusammen, die Webseite wird zum 16.02.2017 Down genommen so sich keiner mehr meldet. Dies gillt dann auch für den Raid-Planer und die Mail-Adresse. Falls Ihr die Webseite uä. erhalten wollt antwortet mir bitte im Forum! Viele Grüße Pethan

Sie sind nicht verbunden. Loggen Sie sich ein oder registrieren Sie sich

[Expert Guide]: Multiboxing library (e)

Vorheriges Thema anzeigen Nächstes Thema anzeigen Nach unten  Nachricht [Seite 1 von 1]

1 [Expert Guide]: Multiboxing library (e) am Mi Mai 09, 2012 10:56 pm

Tabac

avatar
Admin
Admin
Multiboxing

Multiboxing is a term used to refer to playing as multiple separate characters simultaneously. This can either be achieved by using multiple separate machines to run the game or by running multiple separate instances of the game. Multiboxing is done for several reasons. People may enjoy the additional challenge it can bring, as well as being able to tackle more difficult monsters by themselves. Sometimes it is a matter of convenience, having permanent access to a character that can buff, heal or resurrect the main character.

Overall, Multiboxing is a play style choice. Many people find the additional strategy of multiboxing to be very challenging and, with those additional efforts, very rewarding. Rather than require the collaboration and cooperation of multiple human players, people who multibox instead rely upon themselves to intelligently control multiple game characters and utilize their own cunning as a replacement for human cooperation.

As noted above in the term description, multiboxing is a game play style accepted by Turbine, Blizzard, SoE and other MMORPG vendors . The multiboxing solutions documented here do not violate the EULA for the Lord of the Rings game.

Introduction

Please find included a HKN library which is responsible for the button/panel handling and can be used in an existing or a new script. The library design was inspired by common programming language guidelines and was originally designed as a low-level "system engine" on top of which others could write own scripts. However, the library has since become a complete handling of buttons and is responsible for loading, disabling, handling, toggling and movement of the panel and the included buttons.

Note: The library is _not_ a working script. The code can be only used in new/existing scripts. However, there is an archive which includes a small script with the button library, icons and working sample configuration.

Functions
=======================================
- Handling of Multiboxing functions
- Loading and handling of Buttons
- HKN controls (Pause will disable HKN)
- "Slave system" controls (ScrollLock will send all commands to a slave)
- Panel movement (F12 will toggle the panel into the "movement" mode)

Image
=======================================


Usage (short version)
=======================================
1.) Include the library files into the new script
2.) Change the basic values in the UserConfig.txt file
3.) Init the system in the AutoExec command
4.) Define new buttons
5.) Add new hotkeys

Example for a "toggle spell" button
=======================================
1.) Create a new structure of the new script
- Create a new directory "myscript"
- Create new directories "Icons" and "modules" inside "myscript"

2.) Create a new script script.txt inside "myscript"
3.) Copy the library files into "myscript\modules"
4.) Copy the icons into "myscript\icons"


== CHANGES IN script.txt ==
5.) Define label and include the library files:

Code:
<IncludeFile YOUR_DIRECTORY:\myscript\modules\Initialization.txt>
<IncludeFile YOUR_DIRECTORY:\myscript\modules\UserConfig.txt>
<IncludeFile YOUR_DIRECTORY:\myscript\modules\ButtonHandling.txt>

6.) Create a new command "AutoExec" and init the system

Code:
<Command AutoExec>
   <InitSystemVariables>
   <InitUserVariables>
   <SetVar SystemState On>
   <InitButtonBars>

7.) Add a new hotkey

Code:
<Hotkey Ctrl Q>
<toggle>
   <setvar MySpell 2>
   <ApplyTemplate ToggleButton Spell2 ASpell>
   // HOTKEY ACTIONS
<toggle>
   <setvar MySpell 1>
   <ApplyTemplate ToggleButton ASpell ASpell2>
   // HOTKEY ACTIONS


== CHANGES IN UserConfig.txt ==

7.) Change the directory name
Code:
T:\hkn\Icons\ => YOUR_DIRECTORY\myscript\Icons\

8.) Change the panel size and position
Code:
 %1% 20 800 99 38 => %1% X_POS Y_POS X_SIZE Y_SIZE

9.) Add a new spell variable

Code:
<Command InitUserVariables>
   <setvar MySpell 1>

10.) Change the icon definition

Code:
<Template InitUserDefinedButtons>
<ApplyTemplate InitButtonOnP2 icon_spell1_0 SpellIcn 66 5 Ctrl Q>
<ApplyTemplate InitButtonOff icon_spell1_0_off SpellIcnOff 66 5>
<ApplyTemplate InitButtonOffP2 icon_spell1_1 SpellIcn2 66 5 Ctrl Q>
<ApplyTemplate InitButtonOff icon_spell1_1_off SpellIcn2Off 66 5>
<EndTemplate>

11.) Change the definition for "Stop"
Code:
<Template DisableAllButtons>
<ApplyTemplate DisableButton SpellIcn SpellIcn2 MySpell 1>
<EndTemplate>

12.) Change the definition for "Start"
Code:
<Template EnableAllButtons>
<ApplyTemplate EnableButton SpellIcn SpellIcn2 MySpell 1>
<EndTemplate>


== Functionality ==
You have created a new button inside a panel. If you click the new button or hit the hotkey <Ctrl Q>, the defined command will be executed and the icon will be changed to "icon_spell2". If you hit the "Pause" button the button will be grayed out. If you hit F12 all icons will be grayed out and you can move the panel.

The example and the module can be found here: This _IS_ a running script which can be used for test purposes. Please note that you have to change all directory definitions corresponding to "T:\hkn\" to your local directory: CHANGE UserConfig.txt

== Download ==
rapidshare.com hkn_buttonlib.rar


Library:
Code:

// ----------------------------------------------------------------------------
// Script Name: ButtonHandling.txt
// Creation Date: 10/02/2011
// Author: Tabac
//
// Various functions to initialize the button handling
// so that HotKeyNet can use them.
//
// ----------------------------------------------------------------------------
// Requires HotkeyNet build 208 or higher.
// For more info, go to www.hotkeynet.com
//-----------------------------------------------------------------------------


// Global button loader and handler
//*******************************************************************
<Template InitButtonOn>
   // par1 - icon_name without extention (e.g icon_off)
   // par2 - Button name (e.g. BStateOff)
   // par3 - X position (e.g. 10)
   // par4 - Y position (e.g. 100)
   
   <ApplyTemplate LoadIconImage %1% %2%>
   <AddButtonToPanel %2% Buttons %3% %4%>
   <TargetButton %2%>
   <ShowWin>
<EndTemplate>

<Template InitButtonOff>
   // par1 - icon_name without extention (e.g icon_off)
   // par2 - Button name (e.g. BStateOff)
   // par3 - X position (e.g. 10)
   // par4 - Y position (e.g. 100)

   <ApplyTemplate LoadIconImage %1% %2%>
   <AddButtonToPanel %2% Buttons %3% %4%>
   <TargetButton %2%>
   <HideWin>
<EndTemplate>


// Global image init functions
<Template InitButtonOnP1><ApplyTemplate InitButtonOn %1% %2% %3% %4%><SetButtonHotkey %2% Hotkey %5%><EndTemplate>
<Template InitButtonOffP1><ApplyTemplate InitButtonOff %1% %2% %3% %4%><SetButtonHotkey %2% Hotkey %5%><EndTemplate>
<Template InitButtonOnP2><ApplyTemplate InitButtonOn %1% %2% %3% %4%><SetButtonHotkey %2% Hotkey %5% %6%><EndTemplate>
<Template InitButtonOffP2><ApplyTemplate InitButtonOff %1% %2% %3% %4%><SetButtonHotkey %2% Hotkey %5% %6%><EndTemplate>
<Template InitButtonOnP3><ApplyTemplate InitButtonOn %1% %2% %3% %4%><SetButtonHotkey %2% Hotkey %5% %6% %7%><EndTemplate>
<Template InitButtonOffP3><ApplyTemplate InitButtonOff %1% %2% %3% %4%><SetButtonHotkey %2% Hotkey %5% %6% %7%><EndTemplate>
<Template InitButtonOnP4><ApplyTemplate InitButtonOn %1% %2% %3% %4%><SetButtonHotkey %2% Hotkey %5% %6% %7% %8%><EndTemplate>
<Template InitButtonOffP4><ApplyTemplate InitButtonOff %1% %2% %3% %4%><SetButtonHotkey %2% Hotkey %5% %6% %7% %8%><EndTemplate>


// Initialize the button structure and load the images
//*******************************************************************
<Command InitButtonBars>
//   <CreatePanel Buttons 20 1000 32 32>
   <ApplyTemplate CreateUserDefinedPanel Buttons>
   <ApplyTemplate CreatePanelBackground Buttons>
   <TargetWin Buttons>
   <AlwaysOnTop on>
   <RemoveWinFrame>
//   <SetPanelDrag off>

   // Panel head
   <ApplyTemplate InitButtonOnP1 panel_head BPAnelHead 0 0 F12>

   // Status buttons
   <ApplyTemplate InitButtonOffP1 icon_start BStateStart 0 5 Pause>
   <ApplyTemplate InitButtonOff icon_start_off BStateStartOff 0 5>
   <ApplyTemplate InitButtonOnP1 icon_stop BStateStop 0 5 Pause>
   <ApplyTemplate InitButtonOff icon_stop_off BStateStopOff 0 5>

   // Host indication
   <ApplyTemplate InitButtonOnP1 icon_mhost MasterHost 33 5 ScrollLock>
   <ApplyTemplate InitButtonOff icon_mhost_off MasterHostOff 33 5>
   <ApplyTemplate InitButtonOffP1 icon_shost SlaveHost 33 5 ScrollLock>
   <ApplyTemplate InitButtonOff icon_shost_off SlaveHostOff 33 5>

   // User defined buttons
   <ApplyTemplate InitUserDefinedButtons>


// Global button handler
//*******************************************************************
// Display a button: Hide Off and complementary buttons
<Template DisplayButton>
   // First parameter - enabled button name
   // Second parameter - disabled button name
   <TargetButton %1%><ShowWin>
   <TargetButton %1%Off><HideWin>
   <TargetButton %2%><HideWin>
   <TargetButton %2%Off><HideWin>
<EndTemplate>

// Disable a enabled button
<Template DisableButton>
   // param1 - enabled button name
   // param2 - disabled button name
   // param3 - condition
   // param4 - condition TRUE value
   <TargetButton %1%><HideWin>
   <TargetButton %2%><HideWin>

   <if %3% is %4%>
      <TargetButton %2%Off><HideWin>
      <TargetButton %1%Off><ShowWin>
   <Else>
      <TargetButton %1%Off><HideWin>
      <TargetButton %2%Off><ShowWin>
   <Endif>
<EndTemplate>

// Enable a disabled button
<Template EnableButton>
   // param1 - enabled button name
   // param2 - disabled button name
   // param3 - condition
   // param4 - condition TRUE value
   <if %3% is %4%>
      <TargetButton %1%><ShowWin>
   <Else>
      <TargetButton %2%><ShowWin>
   <Endif>

   <TargetButton %1%Off><HideWin>
   <TargetButton %2%Off><HideWin>
<EndTemplate>


// Toggle a button
<Template ToggleButton>
   // First parameter - enable
   // Second parameter - disable
   <TargetButton %1%><ShowWin>
   <TargetButton %2%><HideWin>
<EndTemplate>


// Toggle the power button and enable/disable the images
//*******************************************************************
<Hotkey Pause>
   <Toggle>
      <TurnHotkeysOff>
      <SetVar SystemState Off>
      <ApplyTemplate ToggleButton BStateStart BStateStop>
      <ApplyTemplate DisableButton MasterHost SlaveHost MasterState On>
      <ApplyTemplate DisableAllButtons>
   <Toggle>
      <TurnHotkeysOn>
      <SetVar SystemState On>
      <ApplyTemplate ToggleButton BStateStop BStateStart>
      <ApplyTemplate EnableButton MasterHost SlaveHost MasterState On>
      <ApplyTemplate EnableAllButtons>

// Second char contol and display
<Hotkey ScrollLock>
   <PassThrough>

   <Toggle>
      <ApplyTemplate ToggleButton SlaveHost MasterHost>      
      <SetVar MasterState Off>
   <Toggle>
      <ApplyTemplate ToggleButton MasterHost SlaveHost>
      <SetVar MasterState On>

// Panel movement
<Hotkey F12>
   <Toggle>
      <SetPanelDrag on>
      <ApplyTemplate DisableButton BStateStop BStateStart SystemState On>
      <ApplyTemplate DisableButton MasterHost SlaveHost MasterState On>
      <ApplyTemplate DisableAllButtons>
   <Toggle>
      <SetPanelDrag off>
      <ApplyTemplate EnableButton BStateStop BStateStart SystemState On>
      <ApplyTemplate EnableButton MasterHost SlaveHost MasterState On>
      <ApplyTemplate EnableAllButtons>

Configuration:

Code:

// ----------------------------------------------------------------------------
// Script Name: UserConfig.txt
// Creation Date: 10/02/2011
// Author: Tabac
//
// User defined variables and button definitions.
// NOTE: Change the directory which includes the icons data
//
// ----------------------------------------------------------------------------
// Requires HotkeyNet build 208 or higher.
// For more info, go to www.hotkeynet.com
//-----------------------------------------------------------------------------


//**********************************************************************
// FILESYSTEM VARIABLES
//**********************************************************************

//
// Change this line and set the proper icons directory
//**********************************************************************
<Template LoadIconImage>
   <CreatePictureButton %2% 0 0 "HKN_DIR\Icons\%1%.png">
<EndTemplate>
<Template CreatePanelBackground>
   <SetPanelPicture %1% "HKN_DIR\panel_bg.png">
<EndTemplate>


//**********************************************************************
// BUTTON VARIABLES
//**********************************************************************

//
// Change here the size of the panel. Don't remove the %1%
// Values: X-Pos, Y-Pos, X-Size, Y-Size
//**********************************************************************
<Template CreateUserDefinedPanel>
   <CreatePanel %1% 20 800 99 38>
<EndTemplate>


// User defined variables for icons
// (every icons should have a corresponding variable)
//**********************************************************************
<Command InitUserVariables>
   <setvar Movement Run>           // Movement indicator
   <setvar MySpell 1>           // Spell rotation

//
// Add here all buttons that should be loaded during the HKN init
//**********************************************************************
<Template InitUserDefinedButtons>
   // Usage: <ApplyTemplate FUNCTION_NR_OF_ARGS ICON_FILENAME_W/O_PNG ICON_NAME X_POS Y_POS HOTKEY(S)>
<EndTemplate>

//
// Add here all buttons that should be disabled with the "Stop" button
//**********************************************************************
<Template DisableAllButtons>
   // Usage: <ApplyTemplate DisableButton FirstButtonName SecondButtonName true_Variable true_condition>
<EndTemplate>

//
// Add here all buttons that should be enabled with the "Start" button
//**********************************************************************
<Template EnableAllButtons>
   // Usage: <ApplyTemplate EnableButton FirstButtonName SecondButtonName true_Variable true_condition>
<EndTemplate>

Vorheriges Thema anzeigen Nächstes Thema anzeigen Nach oben  Nachricht [Seite 1 von 1]

Befugnisse in diesem Forum
Sie können in diesem Forum nicht antworten