Author Topic: SuperSlayer's Balm & Lotion Chugger  (Read 2089 times)

0 Members and 1 Guest are viewing this topic.

Offline SuperslayerTopic starter

  • Elite
  • *
  • *
  • Posts: 1006
  • Activity:
    0%
  • Reputation Power: 14
  • Superslayer barely matters.Superslayer barely matters.
  • Gender: Male
  • Well what do you drink? Not tea.
  • Respect: +43
  • Referrals: 0
    • View Profile
SuperSlayer's Balm & Lotion Chugger
« on: September 26, 2010, 09:06:38 PM »
0
Hey all, been a while since I tossed up a script for testing and whatnot (excluding the Elite scripts) but here's one I think can be useful when you're doing a champ spawn.

This script will, at your command, use a balm/lotion!  How simple! The fun part is, you can use this script by hitting the buttons associated with the balm/lotion, or set them to a hotkey!

This is probably the sloppiest script I've ever written and posted, but it's quite early in it's development, so if you were to look through the code, you'd see lots of area's not yet implemented or used.

There is a menu for the user to interact with either by setting the hotkeys, or simply pressing the button when you want to use a lotion. To set a hotkey, enter the key in the fieldbox under the balm name, and press the 'set' button below that.  If you make a mistake i.e., wrong key, please stop the script and start over. The Edit feature isn't ready yet. When you're ready to go to the fight, press the 'GO' button and the script will be ready for your input. Press the 'Stop' button as desired.  So go ahead and take a crack at it!

Code: [Select]
; Script Name: SuperSlayer's Balm & Lotion Chugger
; Author: SuperSlayer
; Version: 1.0 Beta
; Client Tested with: 7.0.8.2 (Patch 95)
; EUO version tested with: 1.5 v176
; Razor Version tested with : 1.0.12.8
; Shard: OSI
; Beta Release: 9-26-10
; Purpose: Use potion/balm/lotion

; Find me at ScriptUO.com !
; =========================================

; information about the balms and lotions: http://www.uoguide.com/Monster_Stealables

; Accepted hotkeys:
; A_B_C_D_E_F_G_H_I_J_K_L_M_N_O_P_Q_R_S_T_U_V_W_X_Y_Z_0_1_2_3_4_5_6_7_8_9_
; F1_F2_F3_F4_F5_F6_F7_F8_F9_F10_F11_F12_
; ESC_BACK_TAB_ENTER_PAUSE_CAPSLOCK_SPACE_PGDN_PGUP_END_HOME_LEFT_RIGHT_UP_DOWN_PRNSCR_INSERT_DELETE_NUMLOCK_SCROLLLOCK

set %Lspc #spc , #spc , #spc , #spc , #spc
set %Sspc #spc , #spc , #spc
set %index 0

menu Clear
;menu Font Size 8
menu Window Title SS's Beta 1.0 Balm & Lotion for #charname
menu Window Size 450 130
menu Font Name MS Sans Serif
menu text Row1 10 10 Seed #spc #spc Mana %Sspc Balm of %Sspc  Balm of %Sspc #spc Life #spc Balm of #spc Stone #spc Balm of
menu text Row2 8 27 of Life #spc Draught #spc Strength #spc  Wisdom #spc Lotion #spc Swift %Lspc Skin %Sspc Protect
menu Button U_NWI 10 45 30 30 Sol
menu Button U_HZF 58 45 30 30 MDr
menu Button U_LPF 115 45 30 30 BoS
menu Button U_RCJ 175 45 30 30 BoW
menu Button U_GPF 225 45 30 30 LsL
menu Button U_CDJ 270 45 30 30 BSw
menu Button U_FPF 315 45 30 30 SSL
menu Button U_OTK 365 45 30 30 BoP
menu Edit NWI 12 80 25
menu Edit HZF 58 80 25
menu Edit LPF 115 80 25
menu Edit RCJ 175 80 25
menu Edit GPF 225 80 25
menu Edit CDJ 270 80 25
menu Edit FPF 315 80 25
menu Edit OTK 365 80 25
menu Button S_NWI 10 110 30 15 Set
menu Button S_HZF 58 110 30 15 Set
menu Button S_LPF 115 110 30 15 Set
menu Button S_RCJ 175 110 30 15 Set
menu Button S_GPF 225 110 30 15 Set
menu Button S_CDJ 270 110 30 15 Set
menu Button S_FPF 315 110 30 15 Set
menu Button S_OTK 365 110 30 15 Set
menu Button Go 415 50 30 30 Go
menu show 250 250

set #menubutton N/A
repeat
  if #menubutton <> N/A && S_ in #menubutton
  {   ; use lotion with hotkey
    set %index %index + 1
    set %cnt %index
    str del #menubutton 1 2
    menu get #strres
    set %bindkey . %index #menures , _ , #strres
    ;  menu set S_ , #strres Edit
    set #menubutton N/A
  }
until #menubutton = Go
menu set Go Stop
set #menubutton N/A

set #lpc 100
while #clilogged = 1
{
  if %index > 0
  {
    for %index 1 %cnt
    {         ; using lotions/balms with hotkey
      str pos %bindkey . %index _
      str del %bindkey . %index #strres 10
      onhotkey #strres
      {
        str pos %bindkey . %index _
        str del %bindkey . %index 1 #strres
        finditem #strres C_ , #backpackid
        if #findcnt = 0
          gosub something
        else
        {
          set #lobjectid #findid
          event macro 17 0
          wait 10
         ; gosub check_replace_gump
        }
      }
    }
  }
  if #menubutton <> N/A && S_ notin #menubutton
  {  ; when use lotion button is pressed
    finditem #menubutton C_ , #backpackid
    if #findcnt = 0
      gosub something
    else
    {
      set #lobjectid #findid
      event macro 17 0
      set #menubutton N/A
      wait 10
     ; gosub check_replace_gump
    }
  }
  if #menubutton = GO
    stop
}

sub something

Return


sub check_replace_gump
  if #contsize = 291_99
  {
    gosub OffsetClick 20 85 ; cancel
    gosub OffsetClick 230 84 ; OK
  }
Return


Sub OffsetClick
  set %tempx %1 + #CONTPOSX
  set %tempy %2 + #CONTPOSY
  click %tempx %tempy %3 %4 %5 %6
Return

Tags: Balm Lotion