Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

[EUO] Bobafett's Magic Resist Trainer
#1

Hey all,

This is my first official script release and also my first post here Smile , i am back to UO after a long time and started scripting so here's the result !

Enjoy!

Code:
;++++++++++++++++++++++++++++++++++++++++++
;Script Name: Bobafett's Magic Resist Trainer (IN-UO)
;Author: Bobafett
;Version: 0.1
;Client tested with: 6.0.4.0 (Patch 95)
;EUO version tested with: 1.5 Version 210
;Shard OSI / FS: IN-UO
;Revision Date: 2012-04-22
;Public release: 2012-04-22
;++++++++++++++++++++++++++++++++++++++++++
;DESCRIPTION:
;++++++++++++++++++++++++++++++++++++++++++
;This script train Magic Resist with a fire field
;You need reagents to cast field and healing
;Meditation is used for mana recovery
;Place your self at the bottom of the desired fire field
;
;This is my first complete script started from scratch
;Please report errors and suggestions !
;Have fun
;++++++++++++++++++++++++++++++++++++++++++

set %walkDelay 8
set %stepCount 10

set %northW 0
set %north 1
set %northE 2
set %east 3
set %southE 4
set %south 5
set %southW 6
set %west 7

set %fireFieldCheck #TIME
set %fireFieldExpiration 150

gosub CastField

While  #TRUE
{
   gosub CheckCastField
   gosub Walk %north %stepCount
   gosub CheckHealth
   gosub Walk %south %stepCount
   gosub CheckHealth
   gosub CheckMana
}

sub CheckMana
{
     if 30 > #mana
     {
        gosub Meditate
     }
     return
}
sub Meditate
{
  set %maxmana #maxmana - 5
  repeat
   {
   event macro 13 46
   wait 40
   }
  until #mana => %maxmana
  return
}

sub CheckHealth
{
  if #HITS < 50
  {
  event macro 15 28
  target
  wait 1s
  event macro 23
  wait 3s
  }
  if #HITS < 50
  {
    wait 10s
    gosub CheckHealth
  }
  return
}

sub CheckCastField
{
  set %fieldLife #TIME - %fireFieldCheck
  
  if %fieldLife > %fireFieldExpiration
  {
      gosub CastField
  }
  return
}

sub CastField
{
  gosub Walk %north 5
  event Macro 15 27
  wait 10
  event Macro 23
  wait 5s
  set %fireFieldCheck #TIME
  gosub Walk %south 5
  return
}

sub Walk
{
  set %cpt 0
  While %cpt < %2
  {
        event macro 5 %1
        wait %walkDelay
        set %cpt %cpt + 1
  }
  return
}


Forum Jump:


Users browsing this thread: 1 Guest(s)