Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =begin
- Documentation: https://elanthipedia.play.net/Lich_script_repository#theurgy
- =end
- custom_require.call(%w[common common-items common-money common-travel drinfomon spellmonitor equipmanager])
- class DankTheurgy
- include DRC
- include DRCI
- include DRCM
- include DRCT
- ######################## GET/PUT ########################
- def put_in_container(item)
- bput "put #{item} in my #{@theurgy_supply_container}", 'You put', 'What were you referring to'
- end
- def get_from_container(item)
- bput "get #{item} from my #{@theurgy_supply_container}", 'You get', 'I could not find', 'What were you referring to'
- end
- ######################## COMMUNES ########################
- def comm_eluned
- fput "stow #{GameObj.right_hand.noun}" if GameObj.right_hand.name != 'Empty'
- fput "stow #{GameObj.left_hand.noun}" if GameObj.left_hand.name != 'Empty'
- walk_to('2801') if @hometown.eql? 'Shard'
- walk_to('764') if @hometown.eql? 'Crossing'
- forage? 'dirt'
- get_from_container(@water_holder)
- bput('commune eluned', 'completed this commune too recently', 'You grind some dirt in your fist')
- put_in_container(@water_holder)
- fput('drop dirt') if [left_hand, right_hand].include?('dirt')
- end
- def comm_tamsine
- if inside?('holy water', @water_holder)
- pause 1
- waitrt?
- get_from_container(@water_holder)
- fput "sprinkle #{@water_holder} on #{checkname}"
- bput('commune tamsine', 'commune too recently', 'You feel warmth spread throughout your body')
- put_in_container(@water_holder)
- else
- Flags.delete('theurgy-tamsine')
- nil
- end
- end
- def comm_truff
- fput "stow #{GameObj.right_hand.noun}" if GameObj.right_hand.name != 'Empty'
- fput "stow #{GameObj.left_hand.noun}" if GameObj.left_hand.name != 'Empty'
- bput('prep gg', 'You begin')
- bput('cast drink', 'You raise')
- case bput('commune truffenyi', 'ommune too recently', 'The power of Truffenyi has answered your prayer')
- when 'The power of Truffenyi has answered your prayer'
- fput 'drop orb'
- end
- fput "drop #{GameObj.right_hand.noun}" if GameObj.right_hand.name != 'Empty'
- end
- ######################## DEVOTION RITUALS ########################
- def clean_altar
- return unless @hometown.eql? 'Shard'
- return unless inside?('holy water', @water_holder)
- get_from_container(@water_holder)
- fput 'clean altar with holy water'
- waitfor 'You finish your job'
- put_in_container(@water_holder)
- waitrt?
- end
- def buy_flint
- return unless withdraw_exact_amount?('1 gold', @settings)
- if @hometown.eql?('Crossing')
- walk_to('8265')
- 5.times do
- fput('buy flint')
- fput('offer 143 kro')
- fput('offer 143 kro')
- put_in_container('flint')
- end
- elsif @hometown.eql?('Shard')
- walk_to('9747')
- 5.times do
- fput('buy flint')
- fput('offer 36 dok')
- fput('offer 36 dok')
- put_in_container('flint')
- end
- end
- end
- def buy_incense
- return unless withdraw_exact_amount?('5 silver', @settings)
- if @hometown.eql?('Crossing')
- walk_to('19073')
- 5.times do
- fput('buy incense')
- fput('offer 62 kro')
- fput('offer 62 kro')
- put_in_container('incense')
- end
- elsif @hometown.eql?('Shard')
- walk_to('8179')
- fput('go divy arch')
- pause 1
- fput('go door')
- pause 1
- 5.times do
- fput('buy incense')
- fput('offer 45 dok')
- fput('offer 45 dok')
- put_in_container('incense')
- end
- fput('out')
- pause 1
- fput('go arch')
- pause 1
- end
- end
- def tithe
- return unless @tithe
- return unless withdraw_exact_amount?('5 silver', @settings)
- if @hometown.eql?'Crossing'
- walk_to(741)
- bput('put 5 silver kro in almsbox', 'You drop', 'But you do not')
- elsif @hometown.eql?'Shard'
- walk_to(8179)
- fput('go smar arch')
- bput('put 5 silver dok in almsbox', 'You drop', 'But you do not')
- fput('go arch')
- end
- end
- def pray
- waitrt?
- if @favor_god
- bput("pray #{@favor_god}", @favor_god, 'Lady of healing', 'reward of hard effort', 'sign with your hand', 'god of the Void', 'bane of accursed', 'blessing be upon your love', 'honorable and true', 'glory shine on us', 'fire across the lands', 'madness and pain', 'floods strike down', 'Lady of supreme beauty')
- else
- bput('pray meraud', 'meraud')
- end
- waitrt?
- end
- def find_seed
- return unless inside?('holy water', @water_holder)
- walk_to '1032' if @hometown.eql?'Crossing'
- walk_to '2789' if @hometown.eql?'Shard'
- exit unless DRRoom.npcs.empty? # Invasion check
- while bput('gather seed', 'You find a tiny', 'This is not a good', 'You come up empty') == 'You come up empty'
- waitrt?
- end
- waitrt?
- plant_seed
- end
- def plant_seed
- walk_to '1031' if @hometown.eql?'Crossing'
- walk_to '6462' if @hometown.eql?'Shard'
- fput('plant seed')
- get_from_container(@water_holder)
- fput("sprinkle #{@water_holder} on room")
- put_in_container(@water_holder)
- end
- def pray_badge
- case bput('remove badge', 'You take off', 'Remove what')
- when 'You take off'
- fput('pray badge')
- pause 2
- waitrt?
- bput 'wear badge', 'You put on a', 'You are already'
- when 'Remove what'
- case bput('get badge', 'You get', 'I could not find', 'What were you referring to')
- when 'You get'
- fput('pray badge')
- pause 2
- waitrt?
- put_in_container('pilgrim badge')
- end
- end
- end
- def dance
- walk_to('5989') if @hometown.eql?('Crossing')
- walk_to('8154') if @hometown.eql?('Shard')
- until ['flawless performance to those on high', 'In your condition', 'Your dance reaches its conclusion'].include? bput('dance', 'flawless performance to those on high', 'Your dance reaches its conclusion', 'You begin to dance', 'Your actions grow', 'Your dance', 'but you falt', 'In your condition')
- pause 1
- waitrt?
- fix_standing
- end
- waitrt?
- end
- def reflectory
- return unless @hometown.eql?('Crossing')
- walk_to('5988')
- fput('meditate')
- waitrt?
- end
- def recite_prayer
- fput "recite Meraud, power the holy fires that unleash my righteous vengeance;Chadatru, guide my sword to swing in justice;Everild, give me the power to conquer my enemies;Truffenyi, let me not lose sight of compassion and mercy;Else, I will become like those I despise;Urrem'tier, receive into your fetid grasp these wicked souls;May the Tamsine's realms never know their evil ways again;May all the Immortals guide your faithful soldier #{checkname}."
- pause 1
- waitrt?
- end
- ######################## FLAGS ########################
- Flags.add('theurgy-commune', 'fully prepared to seek assistance from the Immortals once again', 'You will not be able to open another divine conduit yet', 'You grind some dirt in your fist', 'You feel warmth spread throughout your body', 'The power of Truffenyi has answered your prayer', 'The thick smell of ozone fills your nostrils')
- def commune_check
- if !Flags['theurgy-commune']
- return true
- elsif Flags['theurgy-commune'].include? 'fully prepared to seek assistance from the Immortals once again'
- return true
- end
- end
- def wait_for_commune
- entrance_time = Time.now
- bput("play #{UserVars.song}", 'dirtiness may affect your performance', 'slightest hint of difficulty', 'You begin a', 'You struggle to begin', 'You\'re already playing a song', 'You effortlessly begin', 'You begin some', 'You cannot play', 'Play on what instrument', 'now isn\'t the best time to be playing', 'Perhaps you should find somewhere drier before trying to play')
- while !commune_check
- break if Time.now - entrance_time > 180
- pause 10
- end
- bput('stop play', 'You stop playing your song', 'In the name of', "But you're not performing")
- end
- ######################## MISC ########################
- def initialize
- #return unless DRSkill.getxp('Theurgy') < 2
- @settings = get_settings
- @theurgy_supply_container = @settings.theurgy_supply_container
- @water_holder = @settings.water_holder
- @hometown = @settings.hometown
- @favor_god = @settings.favor_god
- @safe_room = @settings.safe_room
- @tithe = @settings.tithe
- UserVars.song = @song_list.first.first unless UserVars.song
- ######################## SCRIPT ########################
- walk_to '741' if @hometown.eql?('Crossing')
- walk_to '2499' if @hometown.eql?('Shard')
- buy_incense unless inside?('incense', @theurgy_supply_container)
- buy_flint unless inside?('flint', @theurgy_supply_container)
- pray
- things_to_do = %i[comm_eluned comm_truff find_seed wait_for_commune comm_tamsine pray_badge dance clean_altar recite_prayer reflectory tithe pray]
- #things_to_do = %i[comm_eluned comm_truff find_seed pray_badge dance clean_altar recite_prayer reflectory tithe pray]
- things_to_do.each { |thing| send(thing) }
- end
- end
- DankTheurgy.new
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement