ScriptUO

Official ScriptUO EasyUO Scripts => Script Library => Character skill advancement => Topic started by: The Reaper on February 28, 2011, 07:23:33 AM

Title: Necromancy Skill Trainer
Post by: The Reaper on February 28, 2011, 07:23:33 AM
My 3rd script for you guys.

Very simple to use, for sub 30 skills you will need a weapon equipped in your main hand.
I don't like carebear scripts, so you need to do this manually.

Code: [Select]
;==================================
; Script Name: Reaper's Necro Trainer
; Author: The Reaper
; Version: 1.0
; Client Tested with: 7.0.10.3
; EUO version tested with: 1.5.186
; Purpose: Train necro for freeshards.
; Should work on OSI servers also.
;==================================

;==================================
; Set this value to 5 if you are eperiencing
; "Insufficient mana for this spell" Issues
set %setwait 5
; Set this value to your faster casting reduction
; 1FC = 2    2FC = 5  (2FC is necro cap)
set %fc 5
; DO NOT alter below this line
;==================================
initevents
event Macro 8 2 ;open status bar
wait 20
set #contPosX 550
set #contPosY 550

set %skilltraining necro
chooseskill %skilltraining
set %startingskill #skill
set %currentskill #skill
gosub showmenu

if #skill < 300
   {
   display yesno Do you have a weapon equipped in your main hand?
   if #dispRes = no
      {
      display ok Please equip a weapon in your main hand before restarting script
      halt
      }
   }

Loop:
gosub Choosespell
gosub Cast
gosub Checkskill
gosub Checkmana
goto Loop

;SUBS
;=================================================

sub showmenu
  menu clear
  menu window title Necro Trainer
  menu window size 180 95
  menu window color black
  menu font name arial
  menu font size 12
  menu font color Red
  menu font bgcolor black
  menu text title 5 5 NECRO TRAINER.
  menu font size 8
  menu font color lime
  menu text mageryskill 5 25 Current skill:
  menu text gains 5 40 Total gains:
  menu text casting 5 55 Casting:
  menu font color yellow
    str len %currentskill
    str ins %currentskill #dot #strRes
    menu delete currentskill
    menu text currentskill 68 25 #strRes
    set %totalgains %currentskill - %startingskill
    str len %totalgains
    str ins %totalgains #dot #strRes
    menu delete totalgains
    menu text totalgains 68 40 #strRes
  menu font align right
  menu text credit 176 80 by The Reaper
  menu font align left
  menu show
return

sub Choosespell
if #skill = #skillcap
   {
   display You have reached your Necromancy Skill cap of #skill
   halt
   }


  if #skill < 300
  {
    set %spell 104    ; Curse Weapon 0-30
    set %manatocast 7
    set %castdelay 10
    set %masochistic blade
    menu delete currentspell
    menu text currentspell 68 55 Curse Weapon
    return
  }

if #skill < 500
  {
    set %spell 116    ; Wraith Form 30-50
    set %manatocast 17
    set %castdelay 40
    set %masochistic 0
    menu delete currentspell
    menu text currentspell 68 55 Wraith Form
    return
  }

if %currentskill < 711
  {
    set %spell 106    ; Horrific Beast 50-71
    set %manatocast 11
    set %castdelay 40
    set %masochistic 0
    menu delete currentspell
    menu text currentspell 68 55 Horrific Beast
    return
  }

if %currentskill > 809
  {
    while E in #charStatus
      {
        event macro 15 106
        wait 1s
      }

if %currentskill < 810
  {
    set %spell 115    ; Wither 71-81
    set %manatocast 23
    set %castdelay 15
    set %masochistic 0
    menu delete currentspell
    menu text currentspell 68 55 Wither
    return
  }

if #skill < 1050
  {
    set %spell 107    ; Lich Form 81-105
    set %manatocast 23
    set %castdelay 40
    set %masochistic 0
    menu delete currentspell
    menu text currentspell 68 55 Lich Form
    return
  }

if #skill < 1200
  {
    set %spell 113    ; Vampiric Embrace 105-120
    set %manatocast 23
    set %castdelay 40
    set %masochistic 0
    menu delete currentspell
    menu text currentspell 68 55 Vampiric Embrace
    return
  }

return

sub Cast
    event macro 15 %spell
    if %masochistic = 1
       {
       target 2s
       wait 5
       event macro 23 0
       return
       }
    if %masochistic = blade
       {
       wait %castdelay - %FCR
       return
       }
    wait %castdelay - %FCR
    wait 5
    return

return

sub Checkskill
  chooseskill %skilltraining
  if #skill > %currentskill
  {
    set %currentskill #skill
    sound
    str len %currentskill
    str ins %currentskill #dot #strRes
    menu delete currentskill
    menu text currentskill 68 25 #strRes
    set %totalgains %currentskill - %startingskill
    str len %totalgains
    str ins %totalgains #dot #strRes
    menu delete totalgains
    menu text totalgains 68 40 #strRes
  }
return

sub Checkmana
wait %setwait
if #mana < %manatocast
    {
    event macro 13 46
          loop2:
          if #mana < #maxmana
          {
          goto loop2
          }
    }
return

Title: Re: Necromancy Skill Trainer
Post by: Cerveza on February 28, 2011, 07:55:16 AM
Nice, even took care of the Horrific Beast thing....
Title: Re: Necromancy Skill Trainer
Post by: The Reaper on February 28, 2011, 08:28:08 AM
Need to make a few alterations to it in the near future, firstly, to make sure that your in a regnerative form (lich form) where ever possible, possibly even have a shadow wisp where possible too. The horrific beast thing was an accident, after testing the script, it got stuck and it took me a while to figure that bit out.
Title: Re: Necromancy Skill Trainer
Post by: Endless Night on April 05, 2011, 02:28:10 PM
thanks for posting this.
Title: Re: Necromancy Skill Trainer
Post by: Outlaw Josey Wales on April 13, 2011, 03:01:14 PM
Tested 4/13/2011 works good went from 50 to 60.5 rather quickely will let u know how it does as it runs
Title: Re: Necromancy Skill Trainer
Post by: MrChumly on June 18, 2016, 08:19:57 AM
Used this last night and it worked perfect