$include $sys/sound $include $muf/cron $include $lib/gary'smufutils-misc $include $lib/gary'smufutils-strings $include #2787 $include $lib/armor $include $muf/rp/utils $include $lib/rp $include #2123 $include $lib/alynna $include #3820 $include #2789 $undef tohit $def reeler prog "Reeler" call lvar override $def REGION override @ dup not if pop me @ owner "@rp/huntingregion" envprop swap pop toint then me @ location "No Hunt" getstatint if pop 0 then $def rpsys "$rpsystem" match : randomcolor[ -- str:color ] random 5 % case 0 = when "Blue" end 1 = when "Green" end 2 = when "Purple" end 3 = when "Red" end 4 = when "Yellow" end endcase ; : maxhunt[ ref:me -- int:result ] 5 me @ "Craft/Hunting" getstatfloat 5 * * me @ "Improvements/Hunting" getgroupstat toint 2 * 3.0 / + #0 "Temp" getstatint case -20 < when 0.2 end 0 < when 0.4 end 35 < when 0.6 end 1000 < when 1 end endcase * me @ "Special/Hunting" getstatint me @ "Hunter's Endurance" perkcount 2 * + 8 * 100 + * 100 / toint 10 greater ; $undef greater $undef lesser : greater ( i i -- i ) over over <= if swap then pop ; : lesser ( i i -- i ) over over >= if swap then pop ; lvar me2 : find_rooms ( d -- i ) (first, find all the rooms this room has) contents_array "r" array_filter_flags dup not if pop 0 else dup array_count swap foreach swap pop find_rooms + (find other rooms, add to count) repeat then ; : rodpicker var target strip target ! target @ not if "Type +hunt/weapon (name of hunting instrument) to select the weapon you will hunt with. Arrows and Bullets have the longest range but are always lost. Javelins can be hurled a short way but are lost half the time, and knives rarely break but require intense stealth to get close enough. Feral Hunting is an acceptable weapon if you have such skill." .tell exit then target @ "hunting" instring not target @ "Wielded" not and if "This does not appear to be a hunting weapon." .tell exit then me @ "Hunting Weapon" target @ setstat str "You are now Hunting with " target @ "." cat .tell ; : baitpicker var target strip target ! target @ not if "Type +Hunt/bait (name of bait/lure) to select the bait you will Hunt with. Use 'look' to hunt without bait." .tell exit then target @ "look" instring if "You hunt without bait." .tell me @ "Hunting Trap" 0 setstat exit then target @ "Random encounter" smatch if "Invalid Bait." .tell exit then me @ "Hunt/" target @ strcat getstatint if ( It's a Hunt ) str "You take one of your " target @ " and start to use it as bait." cat .tell me @ "Hunting Trap" target @ setstat exit then rpsys str "recipes/" target @ "/desc" cat getpropstr "hunting trap" instring not if "This does not appear to be a Hunting Trap." .tell exit then me @ "Hunting Trap" target @ setstat str "You are now Hunting with " target @ "." cat .tell ; : Huntinfo var target strip target ! rpsys str "Hunt/" target @ cat propdir? not target @ not or if REGION "What you will find in this region: " .tell { "Name" 20 left "|" "Per/Dex/End" "|" "Rare" "|" "Bait" 39 center "|" }cat .tell rpsys "Hunt/" array_get_propdirs foreach var! cur rpsys { "Hunt/" cur @ "/Region" }cat getpropstr "/" explode_array REGION tostr 1 array_make array_intersect array_count not if continue then { cur @ rpsys { "Hunt/" cur @ "/Hurtstohit?" }cat getpropstr if "^red^*^normal^" swap strcat then 20 left "|" rpsys { "Hunt/" cur @ "/Perception" }cat getpropstr tofloat 5 / 1 round tostr 3 left "/" rpsys { "Hunt/" cur @ "/Dexterity" }cat getpropstr tofloat 5 / 1 round tostr 3 left "/" rpsys { "Hunt/" cur @ "/Endurance" }cat getpropstr 3 left var rarity rpsys "Hunt/" cur @ strcat "/Endurance" strcat getpropstr toint 3 * rpsys "Hunt/" cur @ strcat "/Perception" strcat getpropstr toint + rpsys "Hunt/" cur @ strcat "/Dexterity" strcat getpropstr toint + 5 / rarity ! me @ "Craft/Butchering" getstatint rarity @ 1 + > me @ "Craft/Butchering" getstatint rarity @ 1 + swap - 10 > or if "^red^" else "^green^" then swap "^normal^|" rpsys { "Hunt/" cur @ "/Rarity" }cat getpropstr 4 left "|" rpsys { "Hunt/" cur @ "/Bait" }cat getpropstr "," "/1:" subst "" "/1" subst 39 left "|" }cat .tell repeat "^red^Red endurance means no skillup from butchering.^normal^" .tell exit then str "Hunt Info V 0.5 for " target @ ":" cat .tell "Description: " rpsys str "Hunt/" target @ "/desc" cat getpropstr strcat .tell "With the right bait, this Hunt will bite about one out of " rpsys str "Hunt/" target @ "/rarity" cat getpropstr " times." strcat strcat .tell ; : Huntstock var target var cur var x me @ mlevel 3 > not if pop "me" then strip dup not if pop "me" then pmatch target ! str "Hunt Stock Lister 0.7 for: ^green^" target @ unparseobj cat .tell target @ "@rp/Hunt/" array_get_propvals foreach tostr x ! cur ! x @ atoi not if continue then str "^yellow^" cur @ capitalize 40 left "^gloom^:^cyan^" 2 right x @ 3 right cat .tell 0 until "^yellow^Finished." .tell ; lvar Hunt var repeater : sskillraise var mod var x me @ "Craft/Stalking" getstatint 20 < not if exit then me @ "Hunting Number" getstatint 1 - 0.1 * + me @ "Hunting Trap" getstatstr "0" smatch not if 0.1 + then dup 1.0 < not if me @ "XPSpent" getstatfloat me @ "Hunt XP" getstatint 20.0 / + me @ "XPSpent" rot setstat me @ "Hunt XP" getstatint 5.0 / + then mod ! me @ "Craft/Stalking" getstatfloat 5 * rpsys str "Hunt/" me2 @ "Hunt" getstatstr "/Perception" cat getpropstr atoi 2 + swap - dup 0 < if pop exit then dup x ! case 11 < when x @ 3.5 * end pop 1 when x @ 10 - 35 swap - dup 5 < if pop 5 then end endcase me @ "Stealth/Stalking" getstatint me @ "Survival/Hunting" getstatint 2 / over over < if swap then pop 5.0 / + mod @ * me @ "Craft/Stalking" getstatint me @ owner "Craft/Stalking" getstatint < if 30 + then me @ "Craft/Stalking" getstatint 2 < if 20 + then dup 1 fchop "% chance to increase stalking skill" strcat tellme 10 * random 1000 % 1 + > if ( Skill raise ! ) me @ "Craft/Stalking" getstatint str "^White^Your Stalking Skill raises by ^green^" 0.1 me @ "Craft/Stalking" getstatint 5 * rpsys str "Hunt/" me2 @ "Hunt" getstatstr "/Perception" cat getpropstr atoi - 4 * mod @ * 0 swap - random 100 % > if 0.1 + then me @ "Craft/Stalking" getstatint 5 * rpsys str "Hunt/" me2 @ "Hunt" getstatstr "/Dexterity" cat getpropstr atoi - 2 * mod @ * 0 swap - random 100 % > if 0.1 + then dup me @ "Craft/Stalking" getstatfloat + me @ "Craft/Stalking" rot setstat "^white^ points!" cat .tell me @ owner 1 "http://music.scross.homeip.net/Sounds/increase.mp3" "Skillup.mp3" sound_play me @ "Craft/Stalking" getstatint < if str "^white^Your stalking skill increased to " me @ "Craft/Stalking" getstatint "!" cat .tell me @ owner 1 "http://music.scross.homeip.net/Sounds/music/Final%20Fantasy%20-%20Victory%20Remix.mp3" "SkillupBig.mp3" sound_play then then ; : bskillraise var mod var x mod ! 1 me @ "Hunting Number" getstatint 1 for pop 0 x ! me @ "Craft/Butchering" getstatint me @ "Butcher Rarity" getstatint 1 + swap - dup 0 < if pop exit then dup 10 > if pop "This is too difficult to learn from." .tell exit then 5 lesser 12 * me @ "Special/Butchering" getstatint 100 + * 100 / dup tostr "% chance to raise butchering." strcat .tell 10 * random 1000 % 1 + > if ( Skill raise ! ) me @ owner 1 "http://music.scross.homeip.net/Sounds/increase.mp3" "Skillup.mp3" sound_play me @ "Craft/Butchering" getstatint str "^White^Your Butchering Skill raises by ^green^" 0.1 me @ "Craft/Butchering" getstatint dup 5 + dup 25 > if pop 25 then - 4 * mod @ * 0 swap - random 100 % > if 0.1 + then me @ "Craft/Butchering" getstatint dup 5 + dup 25 > if pop 25 then - 2 * mod @ * 0 swap - random 100 % > if 0.1 + then dup me @ "Craft/Butchering" getstatfloat + me @ "Craft/Butchering" rot setstat "^white^ points!" cat .tell me @ "Craft/Butchering" getstatint < if str "^white^Your Butchering skill increased to " me @ "Craft/Butchering" getstatint "!" cat .tell me @ owner 1 "http://music.scross.homeip.net/Sounds/music/Final%20Fantasy%20-%20Victory%20Remix.mp3" "SkillupBig.mp3" sound_play then then repeat ; : struggle var p var o var q str "" repeater @ 1 + repeater ! me @ me2 ! var cur var team 0 array_make team ! me @ "Hunting Power" getstatint not if exit then me @ location contents_array foreach cur ! pop cur @ player? not if continue then cur @ awake? not if continue then cur @ "approved?" getstatint not if continue then cur @ owner maxhunt cur @ owner "Hunting Times" getstatint < if continue then cur @ me @ dbcmp if cur @ team @ array_appenditem team ! continue then cur @ me ! me @ "Hunting Weapon" getstatstr "Magic Hunting Focus" smatch if 25 me2 @ "Hunting Distance" getstatint < if 1.1 else 0.1 then else me @ "Hunting Weapon" getstatstr case "Feral Hunting" smatch when me @ "Special/Feral Hunting" getstatint 5 / dup 1 < if pop 1 then end "Wielded" when me @ "Equipment/Primary Hand/Value" getstatstr case "Masterpiece" smatch when 2 end "Poor" smatch when 0 end when 1 end endcase q ! var weapon me @ "Equipment/Primary Hand/Name" getstatstr weapon ! me @ "Equipment/Primary Hand/Skill" getstatstr case "Bows" smatch when q @ 1 + 15 * 15 + end "CrossBows" smatch when q @ 1 + 10 * 15 + end "Firearms" smatch when q @ 1 + 8 * 15 + end "Rods" smatch when q @ 1 + 8 * 15 + end "Throw" instring when q @ 1 + 6 * 5 + end pop 1 when 1 end endcase end pop 1 when me @ "Gear" me @ "Gear" me @ "Hunting Weapon" getstatstr findboxitem "Quality" getboxprop tostr case "Masterpiece" smatch when 2 end "Poor" smatch when 0 end when 1 end endcase q ! rpsys str "Recipes/" me @ "Hunting Weapon" getstatstr "/Maxrange" cat getpropstr "/" explode array_make array_reverse q @ array_getitem atoi end endcase me2 @ "Hunting Distance" getstatfloat 1 - 0.01 greater swap / then me2 @ me ! 1 > if continue then me @ "Hunting Team" getstatstr "0" smatch if continue then cur @ "Hunting Team" getstatstr me @ "Hunting Team" getstatstr smatch if cur @ owner maxhunt cur @ "Hunting Times" getstatint < not if cur @ team @ array_appenditem team ! continue then then 0 until 0 p ! ( If there is no one stalking, initiate the kill. ) team @ array_count not if reeler pid kill exit then team @ foreach me ! pop ( me @ "Hunt" me2 @ "Hunt" getstatstr setstat ) me @ me @ "Dexterity" getstatint 2 / 1 + me @ "Stealth/Stalking" getstatint 10 greater 12 - + 1 10 1 for var cur intostr cur ! me @ "Equipment/Accessory" cur @ strcat "/Name" strcat getstatstr "Stealth Cape" smatch if me @ "Equipment/Accessory" cur @ strcat "/Quality" strcat getstatstr case "Masterpiece" smatch when 6 end "Poor" smatch when 2 end pop 1 when 4 end endcase + break then 0 until dup me @ "Special/Cloaking" getstatint 2 / me @ "Special/Terrain's-Blessing" getstatint 2 / + dup rot > if pop dup then + repeater @ 2 / me @ "Willpower" getstatint 3 / swap - + me @ "Craft/Stalking" getstatfloat me @ "Hunter's Stealth" perkcount + 5 * + toint tostr " vs " strcat 11 me @ "Improvements/Hunting" getgroupstat toint case 4 > when 2 - end 0 > when 1 - end endcase tostr strcat roller p @ + p ! 0 until p @ team @ array_count / p ! me2 @ me ! #3952 me @ "Hunting Perception" getstatint me @ "Hunting Trap" getstatstr "0" smatch not if 4 * 5 / then tostr " vs " strcat 20 me @ "Hunting Distance" getstatint 100 swap - 7 / - intostr strcat swap pop #21 swap roller o ! p @ o @ - 0 < if 0 p ! me @ "Hunting Perception" getstatint 11 * 10 / me @ "Hunting Perception" rot setstat "It seems to have become more alert!" .tell then o @ 0 < if 0 o ! me @ "Hunting Perception" getstatint 9 * 11 / me @ "Hunting Perception" rot setstat "It seems to have become more relaxed!" .tell then 1 p @ o @ - 0 > if p @ o @ - else 0 then + me2 @ "Hunting Distance" getstatint swap - dup 0 <= if me2 @ "Hunting Distance" 0 setstat reeler exit then me2 @ "Hunting Distance" rot setstat p @ o @ - -5 > p @ o @ - 0 < and if me @ "Hunting Perception" getstatint 11 * 10 / me @ "Hunting Perception" rot setstat "It seems to have become more alert!" .tell then team @ foreach me ! pop ( Start notification ) str "[^bblue^" p @ 1 swap 1 for pop me @ "color" flag? if " " else "*" then 0 until "^bblack^" p @ 20 swap - 1 swap 1 for pop " " 0 until "]" " ^white^-^normal^ " "[^bred^" o @ 1 swap 1 for pop me @ "color" flag? if " " else "*" then 0 until "^bblack^" o @ 20 swap - 1 swap 1 for pop " " 0 until "]" cat 60 left str swap " " me2 @ "Hunting Distance" getstatint cat 66 left str swap "[" me @ "Hunting Weapon" getstatstr "Magic Hunting Focus" smatch if 25 me2 @ "Hunting Distance" getstatint < if 1.1 else 0.1 then else me @ "Hunting Weapon" getstatstr case "Feral Hunting" smatch when me @ "Special/Feral Hunting" getstatint 5 / dup 1 < if pop 1 then end "Wielded" smatch when me @ "Equipment/Primary Hand/Value" getstatstr case "Masterpiece" smatch when 2 end "Poor" smatch when 0 end when 1 end endcase q ! var weapon me @ "Equipment/Primary Hand/Name" getstatstr weapon ! me @ "Equipment/Primary Hand/Skill" getstatstr case "Bows" smatch when q @ 1 + 15 * 15 + end "CrossBows" smatch when q @ 1 + 10 * 15 + end "Firearms" smatch when q @ 1 + 8 * 15 + end "Rods" smatch when q @ 1 + 8 * 15 + end "Throw" instring when q @ 1 + 6 * 5 + end pop 1 when 1 end endcase end pop 1 when me @ "Gear" me @ "Gear" me @ "Hunting Weapon" getstatstr findboxitem "Quality" getboxprop tostr case "Masterpiece" smatch when 2 end "Poor" smatch when 0 end when 1 end endcase q ! rpsys str "Recipes/" me @ "Hunting Weapon" getstatstr "/Maxrange" cat getpropstr "/" explode array_make array_reverse q @ array_getitem atoi end endcase me2 @ "Hunting Distance" getstatfloat 1 - 0.01 greater swap / then case var stop 0.51 < when me @ "color" flag? if "^bgreen^" else "GO" then me @ me2 @ dbcmp if 1 stop ! then me2 @ "Hunting Distance" 0 setstat end 0.71 < when me @ "color" flag? if "^bblue^" else "^^^^" then end 1.0 > when me @ "color" flag? if "^bred^" else "XX" then end pop 1 when me @ "color" flag? if "^bpurple^" else "==" then end endcase " ^normal^]" cat .tell stop @ if background begin me2 @ "interactive" flag? not until reeler exit then ( End Notification ) 0 until me2 @ me ! p @ o @ - p ! p @ 0 = if 1 p ! then me @ "Hunting Power" p @ setstat me @ "Hunting Bolted" 0 setstat 1 sleep me @ "Hunting Power" getstatint not if exit then p @ -4 < if str me @ name " attacks with their weapon as the prey bolts off." cat "Hunt" pretty tellhere random rpsys str "Hunt" me @ "Hunt" getstatstr "/Dexterity" cat getpropstr atoi % me @ "Special/Hesitate" getstatint < if str me @ name " makes a sudden alarming sound, distracting the beast and making it hesitate for just that one vital moment." cat "Hunt" tellhere else me @ "Hunting Bolted" 1 setstat then reeler me2 @ me ! exit then me @ "Hunting Power" getstatint if struggle exit then ; : Huntfinder var cur var bait var any rpsys "Hunt/" array_get_propdirs SORTTYPE_SHUFFLE array_sort foreach cur ! pop rpsys str "Hunt/" cur @ "/region" cat getpropstr "/" explode array_make REGION intostr 1 array_make array_intersect not if continue then rpsys str "Hunt/" cur @ "/Bait" cat getpropstr dup "any" stringcmp swap me @ "Hunting Trap" getstatstr dup "0" smatch if pop "ANY" then instring not and me @ "Hunting Trap" getstatstr "0" smatch not and if continue then me @ owner "Hunt/" cur @ strcat getstatint 11 > if continue then ( rpsys str "Recipes/" me @ "Hunting Weapon" getstatstr "/Maxdamage" cat getpropstr dup if atoi else pop me @ "Special/Feral Hunting" getstatint then rpsys str "Hunt/" cur @ "/Endurance" cat getpropstr toint 5 + > cur @ "random" instring not and if cur @ " would explode if you hit it." strcat .tell continue then ) me @ "Craft/Stalking" getstatint 5 * rpsys str "Hunt/" cur @ "/Perception" cat getpropstr toint 20 - < cur @ "random" instring not and if continue then cur @ "random" instring not if 1 any ! then rpsys str "Hunt/" cur @ "/Rarity" cat getpropstr atoi rpsys str "Hunt/" cur @ "/baitonly?" cat getpropstr toint if pop 1 then cur @ "Random" instring if me @ owner "Improvements/Hunting" getgroupstat toint 1000 * + then #0 "hour" getpropval case dup 6 > swap 10 < and when 0.75 end dup 18 > swap 21 < and when 0.75 end dup 10 > swap 16 < and when 1.5 end pop 1 when 1.1 end endcase * me @ "Hunting Trap" getstatstr "0" smatch if 1.5 * then me @ "Hunting Trap" getstatstr "0" smatch rpsys str "Hunt/" cur @ "/baitonly?" cat getpropstr toint and if continue then #0 "moon" getpropval 5 % case 2 < when 0.5 end 3 > when 0.75 end when 1.1 end endcase * me @ "Gear" me @ "Gear" me @ "Hunting Trap" getstatstr findboxitem "Quality" getboxprop dup string? not if tostr then case "Masterpiece" smatch when 0.75 end "Poor" smatch when 1.25 end when 1 end endcase * me @ "Gear" me @ "Gear" me @ "Hunting Trap" getstatstr findboxitem "Desc" getboxprop dup string? not if tostr then "Lure" instring if 1.25 * then toint dup 1 < if pop 1 then random swap % if continue then rpsys str "Hunt/" cur @ "/Bait" cat getpropstr dup "any" smatch if pop 1 Hunt ! else ":" explode array_make foreach "/" split atoi random swap % 1 + Hunt ! bait ! pop bait @ me @ "Hunting Trap" getstatstr smatch not if continue else break then 0 until then Hunt @ until any @ not if "There is nothing to hunt here at this time." .tell pid kill then cur @ Hunt @ ; lvar q lvar repeating : Hunter begin me @ owner "Hunting Times" getstatint me @ owner maxhunt < not if "You have hunted as much as you can for today. Perhaps tomorrow." .tell exit then me @ "Hunting Weapon" getstatstr "0" smatch if "You are missing your weapon, see +Hunt for help." .tell exit then me @ "Hunting Trap" getstatstr "0" smatch not if me @ "Gear" me @ "Hunting Trap" getstatstr findboxitem not me @ "Hunt/" me @ "Hunting Trap" getstatstr strcat getstatint not and if "You are out of bait it seems. Switching to using no bait." .tell me @ "Hunting Trap" 0 setstat then then me @ "Gear" me @ "Hunting Weapon" getstatstr findboxitem not me @ "Hunting Weapon" getstatstr "Feral Hunting" smatch me @ "Special/Feral Hunting" getstatint and not and me @ "Hunting Weapon" getstatstr "Wielded" smatch me @ "Equipment/Primary Hand/WP" getstatint and not and if me @ "Hunting Weapon" getstatstr dup me @ "Equipment/Primary Hand/Name" getstatstr smatch swap me @ "Equipment/Primary Hand/Engraved Name" getstatstr smatch or if me @ "Hunting Weapon" "Wielded" setstat else "You cannot Hunt with a weapon that doesn't exist." .tell exit then then repeating @ not if systime me @ "Hunting" getstatint - 5 < if str "You cannot Hunt for " systime me @ "Hunting" getstatint - 60 swap - " seconds." cat .tell exit then then REGION not if "This doesn't look like a proper Hunting spot." .tell exit then repeating @ not if str me @ me @ "Hunting Weapon" getstatstr dup "0" smatch if pop else " readies their " swap dup "wielded" smatch if pop me @ "Equipment/Primary Hand/Engraved Name" getstatstr dup "0" smatch if pop me @ "Equipment/Primary Hand/Name" getstatstr then then " and" then " sets out to hunt, looking for prey." cat "Hunt" pretty tellhere then me @ "Hunting" systime setstat me @ location ( 5 me @ "Craft/Hunting" getstatint 10 / - sleep ) me @ location dbcmp not if "You moved, Hunting aborted." .tell me @ "Hunting" 0 setstat exit then Huntfinder var nHunt swap nHunt ! me @ "Hunting Number" Hunt @ setstat me @ "Hunt" nHunt @ setstat if ( Got a bite ! ) me @ "Hunting Weapon" getstatstr "Feral Hunting" smatch if me @ "Special/Feral Hunting" getstatint 8 / dup 1 < if pop 1 then else me @ "Gear" me @ "Gear" me @ "Hunting Weapon" getstatstr findboxitem "Quality" getboxprop tostr case "Masterpiece" smatch when 3 end "Poor" smatch when 1 end when 2 end endcase then q ! rpsys str "Hunt/" nHunt @ "/Perception" cat getpropstr atoi random 40 % 21 - 100 + * 100 / dup 0 < if pop 0 then dup 100 > if pop 100 then nhunt @ "random" instring if pop random 100 % 1 + then dup me @ "Hunting Perception" rot setstat (Weight of Hunt ) case 10 < when "extremely oblivious" end 20 < when "lightly off guard" end 40 < when "on guard" end 60 < when "slightly alert" end 80 < when "very alert" end 101 < when "extremely paranoid" end endcase me @ "Hunting Trap" getstatstr "0" smatch not if ( Not using bait, skipping that section ) me @ "Hunt/" me @ "Hunting Trap" getstatstr strcat getstatint if me @ "Hunt/" me @ "Hunting Trap" getstatstr strcat getstatint 1 - me @ "Hunt/" me @ "Hunting Trap" getstatstr strcat rot setstat else rpsys str "Recipes/" me @ "Hunting Trap" getstatstr strcat "/desc" cat getpropstr "lure" instring not pop 1 if ( It's not a lure, nuke one due to bite. ) me @ "Gear" me @ "Gear" me @ "Hunting Trap" getstatstr findboxitem DeleteOrDecrementBoxItem then then then ( End skip ) "You spot something! It seems " swap strcat "!" strcat "Hunt" pretty tellme me @ "Special/Scan" getstatint case 0 = when 1 pop end when str "Prey Name: " me @ "Hunt" getstatstr " - Perception/Dexterity/Stamina: " rpsys str "Hunt/" nHunt @ "/Perception" cat getpropstr "/" rpsys str "Hunt/" nHunt @ "/Dexterity" cat getpropstr "/" rpsys str "Hunt/" nHunt @ "/Endurance" cat getpropstr "/" end endcase str me @ name " appears to have spotted something and is now approaching carefully!" cat "Hunt" pretty tellhere me @ owner 0 { "http://music.scross.homeip.net/Final Fantasy XI/Disc 1/05 Battle Theme.mp3" }cat { "hunting.mp3" }cat sound_play "^yellow^Type +hunt/stop to stop approaching and attack. Be sure you're close enough first!" .tell str "Your Stealth" 22 center " - " "Prey Perception" 22 center cat " Distance" strcat .tell me @ "Hunting Distance" random 20 % random 20 % random 20 % random 20 % 24 + + + + setstat me @ "Hunting Start" me @ "Hunting Distance" getstatint setstat me @ "Hunting Power" 1 setstat struggle exit then ( No bite ) ( random 15 % 1 + sleep ) ( "^yellow^..." .tell ) 1 repeating ! me @ "Hunting" systime setstat depth if begin pop depth not until then repeat ; : mskillraise var mod var x me @ "Hunting Number" getstatint 1 - 0.1 * + me @ "Hunting Trap" getstatstr "0" smatch not if 0.1 + then dup 1.0 < not if me @ "XPSpent" getstatfloat me @ "Hunt XP" getstatint 20.0 / + me @ "XPSpent" rot setstat me @ "Hunt XP" getstatint 5.0 / + then 4 * 3 / mod ! me @ "Craft/MHunting" getstatint rpsys str "Hunt/" me2 @ "Hunt" getstatstr "/Endurance" cat getpropstr atoi 5 + swap - dup 0 < if pop exit then dup x ! case 16 < when x @ 3.5 * end pop 1 when x @ 15 - 52 swap - dup 5 < if pop 5 then end endcase me @ "Stealth/Tracking" getstatint 2 / me @ "Survival/Hunting" getstatint over over < if swap then pop me @ "Craft/MHunting" getstatint me @ owner "Craft/MHunting" getstatint < if 30 + then 5 / + mod @ * 10 * random 1000 % 1 + > if ( Skill raise ! ) me @ "Craft/Mhunting" getstatint str "^White^Your Magic Hunting Skill raises by ^green^" 0.1 me @ "Craft/MHunting" getstatint rpsys str "Hunt/" me2 @ "Hunt" getstatstr "/Endurance" cat getpropstr atoi - 4 * mod @ * 0 swap - random 100 % > if 0.1 + then me @ "Craft/MHunting" getstatint rpsys str "Hunt/" me2 @ "Hunt" getstatstr "/Dexterity" cat getpropstr atoi - 2 * mod @ * 0 swap - random 100 % > if 0.1 + then dup me @ "Craft/MHunting" getstatfloat + me @ "Craft/MHunting" rot setstat "^white^ points!" cat .tell me @ owner 1 "http://music.scross.homeip.net/Sounds/increase.mp3" "Skillup.mp3" sound_play me @ "Craft/Mhunting" getstatint < if str "^white^Your magic hunting skill increased to " me @ "Craft/Mhunting" getstatint "!" cat .tell me @ owner 1 "http://music.scross.homeip.net/Sounds/music/Final%20Fantasy%20-%20Victory%20Remix.mp3" "SkillupBig.mp3" sound_play then then ; : hskillraise var mod var x me @ "Hunting Weapon" getstatstr "Magic Hunting Focus" smatch if mskillraise exit then me @ "Craft/Hunting" getstatint 20 < not if exit then me @ "Hunting Number" getstatint 1 - 0.1 * + me @ "Hunting Trap" getstatstr "0" smatch not if 0.1 + then dup 1.0 < not if me @ "XPSpent" getstatfloat me @ "Hunt XP" getstatint 20.0 / + me @ "XPSpent" rot setstat me @ "Hunt XP" getstatint 5.0 / + then mod ! me @ "Craft/Hunting" getstatfloat 5 * rpsys str "Hunt/" me2 @ "Hunt" getstatstr "/Dexterity" cat getpropstr atoi 5 + swap - dup 0 < if pop exit then dup 10 > if pop 1 then 5 lesser 15 * me @ "Stealth/Tracking" getstatint 2 / me @ "Survival/Hunting" getstatint over over < if swap then pop 5 / + mod @ * me @ "Craft/Hunting" getstatint me @ owner "Craft/Hunting" getstatint < if 30 + then dup str swap 1 fchop "% chance of raising hunting skill" cat .tell 10 * random 1000 % 1 + > if ( Skill raise ! ) me @ owner 1 "http://music.scross.homeip.net/Sounds/increase.mp3" "Skillup.mp3" sound_play me @ "Craft/Hunting" getstatint str "^White^Your Hunting Skill raises by ^green^" 0.1 me @ "Craft/Hunting" getstatint 5 * rpsys str "Hunt/" me2 @ "Hunt" getstatstr "/Dexterity" cat getpropstr atoi - 4 * mod @ * 0 swap - random 100 % > if 0.1 + then me @ "Craft/Hunting" getstatint 5 * rpsys str "Hunt/" me2 @ "Hunt" getstatstr "/Endurance" cat getpropstr atoi - 2 * mod @ * 0 swap - random 100 % > if 0.1 + then 3 * dup me @ "Craft/Hunting" getstatfloat + me @ "Craft/Hunting" rot setstat "^white^ points!" cat .tell me @ "Craft/hunting" getstatint < if str "^white^Your hunting skill increased to " me @ "Craft/hunting" getstatint "!" cat .tell me @ owner 1 "http://music.scross.homeip.net/Sounds/music/Final%20Fantasy%20-%20Victory%20Remix.mp3" "SkillupBig.mp3" DEBUG_LINE sound_play then then ; $undef reeler : reeler var power var hunt var hp var cur me @ me2 ! var team 0 array_make team ! me @ location contents_array foreach cur ! pop cur @ player? not cur @ "hunting team" getstatstr "0" smatch and if continue then cur @ owner awake? not if continue then cur @ "approved?" getstatint not if continue then cur @ owner "Hunt/" me @ "Hunt" getstatstr strcat getstatint 11 > if continue then cur @ owner maxhunt cur @ owner "Hunting Times" getstatint < if continue then cur @ owner 0 sound_stop cur @ me @ dbcmp if cur @ team @ array_appenditem team ! continue then me @ "Hunting Team" getstatstr "0" smatch if continue then cur @ "Hunting Team" getstatstr me @ "Hunting Team" getstatstr smatch if cur @ team @ array_appenditem team ! cur @ "Special/Pursuit" getstatint if cur @ team @ array_appenditem team ! then continue then 0 until me @ "Hunting Power" getstatint dup power ! not if "You don't appear to have anything to attack." .tell exit then rpsys me @ "Hunt" getstatstr hunt ! team @ foreach me ! pop me2 @ "Hunting Start" getstatint me2 @ "Hunting Distance" getstatint - 25.0 / sskillraise 0 until me @ "Hunting Power" 0 setstat me2 @ me ! rpsys str "Hunt/" me @ "Hunt" getstatstr "/Endurance" cat getpropstr atoi hp ! team @ SORTTYPE_SHUFFLE array_sort foreach me ! pop ( Start attack ) me @ "Gear" me @ "Hunting Weapon" getstatstr findboxitem not me @ "Hunting Weapon" getstatstr "Feral Hunting" smatch me @ "Special/Feral Hunting" getstatint and not and me @ "Hunting Weapon" getstatstr "Wielded" smatch me @ "Equipment/Primary Hand/WP" getstatint and not and if "You cannot Hunt with a weapon that doesn't exist." .tell continue then me @ owner "Hunting Times" getstatint me @ owner maxhunt < not if "You have hunted as much as you can for today. Perhaps tomorrow." .tell continue then 60 "" var! type prog "HERO" flag? if { ">> Begin to-hit calc" }tell debug_line then 0 me @ me @ "Hunting Weapon" getstatstr case "Wielded" instring when str me @ "Equipment/Primary Hand/Type" getstatstr dup type ! "/" me @ "Equipment/Primary Hand/Skill" getstatstr cat end "Feral" instring when "Brawl" end "arrow" instring when "Ranged/Bows" end "javelin" instring when "Ranged/Throwing" end "knife" instring when "Melee/Knives" end "bullet" instring when "Ranged/Firearms" end "claw" instring when "Brawl/Claws" end "snare" instring when "Security/Traps" end "focus" instring when "Arcana/Magic" end endcase prog "HERO" flag? if { ">> Find stat to use " }tell debug_line then getstatint 5 / + me2 @ "Hunting Bolted" getstatint if 2 / then me @ "Craft/Hunting" getstatfloat 5 * me @ "Special/Terrain's-Blessing" getstatint 2 / me @ "Hunting Weapon" getstatstr dup "arrow" instring swap "bullet" instring or type @ "ranged" smatch or if me @ "Special/Aim" getstatint 2 / me @ "Special/Lock-On" getstatint 5 / + else 0 then greater prog "HERO" flag? if { ">> Checkpoint 1 " }tell debug_line then + 3 * + rpsys str "Hunt/" me2 @ "Hunt" getstatstr "/Dexterity" cat getpropstr atoi me @ "Hunting Weapon" getstatstr dup "arrow" instring swap "bullet" instring or type @ "Ranged" smatch or if me @ "Special/Concentration" getstatint 5 / - then 3 * - prog "HERO" flag? if { ">> Checkpoint 2 " }tell debug_line then var toofar me @ "Hunting Weapon" getstatstr "Magic Hunting Focus" smatch if 60 systime me @ "Laststrike" getstatint - 5 < if 26 me @ "Special/Pursuit" getstatint - else 0 then me @ "LastStrike" systime setstat me2 @ "Hunting Distance" getstatint + < if 1.1 else 0.1 then else me @ "Gear" me @ "Gear" me @ "Hunting Weapon" getstatstr findboxitem "Quality" getboxprop tostr case "Masterpiece" smatch when 2 end "Poor" smatch when 0 end when 1 end endcase q ! me @ "Hunting Weapon" getstatstr "Wielded" smatch if me @ "Equipment/Primary Hand/Name" getstatstr var! weapon me @ "Equipment/Primary Hand/Skill" getstatstr case "Bows" smatch when q @ 1 + 15 * 15 + end "CrossBows" smatch when q @ 1 + 10 * 15 + end "Firearms" smatch when q @ 1 + 8 * 15 + end "Rods" smatch when q @ 1 + 8 * 15 + end "Throw" instring when q @ 1 + 6 * 5 + end pop 1 when 1 end endcase systime me @ "Laststrike" getstatint - 5 < if 52 me @ "Special/Pursuit" getstatint 2 * - else 0 then me @ "LastStrike" systime setstat me2 @ "Hunting Distance" getstatfloat 1 - 0.01 greater + swap / else me @ "Hunting Weapon" getstatstr "feral" instring if me @ "Special/Feral Hunting" getstatint 5 / 1 greater me2 @ "Hunting Distance" getstatfloat 1 - 0.01 greater swap / else rpsys str "Recipes/" me @ "Hunting Weapon" getstatstr "/Maxrange" cat getpropstr "/" explode array_make array_reverse q @ array_getitem atoi dup not if pop 1 then me2 @ "Hunting Distance" getstatfloat 1 - 0.1 greater swap / then then then 0 toofar ! prog "HERO" flag? if { ">> Range calculated " }tell debug_line then case 0.51 < when 0 end 0.71 < when -10 "Short range, -10 to hit." .tell end 1.0 > when -200 1 toofar ! "Long range, -200 to hit." .tell end pop 1 when -20 "Medium range, -20 to hit." .tell end endcase prog "HERO" flag? if { ">> Calculating to-hit" }tell debug_line then 50 + 2 / me @ { "Survival/Hunting+" me @ "Craft/Hunting" getstatint 5 * }cat roller 5 * + me @ "Job" getstatstr "Trapper" smatch if 10 + then me @ "Job" getstatstr "Hunter" smatch if 20 + then toofar @ not me @ "Hunting Weapon" getstatstr "Focus" instring and if pop 100 then me @ "Hunting Weapon" getstatstr "wielded" smatch if me @ "Equipment/Primary Hand/Accuracy" getstatint 2 / + then me @ "Hunter's Eye" perkcount 3 * + var tohit prog "HERO" flag? if { ">> To-hit result" }tell debug_line then dup str swap "^yellow^(" swap dup tohit ! "% chance to hit)" cat tellme toofar @ not if rpsys "Hunt/" me2 @ "hunt" getstatstr strcat "/hurtstohit?" strcat getpropstr toint dup not if pop else me2 @ "Hunting Distance" getstatint 6 < if 100 me @ "Physical" soak - * 100 / me @ "+hp " rot tostr strcat force str me @ name " is too close to the prey and takes damage!" cat tellhere else pop then then then tohit @ me @ "Hunting Minimum" getstatint < if pop 0 then random 100 % 1 + > me @ "Hunting Weapon" getstatstr "Focus" instring toofar @ not and or if ( Success!! ) var dam var num 0 random me @ "Craft/Hunting" getstatint 5 * 20 / 1 + me @ "Hunting Weapon" getstatstr "knife" instring type @ tolower "{melee|brawl}" smatch or if random 25 % me @ "Special/Double-Slash" getstatint < if 1 + then then me @ "Hunting Weapon" getstatstr dup "bullet" instring swap "arrow" instring or type @ "ranged" smatch or if me @ "Special/rapid fire" getstatint 10 / + then me @ "Hunting Weapon" getstatstr "bullet" instring if me @ "Special/rapid-reload" getstatint + then me @ "Hunting Weapon" getstatstr "Focus" instring if pop me @ "Craft/MHunting" getstatfloat 20 / me @ "Jobs/Mage" getstatint me @ "Jobs/Black Mage" getstatint + 50.0 / dup 8 > if pop 8 then 2 / + me @ "Special/Quick-Cast" getstatint 12 / + me @ "Special/X-Magic" getstatint random 25 % > if 1 + then toint then me @ "Hunting Weapon" getstatstr "Wielded" instring me @ "Equipment/Primary Hand/Name" getstatstr "Autocrossbow" smatch and if 2 + then % 1 for 1 + num ! me @ "Hunting Weapon" getstatstr case "Focus" instring when me @ "Craft/Mhunting" getstatfloat me @ "Jobs/Mage" getstatfloat 50 / dup 8 < if pop 8 then + me @ "Special/Use-Item" getstatint 4.0 / + toint me @ "Holy" getstatint me @ "Black" getstatint greater me @ "Fire4" getstatint greater 4.0 * me @ "Special/Firaga" getstatint me @ "Special/Iceaga" getstatint greater me @ "Special/Lightningaga" getstatint greater me @ "Special/Airaga" getstatint greater 3.5 * greater me @ "Special/Fira" getstatint me @ "Special/Ica" getstatint greater me @ "Special/Lightninga" getstatint greater me @ "Special/Aira" getstatint greater me @ "Special/Eartha" getstatint greater me @ "Special/Watera" getstatint greater 2.5 * greater me @ "Special/Fire" getstatint me @ "Special/Ice" getstatint greater me @ "Special/Lightning" getstatint greater me @ "Special/Air" getstatint greater me @ "Special/Earth" getstatint greater me @ "Special/Water" getstatint greater greater 1.5 * random 40 % 80 + * 100 / end dup "Feral" instring swap "claw" instring or when me @ "Special/Feral Hunting" getstatint me @ "Special/Martial-Arts" getstatint 2 / + 3 * 2 / dup 3 / - random swap % 1 + me @ "Special/Feral Hunting" getstatint me @ "Special/Martial-Arts" getstatint 2 / + 3 * 2 / 3 / dup 10 < if pop 10 then + me @ "Hunting Weapon" getstatstr "claw" instring if rpsys str "Recipes/" me @ "Hunting Weapon" getstatstr "/maxdamage" cat getpropstr atoi rpsys str "Recipes/" me @ "Hunting Weapon" getstatstr "/mindamage" cat getpropstr atoi - random swap % 1 + rpsys str "Recipes/" me @ "Hunting Weapon" getstatstr "/mindamage" cat getpropstr atoi + + then end "Wielded" smatch when me @ "Equipment/Primary Hand/WP" getstatint 6 * me @ "Equipment/Primary Hand/Condition" getstatint 3 * - ( Randomize damage by up to 20% in either direction ) dup 20 * 100 / random swap % random 2 % if 0 swap - then + me @ "Equipment/Primary Hand/Type" getstatstr "Ranged" smatch if 2 / then end pop 1 when rpsys str "Recipes/" me @ "Hunting Weapon" getstatstr "/maxdamage" cat getpropstr atoi rpsys str "Recipes/" me @ "Hunting Weapon" getstatstr "/mindamage" cat getpropstr atoi - random swap % 1 + rpsys str "Recipes/" me @ "Hunting Weapon" getstatstr "/mindamage" cat getpropstr atoi + end endcase dup dup dam @ = if dam @ 1 + dam ! then dam @ > if dam ! else pop then 0 until q @ case 0 = when -30 end 1 = when 0 end 2 = when 15 end endcase 100 + dam @ * 100 / dam ! ( If a weapon is wielded, check for damage ) me @ "Hunting Weapon" getstatstr "wielded" smatch random 1000 % 3 q @ - 2 * < and if "Your weapon was damaged." .tell me @ "Equipment/Primary Hand/Condition" getstatint 1 + me @ "Equipment/Primary Hand/Condition" rot setstat then dam @ dup 1 < if pop 1 then toint dam ! me @ "Hunter's Fury" perkcount 5 * dam @ + dam ! hp @ dam @ - hp ! hp @ 0 > if ( Got away! ) str me @ name " attacks " num @ " time" num @ 1 > if "s" then " and deals " dam @ " damage, but to no avail, as the " me2 @ "Hunt" getstatstr " escapes, wounded." cat dup debug "Hunt" pretty tellhere random 7 % 1 + var! x me @ owner 1 { "http://music.scross.homeip.net/Sounds/Blow" x @ ".mp3" }cat { "Blow" x @ ".mp3" }cat sound_play me @ "Hunting" 0 setstat 0.8 hskillraise me @ owner "Hunting Times" getstatint rpsys "Hunt/" me2 @ "hunt" getstatstr strcat "/dexterity" strcat getpropstr toint rpsys "Hunt/" me2 @ "hunt" getstatstr strcat "/Perception" strcat getpropstr toint rpsys "Hunt/" me2 @ "hunt" getstatstr strcat "/Endurance" strcat getpropstr toint + + 10 / var! bcost me @ "Craft/Hunting" getstatint 5 * 6 / var! mincost mincost @ bcost @ > if mincost @ bcost @ tofloat / 0 round var! number mincost @ else 1 number ! bcost @ then + me @ owner "Hunting Times" rot setstat me @ "Hunting Weapon" getstatstr case "arrow" instring when 15 end "javelin" instring when 50 end "knife" instring when 90 end "claw" instring when 90 end "bullet" instring when 5 end "snare" instring when 5 end "focus" instring when 0 end pop 1 when 100 end endcase random 100 % 1 + < if ( Weapon was not recovered. ) str me @ name " loses their " me @ "Hunting Weapon" getstatstr "." cat "Hunt" pretty tellhere me @ "Gear" me @ "Gear" me @ "Hunting weapon" getstatstr findboxitem deleteOrDecrementBoxItem then else ( Got it! ) str me @ name " attacks " num @ " time" num @ 1 > if "s" then " and deals " dam @ " damage, bringing down the " me2 @ "Hunt" getstatstr "!" cat dup debug "Hunt" pretty tellhere me2 @ "Hunting" 0 setstat random 7 % 1 + var! x me @ owner 1 { "http://music.scross.homeip.net/Sounds/Blow" x @ ".mp3" }cat { "Blow" x @ ".mp3" }cat sound_play 1.0 hskillraise rpsys "Hunt/" me2 @ "hunt" getstatstr strcat "/endurance" strcat getpropstr toint dam @ - -15 < me2 @ "Hunt" getstatstr "Random Encounter" smatch not and me @ "Hunting Weapon" getstatstr "snare" instring not and me @ "Hunting Weapon" getstatstr "Focus" instring not and if me @ "Hunting Weapon" getstatstr "Wielded" me @ "Equipment/Primary Hand/Skill" getstatstr "{bows|crossbows|firearms|rods}" smatch and random 2 % and if pop 1 else me @ "Overkill" "You believe in tenderizing your meat while still in its hide." addbadge "The prey is ruined in the attack by the overpowerful hunting tool." tellhere me @ owner 1 "http://music.scross.homeip.net/Sounds/ugh.mp3" "Overkill.mp3" sound_play me @ owner "Hunting Times" getstatint rpsys "Hunt/" me2 @ "hunt" getstatstr strcat "/dexterity" strcat getpropstr toint rpsys "Hunt/" me2 @ "hunt" getstatstr strcat "/Perception" strcat getpropstr toint rpsys "Hunt/" me2 @ "hunt" getstatstr strcat "/Endurance" strcat getpropstr toint + + 10 / var! bcost me @ "Craft/Hunting" getstatint 5 * 6 / var! mincost mincost @ bcost @ > if mincost @ bcost @ tofloat / 0 round var! number mincost @ else 1 number ! bcost @ then + me @ owner "Hunting Times" rot setstat exit then then me @ owner "Hunting Times" getstatint rpsys "Hunt/" me2 @ "hunt" getstatstr strcat "/dexterity" strcat getpropstr toint rpsys "Hunt/" me2 @ "hunt" getstatstr strcat "/Perception" strcat getpropstr toint rpsys "Hunt/" me2 @ "hunt" getstatstr strcat "/Endurance" strcat getpropstr toint + + 3 / var! bcost rpsys "Hunt/" me2 @ "hunt" getstatstr strcat "/Endurance" strcat getpropstr toint case 40 < when me @ "Small Game Hunter" "You've bagged a small creature during your hunting expeditions." addbadge end 80 < when me @ "Big Game Hunter" "You've bagged a large creature during your hunting expeditions. What a prize!" addbadge end 100 < when me @ "Extreme Game Hunter" "You've bagged a huge creature during your hunting expeditions, proving your expertise." addbadge end 99 > when me @ "Elite Game Hunter" "You've proven your complete mastery over the wilderness by bagging a creature larger and tougher than life." addbadge end endcase me @ "Craft/Hunting" getstatint 5 * 2 / var! mincost mincost @ bcost @ > if mincost @ bcost @ tofloat / 0 round var! number mincost @ else 1 number ! bcost @ then + me @ owner "Hunting Times" rot setstat number @ 1 > if { "Your expertise downs an extra " number @ 1 - " of them!" }cat .tell then number @ 2 > if me @ "Three in one Blow" "You killed three in one blow!" addbadge then number @ 5 > if me @ "Six in one Swing" "Murder was never quite as effective as you." addbadge then number @ 8 > if me @ "Nine in one Strike" "Hades has his eye on you. He doesn't like competition." addbadge then me @ owner "Hunt/" me2 @ "Hunt" getstatstr strcat getstatint number @ me @ owner "Class" getstatstr "Ranger" smatch me @ owner "Jobs/Ranger" getstatint 350 < not and random 3 % not and if 1 + me @ owner "Your expertise downs another of them!" notify then + dup 12 > if pop 12 then me @ owner "Hunt/" me2 @ "Hunt" getstatstr strcat rot setstat me2 @ "Hunt" getstatstr "Random Encounter" smatch if me @ str "+queue Plot=Random Encounter(hunt)=I just ran into a random encounter at " me @ location name " with " team @ array_commas "!" cat force me @ str "+judge I just ran into a random encounter at " me @ location name " with " team @ array_commas "!" cat force then me @ "Hunting Weapon" getstatstr case "arrow" instring when 40 end "javelin" instring when 75 end "knife" instring when 100 end "claw" instring when 100 end "bullet" instring when 5 end "snare" instring when 100 end "focus" instring when 50 end pop 1 when 100 end endcase random 100 % 1 + < if ( Weapon was not recovered. ) str me @ name " loses their " me @ "Hunting Weapon" getstatstr "." cat "Hunt" pretty tellhere me @ "Gear" me @ "Gear" me @ "Hunting weapon" getstatstr findboxitem deleteOrDecrementBoxItem then break then else ( Failure ) toofar @ if str me @ name " does not attack." cat "Hunt" me @ owner 1 "http://music.scross.homeip.net/Sounds/flee.mp3" "Huntflee.mp3" sound_play pretty tellhere continue then tohit @ me @ "Hunting Minimum" getstatint < if str me @ name " decides to not attack." cat "Hunt" pretty tellhere me @ owner 1 "http://music.scross.homeip.net/Sounds/flee.mp3" "Huntflee.mp3" sound_play else str me @ name " misses the " me2 @ "Hunt" getstatstr " with their " me @ "Hunting Weapon" getstatstr dup "wielded" smatch if pop me @ "Equipment/Primary Hand/Engraved Name" getstatstr dup "0" smatch if pop me @ "Equipment/Primary Hand/Name" getstatstr then then "." cat "Hunt" pretty tellhere me @ owner 1 "http://music.scross.homeip.net/Sounds/evade2.mp3" "HuntMiss.mp3" sound_play then tohit @ me @ "Hunting Minimum" getstatint > if 0.2 hskillraise then me @ "Hunting Weapon" getstatstr case "arrow" instring when 50 end "javelin" instring when 95 end "knife" instring when 100 end "claw" instring when 100 end "bullet" instring when 5 end "snare" instring when 80 end "focus" instring when 50 end pop 1 when 100 end endcase tohit @ me @ "Hunting Minimum" getstatint < if pop 100 then random 100 % 1 + < if ( Weapon was not recovered. ) str me @ name " loses their " me @ "Hunting Weapon" getstatstr "." cat "Hunt" pretty tellhere me @ "Gear" me @ "Gear" me @ "Hunting weapon" getstatstr findboxitem deleteOrDecrementBoxItem then then ( End Attack ) hp @ not until team @ SORTTYPE_SHUFFLE array_sort foreach me ! pop ( Start attack ) me @ "Special/Pursuit" getstatint not if continue then me @ "Gear" me @ "Hunting Weapon" getstatstr findboxitem not me @ "Hunting Weapon" getstatstr "Feral Hunting" smatch me @ "Special/Feral Hunting" getstatint and not and me @ "Hunting Weapon" getstatstr "Wielded" smatch me @ "Equipment/Primary Hand/WP" getstatint and not and if "You cannot Hunt with a weapon that doesn't exist." .tell continue then me @ owner "Hunting Times" getstatint me @ owner maxhunt < not if "You have hunted as much as you can for today. Perhaps tomorrow." .tell continue then 60 me @ me @ "Hunting Weapon" getstatstr case "Feral" instring when "Brawl" end "Wielded" instring when str me @ "Equipment/Primary Hand/Type" getstatstr "/" me @ "Equipment/Primary Hand/Skill" getstatstr cat end "arrow" instring when "Ranged/Bows" end "javelin" instring when "Ranged/Throwing" end "knife" instring when "Melee/Knives" end "bullet" instring when "Ranged/Firearms" end "rod" instring when "Arcana/Hunting" end "claw" instring when "Brawl/Claws" end "snare" instring when "Security/Traps" end "focus" instring when "Arcana/Magic" end endcase getstatint 5 / + me2 @ "Hunting Bolted" getstatint if 2 / then me @ "Craft/Hunting" getstatfloat 5 * dup me @ "Special/Terrain's-Blessing" getstatint 2 / me @ "Hunting Weapon" getstatstr dup "arrow" instring swap "bullet" instring or if me @ "Professionlist" getstatstr "Rock Thrower" instring if 1 + then me @ "Professionlist" getstatstr "Archer" instring if 2 + then me @ "Professionlist" getstatstr "Sniper" instring if 3 + then me @ "Professionlist" getstatstr "Sharpshooter" instring if 2 + then me @ "Special/Aim" getstatint 2 / me @ "Special/Lock-On" getstatint 5 / + else 0 then + dup rot > if pop dup then + 3 * + rpsys str "Hunt/" me2 @ "Hunt" getstatstr "/Dexterity" cat getpropstr atoi me @ "Hunting Weapon" getstatstr dup "arrow" instring swap "bullet" instring or if me @ "Special/Concentration" getstatint 5 / - then 3 * - var toofar me @ "Hunting Weapon" getstatstr "Magic Hunting Focus" smatch if me @ "Special/Target-Extreme" getstatint if 100 else me @ "Special/Target-Long" getstatint me @ "Special/Target-Short" getstatint 3 / + then me2 @ "Hunting Distance" getstatint 52 me @ "Special/Pursuit" getstatint 2 * - + < if 1.1 else 0.1 then else me @ "Gear" me @ "Gear" me @ "Hunting Weapon" getstatstr findboxitem "Quality" getboxprop tostr case "Masterpiece" smatch when 2 end "Poor" smatch when 0 end when 1 end endcase q ! rpsys str "Recipes/" me @ "Hunting Weapon" getstatstr "/Maxrange" cat getpropstr "/" explode array_make array_reverse q @ array_getitem atoi me2 @ "Hunting Distance" getstatfloat 52 me @ "Special/Pursuit" getstatint 2 * - + swap / then 0 toofar ! case 0.51 < when 0 end 0.71 < when 10 end 1.0 > when 200 1 toofar ! end pop 1 when 20 end endcase - 50 + 2 / me @ "Job" getstatstr "Trapper" smatch if 10 + then me @ "Job" getstatstr "Trapper" smatch if 20 + then toofar @ not me @ "Hunting Weapon" getstatstr "Focus" instring and if pop 100 then dup str swap "^yellow^(" swap "%)" cat .tell random 100 % 1 + > me @ "Hunting Weapon" getstatstr "Focus" instring toofar @ not and or if ( Success!! ) var dam var num 0 random me @ "Craft/Hunting" getstatint 5 * 20 / 1 + me @ "Hunting Weapon" getstatstr "knife" instring if random 25 % me @ "Special/Double-Slash" getstatint < if 1 + then then me @ "Hunting Weapon" getstatstr dup "bullet" instring swap "arrow" instring or if me @ "Special/rapid fire" getstatint 10 / + then me @ "Hunting Weapon" getstatstr "bullet" instring if me @ "Special/rapid-reload" getstatint + then me @ "Hunting Weapon" getstatstr "Focus" instring if pop me @ "Craft/MHunting" getstatint 20 / me @ "Jobs/Mage" getstatint 50 / dup 8 > if pop 8 then 2 / + me @ "Special/Quick-Cast" getstatint 12 / + me @ "Special/X-Magic" getstatint random 25 % > if 1 + then then % 1 for 1 + num ! me @ "Hunting Weapon" getstatstr "Focus" instring if me @ "Craft/Mhunting" getstatfloat me @ "Jobs/Mage" getstatint me @ "Jobs/Black Mage" getstatint + 50.0 / dup 8 < if pop 8 then + me @ "Special/Use-Item" getstatint 4.0 / + toint me @ "Special/Holy" getstatint me @ "Special/Black" getstatint greater me @ "Special/Fire4" getstatint greater 4.5 * me @ "Special/Firaga" getstatint me @ "Special/Iceaga" getstatint greater me @ "Special/Lightningaga" getstatint greater me @ "Special/Airaga" getstatint greater 3.5 * greater me @ "Special/Fira" getstatint me @ "Special/Icea" getstatint greater me @ "Special/Lightninga" getstatint greater me @ "Special/Aira" getstatint greater me @ "Special/Eartha" getstatint greater me @ "Special/Watera" getstatint greater 2.5 * greater me @ "Special/Fire" getstatint me @ "Special/Ice" getstatint greater me @ "Special/Lightning" getstatint greater me @ "Special/Air" getstatint greater me @ "Special/Earth" getstatint greater me @ "Special/Water" getstatint greater greater 1.5 * dup random swap toint % + 2 / over lesser + dup 2 / random swap % 1 + swap 2 / + else me @ "Hunting Weapon" getstatstr dup "Feral" instring swap "claw" instring or if me @ "Special/Feral Hunting" getstatint me @ "Special/Martial-Arts" getstatint 2 / + 3 * 2 / dup 3 / - random swap % 1 + me @ "Special/Feral Hunting" getstatint me @ "Special/Martial-Arts" getstatint 2 / + 3 * 2 / 3 / dup 10 < if pop 10 then + me @ "Hunting Weapon" getstatstr "claw" instring if rpsys str "Recipes/" me @ "Hunting Weapon" getstatstr "/maxdamage" cat getpropstr atoi rpsys str "Recipes/" me @ "Hunting Weapon" getstatstr "/mindamage" cat getpropstr atoi - random swap % 1 + rpsys str "Recipes/" me @ "Hunting Weapon" getstatstr "/mindamage" cat getpropstr atoi + + then else rpsys str "Recipes/" me @ "Hunting Weapon" getstatstr "/maxdamage" cat getpropstr atoi rpsys str "Recipes/" me @ "Hunting Weapon" getstatstr "/mindamage" cat getpropstr atoi - random swap % 1 + rpsys str "Recipes/" me @ "Hunting Weapon" getstatstr "/mindamage" cat getpropstr atoi dup 1 + then then dup dup dam @ = if dam @ 1 + dam ! then dam @ > if dam ! else pop then 0 until dam @ q @ case 0 = when -30 end 1 = when 0 end 2 = when 15 end endcase 100 + * 100 / dam ! hp @ dam @ - hp ! hp @ 0 > if ( Got away! ) str me @ name " attacks " num @ " time" num @ 1 > if "s" then " and deals " dam @ " damage, but to no avail, as the " me2 @ "Hunt" getstatstr " escapes, wounded." cat dup debug "Hunt" pretty tellhere me @ "Hunting" 0 setstat 0.8 hskillraise me @ "Hunting Weapon" getstatstr case "arrow" instring when 15 end "javelin" instring when 50 end "knife" instring when 90 end "claw" instring when 90 end "bullet" instring when 5 end "snare" instring when 5 end "focus" instring when 0 end pop 1 when 100 end endcase random 100 % 1 + < if ( Weapon was not recovered. ) str me @ name " finds that their " me @ "Hunting Weapon" getstatstr " could not be recovered from the fleeing beast, what cursed luck." cat "Hunt" pretty tellhere me @ "Gear" me @ "Gear" me @ "Hunting weapon" getstatstr findboxitem deleteOrDecrementBoxItem then else ( Got it! ) str me @ name " attacks " num @ " time" num @ 1 > if "s" then " and deals " dam @ " damage, bringing down the " me2 @ "Hunt" getstatstr "!" cat dup debug "Hunt" pretty tellhere random 7 % 1 + var! x me @ owner 1 { "http://music.scross.homeip.net/Sounds/Blow" x @ ".mp3" }cat { "Blow " x @ ".mp3" }cat DEBUG_LINE sound_play me2 @ "Hunting" 0 setstat 1.0 hskillraise me @ owner "Hunting Times" getstatint 1 + me @ owner "Hunting Times" rot setstat me @ owner "Hunt/" me2 @ "Hunt" getstatstr strcat getstatint 1 + dup 12 > if pop 12 then me @ owner "Hunt/" me2 @ "Hunt" getstatstr strcat rot setstat me @ "Hunting Weapon" getstatstr case "arrow" instring when 40 end "javelin" instring when 75 end "knife" instring when 100 end "claw" instring when 100 end "bullet" instring when 5 end "snare" instring when 100 end "focus" instring when 50 end pop 1 when 100 end endcase random 100 % 1 + < if ( Weapon was not recovered. ) str me @ name " finds that their " me @ "Hunting Weapon" getstatstr " could not be recovered from the dead body." cat "Hunt" pretty tellhere me @ "Gear" me @ "Gear" me @ "Hunting weapon" getstatstr findboxitem deleteOrDecrementBoxItem then break then else ( Failure ) toofar @ if str me @ name " realises they are too far away from the prey and does not attempt to attack." cat "Hunt" pretty tellhere continue then str me @ name " attacks with their " me @ "Hunting Weapon" getstatstr " but misses, allowing the " me2 @ "hunt" getstatstr " to escape from them." cat "Hunt" pretty tellhere 0.2 hskillraise me @ "Hunting Weapon" getstatstr case "arrow" instring when 40 end "javelin" instring when 95 end "knife" instring when 100 end "claw" instring when 100 end "bullet" instring when 5 end "snare" instring when 80 end "focus" instring when 50 end pop 1 when 100 end endcase random 100 % 1 + < if ( Weapon was not recovered. ) str me @ name " discovers that their " me @ "Hunting Weapon" getstatstr " could not be found from wherever it had landed, damn it all." cat "Hunt" pretty tellhere me @ "Gear" me @ "Gear" me @ "Hunting weapon" getstatstr findboxitem deleteOrDecrementBoxItem then then ( End Attack ) hp @ not until me2 @ me ! ; PUBLIC Reeler : xper me @ "Hunt XP" getstatint 1 + dup 10 > if pop 0 then me @ "Hunt XP" rot setstat str "You will now spend " me @ "Hunt XP" getstatint 10.0 / " XP per successful catch to increase your odds at learning from the experience." cat .tell ; : teamer var target var cur target ! target @ strip not if "Those that would attack if you found prey: " .tell me @ me2 ! var team 0 array_make team ! me @ location contents_array foreach cur ! pop cur @ player? not if continue then cur @ awake? not if continue then cur @ me @ dbcmp if cur @ team @ array_appenditem team ! continue then me @ "Hunting Team" getstatstr "0" smatch if continue then cur @ "Hunting Team" getstatstr me @ "Hunting Team" getstatstr smatch if cur @ team @ array_appenditem team ! continue then 0 until str "Name" 20 left " - " "Weapon" 20 center " - " "STA/HNT" cat .tell team @ foreach me ! pop str me @ name 20 left " - " me @ "Hunting Weapon" getstatstr 20 center " - " me @ "Craft/Stalking" getstatint tostr 3 right "/" me @ "Craft/Hunting" getstatint tostr 3 right cat me2 @ swap notify 0 until me2 @ me ! "Team Name: " me @ "Hunting Team" getstatstr strcat .tell exit then me @ "Hunting team" target @ setstat str me @ name " joins the " target @ " hunting team." cat "Hunt" pretty tellhere ; : HeartHuntfinder var cur var bait var reg region toint reg ! var found? rpsys "Hunt/" array_get_propdirs SORTTYPE_SHUFFLE array_sort foreach cur ! pop 0 found? ! ( #235 me @ dbcmp if .debug-on else .debug-off then ) rpsys str "Hunt/" cur @ "/region" cat getpropstr "/" explode array_make foreach swap pop atoi reg @ = if 1 found? ! break then 0 until found? @ not if continue then 0 found? ! rpsys str "Hunt/" cur @ "/Rarity" cat getpropstr atoi #0 "hour" getpropval case dup 6 > swap 10 < and when 0.75 end dup 18 > swap 21 < and when 0.75 end dup 10 > swap 16 < and when 1.5 end pop 1 when 1.1 end endcase * #0 "moon" getpropval 5 % case 2 < when 0.5 end 3 > when 0.75 end when 1.1 end endcase * toint dup 1 < if pop 1 then random swap % if continue then rpsys str "Hunt/" cur @ "/Bait" cat getpropstr dup "any" smatch if pop 1 Hunt ! else ":" explode array_make foreach "/" split atoi random swap % 1 + Hunt ! bait ! pop 0 until then Hunt @ until hunt @ cur @ ; : heartbeat var cur online_array foreach me ! pop region 0 = if continue then hearthuntfinder cur ! cur @ not if continue then not if continue then cur @ strip not random 5 % and if continue then me @ str "You spot a wild " cur @ tolower " wandering about in the background." cat notify 0 until ; : spam var cur var num var hunt random 3 % if exit then getrooms foreach cur ! pop cur @ "@rp/huntingregion" envprop swap pop toint dup not if pop continue then override ! hearthuntfinder hunt ! num ! num @ 1 < hunt @ not or if continue then str "Lurking in the area " num @ 1 = if "the " hunt @ capitalize " is" else num @ " " hunt @ " are" then " spotted for but a moment." cat cur @ #-1 rot ansi_notify_except 0 until ; : rareword[ str:rarity -- str:word ] rarity @ case 20 < when "dull " end 60 < when "average-" end pop 1 when "exotic " end endcase ; : butcher[ str:target -- ] var num var truenum ( Stored master value of exactly what the player entered ) target @ strip not if "Type +hunt/butcher (hunt stock)=(amount to butcher)" .tell exit then target @ "=" split atoi dup 0 < if pop 0 then dup truenum ! num ! capitalize target ! me @ "Hunt/" target @ strcat getstatint dup 1 < if pop "You don't have any of those to butcher." .tell exit then me @ "Hunt/" target @ strcat getstatint dup num ! truenum ! dup num @ < num @ 0 = or if dup truenum ! num ! else pop then target @ "random" instring if "You can't butcher random encounters automatically! Afraid you have to do this the hard way." .tell exit then me @ "hunting number" num @ setstat var rarity rpsys "Hunt/" target @ strcat "/Endurance" strcat getpropstr toint 3 * rpsys "Hunt/" target @ strcat "/Perception" strcat getpropstr toint + rpsys "Hunt/" target @ strcat "/Dexterity" strcat getpropstr toint + 5 / rarity ! target @ "*imp" smatch if { "You receive " num @ rarity @ 8 / 1 greater * " Gil in bounty." }cat .tell me @ "Gil" getstatfloat num @ rarity @ 8 / 1 greater * + me @ "Gil" rot setstat me @ "Hunt/" target @ strcat 0 setstat exit then target @ "*chocobo" smatch if { "You receive " num @ rarity @ 20 / 1 greater * " chocobo units." }cat .tell me @ "Chocobo" getstatfloat num @ rarity @ 20 / 1 greater * + me @ "Chocobo" rot setstat me @ "Hunt/" target @ strcat 0 setstat exit then var skill me @ "Craft/Butchering" getstatfloat me @ "Improvements/Hunting" getgroupstat tofloat dup 2 < if pop else 1 - 4 * + then skill ! me @ "Butcher Rarity" rarity @ setstat var salt me @ "Gear" "Salt Shaker" findboxitem salt ! salt @ if me @ "Gear" salt @ "Quality" getboxprop tostr case "Poor" smatch when 1 end "Master" instring when 3 end pop 1 when 2 end endcase skill @ + skill ! then salt @ if "You use some salt while working." .tell random 5 % not if "You run out of salt in the shaker!" .tell me @ "Gear" salt @ deleteordecrementboxitem then then 70 skill @ 10 * + rarity @ 10 * - random 100 % < if (FAIL!) random num @ % 1 + num ! str "You fail to butcher the meat properly and lose " num @ " " target @ "s!" cat "Hunting" pretty tellme me @ "Hunt/" target @ strcat getstatint num @ - me @ "Hunt/" target @ strcat rot setstat me @ "Hunting Number" num @ setstat 0.5 bskillraise exit then 100 skill @ rarity @ - 10 * - 100 lesser 10 greater dup toint random swap % 1 + + 2.0 / num @ * 100.0 / 0 round var results toint abs results ! results @ not num @ 1 = random 2 % and if (FAIL!) str "You butcher the " target @ " but find that you don't have enough meat to finish the job, ending up with a lot of wasted meats." cat "Hunting" pretty tellme 0.75 bskillraise me @ "Hunt/" target @ strcat getstatint 1 - me @ "Hunt/" target @ strcat rot setstat exit then results @ 0.5 + toint results ! str me @ name " butchers " num @ " " target @ " and gains " results @ " " rarity @ rareword "food!" cat dup debug "Hunting" pretty tellhere 1.0 bskillraise me @ "Hunt/" target @ strcat getstatint truenum @ - me @ "Hunt/" target @ strcat rot setstat 1 truenum @ 1 for pop random 1000 % not if var color randomcolor color ! str me @ name " finds a " color @ " shard embedded in the meat!" cat tellhere me @ "Shards, " color @ strcat getstatint 1 + me @ "Shards, " color @ strcat rot setstat then repeat var num me @ rarity @ rareword "food" strcat getstatint results @ dup num ! + me @ rarity @ rareword "food" strcat rot setstat 20 skill @ 10 * + rarity @ 10 * - random 100 % < results @ not or if (FAIL!) exit then rarity @ 2 / dup 1 < if pop 1 then dup random swap % 1 + + results ! str me @ name " manages to produce " num @ " " rpsys "Hunt/" target @ strcat "/fur?" strcat getprop toint if "fur" else "leather" then " while working!" cat dup debug "Hunting" pretty tellhere me @ rpsys "Hunt/" target @ strcat "/fur?" strcat getprop toint if "Furs" else "Leather" then getstatint num @ + me @ rpsys "Hunt/" target @ strcat "/fur?" strcat getprop toint if "Furs" else "Leather" then rot setstat 0.3 bskillraise random 3 % if exit then var sinew random 2 % sinew ! rarity @ 2 / dup 1 < if pop 1 then dup random swap % 1 + + results ! str me @ name " manages to produce " num @ " " sinew @ if "Sinew" else "Bone" then " while working!" cat dup debug "Hunting" pretty tellhere me @ sinew @ if "Sinew" else "Bone" then getstatint num @ + me @ sinew @ if "Sinew" else "Bone" then rot setstat 0.3 bskillraise ; : giver[ str:target -- ] var hunt target @ " to " split target ! hunt ! target @ strip not if "Type +hunt/give (hunt) to (person)" .tell exit then target @ pmatch dup player? not if pop "I don't see that player." .tell exit then target ! target @ "Hunt/" hunt @ strcat getstatint 11 > if "They already have too much of that beast." .tell exit then me @ "Hunt/" hunt @ strcat getstatint 1 - dup 0 < if pop "You don't have one of those to give." .tell exit then me @ "Hunt/" hunt @ strcat rot setstat target @ "Hunt/" hunt @ strcat getstatint 1 + target @ "Hunt/" hunt @ strcat rot setstat "You give a beast to " target @ name strcat .tell target @ str "You receive a " hunt @ " from " me @ "!" cat ansi_notify ; : main background me @ location "No Hunt" getstatint if 99 override ! then dup mufcron? if spam exit then command @ "+hunt/thresh" smatch if var cur toint 0 greater 95 lesser cur ! str "You set your to-hit minimum to " cur @ "%." cat "Hunt" pretty tellme me @ "Hunting Minimum" cur @ setstat then command @ "+Hunt/weapon" smatch if rodpicker exit then command @ "+Hunt/bait" smatch if baitpicker exit then command @ "+Hunt/info" smatch if Huntinfo exit then command @ "+Hunt/stock" smatch if Huntstock exit then command @ "+Hunt/track" smatch if Hunter exit then command @ "+hunt/team" smatch if teamer exit then command @ "+Hunt/stop" smatch if reeler exit then command @ "+Hunt/give" smatch if giver exit then command @ "+hunt/butcher" smatch if butcher exit then 1 if "Hunt V 2.3.2 by Nuku Valente." .tell "+Hunt -- This help screen!" .tell "+Hunt/weapon (Weapon Name) -- Declare what weapon you will Hunt with by name" .tell "+Hunt/bait (Bait or Lure name) -- Declare the bait/lure you'll use." .tell " You CAN use Hunt from /stock." .tell "+Hunt/info (Hunt name) -- Get the description on a Hunt." .tell "+Hunt/stock -- Get a list of the Hunt you hold." .tell "+Hunt/give (Name)=(Stock) -- Give (stock) to (name) one at a time." .tell "+hunt/team (name) -- Join a hunting team. If someone on your team finds prey," .tell " you will help stalk and attack the target to bring it down." .tell "+Hunt/track -- Hunt!" .tell "+hunt/thresh (number) -- Set the minimum to-hit% that you will attempt to hit the target." .tell "+Hunt/butcher -- Butcher a captured beast down to market-sellable food. Uses the butchering skill." .tell "You are in Hunting region: " me @ "@rp/Huntingregion" envprop swap pop tostr strcat .tell str "You are Hunting with: " me @ "Hunting Weapon" getstatstr dup "0" smatch if pop "NONE" then " -- Vitality: " me @ maxhunt dup me @ "Hunting Times" getstatint - 0 greater 100 * swap / tofloat 0 round "%" cat .tell str "Your bait is: " me @ "Hunting Trap" getstatstr dup "0" smatch if pop "NONE" then cat .tell me @ "Hunting Minimum" getstatint if str "Your minimum to-hit to strike is " me @ "Hunting Minimum" getstatint "%." cat .tell then me @ "Hunting Weapon" getstatstr "0" smatch if me @ "Hunting Weapon" "Wielded" setstat then me @ "Hunting Weapon" getstatstr "0" smatch not if me @ me @ "Hunting Weapon" getstatstr case "feral" instring when "Brawl" end "arrow" instring when "Ranged/Bows" end "javelin" instring when "Ranged/Throwing" end "knife" instring when "Melee/Knives" end "claw" instring when "Brawl/Claws" end "bullet" instring when "Ranged/Firearms" end "snare" instring when "Security/Traps" end "bullet" instring when "Ranged/Firearms" end "rod" instring when "Arcana/Hunting" end "focus" instring when "Special/Use-Item" end "Wielded" instring when str me @ "Equipment/Primary Hand/Type" getstatstr "/" me @ "Equipment/Primary Hand/Skill" getstatstr dup "rod" instring if pop pop pop "Arcana/Hunting" then cat end pop 1 when "no way!" end endcase getstatint 25 < if str "You should raise ^green^" me @ "Hunting Weapon" getstatstr case "Wielded" instring when str me @ "Equipment/Primary Hand/Type" getstatstr "/" me @ "Equipment/Primary Hand/Skill" getstatstr dup "rod" instring if pop pop pop "Arcana/Hunting" then cat end "arrow" instring when "Ranged/Bows" end "javelin" instring when "Ranged/Throwing" end "feral" instring when "Brawl" end "knife" instring when "Melee/Knives" end "rod" instring when "Arcana/Hunting" end "claw" instring when "Brawl/Claws" end "bullet" instring when "Ranged/Firearms" end "focus" instring when "Use-Item" end endcase "^normal^ to increase your chances of landing a blow." cat .tell then then exit then ;