;===============================================================
; Script Name: SealingWax's Discord Trainer **Modified by Jayman405**
; Authors: SealingWax
; Version: 1.1b (altered)
; Client Tested with: 5.0.1d (altered 7.0.6.3)
; EUO version tested with: 1.5 TV 64
; Shard OSI / FS: OSI / Never tested outside of OSI.
; Public Release: 09/18/2005 (altered 3/31/10)
; Latest Revision: 11/09/2005
; Global Variables Used: none
; Purpose: Trains Discordance to 120 using any number of targets.
;===============================================================
;==Note==============
; Before running, you must be in a location where you can target
; your animals but they can't reach you (i.e. a boat, your front
; steps, across a river). Take your tamer, or have a friend tame
; and release animals of your current skill level where you wish
; to train. You must have the ability to either cast invisibilty
; on yourself or use hiding in order to remove the discordance
; effect from your targets.
;====================
;==Variables=========
; Change this variable (X) to the number of targets you will
; have.
set %totaltargets 1
; Change this variable (X) to determine the method you choose
; to cancel your discordance:
; 1 - Invis
; 2 - Double Invis (to use if targets are revealing you)
; 3 - Hiding
set %cancel 1
gosub setup
;====================
;==Setup=============
sub setup
if %totaltargets = X
{
display ok You must set the variable number of targets you will$be using before you start.
halt
}
if %cancel = X
{
display ok You must set the variable for your discord cancelling$method before you start.
halt
}
if %cancel = 3
display yesno You have chosen to use hiding as your cancellation method.$Hiding may not work if you are training on any creatures$that flag against you.$$Do you wish to continue using hiding?
if #dispres = no
{
display ok Script halted.
halt
}
event macro 8 7
set %pack #contid
display ok Now we are going to set up your discord targets.
target:
for %i 1 %totaltargets
{
display ok Please target animal number %i
set #targcurs 1
Targetloop:
if #targcurs = 1
{
goto Targetloop
}
else
{
set %target . %i #ltargetid
wait 20
}
}
chooseskill discordance
set %start #skill
set %gains #skill - %start
set %attempts 0
set %success 0
set %failure 0
gosub time #time
set %starttime #result
gosub menu
;====================
;==Menu==============
sub menu
menu clear
Menu window size 300 165
Menu window color red
menu font color white
menu font bgcolor red
menu font size 14
menu text title 25 10 SealingWax's Discord Trainer
menu font size 7
menu text ver 125 30 Version 1.1a
menu font size 10
menu text success 75 50 Success:
menu text successnum 200 50 %success
menu text failure 75 65 Failure:
menu text failurenum 200 65 %failure
menu text count 75 80 Total Attempts:
menu text countnum 200 80 %attempts
menu text gains 75 95 Total Gains:
menu text gainsnum 200 95 %gains
menu text status 75 110 Status:
menu text curentstatus 200 110 %status
menu text starttime 75 125 Started at:
menu text starttimenum 200 125 %starttime
menu show
gosub disco
;====================
;==Main=Loop=========
sub disco
if #charghost = Yes
{
set %status Paused. Dead :(
menu set curentstatus %status
display ok Something happened and now you're dead.$Go ahead and res up, then hit play.$Script paused.
pause
}
for %i 1 %totaltargets
{
set #ltargetid %target . %i
IFailed:
set %status Discording...
menu set curentstatus %status
event macro 13 15
scanjournal 1
wait 30
if What_instrument_shall_you in #journal
{
gosub playnew
}
else
{
event macro 22 0
set %attempts %attempts + 1
menu set countnum %attempts
}
scanjournal 1
wait 30
if You_attempt_to_disrupt in #sysmsg
{
set %failure %failure + 1
menu set failurenum %failure
set %status Failure...
menu set curentstatus %status
for %waittime 12 0
{
wait 1s
set %status %waittime , s
menu set curentstatus %status
}
goto IFailed
}
if That_creature_is_already in #sysmsg
{
set %attempts %attempts - 1
menu set countnum %attempts
wait 1s
goto Already
}
else
{
scanjournal 1
if That_is_too_far in #journal
{
gosub playnew
}
else
{
menu set currentnum #skill
set %gains #skill - %start
menu set gainsnum %gains
set %success %success + 1
menu set successnum %success
set %status Success...
menu set curentstatus %status
if %i = %totaltargets
{
goto Already
}
for %waittime 9 0
{
wait 1s
set %status %waittime , s
menu set curentstatus %status
}
}
}
Already:
}
gosub cancel
;====================
;==Disco=Cancel======
sub cancel
set %status Hiding...
menu set curentstatus %status
cancel:
if %cancel = 1
{
event macro 15 43
wait 55
event macro 23 0
wait 40
if H notin #charstatus
{
goto cancel
}
else
{
wait 14s
gosub disco
}
}
if %cancel = 2
{
event macro 15 43
wait 55
event macro 23 0
wait 30
event macro 15 43
wait 55
event macro 23 0
wait 40
if H notin #charstatus
{
goto cancel
}
else
{
wait 14s
gosub disco
}
}
if %cancel = 3
{
event macro 13 21
wait 2s
if H notin #charstatus
{
wait 12s
goto cancel
}
else
{
wait 14s
gosub skillcheck
}
}
;====================
;==New=Instrument====
sub playnew
set %status Finding Instrument..
menu set curentstatus %status
finditem MQF_QRF_LQF_PRF C_
wait 1s
set #lobjectid #findid
wait 2s
event macro 17 0
if #findkind = -1
{
if %cancel = 1
{
event macro 15 43
target
event macro 23 0
wait 40
if H notin #charstatus
{
gosub playnew
}
}
if %cancel = 2
{
event macro 15 43
target
event macro 23 0
wait 30
event macro 15 43
target
event macro 23 0
wait 40
if H notin #charstatus
{
gosub playnew
}
}
if %cancel = 3
{
event macro 13 21
wait 2s
if H notin #charstatus
{
wait 12s
gosub playnew
}
}
set %status Paused
menu set curentstatus %status
display ok Can't find anymore instruments. Restock$and hit play. Script paused.
Pause
}
else
{
gosub disco
}
;====================
;==Skill=Check=======
sub skillcheck
set #skill discord
if #skill = #skillcap
{
set %status Done!!
menu set curentstatus %status
display ok Your discordance is capped out.
halt
}
else
{
gosub disco
}
;====================
;==================================
; Name: sub time
; Author: Orngrimm
; Version: 1.1
; Client Tested with: UO 4.0.6a
; EasyUO version tested with: EasyUO 1.42.009D
; Revision Date: 23.11.04
; Public Release: 20.12.03
; Purpose: Formates the time correctly. Also 01:02:03 is formatted correct.
; normally this time gives 1:2:3 without leading "0". My sub takes care of it!
; Disclaimer: Dont change this script and release it under own name.
; Let this header intact and dont distribute without it!
; DONT distribute without my permission!! (PM Orngrimm @ easyuo.com)
; Copyright: Orngrimm
;==================================
; Thanks to Janus who found (and fixed!) a bug with 00:xx:yy shown as xx:xx:yy.
*******************************************
**** Parses the correct time from %1 (gosub time #time)
*******************************************
sub time
set %string %1
set %len 2
str len %string
if #Strres = 5
set %len 1
if #StrRes =< 4
{
set %hour 00:
goto _time_min
}
; Parsing the hour
str left %string %len
set %hour #StrRes
str len %hour
if #strRes = 1 2
set %hour 0 , %hour , :
goto _time_min
set %hour %hour , :
; Parsing the minute
_time_min:
str right %string 4
str left #StrRes 2
set %min #StrRes
str len %Min
if #strRes = 1 2
set %min 0 , %min , :
goto _time_sec
set %min %min , :
; Parsing the second
_time_sec:
str right %string 2
set %sec #StrRes
str len %sec
if #strRes = 1 2
set %temp %hour , %min , 0 , %sec
goto _time_end
set %temp %hour , %min , %sec
_time_end:
return %temp
stop
*******************************************