Advertisement
Guest User

Untitled

a guest
Apr 17th, 2018
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.34 KB | None | 0 0
  1. ;e Room[6274].timeto['11032'] = 100
  2. ;e Room[6274].wayto['11032'] = StringProc.new("force_go2 = proc { |room_num| go2_count = Script.running.find_all { |s| s.name == 'go2' }.length\nforce_start_script 'go2', [ room_num.to_s ]\nwait_while { Script.running.find_all { |s| s.name == 'go2' }.length > go2_count } }\nscript = Script.self\nrrcitizen = nil\nif Char.citizenship == \"River's Rest\"\n\trrcitizen = true\nend\namulet = nil\ndriftwood = nil\nclose_containers = []\nif UserVars.lootsack.nil? or UserVars.lootsack.empty?\n\tlootsack = GameObj.inv.find { |obj| obj.noun =~ /cloak|longcoat|backpack|pack/ }\nelse\n\tlootsack = GameObj.inv.find { |obj| obj.name =~ /\#{Regexp.escape(UserVars.lootsack.strip)}/i } || GameObj.inv.find { |obj| obj.name =~ /\#{Regexp.escape(UserVars.lootsack).sub(' ', ' .*')}/i }\nend\nfind_all_containers_var = nil\nfind_all_containers = proc {\n\tif find_all_containers_var.nil?\n\t\thp = proc { |ss| if ss =~ /^You are wearing/; DownstreamHook.remove('find_all_container_ids'); nil; else; ss; end }\n\t\tDownstreamHook.add('find_all_container_ids', hp)\n\t\trestore_silent = script.silent\n\t\trestore_want_downstream = script.want_downstream\n\t\trestore_want_downstream_xml = script.want_downstream_xml\n\t\tscript.silent = true\n\t\tscript.want_downstream = false\n\t\tscript.want_downstream_xml = true\n\t\tclear\n\t\tput 'inventory containers'\n\t\tscript.silent = restore_silent\n\t\ttimeout = Time.now + 30\n\t\tcontainer_ids = []\n\t\twhile (Time.now < timeout) and (line = get)\n\t\t\tif line =~ /^You are wearing/\n\t\t\t\tcontainer_ids = line.scan(/<a exist=\"([^\"]+)\"/).flatten\n\t\t\t\tbreak\n\t\t\tend\n\t\tend\n\t\tscript.want_downstream = restore_want_downstream\n\t\tscript.want_downstream_xml = restore_want_downstream_xml\n\t\tclear\n\t\tfind_all_containers_var = container_ids.collect { |id| GameObj[id] }\n\tend\n\tfind_all_containers_var\n}\nempty_hands\nif lootsack\n\tif lootsack.contents.nil?\n\t\tresult = dothistimeout \"open #\#{lootsack.id}\", 10, /^You open|^That is already open|^There doesn't seem to be any way to do that|^What were you referring to|^I could not find what you were referring to/\n\t\tif lootsack.contents.nil? and result =~ /^That is already open/\n\t\t\tdothistimeout \"look in #\#{lootsack.id}\", 10, /^In the|^There is nothing|^That is closed|^What were you referring to|^I could not find what you were referring to|is stuffed with a variety of/\n\t\telsif result =~ /^You open/\n\t\t\tclose_containers.push(lootsack)\n\t\tend\n\tend\n\tif rrcitizen\n\t\tdriftwood = lootsack.contents.find { |obj| obj.name == 'piece of sun-washed driftwood' }\n\tend\n\tamulet = lootsack.contents.find { |obj| obj.name == 'crystal amulet' }\nend\nif amulet.nil? && driftwood.nil?\n\tfor container in find_all_containers.call\n\t\tnext if container == lootsack\n\t\tif container.contents.nil?\n\t\t\tresult = dothistimeout \"open #\#{container.id}\", 10, /^You open|^That is already open|^There doesn't seem to be any way to do that|^What were you referring to|^I could not find what you were referring to/\n\t\t\tif container.contents.nil? and result =~ /^That is already open/\n\t\t\t\tdothistimeout \"look in #\#{container.id}\", 10, /^In the|^There is nothing|^That is closed|^What were you referring to|^I could not find what you were referring to|is stuffed with a variety of/\n\t\t\telsif result =~ /^You open/\n\t\t\t\tclose_containers.push(container)\n\t\t\tend\n\t\tend\n\t\tif rrcitizen\n\t\t\tif driftwood = container.contents.find { |obj| obj.name == 'piece of sun-washed driftwood' }\n\t\t\t\tbreak\n\t\t\tend\n\t\tend\n\t\tif amulet = container.contents.find { |obj| obj.name == 'crystal amulet' }\n\t\t\tbreak\n\t\tend\n\tend\nend\nif (rrcitizen && driftwood)\n\tdothistimeout \"_drag #\#{driftwood.id} right\", 10, /^You (?:carefully )?(?:remove|grab|reach|slip|tuck)|^Get what/\nelsif amulet\n\tdothistimeout \"_drag #\#{amulet.id} right\", 10, /^You (?:carefully )?(?:remove|grab|reach|slip|tuck)|^Get what/\nelse\n\tif $go2_get_silvers\n\t\tthis_room = Room.current\n\t\tforce_go2.call('bank --disable-confirm')\n\t\tfput 'unhide' if hidden? or invisible?\n\t\twithdraw_result = dothistimeout \"withdraw 2000 silvers\", 10, /hands you [0-9]+ silvers|don't seem to have that much/\n\t\tunless withdraw_result =~ /hands you [0-9]+ silvers/\n\t\t\techo \"Too poor to go to River's Rest\"\n\t\t\texit\n\t\tend\n\t\tforce_go2.call('alchemist --disable-confirm')\n\t\tfput 'unhide' if hidden? or invisible?\n\t\tfput 'order 10'\n\t\tbuy_result = dothistimeout \"buy\", 10, /hands you a crystal amulet|Looks like you might buckle under this weight/\n\t\tunless buy_result =~ /hands you a crystal amulet/\n\t\t\techo \"Too encumbered to go to River's Rest\"\n\t\t\texit\n\t\tend\n\t\tif righthand?('amulet')\n\t\t\tamulet = GameObj.right_hand\n\t\tend\n\t\tforce_go2.call('bank --disable-confirm')\n\t\tfput 'unhide' if hidden? or invisible?\n\t\tfput 'deposit all'\n\t\tforce_go2.call('6274 --disable-confirm')\n\telse\n\t\techo 'You have no crystal amulet! If you want this script to buy you one, issue the command: ;go2 --getsilvers=on'\n\t\tclose_containers.each { |c| fput \"close #\#{c.id}\" }\n\t\tfill_hands\n\t\texit\n\tend\nend\nif (rrcitizen && driftwood)\n\tfput 'put my driftwood in boot'\nelse\n \tfput 'put my crystal amulet in boot'\nend\nmove 'go boot'\nfill_hands\n")
  3.  
  4. ;e Room[11032].timeto['6274'] = 100
  5. ;e Room[11032].wayto['6274'] = StringProc.new("force_go2 = proc { |room_num| go2_count = Script.running.find_all { |s| s.name == 'go2' }.length\nforce_start_script 'go2', [ room_num.to_s ]\nwait_while { Script.running.find_all { |s| s.name == 'go2' }.length > go2_count } }\nscript = Script.self\nrrcitizen = nil\nif Char.citizenship == \"River's Rest\"\n\trrcitizen = true\nend\namulet = nil\ndriftwood = nil\nclose_containers = []\nif UserVars.lootsack.nil? or UserVars.lootsack.empty?\n\tlootsack = GameObj.inv.find { |obj| obj.noun =~ /cloak|longcoat|backpack|pack/ }\nelse\n\tlootsack = GameObj.inv.find { |obj| obj.name =~ /\#{Regexp.escape(UserVars.lootsack.strip)}/i } || GameObj.inv.find { |obj| obj.name =~ /\#{Regexp.escape(UserVars.lootsack).sub(' ', ' .*')}/i }\nend\nfind_all_containers_var = nil\nfind_all_containers = proc {\n\tif find_all_containers_var.nil?\n\t\thp = proc { |ss| if ss =~ /^You are wearing/; DownstreamHook.remove('find_all_container_ids'); nil; else; ss; end }\n\t\tDownstreamHook.add('find_all_container_ids', hp)\n\t\trestore_silent = script.silent\n\t\trestore_want_downstream = script.want_downstream\n\t\trestore_want_downstream_xml = script.want_downstream_xml\n\t\tscript.silent = true\n\t\tscript.want_downstream = false\n\t\tscript.want_downstream_xml = true\n\t\tclear\n\t\tput 'inventory containers'\n\t\tscript.silent = restore_silent\n\t\ttimeout = Time.now + 30\n\t\tcontainer_ids = []\n\t\twhile (Time.now < timeout) and (line = get)\n\t\t\tif line =~ /^You are wearing/\n\t\t\t\tcontainer_ids = line.scan(/<a exist=\"([^\"]+)\"/).flatten\n\t\t\t\tbreak\n\t\t\tend\n\t\tend\n\t\tscript.want_downstream = restore_want_downstream\n\t\tscript.want_downstream_xml = restore_want_downstream_xml\n\t\tclear\n\t\tfind_all_containers_var = container_ids.collect { |id| GameObj[id] }\n\tend\n\tfind_all_containers_var\n}\nempty_hands\nif lootsack\n\tif lootsack.contents.nil?\n\t\tresult = dothistimeout \"open #\#{lootsack.id}\", 10, /^You open|^That is already open|^There doesn't seem to be any way to do that|^What were you referring to|^I could not find what you were referring to/\n\t\tif lootsack.contents.nil? and result =~ /^That is already open/\n\t\t\tdothistimeout \"look in #\#{lootsack.id}\", 10, /^In the|^There is nothing|^That is closed|^What were you referring to|^I could not find what you were referring to|is stuffed with a variety of/\n\t\telsif result =~ /^You open/\n\t\t\tclose_containers.push(lootsack)\n\t\tend\n\tend\n\tif rrcitizen\n\t\tdriftwood = lootsack.contents.find { |obj| obj.name == 'piece of sun-washed driftwood' }\n\tend\n\tamulet = lootsack.contents.find { |obj| obj.name == 'crystal amulet' }\nend\nif amulet.nil? && driftwood.nil?\n\tfor container in find_all_containers.call\n\t\tnext if container == lootsack\n\t\tif container.contents.nil?\n\t\t\tresult = dothistimeout \"open #\#{container.id}\", 10, /^You open|^That is already open|^There doesn't seem to be any way to do that|^What were you referring to|^I could not find what you were referring to/\n\t\t\tif container.contents.nil? and result =~ /^That is already open/\n\t\t\t\tdothistimeout \"look in #\#{container.id}\", 10, /^In the|^There is nothing|^That is closed|^What were you referring to|^I could not find what you were referring to|is stuffed with a variety of/\n\t\t\telsif result =~ /^You open/\n\t\t\t\tclose_containers.push(container)\n\t\t\tend\n\t\tend\n\t\tif rrcitizen\n\t\t\tif driftwood = container.contents.find { |obj| obj.name == 'piece of sun-washed driftwood' }\n\t\t\t\tbreak\n\t\t\tend\n\t\tend\n\t\tif amulet = container.contents.find { |obj| obj.name == 'crystal amulet' }\n\t\t\tbreak\n\t\tend\n\tend\nend\nif (rrcitizen && driftwood)\n\tdothistimeout \"_drag #\#{driftwood.id} right\", 10, /^You (?:carefully )?(?:remove|grab|reach|slip|tuck)|^Get what/\nelsif amulet\n\tdothistimeout \"_drag #\#{amulet.id} right\", 10, /^You (?:carefully )?(?:remove|grab|reach|slip|tuck)|^Get what/\nelse\n\tif $go2_get_silvers\n\t\tthis_room = Room.current\n\t\tforce_go2.call('bank --disable-confirm')\n\t\tfput 'unhide' if hidden? or invisible?\n\t\tif rrcitizen\n\t\t\twithdraw_result = dothistimeout \"withdraw 600 silvers\", 10, /hands you [0-9]+ silvers|don't seem to have that much/\n\t\t\tunless withdraw_result =~ /hands you [0-9]+ silvers/\n\t\t\t\techo \"Too poor to go to Wehnimer's Landing\"\n\t\t\t\texit\n\t\t\tend\n\t\t\tforce_go2.call('general store --disable-confirm')\n\t\t\tfput 'unhide' if hidden? or invisible?\n\t\t\tfput 'order 11'\n\t\t\tbuy_result = dothistimeout \"buy\", 10, /hands you a piece of sun-washed driftwood|Looks like you might buckle under this weight/\n\t\t\tunless buy_result =~ /hands you a piece of sun-washed driftwood/\n\t\t\t\techo \"Too encumbered to go to Wehnimer's Landing\"\n\t\t\t\texit\n\t\t\tend\n\t\t\tif righthand?('driftwood')\n\t\t\t\tdriftwood = GameObj.right_hand\n\t\t\tend\n\t\telse\n\t\t\twithdraw_result = dothistimeout \"withdraw 2000 silvers\", 10, /hands you [0-9]+ silvers|don't seem to have that much/\n\t\t\tunless withdraw_result =~ /hands you [0-9]+ silvers/\n\t\t\t\techo \"Too poor to go to Wehnimer's Landing\"\n\t\t\t\texit\n\t\t\tend\n\t\t\tforce_go2.call('alchemist --disable-confirm')\n\t\t\tfput 'unhide' if hidden? or invisible?\n\t\t\tfput 'order 15'\n\t\t\tbuy_result = dothistimeout \"buy\", 10, /hands you a crystal amulet|Looks like you might buckle under this weight/\n\t\t\tunless buy_result =~ /hands you a crystal amulet/\n\t\t\t\techo \"Too encumbered to go to Wehnimer's Landing\"\n\t\t\t\texit\n\t\t\tend\n\t\t\tfput 'buy'\n\t\t\tif righthand?('amulet')\n\t\t\t\tamulet = GameObj.right_hand\n\t\t\tend\n\t\tend\n\t\tforce_go2.call('bank --disable-confirm')\n\t\tfput 'unhide' if hidden? or invisible?\n\t\tfput 'deposit all'\n\t\tforce_go2.call('11032 --disable-confirm')\n\telse\n\t\techo 'You have no crystal amulet! If you want this script to buy you one, issue the command: ;go2 --getsilvers=on'\n\t\tclose_containers.each { |c| fput \"close #\#{c.id}\" }\n\t\tfill_hands\n\t\texit\n\tend\nend\nif (rrcitizen && driftwood)\n\tfput 'put my driftwood in log'\nelse\n \tfput 'put my crystal amulet in log'\nend\nmove 'go log'\nfill_hands\n")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement