ScriptUO
Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: gonzoateafly on January 09, 2011, 03:13:27 PM
-
Howdy all,
This script doesn't necessarly need debug. In fact, it may work perfectly. Or it may fail horribly. It's been gathering dust and needs to be tested... unfortunately I don't have an active OSI account any longer to do so. Would someone be so kind as to give it a shot?
Setup: ID's are hardcoded in... simply for easy start/stop (I used to run this thing a lot)... so you'll need to set them yourself:
%obsidian_cont - The container to store obsidian pieces into.
%magic_item_cont - The container to store magic items into.
%unsorted_bags - The container to put the remainder into (just incase).
%primary_runebook_id - The id of the elwood runebook.
The elwood runebook needs to have the following runes (change the number in the script if they aren't in these positions in the runebook, 1-16):
%elwood_rune 1 - A rune near elwood, somewhere that walking to the bank would not be difficult (on the ground instead of the deck)
%haven_lake_rune 2 - A rune for haven lake, somewhere fishing is possible
%alberta_rune 3 - A rune to alberta - where pathfinding to the stool is possible.
%gabriel_rune 4 - A rune to gabriel, where he's in talking distance.
%nujelm_theater_rune 5 - A rune inside Nujelm theater.
%britain_theater_rune 6 - A rune inside Britain theater.
%jhelom_theater_rune 7 - A rune inside Jhelom theater.
%tomas_rune 8 - A run to Tomas the Toymaker.
The first time through
The first time you run the script, it will get up to the fishing part and then wait for you to choose where to fish. It will save that spot in persistent variables (should have made it one, but I used three so I wouldn't have to parse it... lazy, I know) and use it in the future. If for some reason the spot isn't working or you want a new one, simply change %fishing_spot #true to %fishing_spot #false, and the next time around it will offer the option to select the spot.
If this script becomes useful to more than one or two people, I will make this an easier process, but for now this should accommodate anyone's needs.
Notes:
- If you're already partially through the quest, you can just change the current_step variable, and the script will jump ahead (see inside script for numbers of each step).
- The script is semi-auto. It will handle everything automatically up to the picture taking portion. At that point, you will have to handle the movement to each creature, but the script is smart enough to identify which creatures you are supposed to find, display a window with them checked off (adjust check boxes if it makes a mistake, but it never had trouble with me), and search for those monster types. If it finds one, it will take the picture for you automatically, and uncheck that monster. When all the monsters have been unchecked, it will attempt to recall to the next step and continue automatically handling everything.
-The locations for the move commands may be wrong, I don't remember when I was using this script if we were in new haven or not... I think they are designed for new haven though.
Hopefully I'm remembering everything right, please post errors/suggestions.
If anyone wants to do the work to make it fully auto by writing the rails and recall points for all the monsters, they have my blessing to post them and I will integrate it and credit them - if this happens a year from now or something, and I seem to have disappeared for a long period, they can just start a new script and give me credit.
;The Elwoodinator...
set %obsidian_cont XXXXXX
set %magic_item_cont XXXXXX
set %unsorted_bags XXXXXX
set %primary_runebook_id XXXXXX
;recall, gate, sacred_journey
set %travel_kind sacred_journey
set %fishing_spot #true
set %current_step 0
;step 0 - recall to elwood to start
;step 1 - talk to elwood
;step 2 - recall to fishing/start fishing
;step 3 - recall to elwood/talk to elwood
;step 4 - recall to alberta/talk to alberta/get paiting done
;step 5 - recall to elwood/talk to elwood
;step 6 - recall to gabriel/talk to gabriel
;step 7 - recall to music/get music for all three locations untill found
;step 8 - recall to gabriel/talk to gabriel
;step 9 - recall to elwood/talk to elwood
;step 10 - recall to thomas/talk to thomas/bring up quest log
;step 11 - user section for painting monsters, return when final monster unchecked
;step 12 - recall to thomas/talk to thomas
;step 13 - recall to elwood/talk to elwood
;step 14 - walk to bank/unload items/walk back to elwood
set %elwood_rune 1
set %haven_lake_rune 2
set %alberta_rune 3
set %gabriel_rune 4
set %nujelm_theater_rune 5
set %jhelom_theater_rune 7
set %britain_theater_rune 6
set %tomas_rune 8
set %elwood_name Elwood McCarrin the well-known collector
set %alberta_name Alberta Giacco the Respected Painter
set %gabriel_name Gabriel Piete the renown minstrel
set %nujelm_theater_impresario_name Haynes the impresario
set %jhelom_theater_impresario_name Addison the impresario
set %britain_theater_impresario_name Porter the impresario
set %tomas_name Tomas O'Neerlan the famed toymaker
set %runebook_type ZBN
set %fishing_pole_type XHF_KDF
set %betrayer_type DBB
set %bog_thing_type QGB
set %bogling_type VGB
set %gazer_type MD
set %giant_beetle_type ZGB
set %giant_black_widow_type PI
set %giant_scorpion_type UE
set %juggernaut_type MGB
set %juka_mage_type BBB
set %juka_warrior_type CBB
set %lich_type WD
set %meer_mage_type OGB
set %meer_warrior_type NGB
set %mongbat_type BE
set %mummy_type WI
set %pixie_type WH
set %plague_beast_type JGB
set %sand_vortex_type AHB
set %stone_gargoyle_type N
set %swamp_dragon_type MHB
set %wisp_type EF
set %random 1
set *gonzostk_function timer
; ******************************************************
;startup
event macro 8 7
wait 20
gosub find_runebook %primary_runebook_id
set %primary_runebook_id #result
gosub find_fishing_pole
set %fishing_pole_id #result
gosub check_for_mount
set %mount_exists #result
set *gonzostk_start_time #scnt2
while #true
{
if %current_step = 0
{
gosub travel_to %elwood_rune
}
if %current_step = 1
{
gosub find_person %elwood_name
gosub talk_to #result
while #contsize <> 507_436 && #contsize <> 463_414
{
wait 1
}
if #contsize = 463_414
{
gosub gump_set 463_414 245 345
display You already have a Quest - only one Quest allowed at a time
halt
}
else
{
gosub gump_set 507_436 370 400 463_414 245 345
}
}
if %current_step = 2
{
gosub travel_to %haven_lake_rune
gosub fish %fishing_pole_id
}
if %current_step = 3
{
gosub travel_to %elwood_rune
gosub find_person %elwood_name
gosub talk_to #result
gosub gump_set 463_414 245 345
}
if %current_step = 4
{
gosub travel_to %alberta_rune
wait 5
gosub find_person %alberta_name
gosub talk_to #result
gosub gump_set 463_414 245 345
move 2899 706 0 3s
if #charposx <> 2899 || #charposy <> 706
event pathfind 2899 706 0
wait 30s
gosub gump_set 463_414 245 345
}
if %current_step = 5
{
gosub travel_to %elwood_rune
gosub find_person %elwood_name
gosub talk_to #result
gosub gump_set 463_414 245 345
}
if %current_step = 6
{
gosub travel_to %gabriel_rune
wait 5
gosub find_person %gabriel_name
gosub talk_to #result
gosub gump_set 463_414 245 345
}
if %current_step = 7
{
set %found_music #false
gosub travel_to %nujelm_theater_rune
wait 5
gosub find_person %nujelm_theater_impresario_name
gosub talk_to #result
wait 5
gosub music_check
set %found_music #result
if ! %found_music
{
gosub travel_to %jhelom_theater_rune
wait 5
gosub find_person %jhelom_theater_impresario_name
gosub talk_to #result
wait 5
gosub music_check
set %found_music #result
if ! %found_music
{
gosub travel_to %britain_theater_rune
wait 5
gosub find_person %britain_theater_impresario_name
gosub talk_to #result
wait 5
gosub music_check
set %found_music #result
if ! %found_music
{
display ok We can't find music!! You'll have to work it out and resume the script when finished.
pause
}
}
}
}
if %current_step = 8
{
gosub travel_to %gabriel_rune
gosub find_person %gabriel_name
gosub talk_to #result
gosub gump_set 463_414 245 345
}
if %current_step = 9
{
gosub travel_to %elwood_rune
gosub find_person %elwood_name
gosub talk_to #result
gosub gump_set 463_414 245 345
}
if %current_step = 10
{
gosub travel_to %tomas_rune
gosub find_person %tomas_name
gosub talk_to #result
gosub gump_set 463_414 245 345
gosub gump_set 463_414 245 345
gosub gump_set 120_118 60 50
}
if %current_step = 11
{
sound
gosub auto_painting
}
if %current_step = 12
{
gosub travel_to %tomas_rune
gosub find_person %tomas_name
gosub talk_to #result
gosub gump_set 463_414 245 345
}
if %current_step = 13
{
gosub travel_to %elwood_rune
gosub find_person %elwood_name
gosub talk_to #result
gosub gump_set 463_414 245 345
wait 10
gosub gump_set 463_414 245 345
}
if %current_step = 14
{
sound
gosub move -WC 3493 2572 20
wait 10
event macro 1 0 bank
while #contsize <> 180_240
{
wait 1
}
wait 20
finditem CKF C_ , #backpackid
set %count #findcnt
if #findcnt > 0
{
for %i 1 %count
{
finditem CKF C_ , #backpackid
set %id #findid
gosub loot_reward_bag %id %obsidian_cont %magic_item_cont
if #result
{
exevent Drag %id
wait 20
if %random = 1
{
set %x #charposx - 1
set %y #charposy + 1
}
if %random = 2
{
set %x #charposx - 1
set %y #charposy + 0
}
if %random = 3
{
set %x #charposx - 0
set %y #charposy + 1
set %random 0
}
set %random %random + 1
exevent dropg %x %y
}
else
{
exevent drag %id
wait 20
exevent dropc %unsorted_bags
}
ignoreitem %id
wait 20
}
}
gosub move -WC 3499 2567 14
}
if %current_step > 14
{
set %current_step 0
}
set %current_step %current_step + 1
}
; ******************************************************
sub gump_set
for %gumpset_loop 1 %0
set %loc . %gumpset_loop % . %gumpset_loop ;setup local variables
set %gumpset_loopmax %0
set %gumpset_loop 1
while %gumpset_loop < %gumpset_loopmax
{
set %gumpset_size %loc . %gumpset_loop
set %wait_count 0
while #contsize <> %gumpset_size
{
set %wait_count %wait_count + 1
wait 1
if %wait_count > 20
{
break
}
}
set %gumpset_xoff %gumpset_loop + 1
set %gumpset_yoff %gumpset_loop + 2
set %gumpset_x %loc . %gumpset_xoff + #contposx
set %gumpset_y %loc . %gumpset_yoff + #contposy
click %gumpset_x %gumpset_y
set %gumpset_loop %gumpset_loop + 3
}
return
; ******************************************************
sub find_runebook
set %runebook %1
while #true
{
finditem %runebook C_ , #backpackid
if #findcnt < 1
{
display ok Please target the primary runebook for travel.
set #targcurs 1
while #targcurs = 1
{
wait 1
}
set %temp #ltargetid
finditem %temp C_ , #backpackid
if #findcnt > 0
{
if #findtype = %runebook_type
{
set %runebook %temp
return %runebook
}
else
{
display ok Selected is not a valid runebook.
}
}
else
{
display ok Selected runebook must be in the main level of your backpack.
}
}
else
{
set %runebook #findid
return %runebook
}
}
return
; ******************************************************
; ******************************************************
sub find_fishing_pole
while #true
{
finditem %fishing_pole_type
if #findcnt > 0
{
set %fishing_pole_id #findid
return %fishing_pole_id
}
else
{
display ok Can't find fishing pole... press play in EUO when you have one!
pause
}
wait 1
}
return
; ******************************************************
; ******************************************************
sub travel_to
set %rune_number %1
while #true
{
set %session_charposx #charposx
set %session_charposy #charposy
if %travel_kind = gate
{
set %failure #true
set %fails 0
while %failure
{
gosub use_runebook %primary_runebook_id %rune_number %travel_kind
gosub wait_for_moongate 40
set %moongate #result
if %moongate = time_out
{
set %fails %fails + 1
if %fails > 5
{
display ok Cannot gate for some reason, halting.
halt
}
}
else
{
set %failure #false
}
}
gosub use_moongate %moongate
}
else
{
gosub use_runebook %primary_runebook_id %rune_number %travel_kind
}
gosub wait_for_movement 80
if ! #result
{
set %message Dificulties , #spc , moving , #spc , you , #spc , to , #spc , %rune_number
set %message %message , , , #spc , please , #spc , move , #spc , there , #spc , yourself , #spc , and , #spc , press , #spc , play , #spc , in , #spc , EUO.
display ok %message
pause
return
}
else
{
return
}
}
return
; ******************************************************
; ******************************************************
sub find_person
set %name %1
findpersonagain:
set %spaces 0
while #true
{
finditem HS_IS G_ , %spaces
if #findcnt > 0
{
event property #findid
if %name in #property
{
ignoreitem reset 1
return #findid
}
else
{
ignoreitem #findid 1
}
}
else
{
set %spaces %spaces + 1
if %spaces > 50
{
set %spaces 2
}
}
}
return
; ******************************************************
; ******************************************************
sub talk_to
set %person_id %1
set %spaces 0
while #true
{
finditem %person_id G_ , %spaces
if #findcnt > 0
{
if %spaces > 20
{
set %spaces %spaces + 1
gosub move ToObject %person_id %spaces
}
exevent popup %person_id
while #contsize <> 108_60
{
wait 1
}
wait 5
set %clickx #contposx + 20
set %clicky #contposy + 40
click %clickx %clicky
return #true
}
else
{
set %spaces %spaces + 1
if %spaces > 50
{
display ok Can't find %name ... script will halt.
halt
}
}
}
return
; ******************************************************
; ******************************************************
sub fish
gosub prefish
wait 20
set %pearls_found 0
set %msg_no_pearl it_doesn't_have_a_rainbow_pearl
set %msg_has_pearl and_find_a_rainbow_pearl_inside_of_it
set %msg_cannot_be_seen target_cannot_be_seen
if ! %fishing_spot || *gonzos_elwood_fishing_x = null || *gonzos_elwood_fishing_y = null || *gonzos_elwood_fishing_z = null
{
gosub get_fishing_spot %fishing_pole_id
wait 4s
}
while #true
{
set #LTargetX *gonzos_elwood_fishing_x
set #LTargetY *gonzos_elwood_fishing_y
set #LTargetZ *gonzos_elwood_fishing_z
set #LTargetKind 3
set #LObjectID %fishing_pole_id
event macro 17
target 4s
set %jstart #jindex + 1
event macro 22
wait 2s
gosub read_journal %jstart 60 %msg_no_pearl %msg_has_pearl %msg_cannot_be_seen
set %journal_result #result
if %journal_result = 0
{
display ok Timing failure, please report. Script halted.
halt
}
if %journal_result = 3
{
display ok Fishing spot failed... let's get a new spot!
gosub get_fishing_spot
}
if %journal_result = 2
{
set %pearls_found %pearls_found + 1
}
if %pearls_found > 5
{
gosub postfish
return
}
}
return
; ******************************************************
; ******************************************************
sub get_fishing_spot
display ok Please target your fishing spot.
;set #LObjectID %fishing_pole_id
;event macro 17
set #ltargetkind 3
set #targcurs 1
chooseskill Dete
set %DeteLock #skilllock
exevent SkillLock Dete locked ;temporarily lock Det. Hidden
event macro 13 14
while #targcurs = 1
wait 2
exevent SkillLock Dete %DeteLock ;reset Det. Hidden Lock status
set *gonzos_elwood_fishing_x #ltargetx
set *gonzos_elwood_fishing_y #ltargety
set *gonzos_elwood_fishing_z #ltargetz
set %fishing_spot #true
return
; ******************************************************
; ******************************************************
sub PreFish
event macro 24 2 ;disarm Right
set %rhand #RHandID
wait 50
event macro 24 1 ;disarm Left
set %lhand #LHandID
wait 50
if %mount_exists
{
set #lobjectid #charid
event Macro 17 0
}
return
; ******************************************************
; ******************************************************
sub PostFish
event macro 24 1 ;disarm Left - the fishing rod
wait 50
set #RHandID %rhand
event macro 24 2 ;arm Right
wait 50
set #LHandID %lhand
event macro 24 1 ;arm Left
wait 50
if %mount_exists
{
set #lobjectid %mount_id
event macro 17 0
}
return
; ******************************************************
; ******************************************************
sub check_for_mount
set #lobjectid #charid
event Macro 17 0
wait 20
findItem ZGB_OF_MG_SG_EG_WJ_BK_MHB_HHB_SH_CG_JG_KG G_2
if #findcnt > 0
{
set %mount_id #findid
set #lobjectid %mount_id
event macro 17 0
wait 20
return #true
}
return #false
; ******************************************************
; ******************************************************
sub music_check
while #contsize <> 463_440 && #contsize <> 463_414
{
wait 1
}
if #contsize = 463_440
{
wait 5
gosub gump_set 463_440 370 400 463_414 245 345
return #true
}
else
{
gosub gump_set 463_414 245 345
return #false
}
return
; ******************************************************
; ******************************************************
; ***** Special Sub: Read Journal
; ***** Please note: This starts on the value passed, so
; ***** if you want to begin scanning AFTER calling it,
; ***** you will need to add 1 to your passed jindex value.
; ***** Wait time is about 5 per second, roughly.
; ******************************************************
sub read_journal
set %jindex_start %1
set %wait_time %2
if %wait_time < 1
{
set %timed #false
}
else
{
set %timed #true
}
set %message_count %0 - 2
for %i 3 %0
{
set %digit %i - 2
set %message . %digit % . %i
}
while #true
{
set %jindex_now #jindex
for %i %jindex_start %jindex_now
{
scanjournal %i
for %j 1 %message_count
{
if %message . %j in #journal
{
return %j
}
}
}
set %jindex_start %jindex_now
wait 1
if %timed
{
set %wait_time %wait_time - 1
if %wait_time < 1
{
return 0
}
}
}
return
; ******************************************************
; ******************************************************
; ***** Special Sub: Use Runebook
; ******************************************************
sub use_runebook
set %runebook %1
set %page %2
set %action %3
if #contsize <> 452_236
{
gosub open_runebook %runebook
}
wait 5
set %contposx #contposx
set %contposy #contposy
set %x %contposx + 140 + ( %page - 1 ) / 2 * 35
if ( %3 - 1 ) / 2 > 3
set %x %x + 30
set %y %contposy + 195
click %x %y f dmc
wait 10
while #contsize <> 452_236
{
wait 1
}
if %action = set_default
{
set %x %contposx + 165 + ( ( %page - 1 ) % 2 ) * 140
set %y %contposy + 25
}
if %action = drop_rune
{
set %x %contposx + 140 + ( ( %page - 1 ) % 2 ) * 160
set %y %contposy + 120
}
if %action = recall
{
set %x %contposx + 140 + ( ( %page - 1 ) % 2 ) * 160
set %y %contposy + 145
}
if %action = gate
{
set %x %contposx + 140 + ( ( %page - 1 ) % 2 ) * 160
set %y %contposy + 165
}
if %action = sacred_journey
{
set %x %contposx + 140 + ( ( %page - 1 ) % 2 ) * 160
set %y %contposy + 180
}
click %x %y f dmc
return
; ******************************************************
; ******************************************************
; ***** Special Sub: Open Runebook
; ******************************************************
sub open_runebook
set %book %1
set #lobjectid %book
event macro 17 0
for %tick 1 40
{
wait 1
if #contsize = 452_236
{
return #true
}
}
set #lobjectid %book
event macro 17 0
for %tick 1 40
{
wait 1
if #contsize = 452_236
{
return #true
}
}
set #lobjectid %book
event macro 17 0
for %tick 1 40
{
wait 1
if #contsize = 452_236
{
return #true
}
}
display ok Error opening runebook, please post this message in the forums with a summary of what happened.
halt
return
; ******************************************************
; ******************************************************
; ***** Special Sub: Use Moongate
; ******************************************************
sub use_moongate
set %moongate %1
set %charposx #charposx
set %charposy #charposy
set #lobjectid %moongate
event macro 17 0
return
; ******************************************************
; ******************************************************
; ***** Special Sub: Wait for Movement
; ******************************************************
sub wait_for_movement
set %timeout %1
for %tick 1 %timeout
{
if #charposx <> %session_charposx || #charposy <> %session_charposy
{
return #true
}
else
{
wait 1
}
}
return #false
; ******************************************************
; ******************************************************
; ***** Special Sub: Wait for Moongate
; ******************************************************
sub wait_for_moongate
set %max_wait %1
for %tick 1 %max_wait
{
finditem otf_jef g_3
if #findcnt > 0
{
return #findid
}
wait 1
}
return time_out
; ******************************************************
sub move
;===============================================
; Script Name: Move to Something
; Author: MMorning
; Version: 2.3
; Client Tested with: 4.0.10b
; EUO version tested with: 1.42 (00A5)
; Shard OSI / FS: OSI / FS
; Revision Date: 05June03
; Public Release: 05June03
; Global Variables Used: N/A
; Purpose: move to something you want to get close to.
; param %1 ; -WC ; for world coords or ToObject ; to move an objetc
; %2 world coords X or item type
; %3 world coords Y or search_range
; %4 world coords z
; example: to move to an object:
; call movesub.txt move ToObject %item %search_range
; gosub move ToObject %item %search_range
; example: to move to world coords
; call movesub.txt move -WC x_coords y_coords z_coords
; gosub move -WC x_cords y_coords z_coords
;===============================================
deleteJournal
set %J_CantGetThere Can't_get_there
set %found_x -1
set %found_y -1
set %found_z -1
;
if %0 >= 3
{
if %1 = ToObject
{
finditem %2 G_ , %3
wait 1s
if #findkind <> -1
{
set %Found_X #findx
set %Found_y #findy
set %found_z #findz
}
}
if %1 = -wc
{
set %found_x %2
set %found_y %3
set %found_z #findz
if %0 >= 4
{
set %found_z %4
}
}
if %found_X >= 0
{
moveloop:
Set %J_Index #JINDEX
set %dx #charposx - %found_x abs
set %dy #charposy - %found_y abs
if %dx => 2 || %dy => 2 ||
{
event pathfind %found_X %found_y
wait 1s
for %find_loop %J_Index #jindex
{
Scanjournal %findloop
if %J_CantGetThere in #journal
return
}
goto moveloop
}
}
}
return
; ######################################################
; ######################################################
; ######################################################
; ######################################################
; ######################################################
; ######################################################
sub auto_painting
set %betrayer_type_needed #false
set %bog_thing_type_needed #false
set %bogling_type_needed #false
set %gazer_type_needed #false
set %giant_beetle_type_needed #false
set %giant_black_widow_type_needed #false
set %giant_scorpion_type_needed #false
set %juggernaut_type_needed #false
set %juka_mage_type_needed #false
set %juka_warrior_type_needed #false
set %lich_type_needed #false
set %meer_mage_type_needed #false
set %meer_warrior_type_needed #false
set %mongbat_type_needed #false
set %mummy_type_needed #false
set %pixie_type_needed #false
set %plague_beast_type_needed #false
set %sand_vortex_type_needed #false
set %stone_gargoyle_type_needed #false
set %swamp_dragon_type_needed #false
set %wisp_type_needed #false
set %started #false
finditem BXF C_ , #backpackid
if #findcnt > 0
{
set %paints_and_brush #findid
}
else
{
display ok No paints!
halt
}
set %monster_toggler 0
menu window size 200 500
menu clear
gosub write_monster_menu
while #true
{
gosub read_monster_menu
if #result && %started
{
return
}
for %r 1 21
{
gosub get_one_moster_type %r
set %monster_types #result
if ! %monster_types
{
finditem %monster_types G
if #findcnt > 0
{
set %monster_to_target #findid
set #lobjectid %paints_and_brush
event macro 17 0
;set %jstart2 #jindex
wait 15
finditem ZYF C_ , #backpackid
set %current_images #findcnt
set #ltargetid %monster_to_target
set #ltargetkind 1
event macro 22 0
;set %msg_took_picture The enchanted paints swirl for a moment then an image begins to take shape.
;set %msg_no_interest_in_that You have no interest in that
;set %msg_no_interest_in_creature You have no interest in capturing the image of this creature.
;gosub read_journal %jstart2 60 %msg_took_picture %msg_no_interest_in_that %msg_no_interest_in_creature
;set %journal_result #result
;if %journal_result = 0
;{
; display ok journal read error, please report.
;}
;if %journal_result = 1
;{
set %t 40
while %t > 0
{
finditem ZYF C_ , #backpackid
if #findcnt > %current_images
{
set % . %current_monster , _type_needed #false
gosub write_monster_menu
set %t 0
}
else
{
set %t %t - 1
wait 1
}
}
;}
;if %journal_result = 3
;{
; display ok Type error!
; pause
;}
}
}
}
}
return
sub get_one_moster_type
set %monster_toggler %1
if ( %monster_toggler = 1 ) && %betrayer_type_needed
{
set %current_monster betrayer
return %betrayer_type
}
if ( %monster_toggler = 2 ) && %bog_thing_type_needed
{
set %current_monster bog_thing
return %bog_thing_type
}
if ( %monster_toggler = 3 ) && %bogling_type_needed
{
set %current_monster bogling
return %bogling_type
}
if ( %monster_toggler = 4 ) && %gazer_type_needed
{
set %current_monster gazer
return %gazer_type
}
if ( %monster_toggler = 5 ) && %giant_beetle_type_needed
{
set %current_monster giant_beetle
return %giant_beetle_type
}
if ( %monster_toggler = 6 ) && %giant_black_widow_type_needed
{
set %current_monster giant_black_widow
return %giant_black_widow_type
}
if ( %monster_toggler = 7 ) && %giant_scorpion_type_needed
{
set %current_monster giant_scorpion
return %giant_scorpion_type
}
if ( %monster_toggler = 8 ) && %juggernaut_type_needed
{
set %current_monster juggernaut
return %juggernaut_type
}
if ( %monster_toggler = 9 ) && %juka_mage_type_needed
{
set %current_monster juka_mage
return %juka_mage_type
}
if ( %monster_toggler = 10 ) && %juka_warrior_type_needed
{
set %current_monster juka_warrior
return %juka_warrior_type
}
if ( %monster_toggler = 11 ) && %lich_type_needed
{
set %current_monster lich
return %lich_type
}
if ( %monster_toggler = 12 ) && %meer_mage_type_needed
{
set %current_monster meer_mage
return %meer_mage_type
}
if ( %monster_toggler = 13 ) && %meer_warrior_type_needed
{
set %current_monster meer_warrior
return %meer_warrior_type
}
if ( %monster_toggler = 14 ) && %mongbat_type_needed
{
set %current_monster mongbat
return %mongbat_type
}
if ( %monster_toggler = 15 ) && %mummy_type_needed
{
set %current_monster mummy
return %mummy_type
}
if ( %monster_toggler = 16 ) && %pixie_type_needed
{
set %current_monster pixie
return %pixie_type
}
if ( %monster_toggler = 17 ) && %plague_beast_type_needed
{
set %current_monster plague_beast
return %plague_beast_type
}
if ( %monster_toggler = 18 ) && %sand_vortex_type_needed
{
set %current_monster sand_vortex
return %sand_vortex_type
}
if ( %monster_toggler = 19 ) && %stone_gargoyle_type_needed
{
set %current_monster stone_gargoyle
return %stone_gargoyle_type
}
if ( %monster_toggler = 20 ) && %swamp_dragon_type_needed
{
set %current_monster swamp_dragon
return %swamp_dragon_type
}
if ( %monster_toggler = 21 ) && %wisp_type_needed
{
set %current_monster wisp
return %wisp_type
}
return #true
sub read_monster_menu
set %complete #true
menu get betrayer_checkbox
set %betrayer_type_needed #menures
if #menures
{
set %complete #false
set %started #true
}
menu get bog_thing_checkbox
set %bog_thing_type_needed #menures
if #menures
{
set %complete #false
set %started #true
}
menu get bogling_checkbox
set %bogling_type_needed #menures
if #menures
{
set %complete #false
set %started #true
}
menu get gazer_checkbox
set %gazer_type_needed #menures
if #menures
{
set %complete #false
set %started #true
}
menu get giant_beetle_checkbox
set %giant_beetle_type_needed #menures
if #menures
{
set %complete #false
set %started #true
}
menu get giant_black_widow_checkbox
set %giant_black_widow_type_needed #menures
if #menures
{
set %complete #false
set %started #true
}
menu get giant_scorpion_checkbox
set %giant_scorpion_type_needed #menures
if #menures
{
set %complete #false
set %started #true
}
menu get juggernaut_checkbox
set %juggernaut_type_needed #menures
if #menures
{
set %complete #false
set %started #true
}
menu get juka_mage_checkbox
set %juka_mage_type_needed #menures
if #menures
{
set %complete #false
set %started #true
}
menu get juka_warrior_checkbox
set %juka_warrior_type_needed #menures
if #menures
{
set %complete #false
set %started #true
}
menu get lich_checkbox
set %lich_type_needed #menures
if #menures
{
set %complete #false
set %started #true
}
menu get meer_mage_checkbox
set %meer_mage_type_needed #menures
if #menures
{
set %complete #false
set %started #true
}
menu get meer_warrior_checkbox
set %meer_warrior_type_needed #menures
if #menures
{
set %complete #false
set %started #true
}
menu get mongbat_checkbox
set %mongbat_type_needed #menures
if #menures
{
set %complete #false
set %started #true
}
menu get mummy_checkbox
set %mummy_type_needed #menures
if #menures
{
set %complete #false
set %started #true
}
menu get pixie_checkbox
set %pixie_type_needed #menures
if #menures
{
set %complete #false
set %started #true
}
menu get plague_beast_checkbox
set %plague_beast_type_needed #menures
if #menures
{
set %complete #false
set %started #true
}
menu get sand_vortex_checkbox
set %sand_vortex_type_needed #menures
if #menures
{
set %complete #false
set %started #true
}
menu get stone_gargoyle_checkbox
set %stone_gargoyle_type_needed #menures
if #menures
{
set %complete #false
set %started #true
}
menu get swamp_dragon_checkbox
set %swamp_dragon_type_needed #menures
if #menures
{
set %complete #false
set %started #true
}
menu get wisp_checkbox
set %wisp_type_needed #menures
if #menures
{
set %complete #false
set %started #true
}
return %complete
sub write_monster_menu
menu clear
menu show
menu check betrayer_checkbox 10 10 180 15 %betrayer_type_needed Betrayer
menu check bog_thing_checkbox 10 30 180 15 %bog_thing_type_needed Bog Thing
menu check bogling_checkbox 10 50 180 15 %bogling_type_needed Bogling
menu check gazer_checkbox 10 70 180 15 %gazer_type_needed Gazer
menu check giant_beetle_checkbox 10 90 180 15 %giant_beetle_type_needed Giant Beetle
menu check giant_black_widow_checkbox 10 110 180 15 %giant_black_widow_type_needed Black Widow
menu check giant_scorpion_checkbox 10 130 180 15 %giant_scorpion_type_needed Giant Scorpion
menu check juggernaut_checkbox 10 150 180 15 %juggernaut_type_needed Juggernaut
menu check juka_mage_checkbox 10 170 180 15 %juka_mage_type_needed Juka Mage
menu check juka_warrior_checkbox 10 190 180 15 %juka_warrior_type_needed Juka Warrior
menu check lich_checkbox 10 210 180 15 %lich_type_needed Lich
menu check meer_mage_checkbox 10 230 180 15 %meer_mage_type_needed Meer Mage
menu check meer_warrior_checkbox 10 250 180 15 %meer_warrior_type_needed Meer Warrior
menu check mongbat_checkbox 10 270 180 15 %mongbat_type_needed Mongbat
menu check mummy_checkbox 10 290 180 15 %mummy_type_needed Mummy
menu check pixie_checkbox 10 310 180 15 %pixie_type_needed Pixie
menu check plague_beast_checkbox 10 330 180 15 %plague_beast_type_needed Plague Beast
menu check sand_vortex_checkbox 10 350 180 15 %sand_vortex_type_needed Sand Vortex
menu check stone_gargoyle_checkbox 10 370 180 15 %stone_gargoyle_type_needed Stone Gargoyle
menu check swamp_dragon_checkbox 10 390 180 15 %swamp_dragon_type_needed Swamp Dragon
menu check wisp_checkbox 10 410 180 15 %wisp_type_needed Wisp
return
sub loot_reward_bag
set %id %1
set %obsidian_cont %2
set %magic_item_cont %3
set #lobjectid %id
event macro 17 0
while #contsize <> 176_194
{
wait 1
}
wait 20
set %contid #contid
finditem POF C_ , %contid
if #findcnt > 0
{
exevent drag #findid #findstack
wait 15
exevent dropc #backpackid
wait 15
}
wait 10
finditem JSL C_ , %contid
if #findcnt > 0
{
exevent drag #findid #findstack
wait 15
exevent dropc %obsidian_cont
wait 15
}
wait 10
finditem * C_ , %contid
if #findcnt > 0
{
exevent drag #findid #findstack
wait 15
exevent dropc %magic_item_cont
wait 15
}
wait 20
gosub get_contents %id
if #result > 0
{
return #false
}
finditem ZYF C_ , #backpackid
set %counted #findcnt
for %k 1 %counted
{
finditem ZYF C_ , #backpackid
exevent drag #findid
wait 20
exevent dropc %id
wait 20
}
return #true
sub get_contents
set %itemid %1
event property %itemid
set %prop #property
str pos %prop contents: , #spc
set %start #strres + 10
str pos %prop /125
set %end #strres - %start
str mid %prop %start %end
set %weight #strres
return %weight
Post Merge: January 11, 2011, 03:03:29 PM
So, to sum up, anyone on OSI willing to give this a try for me?
-
wow I am glad to see this back out there!!! It works great until it goes to the second theater...it does not seem to recognize the impresario. How can I help you to correct that?
-
Is the name right in the script setup in the beginning?