Inscription trainer
have 30-40k blank scrolls, lots of regs. use in your house. have at least 32.5 skill. be near a trash can. have a full spellbook in your pack when you start. make sure that is the only spellbook in your pack
;==================================
; Script Name: Inscription Express
; Author: Freddy
; Version: 1
; Client Tested with: 7. Something
; EUO version tested with: 1.5 (Build 0199)
; Shard OSI
; Revision Date: 6/22/2012
; Public Release Beta: 6/22/2012
; Purpose: Trains inscription FAST!!!
;==================================
;---------------Do Not Edit Below--------------------------------------
set %beginning #systime
set %min 2
set %max 3
set %version 1.0
;set #lpc 50
set %trash KAG_CGG_NWH_NYD_ZVH
set %tools PBG
set %init #true
set %bottle_list WTL_YUL_PUL_VUL_
set %slayertype repond_undead_elemental_demon_arachnid_reptile_
gosub separate_string %slayertype _
for %o 1 %num
set %slayer . %o !return . %o
chooseskill insc
if #skill < 325
{
display You need at least 32.5 skill points to run this script.
halt
}
finditem MPF C_ , #backpackid
if #findkind <> -1
{
event property #findid
if 64 notin #property
{
display you need a spellbook with all 64 spells.
halt
}
ignoreitem #findid
}
else
{
display You need a full spellbook
halt
}
finditem BKF G_3
if #findkind <> -1
set %trashcan #findid
else
{
display You must be near a trash barrel
halt
}
gosub menu_
gosub initialize
wait 1s
set %skill inscription
gosub setskilltable
set %old_sk %current
gosub inscription
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub check_mana
set #lpc 1000
set %med #false
if #mana <= %mana
{
while #mana < #maxmana
{
chooseskill medi
if #skill > 0 && %med = #false
{
wait 2s
event macro 13 46
set %_jindex #jindex
gosub journal2 trance 10
if #result = #false
{
wait 11s
}
else
set %med #true
}
wait 0
}
}
set #lpc 20
return
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub journal2
set %timer #scnt + %2
While %timer > #scnt
{
set %_jindex #jindex
if #jindex >= %_jindex
{
scanjournal %_jindex
if %1 in #journal
return #true
}
}
return #false
return ;should never get this far
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub crap
while #true
{
if #findkind <> -1
{
finditem %bottle_list C_ , #backpackid
wait 12
exevent drag #findid #findstack
wait 12
exevent dropc %secure
}
else
break
}
finditem PBG C_ , #backpackid
set #lobjectid #findid
event macro 17 0
gosub setskilltable
return
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub find_tongs
bloop:
set %t_location #backpackid
gosub find_tinker
finditem PBG C_ , %t_location
if #findcnt < %min
{
gosub kill_gump 530_497
wait 20
set %var1 %max - #findcnt
finditem jtl C_ , %t_location
if #findkind <> -1
{
set #lobjectid #findid
event macro 17 0
wait 10
}
else
{
display You do not currently have any tinker kits! Get one and restart.
halt
}
finditem jtl c_ , %t_location
{
wait 1s
set #lobjectid #findid
event macro 17 0
wait 10
}
for %q 1 %var1
gosub craft_item jtl 3 3 3 N/A
gosub wait_gump generic_gump 530_497 5
wait 10
finditem PBG C_ , %t_location
if #findcnt < %min
goto bloop
finditem PBG C_ , %t_location
set #lobjectid #findid
event macro 17 0
gosub setskilltable
}
return
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub find_tinker
tloop:
if %sbag = #true
set %t_location %sbagid
else
set %t_location #backpackid
finditem jtl C_ , %t_location
if #findcnt < 2
{
gosub kill_gump 530_497
wait 20
set %var1 3 - #findcnt
finditem jtl C_ , %t_location
if #findkind <> -1
{
set #lobjectid #findid
event macro 17 0
wait 10
}
else
{
display You do not currently have any tinker kits! Get one and restart.
halt
}
for %q 1 %var1
gosub craft_item jtl 3 1 4 N/A
gosub wait_gump generic_gump 530_497 5
wait 15
finditem jtl C_ , %t_location
if #findcnt < 1
goto tloop
finditem RQK C_ , %t_location
set #lobjectid #findid
event macro 17 0
gosub setskilltable
}
return
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub check_pack_items
set #lpc 1000
namespace push
namespace local dura_check
set !item %1
set !dura contents:
event property !item
if !dura in #property
{
set !temp_string #property
str pos !temp_string contents:
set !delete_this #strres + 8
str del !temp_string 1 !delete_this
set !temp_string #strres
str pos !temp_string /
set !t_del #strres - 1
str left !temp_string !t_del
set !temp_string #strres
str del !temp_string 1 1
set !temp_string #strres
namespace push
set #lpc 10
return !temp_string
}
return #false
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub checkresources
finditem %2 C_ , %1
if #findkind <> -1
{
gosub count_stack %1 %2
if #result > %3
return #true
}
if #findkind = -1 || #findcnt < %3
return #false
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub count_stack
finditem %2 C_ , %1
return #findstack
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub fix_maxweight
finditem #charid *
if #findtype notin XU_AV
{
set %sWeight #maxweight + 60
if %sWeight > 550
return 550
else
return %sWeight - #weight
}
else
return #maxweight - #weight
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub setskilltable
chooseskill %skill
if %skill = inscription
{
set %tools PBG
if #skill >= 325 && #skill <= 600 ;recall
{
set %current Recall
set %mana 11
set %category 2
set %page 2
set %item 6
set %resources JUF_KUF_MZF_ ;bloodmoss mandrake root black pearl
}
if #skill >= 601 && #skill <= 700 ;Mark
{
set %current Mark
set %mana 20
set %category 3
set %page 2
set %item 3
set %resources JUF_KUF_MZF_ ;bloodmoss mandrake root black pearl
}
if #skill >= 701 && #skill <= 850 ;Gate
{
set %current Gate
set %mana 40
set %category 4
set %page 1
set %item 4
set %resources KUF_SZF_MZF_ ;blackpearl bloodmoss s.ash
}
if #skill >= 851 && #skill <= 900 ;Resurrection
{
set %current Resurrection
set %mana 50
set %category 4
set %page 2
set %item 1
set %resources JUF_JZF_KZF_ ;mandrakeroot
}
if #skill >= 901 && #skill <= 1000 ;Spell Books
{
set %current SpellBooks
set %category 6
set %page 1
set %item 5
set %resources null ;ginseng
}
}
return
;----------------------------------------------------------------------
;----------------------------------------------------------------------
;tools category page number ml
sub craft_item
namespace push
namespace local craft_item
set %tools %1
set !category %2
set !page %3
set %item %4
set !makelast %5
set !tool_location #backpackid
if !makelast = n/a
{
finditem %tools C_ , !tool_location
set #lobjectid #findid
event macro 17 0
set %reopen no
wait 30
}
finditem %tools c_ , !tool_location
if #findkind <> -1
{
retry_loop:
finditem %tools c_ , !tool_location
if #findkind <> -1
{
set %toolid #findid
gosub wait_gump generic_gump 530_497 3 #true
if #result = #true
wait 0
else
{
set #lobjectid #findid
event macro 17 0
}
}
gosub wait_gump generic_gump 530_497 10 #true
if #result <> #true
goto retry_loop
wait 5
}
else
{
display Can't find your tool. Please put on in your main pack and start the script again.
halt
}
if !category <> smelt
{
if !makelast = N/A
{
gosub click_location category !category
gosub click_button #result
wait 8
if !page > 1
{
set %hey !page - 1
for %p 1 %hey
{
gosub click_location page !page
gosub click_button #result
}
}
wait 8
gosub click_location item %item
gosub click_button #result
}
else
{
gosub click_location ml
gosub click_button #result
set !makelast N/A
}
}
else
{
gosub click_location smelt
gosub click_button #result
}
wait 8
nameSpace Pop
return
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub click_button
set !parsestring %1 , _
gosub separate_string !parsestring _
set !clickx #contposx + !return1
set !clicky #contposy + !return2
click !clickx !clicky
return
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub kill_gump
if %1 = #contsize
{
close_loop:
set %c_modex #contposx + 30
set %c_modey #contposy + 30
click %c_modex %c_modey r
if #contsize = 530_497
{
set %cloop %cloop + 1
if %cloop < 3
goto close_loop
else
return #false
}
}
return
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub click_location
namespace push
namespace local click_location
set !type %1
set !offset %2
if !type = category
{
set !clickx 30
set %base 90
}
if !type = page
return 380_270
if !type = ml
return 280_455
if !type = item
{
set !clickx 230
set %base 70
}
if !type = smelt
return 30_355
if !type = context
return 61_40
if !offset >= 2 || %2 > 2
{
set !offset !offset - 1
for %i 1 !offset
set %base %base + 20
}
set %return !clickx , _ , %base
namespace clear click_location
namespace pop
return %return
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub separate_string
nameSpace Push
namespace local separate
set %num 0
str Count %1 %2
for %i 1 #strres
{
set %var %2
str len %1
set %length #strres
str pos %1 %var
set %del #strres - 1
str left %1 %del %length
set !return . %i #strres
set %del1 %del + 1
str del %1 1 %del1
set %1 #strres
set %num %num + 1
}
nameSpace Pop
nameSpace Copy ret* From Local separate
nameSpace Push
nameSpace Local separate
nameSpace Clear separate
nameSpace Pop
return
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub wait_gump
set %timer #scnt + %3
repeat
if %4 = #true
{
if %sbag = #true
finditem %toolid C_ , %sbagid
else
finditem %toolid C_ , #backpackid
if #findkind = -1
return #false
}
if #contsize = %2 && #contname = %1
{
set %4 n/a
return #true
}
until #scnt >= %timer
set %4 n/a
return #false
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub initialize
namespace push
namespace local initialize
gosub separate_string %resolution x
set !resx !return1
set !resy !return2
set !pd_pos ( !resx - 280 )
try_again:
event macro 8 1
gosub wait_gump paperdoll_gump 262_324 10
if #result <> #true
goto try_again
contpos !pd_pos 10
wait 20
try_again2:
set !bp_pos ( !resy - 450 )
event macro 8 7
gosub wait_gump container_gump 230_204 10
if #result <> #true
goto try_again2
contpos !pd_pos !bp_pos
wait 20
try_again4:
set !sb_pos ( !pd_pos - 150 )
set !sb_pos2 ( !resy - 220 )
event macro 8 2
gosub wait_gump status_gump 432_184 10
if #result <> #true
goto try_again4
contpos !sb_pos !sb_pos2
wait 20
try_again3:
set !rs_pos 50
set !rs_pos2 ( !resy - 250 )
finditem %secure g_3
if #findkind = -1
{
display can't find secure!
halt
}
else
{
set #lobjectid #findid
wait 5
event macro 17 0
wait 30
contpos !rs_pos !rs_pos2
finditem %resource C_ , %secure
if #findkind <> -1
{
set #lobjectid #findid
event macro 17 0
wait 20
set !pos !rs_pos + 210
contpos !pos !rs_pos2
set %resource #contid
}
else
{
display Can't find your resource container!
halt
}
}
if %sbag = #true
{
finditem CKF C_ , #backpackid
for %i 1 #findindex
{
event property #findid
if salvage in #property
set %sbagid #findid
}
if %sbagid = n/a
{
display You do not have a salvage bag! Pleae get one and restart
halt
}
finditem %sbagid C_ , #backpackid
if #findkind <> -1
{
set #lobjectid #findid
event macro 17 0
wait 20
set !pos !rs_pos + 420
contpos !pos !rs_pos2
}
else
{
display Can't find your Salvage Bag!
halt
}
}
namespace clear
namespace pop
return
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub checkskill
chooseskill %skill
set %currentskill #skill
if %cskill = N/A || %cskill <> %currentskill
{
menu Font Style b
menu Font Color $00990066
set %cskill %currentskill
menu delete currentskill
str len %currentskill
str ins %currentskill #dot #strRes
menu Text currentskill 72 108 #strres
}
return
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub totalskill
chooseskill %skill
set %totalskillgained 0
set %totalskillgained %currentskill - %startingskill
if %tskill = N/A || %tskill <> %totalskillgained
{
menu Font Style b
menu Font Color $00990066
menu delete totalskill
set %totalskillgained 0
set %totalskillgained %currentskill - %startingskill
set %tskill %totalskillgained
str len %totalskillgained
str ins %totalskillgained #dot #strRes
menu Text current 72 128 #strres
}
return
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub time
menu Font Style b
menu Font Color $00990066
set %time #systime - %beginning
gosub timeformat
menu delete time
menu Text time 72 148 %outtime
return
;----------------------------------------------------------------------
;----------------------------------------------------------------------
;==================================
; Script Name: Lion's Timer Formatting Subs
; Author: Lion
; Version: 1.1
; Client Tested with: 4.0.0p/q
; EUO version tested with: 1.41 build 0075
; Shard OSI / FS: Any
; Revision Date: 5th March 2004
; Public Release: 4th March 2003
; Purpose: Time in ms to standard MM:DD:HH:MM:SS
;==================================
;==================================
;Simple (hours:mins:secs)
;==================================
sub timeformat
str len %time
set %timelenght #strres - 3
str left %time %timelenght
set %t1 #strres / 3600
set %t2 #strres % 3600 / 60
set %t3 #strres % 3600 % 60
set %outtime %t1
for %i 2 3
{
str len %t . %i
if #strres = 1
set %outtime %outtime , : , 0 , %t . %i
if #strres <> 1
set %outtime %outtime , : , %t . %i
}
return
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub checkskillcap
chooseskill %skill
if #skill = #skillcap
{
return #true
}
return #false
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub menu_
mloop:
menu Clear
menu Window Title Freddy's High-Velocity Trainers
menu Window Color White
menu Window Size 236 261
menu Font Transparent #true
menu Font Align Right
menu Shape EUOShape1 0 0 241 297 3 7 1 Black 1 Maroon
menu Shape EUOShape2 8 8 221 33 3 7 1 Black 7 White
menu Font Name MS Sans Serif
menu Font Size 12
menu Font Style
menu Font Color $00990066
menu Font Transparent #false
menu Font Align Left
menu Font BGColor White
menu Text EUOLabel1 64 16 Inscription Express
menu Shape EUOShape3 8 40 221 213 3 7 1 Black 7 $00990066
menu Shape EUOShape4 16 52 205 189 3 7 1 Black 7 White
menu Font Size 8
menu Font Color Green
menu Text EUOLabel4 24 224 Version %version
menu Text EUOLabel5 184 224 Freddy
menu Font Size 10
menu Font Color Black
menu Text EUOLabel6 20 88 Resolution
menu Font Size 12
menu Font Style b
menu Font Color $00990066
menu Text EUOLabel2 56 60 Inscription Setup
menu Font Size 8
menu Font Style
menu Font Color WindowText
menu Text EUOLabel9 136 92 by
menu Font Style b
menu Text EUOLabel3 20 116 Container Setup:
menu Font Style
menu Text EUOLabel7 28 134 Secure:
menu Text EUOLabel8 28 162 Resource:
menu Font Color White
menu Font BGColor $00990066
menu Button continue 36 188 161 29 Continue
menu Font Color WindowText
menu Font BGColor Window
menu Edit rbox1 88 88 45 *r1
menu Edit rbox2 152 88 45 *r2
menu Edit sbox 88 132 93 *sec
menu Edit rebox 88 160 93 *res
menu Font BGColor BtnFace
menu Button secureid 184 132 25 21 ID
menu Button resourceid 184 160 25 21 ID
menu Show 0 0
set #menubutton n/a
buttonloop2:
if #menubutton = secureid
{
display Target your secure container!
wait 1
set #targcurs 1
target
menu hideeuo
uloop:
if #targcurs = 1
{
goto uloop
}
Set #lobjectid #ltargetid
set *sec #ltargetid
event macro 17 0
goto mloop
}
if #menubutton = resourceid
{
display Target your resource container!
wait 1
set #targcurs 1
target
menu hideeuo
loop1:
if #targcurs = 1
{
goto loop1
}
Set #lobjectid #ltargetid
set *res #ltargetid
event macro 17 0
goto mloop
}
if #menubutton = tcanid
{
display Target your trashcan!
wait 1
set #targcurs 1
target
menu hideeuo
loop3:
if #targcurs = 1
{
goto loop3
}
Set #lobjectid #ltargetid
set *tcan #ltargetid
event macro 17 0
goto mloop
}
if #menubutton <> continue
{
goto buttonloop2
}
menu get rbox1
set *r1 #menures
set %r1 #menures , x
menu get rbox2
set *r2 #menures
set %r2 #menures , x
set %resolution %r1 , %r2
menu get sbox
set %secure #menures
set *sec %secure
menu get rebox
set %resource #menures
set *res %resource
set %skill Inscription
set %skill1 Inscription
menu Clear
menu Window Title Freddy's high-velocity Trainer
menu Window Color White
menu Window Size 159 213
menu Font Transparent #true
menu Font Align Right
menu Shape EUOShape1 0 -180 165 397 3 7 1 Black 1 Maroon
menu Shape EUOShape2 8 8 145 33 3 7 1 Black 7 White
menu Font Name MS Sans Serif
menu Font Size 12
menu Font Style
menu Font Color $00990066
menu Font Transparent #false
menu Font Align Left
menu Font BGColor White
menu Text EUOLabel1 16 16 Inscription Express
menu Shape EUOShape3 8 40 145 165 3 7 1 Black 7 $00990066
menu Shape EUOShape4 16 48 129 145 3 7 1 Black 7 White
menu Font Size 8
menu Font Color Green
menu Text EUOLabel4 20 176 Version %version
menu Text EUOLabel5 108 176 Freddy
menu Font Size 12
menu Font Style b
menu Font Color $00990066
menu Text EUOLabel2 28 60 %skill1
menu Shape EUOShape5 24 84 113 81 3 7 1 Black 7 White
menu Shape EUOShape6 24 84 113 21 3 7 1 Black 7 White
menu Shape EUOShape7 24 104 113 21 3 7 1 Black 7 White
menu Shape EUOShape8 24 124 113 21 3 7 1 Black 7 White
menu Shape EUOShape9 24 144 113 21 3 7 1 Black 7 White
menu Font Size 8
menu Font Style
menu Font Color WindowText
menu Text EUOLabel3 28 88 Start:
menu Text EUOLabel6 28 108 Current:
menu Text EUOLabel7 28 128 Total:
menu Text EUOLabel8 28 148 Time:
menu Shape EUOShape10 68 84 1 81 3 7 1 Black 7 White
menu Font Style b
menu Font Color $00990066
chooseskill %skill
set %startingskill #skill
set %currentskill #skill
set %totalskill %currentskill - %startingskill
str len %startingskill
str ins %startingskill #dot #strRes
menu Text startskill 72 88 #strres
menu Text totalskill 72 128 %totalskill
menu Text currentskill 72 108 %currentskill
menu Text time 72 148 %total_time
menu Show 0 0
return
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub check_resources
finditem DPF C_ , #backpackid
if #findstack <= 10
{
finditem DPF C_ , %resource
if #findkind = -1
{
display You don't have any blank scrolls!
halt
}
exevent drag #findid 100
wait 16
exevent dropc #backpackid
wait 16
}
finditem ENK C_ , #backpackid
if #findstack <= 10
{
finditem ENK C_ , %resource
if #findkind = -1
{
display You don't have any ingots
halt
}
exevent drag #findid 100
wait 16
exevent dropc #backpackid
wait 16
}
if %current <> spellbooks
{
gosub separate_string %resources _
for %i 1 %num
{
set %look !return . %i
finditem %look C_ , #backpackid
if #findstack <= 10
{
finditem %look C_ , %resource
if #findkind = -1
{
display You don't have any reagents
halt
}
exevent drag #findid 100
wait 16
exevent dropc #backpackid
wait 16
}
}
}
return
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub drop_resources
set %newstr %bottle_list , %resources
gosub separate_string %newstr _
for %i 1 %num
{
set %look !return . %i
finditem %look C_ , #backpackid
exevent drag #findid 100
wait 16
exevent dropc %resource
wait 16
}
return
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub crap_books
set #lpc 1000
finditem MPF C_ , #backpackid
for #findindex 1 #findcnt
{
event property #findid
for %slo 1 6
{
if %slayer . %slo in #property
{
exevent drag #findid
wait 12
exevent dropc %secure
wait 12
set %s_y #true
}
}
if %s_y <> #true
{
exevent drag #findid
wait 12
exevent dropc %trashcan
wait 12
}
set %s_y #false
}
set #lpc 20
return
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub inscription
while #true
{
gosub checkskill
gosub totalskill
gosub checkskillcap
if #result = #true
{
gosub drop_resources
wait 1s
gosub crap_books
display You have reached your skill cap!
halt
}
gosub time
finditem %bottle_list C_ , #backpackid
for #findindex 1 #findcnt
{
if #findstack >= 75
{
gosub crap
break
}
}
set #lpc 1000
set %temp_resource %resources
gosub setskilltable
gosub checkresources %resource ENK 200
if #result <> #true
{
display You don't have enough resources! Get some and restart.
halt
}
gosub checkresources %resource DPF 200
if #result <> #true
{
display You don't have enough resources! Get some and restart.
halt
}
gosub check_resources
gosub find_tongs
gosub fix_maxweight
if #result <= 15
gosub crap
gosub check_pack_items #backpackid
if #result >= 120 && %current = spellbooks
gosub crap_books
if #result >= 120 && %current <> spellbooks
gosub crap
if %temp_resource <> %resources
{
finditem %temp_resource C_ , #backpackid
if #findkind <> -1
{
exevent drag #findid #findstack
wait 12
exevent dropc %resource
wait 12
}
gosub crap
wait 5
gosub check_resources
wait 10
set %init #true
}
gosub check_mana
if %current <> %old_sk
{
set %old_sk %current
set %init #true
gosub drop_resources
}
if %init = #true
gosub craft_item %tools %category %page %item n/a
if %init <> #true
gosub craft_item %tools %category %page %item ml reopen
set %init #false
set %look n/a
gosub check_mana
}
return
;----------------------------------------------------------------------
;----------------------------------------------------------------------