Spell Bar / Tool bar

Discussion about the technical aspects of scripting. Ask about all issues involving your freelance projects here.
Locked
lestatzero
Legendary Scribe
Posts: 427
Joined: Sun Mar 18, 2012 7:37 pm

Spell Bar / Tool bar

Post by lestatzero »

Hello everyone,

I have made a rather useful script here that may help a lot of people when it comes
to casting spells.

This Script has a Majority of the Mage spells as well as all of the Necro spells
A few Chiv spells / Druid spells / Cleric spells and some other helpful Skills

All Tucked away in a rather Neat Menu bar that can fit at the top or bottom of your screen.

The script is customizable if needed but you will have to do some manual coding to make
the changes you are looking for.

The Color scheme is also changable.

Current Version 1.4 ...
  • Updates to come
[*]Adding a Feature to choose between Horazontal or Vertical
[*]Adding a Set of Variables at the begning of the script to change Color scheme quickley
[*]Edit the clear menu buttons section to clear menu buttons quicker as well as
[*]add all spells automatically so that if you want to edit the spell choices
[*]all you have to do is edit your choices
Your comments mean something.

Comments help me to make other updates and such to make the script work even better.
So please do post all comments both positive and negative to better assist me in making this script better.

Lestat A. Zero


*** Current version 1.6 made some edits ***
Fixed some spelling errors
Added another static row of buttons 3rd row for targets prmary secondary claim

Another fix .. to the claim / claim all subs

Code: Select all

;;****************************************************************;;
;;                                                                ;;
;; Lestat A. Zero's Spell Casting Bar                             ;;
;; Version 1.5 02/23/14                                           ;;
;; Easyuo Version 1.5 Build 236                                   ;;
;; Based on Configuration for Excelsior Shard                     ;;
;; Base Script By: Talon Rhein                                    ;;
;; Claim and Claimall Scripts by: Blaze Bunny                     ;;
;;                                                                ;;
;;****************************************************************;;

;;************************************************;;
;; Main Features  ( small Menu size )             ;;
;; base menu size is 9 x 2 for spell window       ;;
;; Menus are magery Druid/cleric                  ;;
;;           Necro  Chiv/Skills                   ;;
;; L/T = Last Target T/S = Target Self            ;;
;; Menu selections will prompt differnet colors   ;;
;;************************************************;;

;;****************************************************************;;
;;                                                                ;;
;; Sub Menus Give you A list of most common Mage spells           ;;
;; All of the Necro Spells                                        ;;
;; Most common Chiv Spells                                        ;;
;; Most Common Druid spells and Cleric Spells                     ;;
;; Most Common Skills used                                        ;;
;;                                                                ;;
;;****************************************************************;;

set %pathfind #true ;#true for pathfinding, set to #false to not pathfind (used in claim and claimall)
set %userrange 6 ;enter number 1-9 for how many tiles away you want claim script to look

menu Clear
   menu Clear
   menu Window Title Lestat's Spell Casting Bar
   menu Window Color Black
   menu Window Size 910 65
   menu Font Transparent #true
   menu Font Align Right
   menu Font Name MS Sans Serif
   menu Font Size 8
   menu Font Style
   menu Font Color WindowText
   menu Font BGColor Green
   menu Button MMenu1 2 4 70 20 Magery
   menu Button MMenu2 2 24 70 20 Necro
   menu Button MMenu3 74 4 70 20 Druid/Cleric
   menu Button MMenu4 74 24 70 20 Chiv/Skills
   menu Font BGColor Red
   menu Button MMenuTargetMonster 2 46  70 20 Last target
   menu Font BGColor $ffcc99
   menu Button MMenuTargetSelf 74 46 70 20 Target self
   menu Font BGColor $0066ff
   menu Button MMenuPrimary 168 46 70 20 Primary
   menu Button MMenuSecondary 242 46 70 20 Secondary
   menu Font BGColor $0033CC
   menu Button MMenuClaimS 400 46 90 20 Claim (once)
   menu Font BGColor $9933FF
   menu Button MMenuClaim_loop 495 46 90 20 Claim (loop)
   menu Font BGColor $0033CC
   menu Button MMenuClaimallS 590 46 90 20 ClaimALL (once)
   menu Font BGColor $9933FF
   menu Button MMenuClaimall_loop 685 46 90 20 ClaimALL (loop)
   menu Show 47 608
  Set #menubutton n/a

     mainLoop:
if #menubutton <> n/a
  {
     if MMenu in #menubutton
     {
        gosub #menubutton  ;opens sub menu
     }

     ;else if ( CLOSE in #menubutton )  ;; Checks if you pressed the X Close button
     ;{
      ;    event sysMessage Closing Spell Bar
       ;   Wait 20
        ;  Halt
     ;}

     else
     {
        gosub castSpell #menubutton
     }
     set #menubutton n/a
  }
  wait 5
  goto mainLoop

;;**********************************************************************;;
;;**********************************************************************;;
;; Here is where you can change what spells are displayed and used.     ;;
;; To change them, follow this example:                                 ;;
;; Let;s change Create Food to Earthquake.                              ;;
;; First, replace the text "Create Food" to "Earthquake" (w/o quotes).  ;;
;; Then, after the word "button" put the text that would come after [cs ;;
;; so for this example, after the word "button" replace "createfood"    ;;
;; with "earthquake" (without the quotes)                               ;;
;; That's all there is to do to change the spells.  Very easy, huh? =D  ;;
;; DO NOT CHANGE ANY OF THE NUMBERS.                                    ;;
;; Make sure you note down those spells you change as you will have to  ;;
;; Go down to the Clearscreen section to make sure you clear those      ;;
;; buttons out if they are not already listed in that sub               ;;
;;**********************************************************************;;
;;**********************************************************************;;
sub MMenu1    ;mage

{
     gosub Clearscreen
     menu Font BGColor Yellow
     menu Button Bless 168 4 70 20 Bless
     menu Button Protection 242 4 70 20 Protection
     menu Button Strength 316 4 70 20 Strength
     menu Button Reveal 390 4 70 20 Reveal
     menu Button Telekinesis 464 4 70 20 Telekinesis
     menu Button Teleport 538 4 70 20 Teleport
     menu Button Mark 612 4 70 20 Mark
     menu Button Recall 686 4 70 20 Protection
     menu Button GateTravel 760 4 70 20 Gate
     menu Font BGColor White
     menu Button EnergyBolt 834 4 70 20 E-bolt
     menu Button Clumsy 168 24 70 20 Clumsy
     menu Button Paralyze 242 24 70 20 Paralyze
     menu Button ParalyzeField 316 24 70 20 Paralyze(F)
     menu Button Poison 390 24 70 20 Poison
     menu Button PoisonField 464 24 70 20 Poison (F)
     menu Button Lightning 538 24 70 20 Lightning
     menu Button FlameStrike 612 24 70 20 Flame Strike
     menu Button WallOfStone 686 24 70 20 Wall of Stone
     menu Button Curse 760 24 70 20 Curse
     menu Button Fireball 834 24 70 20 Fireball
     return
}

sub MMenu2  ;necro
{
     gosub Clearscreen
     menu Font BGColor $1d81e1
     menu Button AnimateDead 168 4 70 20 Animate Dead
     menu Button BloodOath 242 4 70 20 Blood Oath
     menu Button CorpseSkin 316 4 70 20 Corpse Skin
     menu Button CurseWeapon 390 4 70 20 Curse Weapon
     menu Button EvilOmen 464 4 70 20 Evil Omen
     menu Button HorrificBeast 538 4 70 20 Hor Beast
     menu Button LichForm 612 4 70 20 Lich Form
     menu Button MindRot 686 4 70 20 Mind Rot
     menu Font BGColor $3c4ce7
     menu Button PainSpike 168 24 70 20 Pain Spike
     menu Button PoisonStrike 242 24 70 20 Poison Strike
     menu Button Strangle 316 24 70 20 Strangle
     menu Button SummonFamiliar 390 24 70 20 S Familia
     menu Button VampiricEmbrace 464 24 70 20 Vamp Emb
     menu Button VengefulSpirit 538 24 70 20 Veng Spirit
     menu Button Wither 612 24 70 20 Wither
     menu Button WraithForm 686 24 70 20 Wraith Form
     return
}
sub MMenu3   ;Druid/cleric
{
     gosub Clearscreen
     menu Font BGColor $3ec68c  ;Top Menu
     menu Button touchoflife 168 4 70 20 T O L
     menu Button Purge 242 4 70 20 Purge
     menu Button Restoration 316 4 70 20 Restoration
     menu Button AngelicFaith 390 4 70 20 Angelic Faith
     menu Button dampenspirit 464 4 70 20 Dampen Spirit
     menu Button Sacredboon 538 4 70 20 Sacred Boon
     menu Button Smite 612 4 70 20 Smite
     menu Button TrialByFire 686 4 70 20 Trial B F
     menu Font BGColor $b17796      ; Bottom Menu
     menu Button Enchantedgrove 168 24 70 20 Enc Grove
     menu Button Volcaniceruption 242 24 70 20 Volc Erup
     menu Button StoneCircle 316 24 70 20 Stone Circle
     menu Button RestorativeSoil 390 24 70 20 Rez Soil
     menu Button Swarmofinsects 464 24 70 20 Swarm of I
     menu Button Shieldofearth 538 24 70 20 Shield O E
     menu Button Graspingroots 612 24 70 20 Grasp Root
     menu Button NaturesPassage 686 24 70 20 Nature's Pass
     menu Button MushroomGateway 760 24 70 20 Mush Gate
     return
}
sub MMenu4 ;Chiv / Skills
{
     gosub Clearscreen
     menu Font BGColor $0099CC   ;Chiv
     menu Button consecrateweapon 168 4 70 20 Consecrate
     menu Button DivineFury 242 4 70 20 Divine Fury
     menu Button Enemyofone 316 4 70 20 Enemy 1


     menu Font BGColor $7da1a1      ;skills
     menu Button MMenuHiding 168 24 70 20 Hiding
     menu Button MMenuTracking 242 24 70 20 Tracking
     menu Button MMenuPeace 316 24 70 20 Peace
     menu Button MMenuDisco 390 24 70 20 Disco
     menu Button MMenuProvoke 464 24 70 20 Provoke
     menu Button MMenuDetect 538 24 70 20 Detect H
     menu Button MMenuLore 612 24 70 20 Animal L
     menu Button MMenuMed 686 24 70 20 Meditate

     return
}
sub castSpell
{
      msg $
      msg [cs %1 $
      set #menubutton n/a
      return
}

;;***************************************************************************************;;
;;***************************************************************************************;;
;; Here is where you will need to edit the clear menu screen for thos spells you changed ;;
;; YOu have to make sure this menu clear matches the order of each sub abov              ;;
; for the menu options to make sure older menus do not appiear ontop of                  ;;
;; newer menus                                                                           ;;
;;                                                                                       ;;
;;***************************************************************************************;;
;;***************************************************************************************;;

 Sub Clearscreen
 {
     menu Delete Bless            ;start Mage Menu Clear
     menu Delete Protection
     menu Delete Strength
     menu Delete Reveal
     menu Delete EnergyBolt
     menu Delete Teleport
     menu Delete Mark
     menu Delete Recall
     menu Delete GateTravel
     menu Delete Telekinesis
     menu Delete Clumsy
     menu Delete Paralyze
     menu Delete ParalyzeField
     menu Delete Poison
     menu Delete PoisonField
     menu Delete Lightning
     menu Delete FlameStrike
     menu Delete WallOfStone
     menu Delete Curse
     menu Delete Fireball
     menu Delete AnimateDead  ;Start Necro menu clear
     menu Delete BloodOath
     menu Delete CorpseSkin
     menu Delete CurseWeapon
     menu Delete EvilOmen
     menu Delete HorrificBeast
     menu Delete LichForm
     menu Delete MindRot
     menu Delete PainSpike
     menu Delete PoisonStrike
     menu Delete Strangle
     menu Delete SummonFamiliar
     menu Delete VampiricEmbrace
     menu Delete VengefulSpirit
     menu Delete Wither
     menu Delete WraithForm
     menu Delete touchoflife    ;Start of Druid/Claric Menu Clearing
     menu Delete Purge
     menu Delete Restoration
     menu Delete AngelicFaith
     menu Delete dampenspirit
     menu Delete Sacredboon
     menu Delete Smite
     menu Delete TrialByFire
     menu Delete EnchantedGrove
     menu Delete Volcaniceruption
     menu Delete StoneCircle
     menu Delete RestorativeSoil
     menu Delete Swarmofinsects
     menu Delete Shieldofearth
     menu Delete Graspingroots
     menu Delete NaturesPassage
     menu Delete MushroomGateway
     menu Delete consecrateweapon ;Start of Chiv/skills menu clearing
     menu Delete DivineFury
     menu Delete Enemyofone
     ;menu Delete MMenuClaimS
    ; menu Delete MMenuClaim_loop
     ;menu Delete MMenuClaimallS
    ; menu Delete MMenuClaimall_loop
	   menu Delete MMenuHiding
     menu Delete MMenuTracking
     menu Delete MMenuPeace
     menu Delete MMenuDisco
     menu Delete MMenuProvoke
     menu Delete MMenuDetect
     menu Delete MMenuLore
     menu Delete MMenuMed

     return
 }
 
sub MMenuHiding
{
     _Setup_ReHide
      EVENT macro 13 21
      _Setup_ScanJournal:
      SCANJOURNAL 1
      IF hidden_yourself_well in #JOURNAL
         GOTO _Setup_DoneHiding
      WAIT 10s
      GOTO _Setup_ReHide
      _Setup_DoneHiding:
      return
}
sub MMenuTargetSelf
{
      event Macro 23 0
      event sysMessage Targeting Self
      return
}
sub MMenutracking
{
    event macro 13 38
    return
}
sub MMenupeace
{
    event macro 13 9
    return
}
sub MMenudisco
{
    event macro 13 15
    return
}
sub MMenuprovoke
{
    event macro 13 22
    return
}
sub MMenudetect
{
    event macro 13 14
    return
}
sub MMenulore
{
    event macro 13 2
    return
}
sub MMenumed
{
   event macro 13 46
   return
}
sub MMenuTargetMonster
{
     event macro 22 0
     event sysMessage Targeting Last Target
     return
}
sub MMenuClaimS
{
   event sysMessage Claim Single Target
   msg [claim $
   return
}
sub MMenuClaimAllS
{
   event sysMessage ClaimALL Single Target
   msg [claimall $
   return
}
sub MMenuPrimary
{
  event macro 35 0
  return
}
sub MMenuSecondary
{
   event macro 36 0
   return
}
;;***********************;;
;; Claim Loop            ;;
;;***********************;;
sub MMenuClaim_loop

set #menubutton N/A
event sysMessage Claim loop running
menu delete MMenuclaim_loop
menu Font BGColor red
menu Font Style b
menu Button MMenuStopClaiming 495 46 90 20 Stop!
set %claimall #false
    gosub findCorpse
    return
;;***********************;;
;; Claim All Loop        ;;
;;***********************;;
sub MMenuClaimAll_loop

set #menubutton N/A
event sysMessage ClaimAll Loop Running !
menu delete MMenuclaimall_loop
menu Font BGColor red
menu Font Style b
menu Button MMenuStopClaimAll 685 46 90 20 Stop!

set %claimall #true
    gosub findCorpse
    return


;;***********************;;
;; Find corpse           ;;
;;***********************;;

sub findCorpse
{
    set %claim Tango
        for %range 1 %userrange
         {
          findItem YFM G_ , %range
          if #findKind > 0
           gosub claim
         }
         target
         key esc
         set %claim done
         if %claimall = #false
         {
         gosub MMenuStopClaiming
         }
         if %claimall = #true
         {
         gosub MMenuStopClaimall
         }
         return
}

;;***********************;;
;; Claim                 ;;
;;***********************;;

sub claim
{
    set #lTargetID #findID
    set #lTargetKind 1
    gosub ClaimorClaimall
    if done notIn %claim
       goto again


again:
      target 2s
      event macro 22
      wait %lagTimer
      gosub journalCheck
      set %range 1
      gosub Checkstop
      return
}
;;***********************;;
;; Claim All             ;;
;;***********************;;

sub ClaimorClaimall
{
if %claimAll = #false
  event macro 1 0 [claim
else
  event macro 1 0 [claimall

return
}

sub journalCheck
{
for %scan 1 3
  {
  scanJournal %scan
  if isn't_a_corpse! in #journal || can't_get_there in #journal || earn_the_rights in #journal
    {
    set %claim done
    ignoreItem #findID
    }
  if cannot_be_seen in #journal
    {
    if %pathfind = #true
      {
      event pathfind #findX #findY
      gosub ClaimorClaimall
      }
    else
      {
      set %claim done
      ignoreitem #findID
      return
      }
    set %scan 3
    }
  }

return

}
;;***********************;;
;; Stop Claim            ;;
;;***********************;;
sub MMenuStopClaiming
{
set #menubutton N/A
event sysMessage Claim Loop Stopped!
menu delete MMenuStopClaiming
menu Font BGColor $9933FF
menu Font Style
menu Button MMenuClaim_loop 495 46 90 20 Claim (loop)
key esc
goto mainloop
}

;;***********************;;
;; Stop Claim All        ;;
;;***********************;;
sub MMenuStopClaimAll
{
set #menubutton N/A
event sysMessage ClaimALL Loop Stopped!
menu delete MMenuStopClaimAll
menu Font BGColor $9933FF
menu Font Style
menu Button MMenuClaimall_loop 685 46 90 20 ClaimALL (loop)
key esc
goto mainloop
}
;;***********************;;
;; Check stop            ;;
;;***********************;;
sub Checkstop
{
if MMenustopclaiming in #menubutton
{
gosub MMenuStopClaiming
}
if MMenuStopClaimAll in #menubutton
{
gosub MMenuStopClaimAll
}
else
return
}



User avatar
Aster
Grandmaster Scribe
Posts: 81
Joined: Thu Feb 21, 2013 6:23 pm
Location: Italy

Re: Spell Bar / Tool bar

Post by Aster »

Very nice! tnx Lestat :D
This is your life and it's ending one minute at a time.
User avatar
Lord Summerisle
Novice Scribe
Posts: 5
Joined: Tue Apr 01, 2014 8:16 am

Re: Spell Bar / Tool bar

Post by Lord Summerisle »

Sorry if this is a stupid question but how do you implement this?
A heathen, conceivably, but not, I hope, an unenlightened one.
lestatzero
Legendary Scribe
Posts: 427
Joined: Sun Mar 18, 2012 7:37 pm

Re: Spell Bar / Tool bar

Post by lestatzero »

you need Easyuo version 1.5 .

Run easyuo copy and paste the script into the easyuo (save it ) and then click play ... it will pop up the Gui and you will be all set ... There are hundreds of differnet scripts that are written for Easyuo.
dreamstalker
Legendary Scribe
Posts: 345
Joined: Wed Apr 16, 2014 3:39 pm
Location: North Carolina

Re: Spell Bar / Tool bar

Post by dreamstalker »

very nice script... very easy to change and /or add buttons.. had to add sacred journey to the chiv/skills tab.. just copy pasted the line in magery where i wanted the button to be then changed from reveal to sacred and viola there is was way to cool
I keep a gun because I'm too young to die and too old to take an ass whoopin! just cause you aint paranoid doesnt mean they aint after you
Tattersail
Master Scribe
Posts: 57
Joined: Wed Nov 25, 2015 8:22 am

Re: Spell Bar / Tool bar

Post by Tattersail »

Nice one bud :)
Locked