#!/usr/bin/perl # This Program, RPG1, Is Protected Under The Terms And # Conditions of Version Two (2) of # The GNU GENERAL PUBLIC LICENSE (GPL) # By The Entity Known As MikeeUSA #NOTE: For help on the code or game play enter #linux at cat2.ath.cx on IRC use Term::ANSIColor; print color 'reset'; #If you want a ~random splash screen color set to 1 if you just want default red set to 0 $randcolorsplash = 1; #BUFFERS:: 1 = Enable Buffer :: 0 = Disable Buffer :: NOTE: If you are a believer in minimal ram usage set these to 0 $allowinfotrack = 1; ##buffer -- Logs $info and $info2 $allowstarttrack = 1; ##cbuffer -- Logs $start (the 'command prompt' in the game) $allowreadtrack = 1; ##rbuffer -- Logs $read #PLATFORM:: if you are using unix or a unix like OS set $unix to 1, otherwise set $unix to 0 $unix = 1; $shellargs = 1; ##Accept shell arguments (-h, --help etc):: 1 = True :: 0 = False $wav123 = 1; ##Allow SoundFX :: 1 = YES :: 0 = No $voi123 = 1; ##Allow Voice Synth (via festival) :: 1 = YES :: 0 = No $ogg123 = 0; ##Pointer for weather music is on or off, keep set at 0. $testFX = 1; ##Test to see if (sound)FX programs are installed :: 1 = YES :: 0 = No #VOICEFX:: $voiceFXutil = 'festival'; $voiceFXbuff = ''; #SOUNDFX:: $soundFXdir = './'; #Directory to find SoundFX files $soundFXutil = 'play'; #Sound Utility $soundFXfile = ''; #Automatically set $soundFXrate = ''; #Automatically set $soundFXvolu = ''; #Automatically set $soundFX_explosion = 'explosion.wav'; #Explosion sound file $soundFX_explosionSR = '21000'; #Explosion sample rate $soundFX_explosionVO = '4'; #Explosion volume multiplier $soundFX_boom = 'boom.wav'; #Boom sound file (Shotgun) $soundFX_boomSR = '24000'; #Boom sample rate $soundFX_boomVO = '7'; #Boom volume multiplier $soundFX_pop0 = 'fire.wav'; #Pop sound file (9mm) $soundFX_pop0SR = '48000'; #Pop sample rate $soundFX_pop0VO = '8'; #Pop volume multiplier $soundFX_pop1 = 'boom.wav'; #Pop sound file (.45) $soundFX_pop1SR = '38000'; #Pop sample rate $soundFX_pop1VO = '5'; #Pop volume multiplier $soundFX_pop2 = 'ricochet.wav'; #Pop sound file (.9mm suppressed) $soundFX_pop2SR = '35000'; #Pop sample rate $soundFX_pop2VO = '1'; #Pop volume multiplier $soundFX_missile = 'missile.wav'; #Missle sound file $soundFX_missileSR = '8000'; #Missle sample rate $soundFX_missileVO = '2'; #Missle volume multiplier $soundFX_nuke = 'explosion.wav'; #Nuke sound file $soundFX_nukeSR = '4000'; #Nuke sample rate $soundFX_nukeVO = '9'; #Nuke volume multiplier $soundFX_click = 'flag_grab.wav'; #Click sound file $soundFX_clickSR = '28000'; #Click sample rate $soundFX_clickVO = '5'; #Click volume multiplier $soundFX_laser = 'laser.wav'; #Laser sound file $soundFX_laserSR = '28000'; #Laser sample rate $soundFX_laserVO = '6'; #Laser volume multiplier #Color Theme:: 0 = blue || 1 = white || 2 = green || 3 = red || 4 = yellow || 5 = cyan || 6 = magenta || 7 = black $themecolor1 = 0; ##0 DEFAULT $themecolor2 = 1; ##1 DEFAULT $screen2def1 = 'blue'; ##blue DEFAULT $screen2def2 = 'cyan'; ##cyan DEFAULT $colorhealthbardef = 'red'; ##red DEFAULT $colormanabardef = 'magenta'; ##magenta DEFAULT $colorfhealthbardef = 'bold red'; ##bold red DEFAULT $colorfmanabardef = 'bold magenta'; ##bold magenta DEFAULT $colorbeingice1def = 'blue'; ##blue DEFAULT $colorbeingice2def = 'cyan'; ##cyan DEFAULT $colorbeing1def = 'bold yellow'; ##bold yellow DEFAULT $colorbeing2def = 'cyan'; ##cyan DEFAULT $colorbeingnull1def = 'bold white'; ##bold white DEFAULT $colorbeingnull2def = 'cyan'; ##cyan DEFAULT $colorpromptdef = 'bold yellow'; ##bold yellow DEFAULT $colorinfodef = 'yellow'; ##yellow DEFAULT $colorcompass1def = 'bold yellow'; ##bold yellow DEFAULT $colorcompass2def = 'yellow'; ##yellow DEFAULT $colorcompassudef = 'bold green'; ##bold green DEFAULT $colorcompassddef = 'green'; ##green DEFAULT $themenbrdef = 0; #---------------------------------------------------------# # PERL Knowledge needed beyond this point # #---------------------------------------------------------# BEGIN { print"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"; print'<><><><><><><><><><><><><><><><><><><><><><><><><><>'; print"\n"; print'<> <>'; print"\n"; print'<> <>'; print"\n"; print'<> RRRRRRR PPPPPPP GGGGG 11111 <>'; print"\n"; print'<> RRRRRRRR PPPPPPPP GGGGGGG 11 <>'; print"\n"; print'<> RR RR PP PP GG 11 <>'; print"\n"; print'<> RR RR PP PP GG 11 <>'; print"\n"; print'<> RRRRRRR PPPPPP GG GG 11 <>'; print"\n"; print'<> RR RRR PP GG GG 11 <>'; print"\n"; print'<> RR RRR PP GGGGGGG 11 <>'; print"\n"; print'<> RR RRR PP GGGGG 11111111 <>'; print"\n"; print'<> <>'; print"\n"; print'<> <>'; print"\n"; print'<> <>'; print"\n"; print'<> <>'; print"\n"; print'<> <>'; print"\n"; print'<> [LOADING] <>'; print"\n"; print'<> <>'; print"\n"; print'<> <>'; print"\n"; print'<> <>'; print"\n"; print'<><><><><><><><><><><><><><><><><><><><><><><><><><>'; print"\n"; } sub themes { if ($startinfomenu eq 'theme 0' or $startinfomenu eq 'THEME 0') { $themenbr = 0; $templateC1 = $themecolor1; $templateC2 = $themecolor2; $screen2color1 = $screen2def1; $screen2color2 = $screen2def2; $colorhealthbar = $colorhealthbardef; $colormanabar = $colormanabardef; $colorfhealthbar = $colorfhealthbardef; $colorfmanabar = $colorfmanabardef; $colorbeingice1 = $colorbeingice1def; $colorbeingice2 = $colorbeingice2def; $colorbeing1 = $colorbeing1def; $colorbeing2 = $colorbeing2def; $colorbeingnull1 = $colorbeingnull1def; $colorbeingnull2 = $colorbeingnull2def; $colorprompt = $colorpromptdef; $colorinfo = $colorinfodef; $colorcompass1 = $colorcompass1def; $colorcompass2 = $colorcompass2def; $colorcompassu = $colorcompassudef; $colorcompassd = $colorcompassddef; infomenu(); } elsif ($startinfomenu eq 'theme 1' or $startinfomenu eq 'THEME 1') { $themenbr = 1; $templateC1 = 2; $templateC2 = 1; $screen2color1 = 'green'; $screen2color2 = 'white'; $colorhealthbar = 'yellow'; $colormanabar = 'yellow'; $colorfhealthbar = 'bold yellow'; $colorfmanabar = 'bold yellow'; $colorbeingice1 = $colorbeingice1def; $colorbeingice2 = 'yellow'; $colorbeing1 = 'bold yellow'; $colorbeing2 = 'yellow'; $colorbeingnull1 = 'bold white'; $colorbeingnull2 = 'yellow'; $colorprompt = $colorpromptdef; $colorinfo = $colorinfodef; $colorcompass1 = $colorcompass1def; $colorcompass2 = $colorcompass2def; $colorcompassu = $colorcompassudef; $colorcompassd = $colorcompassddef; infomenu(); } elsif ($startinfomenu eq 'theme 2' or $startinfomenu eq 'THEME 2') { $themenbr = 2; $templateC1 = 2; $templateC2 = 3; $screen2color1 = 'green'; $screen2color2 = 'red'; $colorhealthbar = 'green'; ##red DEFAULT $colormanabar = 'green'; ##magenta DEFAULT $colorfhealthbar = 'bold green'; $colorfmanabar = 'bold green'; $colorbeingice1 = 'blue'; ##blue DEFAULT $colorbeingice2 = 'red'; ##cyan DEFAULT $colorbeing1 = 'bold yellow'; ##bold yellow DEFAULT $colorbeing2 = 'red'; ##cyan DEFAULT $colorbeingnull1 = 'bold white'; ##bold white DEFAULT $colorbeingnull2 = 'red'; ##cyan DEFAULT $colorprompt = $colorpromptdef; $colorinfo = $colorinfodef; $colorcompass1 = $colorcompass1def; $colorcompass2 = $colorcompass2def; $colorcompassu = $colorcompassudef; $colorcompassd = $colorcompassddef; infomenu(); } elsif ($startinfomenu eq 'theme 3' or $startinfomenu eq 'THEME 3') { $themenbr = 3; $templateC1 = 0; $templateC2 = 3; $screen2color1 = 'red'; $screen2color2 = 'blue'; $colorhealthbar = 'red'; $colormanabar = 'blue'; $colorfhealthbar = 'blue'; $colorfmanabar = 'red'; $colorbeingice1 = $colorbeingice1def; $colorbeingice2 = $colorbeingice2def; $colorbeing1 = $colorbeing1def; $colorbeing2 = $colorbeing2def; $colorbeingnull1 = $colorbeingnull1def; $colorbeingnull2 = $colorbeingnull2def; $colorprompt = $colorpromptdef; $colorinfo = $colorinfodef; $colorcompass1 = $colorcompass1def; $colorcompass2 = $colorcompass2def; $colorcompassu = $colorcompassudef; $colorcompassd = $colorcompassddef; infomenu(); } elsif ($startinfomenu eq 'theme 4' or $startinfomenu eq 'THEME 4') { $themenbr = 4; $templateC1 = 0; $templateC2 = 5; $screen2color1 = 'cyan'; $screen2color2 = 'blue'; $colorhealthbar = 'white'; $colormanabar = 'white'; $colorfhealthbar = 'bold black'; $colorfmanabar = 'bold white'; $colorbeingice1 = $colorbeingice1def; $colorbeingice2 = 'white'; $colorbeing1 = $colorbeing1def; $colorbeing2 = 'white'; $colorbeingnull1 = $colorbeingnull1def; $colorbeingnull2 = 'white'; $colorprompt = 'bold blue'; $colorinfo = 'cyan'; $colorcompass1 = 'bold blue'; $colorcompass2 = 'blue'; $colorcompassu = 'bold white'; $colorcompassd = 'white'; infomenu(); } elsif ($startinfomenu eq 'theme 5' or $startinfomenu eq 'THEME 5') { $themenbr = 5; $templateC1 = 3; $templateC2 = 1; $screen2color1 = 'white'; $screen2color2 = 'red'; $colorhealthbar = 'black'; $colormanabar = 'black'; $colorfhealthbar = 'bold black'; $colorfmanabar = 'bold black'; $colorbeingice1 = $colorbeingice1def; $colorbeingice2 = 'black'; $colorbeing1 = 'red'; $colorbeing2 = 'black'; $colorbeingnull1 = 'bold black'; $colorbeingnull2 = 'black'; $colorprompt = 'red'; $colorinfo = 'red'; $colorcompass1 = 'bold red'; $colorcompass2 = 'red'; $colorcompassu = 'bold white'; $colorcompassd = 'bold black'; infomenu(); } elsif ($startinfomenu eq 'theme 6' or $startinfomenu eq 'THEME 6') { $themenbr = 6; $templateC1 = 2; $templateC2 = 7; $screen2color1 = 'black'; $screen2color2 = 'green'; $colorhealthbar = 'black'; $colormanabar = 'black'; $colorfhealthbar = 'bold green'; $colorfmanabar = 'green'; $colorbeingice1 = $colorbeingice1def; $colorbeingice2 = 'black'; $colorbeing1 = 'bold green'; $colorbeing2 = 'black'; $colorbeingnull1 = 'green'; $colorbeingnull2 = 'black'; $colorprompt = 'bold green'; $colorinfo = 'green'; $colorcompass1 = 'green'; $colorcompass2 = 'bold black'; $colorcompassu = $colorcompassudef; $colorcompassd = $colorcompassddef; infomenu(); } elsif ($startinfomenu eq 'theme 7' or $startinfomenu eq 'THEME 7') { $themenbr = 7; $templateC1 = 7; $templateC2 = 1; $screen2color1 = 'black'; $screen2color2 = 'white'; $colorhealthbar = $colorhealthbardef; $colormanabar = $colormanabardef; $colorfhealthbar = $colorfhealthbardef; $colorfmanabar = $colorfmanabardef; $colorbeingice1 = $colorbeingice1def; $colorbeingice2 = $colorbeingice2def; $colorbeing1 = $colorbeing1def; $colorbeing2 = $colorbeing2def; $colorbeingnull1 = $colorbeingnull1def; $colorbeingnull2 = $colorbeingnull2def; $colorprompt = 'bold black'; $colorinfo = 'white'; $colorcompass1 = $colorcompass1def; $colorcompass2 = $colorcompass2def; $colorcompassu = $colorcompassudef; $colorcompassd = $colorcompassddef; infomenu(); } elsif ($startinfomenu eq 'theme 8' or $startinfomenu eq 'THEME 8') { $themenbr = 8; $templateC1 = 3; $templateC2 = 6; $screen2color1 = 'magenta'; $screen2color2 = 'red'; $colorhealthbar = 'cyan'; $colormanabar = 'cyan'; $colorfhealthbar = 'blue'; $colorfmanabar = 'blue'; $colorbeingice1 = $colorbeingice1def; $colorbeingice2 = $colorbeingice2def; $colorbeing1 = $colorbeing1def; $colorbeing2 = $colorbeing2def; $colorbeingnull1 = $colorbeingnull1def; $colorbeingnull2 = $colorbeingnull2def; $colorprompt = 'bold magenta'; $colorinfo = 'bold yellow'; $colorcompass1 = $colorcompass1def; $colorcompass2 = $colorcompass2def; $colorcompassu = $colorcompassudef; $colorcompassd = $colorcompassddef; infomenu(); } else { #N/A } } #Weapons #class table # # Type Number # ---------------------------------------------- # unarmed 0 # sword 1 # axe 2 # pole arm 3 # dagger/knife 4 # staff 5 # bow 6 # magic staff 7 # fire arm 9mm 8 # blunt force (mace,hammer,morningstar) 9 # fire arm .45 cal 10 # fire arm .50 cal 11 # fire arm (shotgun) 12 ga 12 # fire arm (shotgun) 20 ga 13 # fire arm ("cannon") 22mm 14 # claws/teeth/sheer weight 15 # laser 16 # explosive (RPG) X14 17 #Armor #class table # # Type Number # ---------------------------------------------- # none 0 # light cloth ("regular clothes") 1 # heavy cloth (heavy cloak etc) 2 # animal skin (buffalo hide etc) 3 # leather (hats etc) 4 # studded leather 5 # ring mail 6 # scale mail 7 # plate mail 8 # solid sheet metal (helmets etc) 9 # kevlar ("bullet proof vests etc") 10 #Phases #type table # Type Number # ---------------------------------------------- # Living 0 # ICE 1 turn 1 # ICE 2 turn 2 # etc etc #Body Parts #table # Type Number # ---------------------------------------------- # None 0 # Flesh 1 #notes on attack: force(attack dammage given to being (read: enemy)) and beinghealth(your enemy's health) #the scale for force and beinghealth is 0 - 1000000 (course it can be anything you want really...) #Strong humans are at 8000-10000 normal humans are at 4000-6000 #version $version = '0.1.1'; #start clock at 0 $clock = 0; #shellarguments if ($shellargs == 1) { if ($ARGV[0] eq '-h' or $ARGV[0] eq '--help') { print"This Program, RPG1, Is Protected Under The Terms And\n"; print" Conditions of Version Two (2) of \n"; print" The GNU GENERAL PUBLIC LICENSE (GPL) \n"; print" By The Entity Known As MikeeUSA \n\n"; print"RPG1 version $version\n\n"; print"Usage: rpg1 [options]\n"; print" Where [options] are any of:\n"; print"-h, --help Display this help screen\n"; print"-b, --disablebuffers Disable all buffers\n"; print"+b, --enablebuffers Enable all buffers\n"; print" --showtemplates Display Game Templates\n"; exit; #I like die better } elsif ($ARGV[0] eq '+b' or $ARGV[0] eq '--enablebuffers') { $allowinfotrack = 1; $allowstarttrack = 1; $allowreadtrack = 1; print"\n\nAll Buffers Enabled\n"; } elsif ($ARGV[0] eq '-b' or $ARGV[0] eq '--disablebuffers') { $allowinfotrack = 0; $allowstarttrack = 0; $allowreadtrack = 0; print"\n\nAll Buffers Disabled\n"; } elsif ($ARGV[0] eq '--showtemplates') { showtemplates(); exit(); } else { } } else { #ain't no thang } sub svars { #startingroom $room2startin = int(rand(15)); if ($room2startin == 1) { $room = 'zug1'; } #zug1 JAIL else { $room = 'ua1'; } #ua1 REG $info = "nothing mutch"; $info2 = "nada"; #attrubites $health = 100; $weapon = "temp_crookddagger"; $mana = 50; $starvedie = 0; $die = 0; $turn = 0; #experience $magicexp = 1; $physexp = 0; $intellect = 1; $explevel = 1; $wickedness = 0; $psphysexp = $physexp; $pmagicexp = $magicexp; $pintellect = $intellect; #Visual Effects $veffect = 0; $visualpsyc = 0; $visualblind = 0; #Bonus given by eqipment spells etc $healthbonus = 1; #armor we have $nonearmor = 1; $leathervestarmor = 0; $redtshirtarmor = 0; $ringmailvestarmor = 0; $whiterobearmor = 0; #weapons we have $noweaponnone = 1; if ($room2startin == 1) { $crookddagger = 0; } else { $crookddagger = 1; } $cappedstaff = 0; $longsword = 0; $mace = 0; $redcrowbar = 0; $sapg = 0; $sap45cal = 0; if ($room2startin == 1) { $skive = 1; } else { $skive = 0; } $sg12p = 0; $bflyknife = 0; $smg9mm = 0; $smg45cal = 0; $fireaxe = 0; $englishaxe = 0; $straightaxe = 0; $doubleaxe = 0; $broadtipspear = 0; $rpgX14launcher = 0; #spells we have $spellburn = 0; $spellshock = 0; $spelllife = 0; $spellrage = 0; $spellsoultransfer = 0; $spelltoice = 0; $spellteleport = 0; $spellsustenance = 0; #manavar $spellburnmana = 40; $spellragemana = 60; $spellshockmana = 45; $spelllifemana = 90; $spellsoultransfermana = 5; $spellsoultransferpoint = 3; $spelltoicemana = 5; $spelltoicepoint = 10; $spelltoicelife = 50; $spellteleportmana = 10; $spellteleportmana2 = 45; $spellteleportdrain = 50; $spellsustenancemana = 85; #projectile damage $prj9mm = 8000; $prj45cal = 9500; $prj12ga = 21000; $prjRPGX14 = 122000; #directions $n = 0; $s = 0; $e = 0; $w = 0; $ne = 0; $nw = 0; $se = 0; $sw = 0; $up = 0; $down = 0; #bookswehave $ancientredbook = 1; $spellbookburn = 0; $spellbookshock = 0; $spellbooklife = 0; $spellbookrage = 0; $spellbooksoultransfer = 0; $spellbooktoice = 0; $spellbookteleport = 0; $spellbooksustenance = 0; $bookpr0n = 0; $bookjournal = 0; #tools $bombamount = 0; $bullet9mmamount = 0; $bullet45calamount = 0; $slug12gaamount = 0; $explosiveRPGX14amount = 0; $nukeamount = 0; #10 MT at least $sachel = 1; $spflashlight = 0; $gp = 20; #20 $blackbppen = 0; $bbpink = 0; $passcardredkewsszum6 = 0; $glassbottleempty = 0; #misc $rpgx14capacity = 0; $sg12pcapacity = 0; $pistol45calcapacity = 0; $semiautopistolcapacity = 0; $smg45calcapacity = 0; $smg9mmcapacity = 0; $bodyhealthrate = 0.25; $psudobeingattack = 0; $beingattackbodydam = 0; $messageda1a = 0; $messageda2a = 0; $messageda1l = 0; $messageda2l = 0; $bodycolor = 'bold white'; $bloodcolor = 'red'; $bonecolor = 'bold black'; $braincolor = 'bold red'; $movetog = 0; $food = 200; $fooddpl = 1; $foodmax = 500; $armorclass = 0; $armortype = "NA"; $armorginger = "none"; $armordefend = 0; $armordur = 0; $armormagik = 0; #magic bonus $class = 0; $type = "NA"; $gingertype = "none"; $power = 0; $magic = 0; $weapprotect = 0; $fright = 0; #1-10 $armsneeded = 0; $legsneeded = 0; $ranged = 0; $ammocapacity = 0; $accuracy = 0; $journalread = ' '; $templateC1 = $themecolor1; $templateC2 = $themecolor2; $screen2color1 = $screen2def1; $screen2color2 = $screen2def2; $colorhealthbar = $colorhealthbardef; $colormanabar = $colormanabardef; $colorfhealthbar = $colorfhealthbardef; $colorfmanabar = $colorfmanabardef; $colorbeingice1 = $colorbeingice1def; $colorbeingice2 = $colorbeingice2def; $colorbeing1 = $colorbeing1def; $colorbeing2 = $colorbeing2def; $colorbeingnull1 = $colorbeingnull1def; $colorbeingnull2 = $colorbeingnull2def; $colorprompt = $colorpromptdef; $colorinfo = $colorinfodef; $colorcompass1 = $colorcompass1def; $colorcompass2 = $colorcompass2def; $colorcompassu = $colorcompassudef; $colorcompassd = $colorcompassddef; $themenbr = $themenbrdef; $lroomauthor = ''; $roomauthor = 'N/A '; $termdir = '~'; $spellsknown = ' '; if ($randcolorsplash == 1) { $splasscolorrand = int(rand(16)); if ($splasscolorrand == 1) { $splashscrncolor = "red"; } elsif ($splasscolorrand == 2) { $splashscrncolor = "bold red"; } elsif ($splasscolorrand == 3) { $splashscrncolor = "green"; } elsif ($splasscolorrand == 4) { $splashscrncolor = "bold green"; } elsif ($splasscolorrand == 5) { $splashscrncolor = "blue"; } elsif ($splasscolorrand == 6) { $splashscrncolor = "bold blue"; } elsif ($splasscolorrand == 7) { $splashscrncolor = "yellow"; } elsif ($splasscolorrand == 8) { $splashscrncolor = "bold yellow"; } elsif ($splasscolorrand == 9) { $splashscrncolor = "white"; } elsif ($splasscolorrand == 10) { $splashscrncolor = "bold white"; } elsif ($splasscolorrand == 11) { $splashscrncolor = "bold black"; } elsif ($splasscolorrand == 12) { $splashscrncolor = "magenta"; } elsif ($splasscolorrand == 13) { $splashscrncolor = "bold magenta"; } elsif ($splasscolorrand == 14) { $splashscrncolor = "cyan"; } elsif ($splasscolorrand == 15) { $splashscrncolor = "bold cyan"; } else { $splashscrncolor = "red"; } } else { $splashscrncolor = "red"; } $read = " "; $explosivecharge = 2500; $attackdamage = 0; $spellburndam = 210; $statmurders = 0; $statkills = 0; $counter9mm = 0; $counter45cal = 0; $counter12ga = 0; $counterRPGX14 = 0; $bufferinfo = ''; $bufferstart = ''; $bufferread = ''; $bufinfo = " "; $bufinfo2 = " "; #Bodyparts $bodypart_head = 1; $bodypart_kneck = 1; $bodypart_armR = 1; $bodypart_armL = 1; $bodypart_chest = 1; $bodypart_torso = 1; $bodypart_legR = 1; $bodypart_legL = 1; $bodycolor_head = 'bold white'; $bodycolor_kneck = 'bold white'; $bodycolor_armR = 'bold white'; $bodycolor_armL = 'bold white'; $bodycolor_chest = 'bold white'; $bodycolor_torso = 'bold white'; $bodycolor_legR = 'bold white'; $bodycolor_legL = 'bold white'; $bodyhealth_head = 100; $bodyhealth_kneck = 100; $bodyhealth_armR = 100; $bodyhealth_armL = 100; $bodyhealth_chest = 100; $bodyhealth_torso = 100; $bodyhealth_legR = 100; $bodyhealth_legL = 100; $bodyhealthMAX_head = 100; $bodyhealthMAX_kneck = 100; $bodyhealthMAX_armR = 100; $bodyhealthMAX_armL = 100; $bodyhealthMAX_chest = 100; $bodyhealthMAX_torso = 100; $bodyhealthMAX_legR = 100; $bodyhealthMAX_legL = 100; #Sickness/poison/etc $poisoned = 0; #if over 0 = turns to be poisoned, if less eq perm = permanent $poisondam = 5; $sick = 0; #if over 0 = turns to be sick, if eq perm = permanent $sickdam = 3; $starve = 0; #if over 0 = turns to be sick, starve increases each turn under its influence untill 4/5/whatever-the-death-nbr-is #or untill you eat something #triggers $beinginroom = 0; $beinghealth = 0; $beingattack = 0; $beingdefend = 0; #armor points ($force = $force - $beingdefend; if it applies depending on armor class); $beingarmor = 0; #armor class $beingluck = 0; $beinglife = 0; $beingphase = 0; $beingweapon = 0; $beingname = " "; $beinghandle = " "; ##someones in the room if $beinginroom = 1 # $nobeingevade = 0; $fired9mm = 0; $fired12ga = 0; $firedRPGX14 = 0; $fired45cal = 0; $attackedaxe = 0; $attackedsword = 0; $attackedblunt = 0; $smgfired = 0; $brstfired = 0; $smg45calfired = 0; $brst45calfired = 0; $bombdetonate = 0; $bombbeing = 0; $immobile = 0; $drainedla2 = 0; $la2findgrate = 0; $sa0grateblown = 0; $uzx4term = 0; $uzx4termsmoke = 0; $burnredbook = 0; $uzy4lockeropen = 0; $lockersmarts = 0; $termnboom = 0; $termnboom2 = 0; $termnboom3 = 0; $uzz4blowupglass = 0; $uzz4shatterglass = 0; $keyuzs4keyfuze = 0; $keyuzw4keyfuze = 0; $keyuzw4bombed = 0; $keyuzs4bombed = 0; $uzz5bomedup = 0; $uzx7readbook = 0; $uzw4passwordputer = 0; $decssreadlessterm = 0; $uzw4listterm = 0; $uzv4bombedoutg = 0; $sbm2blocked = 0; $sbm2blocked = 1; $smb2cantgo = 0; $spjackpot = 0; $jackpot = 0; $jackpot2 = 0; $jackpot3 = 0; $jackpot4 = 0; $jackpot5 = 0; $jackpot6 = 0; $jackpot7 = 0; $jackpot8 = 0; $jackpot9 = 0; $evadeinfo = 0; $bombsam1trig = 0; $spellburntrig = 0; $spellshocktrig = 0; $spellshocktime = 0; $spellragetrig = 0; $spellragetime = 0; $spelltoicetrig = 0; $spelltoicefail = 0; $spelltransfersoultrig0 = 0; $spelltransfersoultrig1 = 0; $spellteleporttrig = 0; $spellteleporttrig2 = 0; $spellteleportready = 0; $knowspellburntrig = 0; $knowspellshocktrig = 0; $knowspelllifetrig = 0; $knowspellragetrig = 0; $knowspellsustenancetrig = 0; $knowspellsoultransfertrig = 0; $knowspelltoicetrig = 0; $knowspellteleporttrig = 0; $sa0readintel = 0; $gac4readintel = 0; $droid1attacktrig = 0; $droid1attacktrig2 = 0; $droid2attacktrig = 0; $droid2attacktrig2 = 0; $zug1ltrig = 0; $caa4bombw = 0; $zug1winb = 0; $zug1winbtrig = 0; $cac3levelin = 0; $nukedetonate = 0; $la2movetrig = 0; $smg9mmsetnbr = 1; $smg45calsetnbr = 1; $gpop = 0; $noammoclick = 0; $randrommsnake1 = 1; $randrommsnake2 = 1; $trigtripebread = 0; $playpaytrig = 0; $sageteachtrig = 0; $sageharmtrig1 = 0; $attacktrig = 1; $gpopcolor = 0; $keysewagecrdb = 0; $keysewagecrdbp = 0; $keysewagecrds = 0; $switchswr = 0; $switchswrb = 0; $mainframeb = 0; $mainframebroke = 0; $mainframe2b = 0; $mainframe3b = 0; $notereadlessterm = 0; $notereadlessterm2 = 0; $padduzu3b = 0; $uzw4passwdset = 0; $uzw4psauxt = 0; $reactorC0 = 'blue'; $reactorcoolant = 90; $reactortempO = 0; $reactordegrd = 0; $reactorredline = 0; $uzt3bomb = 0; $pincerbeing2_u2zv0 = 0; $bombed_u2zv1 = 0; $keyuzw4var = "keyuzw4"; $beingname = ' '; #foods $f_apple = 1; $fa_apple = 40; $f_carrot = 3; $fa_carrot = 30; $f_bread = 0; $fa_bread = 120; $f_cake = 0; $fa_cake = 160; $f_tripebread = 0; $fa_tripebread = 90; $f_elixirhealth100 = 0; $fa_elixirhealth100 = 10; $f_elixirpoison10 = 0; $fa_elixirpoison10 = '-20'; $f_lsd = 0; $fa_lsd = 3; #debugmode (debuglock = 1 to disable debugmode) $debugmode = 0; $debuglock = 0; $manacheat = 0; $weaponcheat = 0; $bombcheat = 0; $spellcheat = 0; $armorcheat = 0; $magecheat = 0; $barbarycheat = 0; $foodcheat = 0; #names $name_mikeeusa = 'MikeeUSA '; colors(); findslot(); randomstuffstart(); } svars(); titlescreenrpg1(); startingrpg(); sub startingrpg { testFX(); infinitenewlines(); room_registry(); set_armordur(); maintask(); } ##SUBS######################################################################### sub maintask { #NOTE: The recursive loop forged by assume_we_are_done(); might not be the most optimal of paths... deadyet(); weaponability(); reactor(); reactormeltdownsound(); setbufnumber(); beingattr(); resetfight(); topinfobar(); poisonsick(); sbluebar(); colors(); findroom(); manacheck(); healthcheck(); levelcheck(); beingattacking(); reactormeltdown(); infotrack(); bodyhealthcheck(); roominfo(); infotrack(); sbluebar(); beinginfo(); infotrack(); sbluebar(); manacheck2(); healthcheck2(); healthbar(); damagebeing(); cleanup(); bodycolors(); startbar(); stdinstart(); $lroomauthor = $roomauthor; $roomauthor = 'N/A '; starttrack(); enlightenment(); food(); clockup(); assume_we_are_done(); } ###RANGED#WEAPONS###################################### sub reload { if ($ranged == 1) { #reload 'n pop a lil mo if ($gingertype eq '12GA pump action shotgun') { $sg12pcapacity = $ammocapacity; } elsif ($gingertype eq '.45 automatic pistol') { $pistol45calcapacity = $ammocapacity; } elsif ($gingertype eq 'semiautomatic pistol') { $semiautopistolcapacity = $ammocapacity; } elsif ($gingertype eq 'RPG-X14') { $rpgx14capacity = $ammocapacity; } elsif ($gingertype eq '.45 SMG Carbine') { $smg45calcapacity = $ammocapacity; } elsif ($gingertype eq 'SMG 9MM') { $smg9mmcapacity = $ammocapacity; } else { #fo shizzle wha'cha fool talkin? } } else { #fuck dat shit today niggah! } } ###RANGED#WEAPONS###################################### ###TEST#FX############################################ sub testFX { if ($testFX == 1) { print color 'reset'; print color 'black'; if ($voi123 == 1) { if (system("$voiceFXutil -v")) { $voi123 = 0; } else { $voi123 = 1; } } if ($wav123 == 1) { if (system("$soundFXutil -v")) { $wav123 = 0; } else { $wav123 = 1; } } print color 'reset'; } } ###TEST#END########################################### ###VOICE############################################### sub voiceFX_play { #You if ($voi123 == 1) { $voiceFXbuff=~ s/-/ /g; $voiceFXbuff =~ s/\W//g; system("echo \\(SayText \\\"$voiceFXbuff\\\"\\) | $voiceFXutil &"); $voiceFXbuff = ''; } else { #N/A } } sub voiceFX_play_manA { #Thugg if ($voi123 == 1) { $voiceFXbuff=~ s/-/ /g; $voiceFXbuff =~ s/\W//g; system("echo \\(SayText \\\"$voiceFXbuff\\\"\\) | $voiceFXutil &"); $voiceFXbuff = ''; } else { #N/A } } sub voiceFX_play_manB { #Sage if ($voi123 == 1) { $voiceFXbuff=~ s/-/ /g; $voiceFXbuff =~ s/\W//g; system("echo \\(SayText \\\"$voiceFXbuff\\\"\\) | $voiceFXutil &"); $voiceFXbuff = ''; } else { #N/A } } ###VOICE#END########################################### ###SOUND############################################### sub soundFX_play { if ($wav123 == 1) { system("$soundFXutil --silent $soundFXdir$soundFXfile -r $soundFXrate -v $soundFXvolu &"); } else { #N/A } } sub soundFX_play_explosion { $soundFXfile = $soundFX_explosion; $soundFXrate = $soundFX_explosionSR; $soundFXvolu = $soundFX_explosionVO; soundFX_play(); } sub soundFX_play_boom { $soundFXfile = $soundFX_boom; $soundFXrate = $soundFX_boomSR; $soundFXvolu = $soundFX_boomVO; soundFX_play(); } sub soundFX_play_pop0 { $soundFXfile = $soundFX_pop0; $soundFXrate = $soundFX_pop0SR; $soundFXvolu = $soundFX_pop0VO; soundFX_play(); } sub soundFX_play_pop1 { $soundFXfile = $soundFX_pop1; $soundFXrate = $soundFX_pop1SR; $soundFXvolu = $soundFX_pop1VO; soundFX_play(); } sub soundFX_play_pop2 { $soundFXfile = $soundFX_pop2; $soundFXrate = $soundFX_pop2SR; $soundFXvolu = $soundFX_pop2VO; soundFX_play(); } sub soundFX_play_missile { $soundFXfile = $soundFX_missile; $soundFXrate = $soundFX_missileSR; $soundFXvolu = $soundFX_missileVO; soundFX_play(); } sub soundFX_play_nuke { $soundFXfile = $soundFX_nuke; $soundFXrate = $soundFX_nukeSR; $soundFXvolu = $soundFX_nukeVO; soundFX_play(); } sub soundFX_play_click { $soundFXfile = $soundFX_click; $soundFXrate = $soundFX_clickSR; $soundFXvolu = $soundFX_clickVO; soundFX_play(); } sub soundFX_play_laser { $soundFXfile = $soundFX_laser; $soundFXrate = $soundFX_laserSR; $soundFXvolu = $soundFX_laserVO; soundFX_play(); } ###SOUND#END########################################### ###COLORS############################################## sub colors { if ($reactorredline >= 110) { colors_reverse(); } elsif ($health <= 3) { colors_3health(); } elsif ($health <= 5) { colors_5health(); } elsif ($health <= 10) { colors_10health(); } elsif ($health <= 15) { colors_15health(); } elsif ($health <= 20) { colors_20health(); } elsif ($health <= 25) { colors_25health(); } elsif ($health <= 30) { colors_30health(); } elsif ($spellragetrig == 1) { colors_rage(); } else { colors_standard(); } } sub colors_standard { $white = 'white'; $black = 'black'; $yellow = 'yellow'; $green = 'green'; $red = 'red'; $blue = 'blue'; $cyan = 'cyan'; $magenta = 'magenta'; } sub colors_frost { $white = 'white'; $black = 'black'; $yellow = 'blue'; $green = 'cyan'; $red = 'white'; $blue = 'blue'; $cyan = 'cyan'; $magenta = 'blue'; } sub colors_rage { $white = 'red'; $black = 'black'; $yellow = 'white'; $green = 'white'; $red = 'red'; $blue = 'red'; $cyan = 'white'; $magenta = 'red'; } sub colors_flash { $white = 'white'; $black = 'white'; $yellow = 'white'; $green = 'white'; $red = 'white'; $blue = 'white'; $cyan = 'white'; $magenta = 'white'; } sub colors_reverse { $white = 'black'; $black = 'white'; $yellow = 'cyan'; $green = 'magenta'; $red = 'blue'; $blue = 'red'; $cyan = 'yellow'; $magenta = 'green'; } sub colors_crazy { $white = 'cyan'; $black = 'magenta'; $yellow = 'yellow'; $green = 'yellow'; $red = 'magenta'; $blue = 'blue'; $cyan = 'cyan'; $magenta = 'magenta'; } sub colors_30health { $white = 'white'; $black = 'black'; $yellow = 'yellow'; $green = 'green'; $red = 'black'; $blue = 'blue'; $cyan = 'cyan'; $magenta = 'magenta'; } sub colors_25health { $white = 'white'; $black = 'black'; $yellow = 'yellow'; $green = 'black'; $red = 'black'; $blue = 'blue'; $cyan = 'cyan'; $magenta = 'magenta'; } sub colors_20health { $white = 'white'; $black = 'black'; $yellow = 'yellow'; $green = 'black'; $red = 'black'; $blue = 'blue'; $cyan = 'cyan'; $magenta = 'black'; } sub colors_15health { $white = 'black'; $black = 'black'; $yellow = 'yellow'; $green = 'black'; $red = 'black'; $blue = 'blue'; $cyan = 'cyan'; $magenta = 'black'; } sub colors_10health { $white = 'black'; $black = 'black'; $yellow = 'black'; $green = 'black'; $red = 'black'; $blue = 'blue'; $cyan = 'cyan'; $magenta = 'black'; } sub colors_5health { $white = 'black'; $black = 'black'; $yellow = 'black'; $green = 'black'; $red = 'black'; $blue = 'black'; $cyan = 'cyan'; $magenta = 'black'; } sub colors_3health { $white = 'black'; $black = 'black'; $yellow = 'black'; $green = 'black'; $red = 'black'; $blue = 'black'; $cyan = 'black'; $magenta = 'black'; } ###COLORS#END########################################## ###BODY#PARTS########################################## sub printbody0 { #head if ($bodypart_head == 1) { print color "$bodycolor_head"; print' ____ '; print color 'reset'; } else { print color "$bloodcolor"; print' , . '; print color 'reset'; } } sub printbody1 { #head if ($bodypart_head == 1) { print color "$bodycolor_head"; print' /----\\'; print color 'reset'; } else { print color "$braincolor"; print' . ~'; print color 'reset'; } } sub printbody2 { #head if ($bodypart_head == 1) { print color "$bodycolor_head"; print' |----|'; print color 'reset'; } else { print color "$braincolor"; print' , '; print color 'reset'; print color "$bloodcolor"; print'.'; print color 'reset'; print color "$bonecolor"; print';'; print color 'reset' } } sub printbody3 { #head if ($bodypart_head == 1) { print color "$bodycolor_head"; print' \\____/'; print color 'reset'; } else { print color "$bloodcolor"; print' \\~@_ '; print color 'reset'; } } sub printbody4 { #rightarm if ($bodypart_armR == 1) { print color "$bodycolor_armR"; print' __'; print color 'reset'; } else { print color "$bloodcolor"; print' ,_'; print color 'reset'; } #kneck if ($bodypart_kneck == 1) { print color "$bodycolor_kneck"; print'|__|'; print color 'reset'; } else { print color "$bloodcolor"; print'.__.'; print color 'reset'; } #leftarm if ($bodypart_armL == 1) { print color "$bodycolor_armL"; print'__'; print color 'reset'; } else { print color "$bloodcolor"; print'_.'; print color 'reset'; } } sub printbody5 { #rightarm if ($bodypart_armR == 1) { print color "$bodycolor_armR"; print' /-|'; print color 'reset'; } else { print color "$bloodcolor"; print' /_|'; print color 'reset'; } #chest if ($bodypart_chest == 1) { print color "$bodycolor_chest"; print'----'; print color 'reset'; } else { print color "$bloodcolor"; print'* .'; print color 'reset'; } #leftarm if ($bodypart_armL == 1) { print color "$bodycolor_armL"; print'|-\\'; print color 'reset'; } else { print color "$bloodcolor"; print'|}'; print color 'reset'; print color "$bonecolor"; print'- '; print color 'reset'; } } sub printbody6 { #rightarm if ($bodypart_armR == 1) { print color "$bodycolor_armR"; print' /-/'; print color 'reset'; } else { #Placeholder print color "$bloodcolor"; print' .'; print color 'reset'; } #chest if ($bodypart_chest == 1) { print color "$bodycolor_chest"; print'|----|'; print color 'reset'; } else { print color "$bloodcolor"; print' ~ '; print color 'reset'; } #leftarm if ($bodypart_armL == 1) { print color "$bodycolor_armL"; print'\\-\\'; print color 'reset'; } else { #PlaceHolder print color "$bloodcolor"; print' '; print color 'reset'; } } sub printbody7 { #rightarm if ($bodypart_armR == 1) { print color "$bodycolor_armR"; print' /-/ '; print color 'reset'; } else { #Placeholder print color "$bloodcolor"; print' '; print color 'reset'; } #chest if ($bodypart_chest == 1) { print color "$bodycolor_chest"; print'|----|'; print color 'reset'; } else { print color "$bloodcolor"; print' , '; print color 'reset'; } #leftarm if ($bodypart_armL == 1) { print color "$bodycolor_armL"; print' \\-\\'; print color 'reset'; } else { #PlaceHolder print color "$bloodcolor"; print' '; print color 'reset'; } } sub printbody8 { #rightarm if ($bodypart_armR == 1) { print color "$bodycolor_armR"; print'(__) '; print color 'reset'; } else { #Placeholder print color "$bloodcolor"; print' '; print color 'reset'; } #chest if ($bodypart_chest == 1) { print color "$bodycolor_chest"; print'|____|'; print color 'reset'; } else { print color "$bloodcolor"; print' : ~_ '; print color 'reset'; } #leftarm if ($bodypart_armL == 1) { print color "$bodycolor_armL"; print' (__)'; print color 'reset'; } else { #PlaceHolder print color "$bloodcolor"; print' '; print color 'reset'; } } sub printbody9 { #torso if ($bodypart_torso == 1) { print color "$bodycolor_torso"; print' |----|'; print color 'reset'; } else { print color "$bloodcolor"; print' ^ ~ '; print color 'reset'; } } sub printbody10 { #rightleg if ($bodypart_legR == 1) { print color "$bodycolor_legR"; print' |'; print color 'reset'; } else { print color "$bloodcolor"; print' {'; print color 'reset'; } #chest if ($bodypart_torso == 1) { print color "$bodycolor_torso"; print'\\__/'; print color 'reset'; } else { print color "$bloodcolor"; print' . '; print color 'reset'; } #leftleg if ($bodypart_legL == 1) { print color "$bodycolor_legL"; print'|'; print color 'reset'; } else { print color "$bloodcolor"; print'>'; print color 'reset'; } } sub printbody11 { #rightleg if ($bodypart_legR == 1) { print color "$bodycolor_legR"; print' |-|'; print color 'reset'; } else { print color "$bloodcolor"; print' \\|'; print color 'reset'; } #leftleg if ($bodypart_legL == 1) { print color "$bodycolor_legL"; print'|-|'; print color 'reset'; } else { print color "$bloodcolor"; print' '; print color 'reset'; } } sub printbody12 { #rightleg if ($bodypart_legR == 1) { print color "$bodycolor_legR"; print' |-|'; print color 'reset'; } else { print color "$bloodcolor"; print' .'; print color 'reset'; print color "$bonecolor"; print '| '; print color 'reset'; } #leftleg if ($bodypart_legL == 1) { print color "$bodycolor_legL"; print'|-|'; print color 'reset'; } else { print color "$bodycolor"; print' '; print color 'reset'; } } sub printbody13 { #rightleg if ($bodypart_legR == 1) { print color "$bodycolor_legR"; print' |-|'; print color 'reset'; } else { print color "$bloodcolor"; print' '; print color 'reset'; } #leftleg if ($bodypart_legL == 1) { print color "$bodycolor_legL"; print'|-|'; print color 'reset'; } else { print color "$bodycolor"; print' '; print color 'reset'; } } sub printbody14 { #rightleg if ($bodypart_legR == 1) { print color "$bodycolor_legR"; print' /__|'; print color 'reset'; } else { print color "$bloodcolor"; print' ~@ '; print color 'reset'; } #leftleg if ($bodypart_legL == 1) { print color "$bodycolor_legL"; print'|__\\'; print color 'reset'; } else { print color "$bloodcolor"; print'. * '; print color 'reset'; } } sub printbody_all { printbody0(); print"\n"; printbody1(); print"\n"; printbody2(); print"\n"; printbody3(); print"\n"; printbody4(); print"\n"; printbody5(); print"\n"; printbody6(); print"\n"; printbody7(); print"\n"; printbody8(); print"\n"; printbody9(); print"\n"; printbody10(); print"\n"; printbody11(); print"\n"; printbody12(); print"\n"; printbody13(); print"\n"; printbody14(); print"\n"; } sub weaponability { if (($bodypart_armR == 0) && ($bodypart_armL == 0) && ($armsneeded >= 1)) { deweaponize(); $messageda1a = 1; } elsif ((($bodypart_armR == 0) or ($bodypart_armL == 0)) && ($armsneeded >= 2)) { deweaponize(); $messageda2a = 1; } else { #N/A } if (($bodypart_legR == 0) && ($bodypart_legL == 0) && ($legsneeded >= 1)) { deweaponize(); $messageda1l = 1; } elsif ((($bodypart_legR == 0) or ($bodypart_legL == 0)) && ($legsneeded >= 2)) { deweaponize(); $messageda2l = 1; } else { #N/A } } sub bodycolors { if ($bodyhealth_head >= 80) { $bodycolor_head = 'bold white'; } elsif ($bodyhealth_head >= 60) { $bodycolor_head = 'white'; } elsif ($bodyhealth_head >= 40) { $bodycolor_head = 'bold yellow'; } elsif ($bodyhealth_head >= 20) { $bodycolor_head = 'yellow'; } else { $bodycolor_head = 'bold red'; } if ($bodyhealth_kneck >= 80) { $bodycolor_kneck = 'bold white'; } elsif ($bodyhealth_kneck >= 60) { $bodycolor_kneck = 'white'; } elsif ($bodyhealth_kneck >= 40) { $bodycolor_kneck = 'bold yellow'; } elsif ($bodyhealth_kneck >= 20) { $bodycolor_kneck = 'yellow'; } else { $bodycolor_kneck = 'bold red'; } if ($bodyhealth_torso >= 80) { $bodycolor_torso = 'bold white'; } elsif ($bodyhealth_torso >= 60) { $bodycolor_torso = 'white'; } elsif ($bodyhealth_torso >= 40) { $bodycolor_torso = 'bold yellow'; } elsif ($bodyhealth_torso >= 20) { $bodycolor_torso = 'yellow'; } else { $bodycolor_torso = 'bold red'; } if ($bodyhealth_armR >= 80) { $bodycolor_armR = 'bold white'; } elsif ($bodyhealth_armR >= 60) { $bodycolor_armR = 'white'; } elsif ($bodyhealth_armR >= 40) { $bodycolor_armR = 'bold yellow'; } elsif ($bodyhealth_armR >= 20) { $bodycolor_armR = 'yellow'; } else { $bodycolor_armR = 'bold red'; } if ($bodyhealth_armL >= 80) { $bodycolor_armL = 'bold white'; } elsif ($bodyhealth_armL >= 60) { $bodycolor_armL = 'white'; } elsif ($bodyhealth_armL >= 40) { $bodycolor_armL = 'bold yellow'; } elsif ($bodyhealth_armL >= 20) { $bodycolor_armL = 'yellow'; } else { $bodycolor_armL = 'bold red'; } if ($bodyhealth_legR >= 80) { $bodycolor_legR = 'bold white'; } elsif ($bodyhealth_legR >= 60) { $bodycolor_legR = 'white'; } elsif ($bodyhealth_legR >= 40) { $bodycolor_legR = 'bold yellow'; } elsif ($bodyhealth_legR >= 20) { $bodycolor_legR = 'yellow'; } else { $bodycolor_legR = 'bold red'; } if ($bodyhealth_legL >= 80) { $bodycolor_legL = 'bold white'; } elsif ($bodyhealth_legL >= 60) { $bodycolor_legL = 'white'; } elsif ($bodyhealth_legL >= 40) { $bodycolor_legL = 'bold yellow'; } elsif ($bodyhealth_legL >= 20) { $bodycolor_legL = 'yellow'; } else { $bodycolor_legL = 'bold red'; } } sub bodyhealthcheck { if ($bodypart_head == 0) { $bodyhealth_head = 0; } elsif ($bodyhealth_head >= $bodyhealthMAX_head) { $bodyhealth_head = $bodyhealthMAX_head; } elsif ($bodyhealth_head <= 0) { $bodypart_head = 0; $bodyhealth_head = 0; $info = ' Your Head Is Severed! '; ########################################################### infotrack(); } else { $bodyhealth_head = $bodyhealth_head + $bodyhealthrate; } if ($bodypart_kneck == 0) { $bodyhealth_kneck = 0; } elsif ($bodyhealth_kneck >= $bodyhealthMAX_kneck) { $bodyhealth_kneck = $bodyhealthMAX_kneck; } elsif ($bodyhealth_kneck <= 0) { $bodypart_kneck = 0; $bodyhealth_kneck = 0; $info = ' Your Kneck Is Severed! '; ########################################################### infotrack(); } else { $bodyhealth_kneck = $bodyhealth_kneck + $bodyhealthrate; } if ($bodypart_chest == 0) { $bodyhealth_chest = 0; } elsif ($bodyhealth_chest >= $bodyhealthMAX_chest) { $bodyhealth_chest = $bodyhealthMAX_chest; } elsif ($bodyhealth_chest <= 0) { $bodypart_chest = 0; $bodyhealth_chest = 0; $info = ' Your Chest Is Destroyed! '; ########################################################### infotrack(); } else { $bodyhealth_chest = $bodyhealth_chest + $bodyhealthrate; } if ($bodypart_torso == 0) { $bodyhealth_torso = 0; } elsif ($bodyhealth_torso >= $bodyhealthMAX_torso) { $bodyhealth_torso = $bodyhealthMAX_torso; } elsif ($bodyhealth_torso <= 0) { $bodypart_torso = 0; $bodyhealth_torso = 0; $info = ' Your Torso Is Destroyed! '; ########################################################### infotrack(); } else { $bodyhealth_torso = $bodyhealth_torso + $bodyhealthrate; } if ($bodypart_armR == 0) { $bodyhealth_armR = 0; } elsif ($bodyhealth_armR >= $bodyhealthMAX_armR) { $bodyhealth_armR = $bodyhealthMAX_armR; } elsif ($bodyhealth_armR <= 0) { $bodypart_armR = 0; $bodyhealth_armR = 0; $info = ' Your Right Arm Is Severed! '; ########################################################### infotrack(); } else { $bodyhealth_armR = $bodyhealth_armR + $bodyhealthrate; } if ($bodypart_armL == 0) { $bodyhealth_armL = 0; } elsif ($bodyhealth_armL >= $bodyhealthMAX_armL) { $bodyhealth_armL = $bodyhealthMAX_armL; } elsif ($bodyhealth_armL <= 0) { $bodypart_armL = 0; $bodyhealth_armL = 0; $info = ' Your Left Arm Is Severed! '; ########################################################### infotrack(); } else { $bodyhealth_armL = $bodyhealth_armL + $bodyhealthrate; } if ($bodypart_legR == 0) { $bodyhealth_legR = 0; } elsif ($bodyhealth_legR >= $bodyhealthMAX_legR) { $bodyhealth_legR = $bodyhealthMAX_legR; } elsif ($bodyhealth_legR <= 0) { $bodypart_legR = 0; $bodyhealth_legR = 0; $info = ' Your Right Leg Is Severed! '; ########################################################### infotrack(); } else { $bodyhealth_legR = $bodyhealth_legR + $bodyhealthrate; } if ($bodypart_legL == 0) { $bodyhealth_legL = 0; } elsif ($bodyhealth_legL >= $bodyhealthMAX_legL) { $bodyhealth_legL = $bodyhealthMAX_legL; } elsif ($bodyhealth_legL <= 0) { $bodypart_legL = 0; $bodyhealth_legL = 0; $info = ' Your Left Leg Is Severed! '; ########################################################### infotrack(); } else { $bodyhealth_legL = $bodyhealth_legL + $bodyhealthrate; } } ###BODY#PARTS#END###################################### ###THEME#ROUTIENES##################################### sub themeinfo { if ($themenbr == 6) { $info =~ s/ the / teh /g; $info =~ s/l/1/g; $info =~ s/e/3/g; $info =~ s/a/4/g; $info =~ s/s/5/g; $info =~ s/g/6/g; $info =~ s/t/7/g; $info =~ s/b/8/g; $info =~ s/o/0/g; $info =~ s/L/1/g; $info =~ s/E/3/g; $info =~ s/A/4/g; $info =~ s/S/5/g; $info =~ s/G/6/g; $info =~ s/T/7/g; $info =~ s/B/8/g; $info =~ s/O/0/g; $info2 =~ s/ the / teh /g; $info2 =~ s/l/1/g; $info2 =~ s/e/3/g; $info2 =~ s/a/4/g; $info2 =~ s/s/5/g; $info2 =~ s/g/6/g; $info2 =~ s/t/7/g; $info2 =~ s/b/8/g; $info2 =~ s/o/0/g; $info2 =~ s/L/1/g; $info2 =~ s/E/3/g; $info2 =~ s/A/4/g; $info2 =~ s/S/5/g; $info2 =~ s/G/6/g; $info2 =~ s/T/7/g; $info2 =~ s/B/8/g; $info2 =~ s/O/0/g; } elsif ($themenbr == 4) { $info =~ s/ you / eow /g; $info =~ s/ You / Eow /g; $info =~ s/ your / thin /g; $info =~ s/ Your / Thin /g; $info =~ s/ are / art /g; $info =~ s/ Are / Art /g; $info =~ s/staff/stave/g; $info =~ s/Staff/Stave/g; $info =~ s/u/v/g; $info =~ s/w/p/g; $info =~ s/O/0/g; $info =~ s/U/V/g; $info =~ s/W/P/g; $info =~ s/1/I/g; $info =~ s/0/o/g; $info2 =~ s/ you / eow /g; $info2 =~ s/ You / Eow /g; $info2 =~ s/ your / thin /g; $info2 =~ s/ Your / Thin /g; $info2 =~ s/ are / art /g; $info2 =~ s/ Are / Art /g; $info2 =~ s/staff/stave/g; $info2 =~ s/Staff/Stave/g; $info2 =~ s/u/v/g; $info2 =~ s/w/p/g; $info2 =~ s/O/0/g; $info2 =~ s/U/V/g; $info2 =~ s/W/P/g; $info2 =~ s/1/I/g; $info2 =~ s/0/o/g; } elsif ($themenbr == 5) { $info =~ s/o/x/g; $info2 =~ s/o/x/g; } elsif ($themenbr == 7) { $info = reverse $info; $info2 = reverse $info2; } elsif ($themenbr == 8) { $info =~ s/e/w/g; $info =~ s/E/W/g; $info =~ s/u/v/g; $info =~ s/U/V/g; $info =~ s/magic/magik/g; $info =~ s/Magic/Magik/g; $info2 =~ s/e/w/g; $info2 =~ s/E/W/g; $info2 =~ s/u/v/g; $info2 =~ s/U/V/g; $info2 =~ s/magic/magik/g; $info2 =~ s/Magic/Magik/g; } else { #nothing } } sub themebeinginfo { if ($visualblind != 0) { $pbeinghandle= 'something '; } elsif ($visualpsyc != 0) { $vpsycrand = int(rand(2)); if ($vpsycrand == 1) { $pbeinghandle = reverse $beinghandle; } else { $pbeinghandle = $beinghandle; } } else { $pbeinghandle = $beinghandle; } if ($themenbr == 6) { $pbeinghandle =~ s/ the / teh /g; $pbeinghandle =~ s/l/1/g; $pbeinghandle =~ s/e/3/g; $pbeinghandle =~ s/a/4/g; $pbeinghandle =~ s/s/5/g; $pbeinghandle =~ s/g/6/g; $pbeinghandle =~ s/t/7/g; $pbeinghandle =~ s/b/8/g; $pbeinghandle =~ s/o/0/g; $pbeinghandle =~ s/L/1/g; $pbeinghandle =~ s/E/3/g; $pbeinghandle =~ s/A/4/g; $pbeinghandle =~ s/S/5/g; $pbeinghandle =~ s/G/6/g; $pbeinghandle =~ s/T/7/g; $pbeinghandle =~ s/B/8/g; $pbeinghandle =~ s/O/0/g; } elsif ($themenbr == 4) { $pbeinghandle =~ s/ you / eow /g; $pbeinghandle =~ s/ You / Eow /g; $pbeinghandle =~ s/ your / thin /g; $pbeinghandle =~ s/ Your / Thin /g; $pbeinghandle =~ s/ are / art /g; $pbeinghandle =~ s/ Are / Art /g; $pbeinghandle =~ s/ staff / stave /g; $pbeinghandle =~ s/ Staff / Stave /g; $pbeinghandle =~ s/u/v/g; $pbeinghandle =~ s/w/p/g; $pbeinghandle =~ s/O/0/g; $pbeinghandle =~ s/U/V/g; $pbeinghandle =~ s/W/P/g; $pbeinghandle =~ s/1/I/g; $pbeinghandle =~ s/0/o/g; } elsif ($themenbr == 5) { $pbeinghandle =~ s/o/x/g; } elsif ($themenbr == 7) { $pbeinghandle = reverse $beinghandle; } elsif ($themenbr == 8) { $pbeinghandle =~ s/e/w/g; $pbeinghandle =~ s/E/W/g; $pbeinghandle =~ s/u/v/g; $pbeinghandle =~ s/U/V/g; } else { #nothing } } ###THEME#ROUTIENES#END################################# ###BUFFERS!!!!!!!!##################################### sub setbufnumber { if ($clock <= 9) { $bufnbr = "< $clock>"; } elsif ($clock <= 99) { $bufnbr = "<$clock>"; } elsif ($clock <= 999) { $bufnbr = "$clock>"; } else { $bufnbr = "$clock"; } } #Add $info and $info2 to a buffer#### sub infotrack { themeinfo(); if ($allowinfotrack == 1) { if ($info eq $bufinfo or $info eq " ") { #donothing } else { $bufferinfo = "$bufferinfo\n"."$bufnbr"."$info"; } if ($info2 eq $bufinfo2 or $info2 eq " ") { #donothing } else { $bufferinfo = "$bufferinfo\n"."$bufnbr"."$info2"; } $bufinfo = $info; $bufinfo2 = $info2; } else { } } #Add $start to a buffer#### sub starttrack { if ($allowstarttrack == 1) { if ($start eq "") { #donothing } else { $bufferstart = "$bufferstart\n"."<$clock> "."$start"; } } else { } } sub readtrack { if ($allowreadtrack == 1) { if ($read eq $bufread or $read eq " ") { #donothing } else { $bufferread = "$bufferread\n"."<$clock> "."$read"; } $bufread = $read; } else { } } sub printbufferinfo { infinitenewlines(); sbluebar(); if ($allowinfotrack == 1) { print color "$colorinfo"; print"$bufferinfo\n\n"; print color 'reset'; } else { print"\n"; print color 'red'; print' This buffer has been disabled. '; print"\n"; print' Edit '; print color 'reset'; print'$allowinfotrack'; print color 'red'; print' in the beginning of this file'; print"\n"; print' to change this'; print"\n\n"; print color 'reset'; } sbluebar2(); print color "reset"; print"press ["; print color 'green'; print"ENTER"; print color 'reset'; print"]"; $placeholder = ; chomp($placeholder); infinitenewlines(); } sub printbufferstart { infinitenewlines(); sbluebar(); if ($allowstarttrack == 1) { print color "$colorprompt"; print"$bufferstart\n\n"; print color 'reset'; } else { print"\n"; print color 'red'; print' This buffer has been disabled. '; print"\n"; print' Edit '; print color 'reset'; print'$allowstarttrack'; print color 'red'; print' in the beginning of this file'; print"\n"; print' to change this'; print"\n\n"; print color 'reset'; } sbluebar2(); print color "reset"; print"press ["; print color 'green'; print"ENTER"; print color 'reset'; print"]"; $placeholder = ; chomp($placeholder); infinitenewlines(); } sub printbufferread { infinitenewlines(); sbluebar(); if ($allowreadtrack == 1) { print"$bufferread\n\n"; } else { print"\n"; print color 'red'; print' This buffer has been disabled. '; print"\n"; print' Edit '; print color 'reset'; print'$allowreadtrack'; print color 'red'; print' in the beginning of this file'; print"\n"; print' to change this'; print"\n\n"; print color 'reset'; } sbluebar2(); print color "reset"; print"press ["; print color 'green'; print"ENTER"; print color 'reset'; print"]"; $placeholder = ; chomp($placeholder); infinitenewlines(); } ###BUFFERS!!!!!!!!##################################### ####FOOD################ sub food { if ($food > $foodmax) { $food = $foodmax } elsif ($food <= 0) { $starve = $starve + 1; } else { $starve = 0; if ($fooddpl > 0) { $foodtemp = 1 / $fooddpl; $food = $food - $foodtemp; } else { $food = $food - 1 } } } ####FOOD################ ####SPELLS############## ####SPELLS############## sub castspellteleport { if ($spellteleport == 1) { if ($magicexp >= 2) { if ($health >= 0) { if ($spellteleportready == 0) { if ($mana >= $spellteleportmana) { $mana = $mana - $spellteleportmana; $troom = $room; $spellteleportready = 1; $spellteleporttrig = 1; } else { } } else { if ($mana >= $spellteleportmana2) { $mana = $mana - $spellteleportmana2; $food = $food - $spellteleportdrain; $room = $troom; $spellteleportready = 0; $spellteleporttrig2 = 1; $immobile = 2; } else { } } } else { } } else { } } else { } } sub castspellburn { if ($spellburn == 1){ if ($magicexp >= 2) { if ($health >= 0) { if ($beinginroom == 1) { if ($mana >= $spellburnmana) { $mana = $mana - $spellburnmana; $beinghealth = $beinghealth - $spellburndam; $spellburntrig = 1; $beingphase = 0; $magicexp = $magicexp + 0.04; $wickedness = $wickedness + 0.25; } else { } } else { } } else { } } else { } } else { } } sub castspelltoice { if ($spelltoice == 1){ if ($magicexp >= 1) { if ($health >= 0) { if ($beinginroom == 1) { if ($mana >= $spelltoicemana) { $mana = $mana - $spelltoicemana; infinitenewlines(); icebar1(); print color 'bold blue'; print"How much force shall you expend to freeze this\n"; print"being? Each point of force will cost $spelltoicepoint mana and\n"; print"will stall the thaw a length of time and do some\n"; print"frost damage.\n\n"; print"Your mana reserve is $mana percent full\n"; icebar2(); print color 'bold blue'; print"Force To Frost: "; print color 'bold cyan'; $spelltoicedam = ; chomp($spelltoicedam); print color 'reset'; $spelltoicevarb = $spelltoicedam * $spelltoicepoint; if ($spelltoicevarb > $mana) { $spelltoicefail = 1; } else { $beingphase = $beingphase + $spelltoicedam; $mana = $mana - $spelltoicevarb; } $spelltoicetrig = 1; $magicexp = $magicexp + 0.05; } else { } } else { } } else { } } else { } } else { } } sub castspellshock { if ($spellshock == 1){ if ($magicexp >= 1) { if ($health >= 0) { if ($mana >= $spellshockmana) { $mana = $mana - $spellshockmana; $spellshocktime = 2; $spellshocktrig = 1; $nobeingevade = 2; $magicexp = $magicexp + 0.025; } else { } } else { } } else { } } else { } } sub castspelllife { if ($spelllife == 1){ if ($magicexp >= 1) { if ($health <= 0) { if ($mana >= $spelllifemana) { $mana = $mana - $spelllifemana; $health = 20; $pmagicexp = $pmagicexp + 0.1; } else { } } else { } } else { } } else { } } sub castspellrage { if ($spellrage == 1){ if ($magicexp >= 1) { if ($health > 0) { if ($mana >= $spellragemana) { $mana = $mana - $spellragemana; $spellragetime = 2; $spellragetrig = 1; $pmagicexp = $pmagicexp + 0.015; } else { } } else { } } else { } } else { } } sub castspellsustenance { if ($spellsustenance == 1){ if ($magicexp >= 1) { if ($health > 0) { if ($mana >= $spellsustenancemana) { $mana = $mana - $spellsustenancemana; $food = $food + 50; $pmagicexp = $pmagicexp + 0.025; } else { } } else { } } else { } } else { } } sub castspellsoultransfer { if ($spellsoultransfer == 1) { if ($magicexp >= 1) { if ($beinginroom == 1) { if ($mana >= $spellsoultransfermana) { $mana = $mana - $spellsoultransfermana; infinitenewlines(); if ($beinghealth <= 0) { $healthbeingrate = 0; } else { $healthbeingrate = $beinghealth / $beinglife; #inflate x100 for a percentage $healthbeingrate = $healthbeingrate * 100; } darkbar1(); print color 'bold black'; print"The being you seek to destroy claims hold to\n"; print"health of $healthbeingrate percent...\n\n"; print"Your mana reserve is at $mana and your current\n"; print"vitality rests at $health percent\n\n"; print"It is expected that each point of life transfered\n"; print"will deplete your mana by $spellsoultransferpoint points\n"; print color 'reset'; darkbar2(); if ($beinghealth > 0) { if ($mana > 0) { if ($spellsoultransferpoint > 0) { $manaallowtransfer = $mana / $spellsoultransferpoint; $possiblelifetake = $healthbeingrate + 1; } else { $manaallowtransfer = $mana; $possiblelifetake = $healthbeingrate + 1; } } else { $possiblelifetake = 0; } } else { $possiblelifetake = 0; } print color 'white'; print"Life To Take: "; print color 'reset'; print color 'red'; $spellsoultransferdam = ; chomp($spellsoultransferdam); print color 'reset'; if ($spellsoultransferdam <= $possiblelifetake) { if ($spellsoultransferdam <= $manaallowtransfer) { if ($spellsoultransferpoint > 0) { $soultransfermanacost = $spellsoultransferdam * $spellsoultransferpoint; } else { $soultransfermanacost = $spellsoultransferdam; } if ($mana < $soultransfermanacost) { $spelltransfersoultrig0 = 1; } else { $mana = $mana - $soultransfermanacost; $healthbeingrate = $healthbeingrate - $spellsoultransferdam; if ($healthbeingrate > 0) { #deflate back to 1 or less so we can multiply by it to get the beings real health $healthbeingrate = $healthbeingrate / 100; } else { $healthbeingrate = 0; } $beinghealth = $healthbeingrate * $beinglife; $health = $health + $spellsoultransferdam; $spelltransfersoultrig1 = 1; $wickedness = $wickedness + 1; $pmagicexp = $pmagicexp + 0.1; } } else { $spelltransfersoultrig0 = 1; } } else { $spelltransfersoultrig0 = 1; } } else { } } else { } } else { } } else { } } ####SPELLS############## ####SPELLS############## ##GUN#STUFF############# sub smg9mmsetcheck { if ($smg9mmsetnbr == 1) { $smg9mmsetwrd = "semiauto"; $smg9mmpower = $prj9mm; } elsif ($smg9mmsetnbr == 2) { $smg9mmsetwrd = "Burst (3RND)"; $smg9mmpower = $prj9mm * 3; } elsif ($smg9mmsetnbr == 3) { $smg9mmsetwrd = "fullauto"; $smg9mmpower = $prj9mm * 30; } else { } } sub smg45calsetcheck { if ($smg45calsetnbr == 1) { $smg45calsetwrd = "semiauto"; $smg45calpower = $prj45cal; } elsif ($smg45calsetnbr == 2) { $smg45calsetwrd = "Burst (3RND)"; $smg45calpower = $prj45cal * 3; } elsif ($smg45calsetnbr == 3) { $smg45calsetwrd = "fullauto"; $smg45calpower = $prj45cal * 32; } else { } } sub gpop { if ($gpop >= 1) { # ~1000 RPM sleep(0.06); if ($gpopcolor == 1) { print color 'white'; print"*"; print color 'yellow'; print"POP"; print color 'reset'; print color 'white'; print"*\n"; soundFX_play_pop2(); $counter9mm = $counter9mm + 1; $gpopcolor = 0; } else { print color 'bold black'; print"*"; print color 'bold yellow'; print"POP"; print color 'reset'; print color 'bold black'; print"*\n"; soundFX_play_pop2(); $counter9mm = $counter9mm + 1; $gpopcolor = 1; } print color 'reset'; $gpop = $gpop - 1; gpop(); } else { } } sub gpop45 { if ($gpop >= 1) { # ~650 RPM sleep(0.09); if ($gpopcolor == 1) { print color 'white'; print"*"; print color 'red'; print"POP"; print color 'reset'; print color 'white'; print"*\n"; soundFX_play_pop1(); $counter45cal = $counter45cal + 1; $gpopcolor = 0; } else { print color 'bold black'; print"*"; print color 'bold yellow'; print"POP"; print color 'reset'; print color 'bold black'; print"*\n"; soundFX_play_pop1(); $counter45cal = $counter45cal + 1; $gpopcolor = 1; } print color 'reset'; $gpop = $gpop - 1; gpop45(); } else { } } ##GUN#STUFF#END########## ##turn counter########### sub clockup { $clock = $clock + 1; } ##turn counter########### ##Level Check############################################# sub levelcheck { if ($pintellect >= 11) { $intellect = 11; } elsif ($pintellect >= 10) { $intellect = 10; } elsif ($pintellect >= 9) { $intellect = 9; } elsif ($pintellect >= 8) { $intellect = 8; } elsif ($pintellect >= 7) { $intellect = 7; } elsif ($pintellect >= 6) { $intellect = 6; } elsif ($pintellect >= 5) { $intellect = 5; } elsif ($pintellect >= 4) { $intellect = 4; } elsif ($pintellect >= 3) { $intellect = 3; } elsif ($pintellect >= 2) { $intellect = 2; } elsif ($pintellect >= 1) { $intellect = 1; } elsif ($pintellect >= 0) { $intellect = 0; } else { $intellect = 0; } if ($psphysexp >= 4096) { $physexp = 12; $bodyhealthrate = 0.85; } elsif ($psphysexp >= 2048) { $physexp = 11; $bodyhealthrate = 0.8; } elsif ($psphysexp >= 1024) { $physexp = 10; $bodyhealthrate = 0.75; } elsif ($psphysexp >= 512) { $physexp = 9; $bodyhealthrate = 0.7; } elsif ($psphysexp >= 256) { $physexp = 8; $bodyhealthrate = 0.65; } elsif ($psphysexp >= 128) { $physexp = 7; $bodyhealthrate = 0.6; } elsif ($psphysexp >= 64) { $physexp = 6; $bodyhealthrate = 0.55; } elsif ($psphysexp >= 32) { $physexp = 5; $bodyhealthrate = 0.5; } elsif ($psphysexp >= 16) { $physexp = 4; $bodyhealthrate = 0.45; } elsif ($psphysexp >= 8) { $physexp = 3; $bodyhealthrate = 0.4; } elsif ($psphysexp >= 4) { $physexp = 2; $bodyhealthrate = 0.35; } elsif ($psphysexp >= 1) { $physexp = 1; $bodyhealthrate = 0.3; } elsif ($psphysexp >= 0) { $physexp = 0; $bodyhealthrate = 0.25; } else { $physexp = 0; $bodyhealthrate = 0.25; } $pXCmagicexp = $pmagicexp + $armormagik; if ($pXCmagicexp >= 32) { $magicexp = 12; } elsif ($pXCmagicexp >= 25) { $magicexp = 11; } elsif ($pXCmagicexp >= 20.5) { $magicexp = 10; } elsif ($pXCmagicexp >= 17) { $magicexp = 9; } elsif ($pXCmagicexp >= 14) { $magicexp = 8; } elsif ($pXCmagicexp >= 11.5) { $magicexp = 7; } elsif ($pXCmagicexp >= 9) { $magicexp = 6; } elsif ($pXCmagicexp >= 7) { $magicexp = 5; } elsif ($pXCmagicexp >= 5) { $magicexp = 4; } elsif ($pXCmagicexp >= 3.5) { $magicexp = 3; } elsif ($pXCmagicexp >= 2) { $magicexp = 2; } elsif ($pXCmagicexp >= 1) { $magicexp = 1; } elsif ($pXCmagicexp >= 0) { $magicexp = 0; } else { $magicexp = 0; } if ($magicexp <= 0) { $spellragemana = 999999; $spellshockmana = 999999; $spelllifemana = 999999; $spellsoultransfermana = 999999; $spellsoultransferpoint = 999999; $spellburnmana = 999999; $spelltoicemana = 999999; $spelltoicepoint = 999999; $spelltoicelife = 0; $spellburndam = 0; $spellteleportmana = 999999; $spellteleportmana2 = 999999; $spellteleportdrain = 999999; $spellsustenancemana = 999999; } elsif ($magicexp == 1) { #vars depending on magic exp $spellragemana = 60; $spellshockmana = 45; $spelllifemana = 90; $spellsoultransfermana = 10; $spellsoultransferpoint = 3; $spellburnmana = 999999; $spelltoicemana = 5; $spelltoicepoint = 10; $spelltoicelife = 10; $spellburndam = 0; $spellteleportmana = 999999; $spellteleportmana2 = 999999; $spellteleportdrain = 50; $spellsustenancemana = 85; } elsif ($magicexp == 2) { $spellragemana = 45; $spellshockmana = 35; $spelllifemana = 85; $spellsoultransfermana = 8; $spellsoultransferpoint = 2.5; $spellburnmana = 40; $spelltoicemana = 5; $spelltoicepoint = 8; $spelltoicelife = 20; $spellburndam = 210; $spellteleportmana = 10; $spellteleportmana2 = 45; $spellteleportdrain = 50; $spellsustenancemana = 80; } elsif ($magicexp == 3) { $spellragemana = 30; $spellshockmana = 20; $spelllifemana = 80; $spellsoultransfermana = 5; $spellsoultransferpoint = 2.2; $spellburnmana = 30; $spelltoicemana = 4; $spelltoicepoint = 8; $spelltoicelife = 35; $spellburndam = 450; $spellteleportmana = 10; $spellteleportmana2 = 45; $spellteleportdrain = 50; $spellsustenancemana = 75; } elsif ($magicexp == 4) { $spellragemana = 25; $spellshockmana = 18; $spelllifemana = 75; $spellsoultransfermana = 4; $spellsoultransferpoint = 2; $spellburnmana = 20; $spelltoicemana = 4; $spelltoicepoint = 6; $spelltoicelife = 50; $spellburndam = 705; $spellteleportmana = 8; $spellteleportmana2 = 45; $spellteleportdrain = 50; $spellsustenancemana = 70; } elsif ($magicexp == 5) { $spellragemana = 20; $spellshockmana = 16; $spelllifemana = 70; $spellsoultransfermana = 4; $spellsoultransferpoint = 1.8; $spellburnmana = 16; $spelltoicemana = 3; $spelltoicepoint = 5; $spelltoicelife = 100; $spellburndam = 1030; $spellteleportmana = 8; $spellteleportmana2 = 42; $spellteleportdrain = 50; $spellsustenancemana = 65; } elsif ($magicexp == 6) { $spellragemana = 15; $spellshockmana = 14; $spelllifemana = 60; $spellsoultransfermana = 4; $spellsoultransferpoint = 1.8; $spellburnmana = 14; $spelltoicemana = 3; $spelltoicepoint = 5; $spelltoicelife = 125; $spellburndam = 1420; $spellteleportmana = 8; $spellteleportmana2 = 42; $spellteleportdrain = 50; $spellsustenancemana = 60; } elsif ($magicexp == 7) { $spellragemana = 10; $spellshockmana = 12; $spelllifemana = 55; $spellsoultransfermana = 4; $spellsoultransferpoint = 1.6; $spellburnmana = 12; $spelltoicemana = 3; $spelltoicepoint = 5; $spelltoicelife = 150; $spellburndam = 1705; $spellteleportmana = 8; $spellteleportmana2 = 42; $spellteleportdrain = 50; $spellsustenancemana = 55; } else { $spellragemana = 60; $spellshockmana = 45; $spelllifemana = 90; $spellsoultransfermana = 5; $spellsoultransferpoint = 3; $spellburnmana = 999999; $spelltoicemana = 5; $spelltoicepoint = 10; $spelltoicelife = 10; $spellburndam = 0; $spellteleportmana = 999999; $spellteleportmana2 = 999999; $spellteleportdrain = 50; $spellsustenancemana = 85; } } ##Level Check############################################# ##Ghettomap sub ghmap { infinitenewlines(); sbluebar(); #this code is mangled, phj33r my l33t skillx0rz! print color 'bold yellow'; print"Possible Directions:\n"; print color 'reset'; print' '; if ($n == 1) { print color 'bold white'; print" N \n"; print color 'reset'; } else { print"\n"; } print' '; if ($nw == 1) { print" NW "; } else { print" "; } print color 'bold yellow'; print'A'; print color 'reset'; if ($ne == 1) { print" NE \n"; } else { print" \n"; } print' '; if ($up == 1) { print color 'bold green'; print" U"; print color 'reset'; } else { print" "; } print color 'bold yellow'; print'|'; print color 'reset'; if ($up == 1) { print color 'bold green'; print"P \n"; print color 'reset'; } else { print"\n"; } print' '; if ($w == 1) { print color 'bold white'; print"W"; print color 'reset'; } else { print" "; } print color 'bold yellow'; print'<---'; print color 'reset'; print color 'bold blue'; print'+'; print color 'reset'; print color 'bold yellow'; print'--->'; print color 'reset'; if ($e == 1) { print color 'bold white'; print"E\n"; print color 'reset'; } else { print" \n"; } print' '; if ($down == 1) { print color 'green'; print" DO"; print color 'reset'; } else { print" "; } print color 'bold yellow'; print'|'; print color 'reset'; if ($down == 1) { print color 'green'; print"WN \n"; print color 'reset'; } else { print"\n"; } print' '; if ($sw == 1) { print" SW "; } else { print" "; } print color 'bold yellow'; print'V'; print color 'reset'; if ($se == 1) { print" SE \n"; } else { print" \n"; } print' '; if ($s == 1) { print color 'bold white'; print" S \n"; print color 'reset'; } else { print"\n"; } print"\n"; sbluebar2(); print color "reset"; print"press ["; print color 'green'; print"ENTER"; print color 'reset'; print"]"; $placeholder = ; chomp($placeholder); infinitenewlines(); } ##Ghettomap ##Cleanup###################################################################### sub cleanup { $attacktrig = 0; $playpaytrig = 0; $bombbeing = 0; $spellburntrig = 0; $spellshocktrig = 0; $spellragetrig = 0; $possiblelifetake = 0; $spelltransfersoultrig1 = 0; $spelltransfersoultrig0 = 0; $spelltoicetrig = 0; $spelltoicefail = 0; $spellteleporttrig = 0; $spellteleporttrig2 = 0; $knowspellburntrig = 0; $knowspellsustenancetrig = 0; $knowspellshocktrig = 0; $knowspelllifetrig = 0; $knowspellragetrig = 0; $knowspellsoultransfertrig = 0; $knowspelltoicetrig = 0; $knowspellteleporttrig = 0; $fired9mm = 0; $fired45cal = 0; $fired12ga = 0; $firedRPGX14 = 0; $smgfired = 0; $brstfired = 0; $smg45calfired = 0; $brst45calfired = 0; $noammoclick = 0; $attackedaxe = 0; $attackedsword = 0; $attackedblunt = 0; $keysewagecrdb = 0; $messageda1a = 0; $messageda2a = 0; $messageda1l = 0; $messageda2l = 0; if ((($bodypart_legR == 0) && ($bodypart_legL == 0)) or ($bodypart_torso == 0)) { if (($bodypart_armR == 0) && ($bodypart_armL == 0)) { if ($movetog == 0) { $movetog = 7; } elsif ($movetog == 1) { $movetog = 0; } elsif ($movetog == 2) { $movetog = 1; } elsif ($movetog == 3) { $movetog = 2; } elsif ($movetog == 4) { $movetog = 3; } elsif ($movetog == 5) { $movetog = 4; } elsif ($movetog == 6) { $movetog = 5; } elsif ($movetog == 7) { $movetog = 6; } else { $movetog = 0; } } elsif (($bodypart_armR == 0) or ($bodypart_armL == 0)) { if ($movetog == 0) { $movetog = 5; } elsif ($movetog == 1) { $movetog = 0; } elsif ($movetog == 2) { $movetog = 1; } elsif ($movetog == 3) { $movetog = 2; } elsif ($movetog == 4) { $movetog = 3; } elsif ($movetog == 5) { $movetog = 4; } else { $movetog = 0; } } else { if ($movetog == 0) { $movetog = 3; } elsif ($movetog == 1) { $movetog = 0; } elsif ($movetog == 2) { $movetog = 1; } elsif ($movetog == 3) { $movetog = 2; } else { $movetog = 0; } } } elsif (($bodypart_legR == 0) or ($bodypart_legL == 0)) { if ($movetog == 0) { $movetog = 1; } else { $movetog = 0; } } else { $movetog = 0; } if ($visualpsyc == '-1') { $visualpsyc = -1; } elsif ($visualpsyc > 0) { $visualpsyc = $visualpsyc - 1; } else { } if ($visualblind == '-1') { $visualblind = -1; } elsif ($visualblind > 0) { $visualblind = $visualblind - 1; } else { } if ($keysewagecrds > 0) { $keysewagecrds = $keysewagecrds - 1; } else { } if ($nobeingevade > 0) { $nobeingevade = $nobeingevade - 1; } else { } if ($immobile > 0) { $immobile = $immobile - 1; } else { } if ($spellshocktime > 0) { $spellshocktime = $spellshocktime - 1; } else { } if ($spellragetime > 0) { $spellragetime = $spellragetime - 1; } else { } } ##Cleanup###################################################################### ##Assume We Are Done########################################################### sub assume_we_are_done { $turn = $turn + 1; print color 'reset'; #Infinite newlines... infinitenewlines(); #get ready... maintask(); #LOOP!!! } ##Assume We Are Done########################################################### sub poisonsick { if ($poisoned eq "perm") { $health = $health - $poisondam; } elsif ($poisoned > 0) { $health = $health - $poisondam; $poisoned = $poisoned - 1; } else { $poisoned = 0 } if ($sick eq "perm") { $health = $health - $sickdam; } elsif ($sick > 0) { $health = $health - $sickdam; $sick = $sick - 1; } else { $sick = 0 } } sub deweaponize { $class = 0; $type = 'NA'; $gingertype = 'none'; $power = 0; $magic = 0; $weapprotect = 0; $armsneeded = 0; $legsneeded = 0; $ranged = 0; $ammocapacity = 0; $accuracy = 0; } sub foodpick { infinitenewlines(); inventorybar1(); print color 'bold yellow'; print"Your Food Store:\n\n"; print color 'reset'; if ($f_apple == 1) { print"1) 1 apple\n"; } elsif ($f_apple > 1) { print"1) $f_apple apples\n"; } else { } if ($f_carrot == 1) { print"2) 1 carrot\n"; } elsif ($f_carrot > 1) { print"2) $f_carrot carrots\n"; } else { } if ($f_bread == 1) { print"3) 1 loaf of bread\n"; } elsif ($f_bread > 1) { print"3) $f_bread loaves of bread\n"; } else { } if ($f_cake == 1) { print"4) 1 cake\n"; } elsif ($f_cake > 1) { print"4) $f_cake cakes\n"; } else { } if ($f_tripebread == 1) { print"5) 1 tripe loaf of bread\n"; } elsif ($f_tripebread > 1) { print"5) $f_tripebread tripe loaves of bread\n"; } else { } if ($f_lsd == 1) { print"6) 1 LSD cube\n"; } elsif ($f_lsd > 1) { print"6) $f_lsd LSD cubes\n"; } else { } if ($f_elixirhealth100 == 1) { print"7) 1 $colorelixirH100 elixir\n"; } elsif ($f_elixirhealth100 > 1) { print"7) $f_elixirhealth100 $colorelixirH100 elixirs\n"; } else { } if ($f_elixirpoison10 == 1) { print"8) 1 $colorelixirP10 elixir\n"; } elsif ($f_elixirpoison10 > 1) { print"8) $f_elixirpoison10 $colorelixirP10 elixirs\n"; } else { } print"\n"; inventorybar2(); print'What Article of Food Do You Wish To Devour (chose #): '; $foodchoose = ; chomp($foodchoose); infinitenewlines(); if ($foodchoose == 1) { if ($f_apple >= 1) { $f_apple = $f_apple - 1; $food = $food + $fa_apple; } else { } } elsif ($foodchoose == 2) { if ($f_carrot >= 1) { $f_carrot = $f_carrot - 1; $food = $food + $fa_carrot; } else { } } elsif ($foodchoose == 3) { if ($f_bread >= 1) { $f_bread = $f_bread - 1; $food = $food + $fa_bread; } else { } } elsif ($foodchoose == 4) { if ($f_cake >= 1) { $f_cake = $f_cake - 1; $food = $food + $fa_cake; } else { } } elsif ($foodchoose == 5) { if ($f_tripebread >= 1) { $f_tripebread = $f_tripebread - 1; $food = $food + $fa_tripebread; $poisoned = $poisoned + 5; $trigtripebread = 1; } else { } } elsif ($foodchoose == 6) { if ($f_lsd >= 1) { $f_lsd = $f_lsd - 1; $food = $food + $fa_lsd; if ($visualpsyc == '-1') { $visualpsyc = -1; } else { $visualpsyc = $visualpsyc + 53; } } else { } } elsif ($foodchoose == 7) { if ($f_elixirhealth100 >= 1) { $f_elixirhealth100 = $f_elixirhealth100 - 1; $food = $food + $fa_elixirhealth100; $glassbottleempty = $glassbottleempty + 1; $health = 100; } else { } } elsif ($foodchoose == 8) { if ($f_elixirpoison10 >= 1) { $f_elixirpoison10 = $f_elixirpoison10 - 1; $food = $food + $fa_elixirpoison10; $glassbottleempty = $glassbottleempty + 1; $poisoned = $poisoned + 10; $visualblind = $visualblind + 7; } else { } } else { } } sub readownbook { infinitenewlines(); cyanbar1(); print color 'bold yellow'; print"Your Library:\n"; print color 'reset'; print" 1) "; if ($ancientredbook == 1) { print"Ancient Red Book"; } else { }; print"\n"; print" 2) "; if ($spellbookshock == 1) { print"Tome of Shock"; } else { }; print"\n"; print" 3) "; if ($spellbooklife == 1) { print"Spellbook of Life"; } else { }; print"\n"; print" 4) "; if ($spellbookrage == 1) { print"Written Rag of Rage"; } else { }; print"\n"; print" 5) "; if ($spellbooksoultransfer == 1) { print"Directions on Soultransfer, Volume 1"; } else { }; print"\n"; print" 6) "; if ($spellbookburn == 1) { print"Book of Fire"; } else { }; print"\n"; print" 7) "; if ($bookpr0n == 1) { print"Tome of the Best [Undecipherable]"; } else { }; print"\n"; print" 8) "; if ($spellbooktoice == 1) { print"Book of Frost"; } else { }; print"\n"; print" 9) "; if ($spellbookteleport == 1) { print"Ancient Treatise of Teleportation"; } else { }; print"\n"; print"10) "; if ($bookjournal == 1) { print"Journal"; } else { }; print"\n"; print"11) "; if ($spellbooksustenance == 1) { print"Writ of Sustenance"; } else { }; print"\n"; cyanbar2(); print'What Do You Wish To Read (chose number): '; $readownbookchoose = ; chomp($readownbookchoose); if ($readownbookchoose == 1) { if ($ancientredbook == 1) { $pintellect = $pintellect + 0.01; } else { } } elsif ($readownbookchoose == 2) { if ($spellbookshock == 1) { if ($spellshock == 0) { if ($intellect >= 2) { $spellshock = 1; $knowspellshocktrig = 1; $pintellect = $pintellect + 0.25; $spellsknown = "$spellsknown".' -shock- '; } else { } } else { } } else { } } elsif ($readownbookchoose == 8) { if ($spellbooktoice == 1) { if ($spelltoice == 0) { if ($intellect >= 3) { $spelltoice = 1; $knowspelltoicetrig = 1; $pintellect = $pintellect + 0.25; $spellsknown = "$spellsknown".' -toice- '; } else { } } else { } } else { } } elsif ($readownbookchoose == 9) { if ($spellbookteleport == 1) { if ($spellteleport == 0) { if ($intellect >= 5) { $spellteleport = 1; $knowspellteleporttrig = 1; $pintellect = $pintellect + 0.6; $spellsknown = "$spellsknown".' -teleport- '; } else { } } else { } } else { } } elsif ($readownbookchoose == 10) { if ($bookjournal == 1) { infinitenewlines(); cyanbar1(); print color 'bold yellow'; print"Journal:"; print color 'reset'; print"$journalread\n"; cyanbar2(); if ($blackbppen == 1 & $bbpink > 0) { print'Enter That Which You Wish To Add: '; $journaladd = ; chomp($journaladd); if ($journaladd eq "") { } else { $bbpink = $bbpink - 1; $journalread = "$journalread\n"."$journaladd"; } } else { $placeholder = ; chomp($placeholder); } if ($bbpink < 0) { $bbpink = 0; } else { } } else { } } elsif ($readownbookchoose == 3) { if ($spellbooklife == 1) { if ($spelllife == 0) { if ($intellect >= 2) { $spelllife = 1; $knowspelllifetrig = 1; $pintellect = $pintellect + 0.3; $spellsknown = "$spellsknown".' -life- '; } else { } } else { } } else { } } elsif ($readownbookchoose == 4) { if ($spellbookrage == 1) { if ($spellrage == 0) { if ($intellect >= 1) { $spellrage = 1; $knowspellragetrig = 1; $pintellect = $pintellect + 0.15; $spellsknown = "$spellsknown".' -rage- '; } else { } } else { } } else { } } elsif ($readownbookchoose == 5) { if ($spellbooksoultransfer == 1) { if ($spellsoultransfer == 0) { if ($intellect >= 3) { $spellsoultransfer = 1; $knowspellsoultransfertrig = 1; $pintellect = $pintellect + 0.5; $spellsknown = "$spellsknown".' -soultransfer- '; } else { } } else { } } else { } } elsif ($readownbookchoose == 6) { if ($spellbookburn == 1) { if ($spellburn == 0) { if ($intellect >= 2) { $spellburn = 1; $knowspellburntrig = 1; $pintellect = $pintellect + 0.2; $spellsknown = "$spellsknown".' -burn- '; } else { } } else { } } else { } } elsif ($readownbookchoose == 11) { if ($spellbooksustenance == 1) { if ($spellsustenance == 0) { if ($intellect >= 1) { $spellsustenance = 1; $knowspellsustenancetrig = 1; $pintellect = $pintellect + 0.2; $spellsknown = "$spellsknown".' -sustenance- '; } else { } } else { } } else { } } elsif ($readownbookchoose == 7) { if ($bookpr0n == 1) { if ($intellect > 0) { bpbcf(); $pintellect = $pintellect + 0.005; } else { } } else { } } else { } } ##Enlightenment################################################################ sub enlightenment { if ($beinginroom == 1) { $enlightenmentluck = int(rand(6)); if ($enlightenmentluck == 3) { if ($beinghealth <= 0) { $healthbeingrate = 0; } else { $healthbeingrate = $beinghealth / $beinglife; $healthbeingrate = $healthbeingrate * 100; } infinitenewlines(); cyanbar1(); print"\n"; print"You have been enlightened with knowledge....\n"; print"The being has a strenth of attack equal to $beingattack \n"; print"and is wearing class $beingdefend armor. It has\n"; print"$beingluck degrees of luck and is at\n"; print"$healthbeingrate percent of normal health\n\n"; cyanbar2(); print"press enter..."; $placeholder = ; chomp($placeholder); } } else { $enlightenmentluck = int(rand(50)); } } ##Enlightenment################################################################ ##(re)ASSIGN DAMAGE AND ATTRIBUTES TO BEING######################################## sub beingattr { if ($beinghealth <= 0) { $beinginroom = 0; } else { } if ($beingname eq "rat1") { ratbeing1_pull(); #here we assign all the being vars to ratbeing1 vars so if, lets say, #rat1 was damaged by your weapon it would be assigned the dammage } elsif ($beingname eq 'rat2') { ratbeing2_pull(); } elsif ($beingname eq 'cat1') { catbeing1_pull(); } elsif ($beingname eq 'spider1') { spiderbeing1_pull(); } elsif ($beingname eq 'pincer1') { pincerbeing1_pull(); } elsif ($beingname eq 'pincer2') { pincerbeing2_pull(); } elsif ($beingname eq 'droid1') { droidbeing1_pull(); } elsif ($beingname eq 'droid2') { droidbeing2_pull(); } elsif ($beingname eq 'thugg1') { thuggbeing1_pull(); } elsif ($beingname eq 'sage1') { sagebeing1_pull(); } elsif ($beingname eq 'snake1') { snakebeing1_pull(); } elsif ($beingname eq 'snake2') { snakebeing2_pull(); } elsif ($beingname eq 'alligator1') { alligatorbeing1_pull(); } else { } } ##(re)ASSIGN DAMAGE AND ATTRIBUTES TO BEING######################################## #inpho for room sub roominfo { if ($messageda1a == 1) { $info = ' This weapon requires an arm to weild '; } elsif ($messageda2a == 1) { $info = ' This weapon requires two arms to weild '; } elsif ($messageda1l == 1) { $info = ' This weapon requires a leg to weild '; } elsif ($messageda2l == 1) { $info = ' This weapon requires two legs to weild '; } else { #N/A } infotrack(); if ($evadeinfo == 1) { $info2 = " ...The being evaded your attack... "; } elsif ($noammoclick == 1) { $info2 = " *CLICK* "; } elsif ($spellragetrig == 1) { $info2 = "...You feel a great torrent well up inside you.."; } elsif ($spellburntrig == 1) { $info2 = " ...You incinerate part of the being... "; } elsif ($spellteleporttrig == 1) { $info2 = "...You study the spacial fabric of this area... "; } elsif ($spellteleporttrig2 == 1) { $info = "..You expend great energy on thought and enter a"; $info2 = "deep trance.Your mind and body are transferred.."; } elsif ($spelltransfersoultrig1 == 1) { $info = ".You sence a great aura of 3vil surrounding you."; $info2 = " ...You laugh wickedly... "; } elsif ($spelltransfersoultrig0 == 1) { $info2 = " ...Your inexperience with magic is evident... "; } elsif ($spelltoicefail == 1) { $info2 = " ...Your inexperience with magic is evident... "; } elsif ($spelltoicetrig == 1) { $info2 = " ...You cast toice... "; } elsif ($trigtripebread == 1) { $info2 = " That bread was rancid!!! "; $trigtripebread = 0; } elsif ($droid1attacktrig == 1) { if ($beinginroom == 1) { $info = " You attack the droid and trigger it's defences "; } else { } $droid1attacktrig = 0; $droid1attacktrig2 = 1; } elsif ($droid2attacktrig == 1) { if ($beinginroom == 1) { $info = " You attack the droid and trigger it's defences "; } else { } $droid2attacktrig = 0; $droid2attacktrig2 = 1; } elsif ($knowspellburntrig == 1) { $info = " You learn the spell of burn "; } elsif ($knowspellshocktrig == 1) { $info = " You learn the spell of shock "; } elsif ($knowspelllifetrig == 1) { $info = " You learn the spell of life "; } elsif ($knowspellragetrig == 1) { $info = " You learn the spell of rage "; } elsif ($knowspellsoultransfertrig == 1) { $info = " You learn the spell of soultransfer "; } elsif ($knowspelltoicetrig == 1) { $info = " You learn the spell of toice "; } elsif ($knowspellteleporttrig == 1) { $info = " You learn the spell teleport "; } elsif ($knowspellsustenancetrig == 1) { $info = " You learn the spell of sustenance "; } else { } if ($food <= 0) { $info = " You are starving "; } elsif ($food == 50) { $info = " You feel a bit hungry "; } elsif ($food == 30) { $info = " You feel the urge to eat "; } elsif ($food == 20) { $info = " You are very hungry "; } elsif ($food == 10) { $info = " You are extremly hungry "; } else { } t5(); if ($visualpsyc != 0) { $vpsycrand = int(rand(9)); if ($vpsycrand == 1) { print color 'blue'; } elsif ($vpsycrand == 2) { print color 'magenta'; } elsif ($vpsycrand == 3) { print color 'cyan'; } elsif ($vpsycrand == 4) { print color 'red'; } elsif ($vpsycrand == 5) { print color 'bold yellow'; } elsif ($vpsycrand == 6) { print color 'bold red'; } elsif ($vpsycrand == 7) { print color 'bold blue'; } elsif ($vpsycrand == 8) { print color 'bold cyan'; } else { print color 'bold magenta'; } $vpsycrand = int(rand(2)); if ($vpsycrand == 1) { $info = reverse $info; } else { #do nothing } } else { print color "$colorinfo"; } print"$info"; print color 'reset'; t6(); print"\n"; t6(); if ($visualpsyc != 0) { $vpsycrand = int(rand(9)); if ($vpsycrand == 1) { print color 'blue'; } elsif ($vpsycrand == 2) { print color 'magenta'; } elsif ($vpsycrand == 3) { print color 'cyan'; } elsif ($vpsycrand == 4) { print color 'red'; } elsif ($vpsycrand == 5) { print color 'bold yellow'; } elsif ($vpsycrand == 6) { print color 'bold red'; } elsif ($vpsycrand == 7) { print color 'bold blue'; } elsif ($vpsycrand == 8) { print color 'bold cyan'; } else { print color 'bold magenta'; } $vpsycrand = int(rand(2)); if ($vpsycrand == 1) { $info2 = reverse $info2; } else { #do nothing } } else { print color "$colorinfo"; } print"$info2"; print color 'reset'; t5(); print"\n"; $evadeinfo = 0; } sub beinginfo { t6(); themebeinginfo(); if ($beinginroom == 1) { if ($beingphase >= 1) { print colored(" BEING: $pbeinghandle","$colorbeingice1 on_$colorbeingice2"); } else { print colored(" BEING: $pbeinghandle","$colorbeing1 on_$colorbeing2"); } } else { print colored(" BEING: ","$colorbeingnull1 on_$colorbeingnull2"); } t5(); print"\n"; } #Top Iface with compass etc sub topinfobar{ print color "$colorcompass1"; print' N '; print color 'reset'; print' A = Attack'; print"\n"; print color "$colorcompass2"; print' NW'; print color 'reset'; print color "$colorcompass1"; print'|'; print color 'reset'; print color "$colorcompass2"; print'NE '; print color 'reset'; print color "$colorcompassu"; print'UP'; print color 'reset'; print' X = Choose Weapon'; print"\n"; print color "$colorcompass1"; print' W---+---E '; print color 'reset'; print' Z = Choose Armor'; print"\n"; print color "$colorcompass2"; print' SW'; print color 'reset'; print color "$colorcompass1"; print'|'; print color 'reset'; print color "$colorcompass2"; print'SE ';print color 'reset'; print color "$colorcompassd"; print'DOWN'; print color 'reset'; print' H = Help '; t5(); t6(); t5(); t6(); t5(); t6(); t5(); t6();print"\n"; print color "$colorcompass1"; print' S '; print color 'reset'; print' ? = Status '; t6(); if ($sick eq "perm" & $poisoned eq "perm" & $starve > 0) { print colored ("PSN+SCK+STRV",'bold black on_black'); } elsif ($sick eq "perm" & $poisoned > 0 & $starve > 0) { print colored ("PSN+SCK+STRV",'bold black on_black'); } elsif ($sick > 0 & $poisoned eq "perm" & $starve > 0) { print colored ("PSN+SCK+STRV",'bold black on_black'); } elsif ($sick > 0 & $poisoned > 0 & $starve > 0) { print colored ("PSN+SCK+STRV",'bold black on_black'); } elsif ($starve > 0 & $poisoned eq "perm") { print colored ("POISON++STRV",'bold black on_black'); } elsif ($starve > 0 & $poisoned > 0) { print colored ("POISON++STRV",'bold black on_black'); } elsif ($sick eq "perm" & $starve > 0) { print colored ("STARVE++SICK",'bold black on_black'); } elsif ($sick > 0 & $starve > 0) { print colored ("STARVE++SICK",'bold black on_black'); } elsif ($sick eq "perm" & $poisoned eq "perm") { print colored ("POISON++SICK",'bold black on_black'); } elsif ($sick eq "perm" & $poisoned > 0) { print colored ("POISON++SICK",'bold black on_black'); } elsif ($sick > 0 & $poisoned eq "perm") { print colored ("POISON++SICK",'bold black on_black'); } elsif ($sick > 0 & $poisoned > 0) { print colored ("POISON++SICK",'bold black on_black'); } elsif ($sick eq "perm") { print colored (" SICK ",'bold black on_black'); } elsif ($poisoned eq "perm") { print colored (" POISONED ",'bold black on_black'); } elsif ($sick > 0) { print colored (" SICK ",'bold black on_black'); } elsif ($poisoned > 0) { print colored (" POISONED ",'bold black on_black'); } elsif ($starve > 0) { print colored (" STARVING ",'bold black on_black'); } else { print colored (" ",'bold black on_black'); } t5(); print"\n"; print color 'reset'; } #Are we dead? sub deadyet { if ($health <= 0) { $die = 1; deathdestructiondecay(); } elsif ($starve >= 4) { $starvedie = 1; $die = 1; deathdestructiondecay(); } elsif ($bodypart_head == 0) { $die = 1; deathdestructiondecay(); } elsif ($bodypart_chest == 0) { $die = 1; deathdestructiondecay(); } elsif ($bodypart_kneck == 0) { $die = 1; deathdestructiondecay(); } else { } } #Help and status inpho sub helpstatusinpho { infinitenewlines(); inventorybar1(); print color 'bold yellow'; print" Commands \n"; print color 'reset'; print color 'bold white'; print' N '; print color 'reset'; print"or "; print color 'bold white'; print"n"; print color 'reset'; print" go north "; print color 'bold white'; print"NE"; print color 'reset'; print" or"; print color 'bold white'; print" ne "; print color 'reset'; print"go northeast\n"; print color 'bold white'; print' S '; print color 'reset'; print"or "; print color 'bold white'; print"s"; print color 'reset'; print" go south "; print color 'bold white'; print"SE"; print color 'reset'; print" or"; print color 'bold white'; print" se "; print color 'reset'; print"go southeast\n"; print color 'bold white'; print' E '; print color 'reset'; print"or "; print color 'bold white'; print"e"; print color 'reset'; print" go east "; print color 'bold white'; print"NW"; print color 'reset'; print" or"; print color 'bold white'; print" nw "; print color 'reset'; print"go northwest\n"; print color 'bold white'; print' W '; print color 'reset'; print"or "; print color 'bold white'; print"w"; print color 'reset'; print" go west "; print color 'bold white'; print"SW"; print color 'reset'; print" or"; print color 'bold white'; print" sw "; print color 'reset'; print"go southwest\n"; print color 'bold white'; print' UP '; print color 'reset'; print"or "; print color 'bold white'; print"up "; print color 'reset'; print" go up a ladder etc in middle of room\n"; print color 'bold white'; print' DOWN '; print color 'reset'; print"or "; print color 'bold white'; print"down"; print color 'reset'; print" go down a ladder etc in middle of room\n"; print color 'bold white'; print' MAP '; print color 'reset'; print"or "; print color 'bold white'; print"map"; print color 'reset'; print" displays possible directions to travel\n"; print color 'bold white'; print' I'; print color 'reset'; print" or"; print color 'bold white'; print" i"; print color 'reset'; print" list your inventory\n"; print color 'bold white'; print' Z'; print color 'reset'; print" or"; print color 'bold white'; print" z"; print color 'reset'; print" choose armor to wear\n"; print color 'bold white'; print' X'; print color 'reset'; print" or"; print color 'bold white'; print" x"; print color 'reset'; print" chose weapon to weild\n"; print color 'bold white'; print' A'; print color 'reset'; print" or"; print color 'bold white'; print" a"; print color 'reset'; print" attack something\n"; print color 'bold white'; print' L'; print color 'reset'; print" or"; print color 'bold white'; print" l"; print color 'reset'; print" browse your library of fine literature\n"; print color 'bold white'; print' R'; print color 'reset'; print" or"; print color 'bold white'; print" r "; print color 'reset'; print" display an inscription in a room or book\n"; print color 'bold white'; print' B'; print color 'reset'; print" or"; print color 'bold white'; print" b "; print color 'reset'; print" detonates a bomb in the current room\n"; print color 'bold white'; print' H'; print color 'reset'; print" or"; print color 'bold white'; print" h "; print color 'reset'; print" displays this screen\n"; print color 'bold white'; print' P'; print color 'reset'; print" or"; print color 'bold white'; print" p "; print color 'reset'; print" play game you are standing at and/or pay\n"; print color 'bold white'; print' M'; print color 'reset'; print" or"; print color 'bold white'; print" m "; print color 'reset'; print" list known spells\n"; print color 'bold white'; print' F'; print color 'reset'; print" or"; print color 'bold white'; print" f "; print color 'reset'; print" browse your food store\n"; print color 'bold white'; print' C'; print color 'reset'; print" or"; print color 'bold white'; print" c "; print color 'reset'; print" change magazine, ready arrow, load bolt\n"; print color 'bold white'; print' +'; print color 'reset'; print" or"; print color 'bold white'; print' - '; print color 'reset'; print" add/subtract (control for some terminals)\n"; print color 'bold white'; print' ? '; print color 'reset'; print"status of player\n"; print color 'bold white'; print" cast spellname"; print color 'bold reset'; print" cast a certain spell\n"; print color 'bold white'; print" save exploits"; print color 'bold reset'; print" save a log of your RPG1 session\n"; print color 'bold white'; print" infomenu"; print color 'bold reset'; print" display infomenu\n"; print color 'bold white'; print" music "; print color 'bold reset'; print" toggle music\n"; print color 'bold white'; print" exit"; print color 'bold reset'; print" exit the game\n"; inventorybar2(); print color "reset"; print"press ["; print color 'green'; print"ENTER"; print color 'reset'; print"]"; $placeholder = ; chomp($placeholder); infinitenewlines(); inventorybar1(); print color 'bold yellow'; print" Commands Continued \n"; print color 'reset'; print color 'bold white'; print' buffer'; print color 'reset'; print" view info buffer\n"; print color 'bold white'; print' cbuffer'; print color 'reset'; print" view command buffer\n"; print color 'bold white'; print' rbuffer'; print color 'reset'; print" view read buffer\n"; print"\n"; print"\n"; print"\n"; print"\n"; print"\n"; print"\n"; print"\n"; print"\n"; print"\n"; print"\n"; print"\n"; print"\n"; print"\n"; print"\n"; print"\n"; print"\n"; print"\n"; print"\n"; print"\n"; print"\n"; print"\n"; print"\n"; print"\n"; inventorybar2(); print color "reset"; print"press ["; print color 'green'; print"ENTER"; print color 'reset'; print"]"; $placeholder = ; chomp($placeholder); } sub statusonlyinfo { infinitenewlines(); if ($die == 1) { bloodbar1(); } else { inventorybar1(); } print color 'bold yellow'; print" Status \n"; print color 'reset'; print' Armor Worn: '; print"$armorginger\n"; print' Greatest Possible Protection By Armor: '; print"$armordefend\n"; print' Durability of Armor: '; print"$armordur\n\n"; print' Weapon Weilded: '; print"$gingertype"; if ($gingertype eq 'SMG 9MM') { if ($smg9mmsetnbr == 1) { print' (Semiautomatic)'; } elsif ($smg9mmsetnbr == 2) { print' (Three Round Burst)'; } elsif ($smg9mmsetnbr == 3) { print' (Fully Automatic)'; } else { } } elsif ($gingertype eq '.45 SMG Carbine') { if ($smg45calsetnbr == 1) { print' (Semiautomatic)'; } elsif ($smg45calsetnbr == 2) { print' (Three Round Burst)'; } elsif ($smg45calsetnbr == 3) { print' (Fully Automatic)'; } else { } } else { } print"\n"; print' Greatest Possible Force: '; print"$force\n"; print' Greatest Possible Protection By Weapon: '; print"$wprotect\n\n"; print' Magic Exp: '; print color 'green'; print"$magicexp"; print color 'reset'; print' | Intellect: '; print color 'cyan'; print"$intellect"; print color 'reset'; print' | Physical Exp: '; print color 'bold yellow'; print"$physexp\n"; print color 'reset'; print" Music is "; if ($ogg123 == 1) { print"enabled\n"; } else { print"disabled\n"; } print' '; printbody0(); print"\n"; print' '; printbody1(); print' Health: '; if ($health <= 0) { print color 'red'; print" 0\n"; print color 'reset'; } elsif ($health >= 100) { print color 'red'; print" 100\n"; print color 'reset'; } else { print color 'red'; print" $health\n"; print color 'reset'; } print' '; printbody2(); print' Mana: '; if ($mana <= 0) { print color 'magenta'; print" 0\n"; print color 'reset'; } elsif ($mana >= 100) { print color 'magenta'; print" 100\n"; print color 'reset'; } else { print color 'magenta'; print" $mana\n"; print color 'reset'; } print' '; printbody3(); print' Food: '; if ($food <= 0) { print color 'bold green'; print" 0\n"; print color 'reset'; } elsif ($food >= $foodmax) { print color 'bold green'; print" $foodmax\n"; print color 'reset'; } else { print color 'bold green'; print" $food\n"; print color 'reset'; } print' '; printbody4(); print"\n"; print' '; printbody5(); if ($sick eq "perm") { print" You are sick\n"; } elsif ($sick > 0) { print" You are sick\n"; } else { print"\n"; } print' '; printbody6(); if ($poisoned eq "perm") { print" You are poisoned\n"; } elsif ($poisoned > 0) { print" You are poisoned\n"; } else { print"\n"; } print' '; printbody7(); if ($visualpsyc != 0) { print" You are hallucinating\n"; } else { print"\n"; } print' '; printbody8(); if ($visualblind != 0) { print" You are blind\n"; } else { print"\n"; } print' '; printbody9(); print"\n"; print' '; printbody10(); print"\n"; print' '; printbody11(); print"\n"; print' '; printbody12(); print"\n"; print' '; printbody13(); print"\n"; print' '; printbody14(); print"\n\n"; if ($debugmode == 1) { print"Room is $room\n"; } else { } if ($die == 1) { bloodbar2(); } else { inventorybar2(); } print color "reset"; print"press ["; print color 'green'; print"ENTER"; print color 'reset'; print"]"; $placeholder = ; chomp($placeholder); } ##DAMAGEBEING########################## sub damagebeing { if ($health <= 0) { $wprotect = 0; } elsif ($health <= 5) { $wprotect = $weapprotect * 0.1; } elsif ($health <= 10) { $wprotect = $weapprotect * 0.2; } elsif ($health <= 15) { $wprotect = $weapprotect * 0.3; } elsif ($health <= 20) { $wprotect = $weapprotect * 0.4; } elsif ($health <= 25) { $wprotect = $weapprotect * 0.5; } elsif ($health <= 40) { $wprotect = $weapprotect * 0.7; } elsif ($health <= 50) { $wprotect = $weapprotect * 1.0; } elsif ($health <= 60) { $wprotect = $weapprotect * 1.2; } elsif ($health <= 75) { $wprotect = $weapprotect * 1.5; } elsif ($health <= 80) { $wprotect = $weapprotect * 1.6; } elsif ($health <= 85) { $wprotect = $weapprotect * 1.8; } elsif ($health <= 90) { $wprotect = $weapprotect * 2.0; } else { $wprotect = $weapprotect * 2.0; } if ($physexp <= 0) { $fcphysexp = 0.1; } else { $fcphysexp = $physexp; } if ($health <= 0) { $force = 0; } elsif ($class == 8) { $force = $power; } elsif ($class == 10) { $force = $power; } elsif ($class == 11) { $force = $power; } elsif ($class == 12) { $force = $power; } elsif ($class == 13) { $force = $power; } elsif ($class == 14) { $force = $power; } elsif ($class == 17) { $force = $power; } elsif ($health <= 1) { $force = (($power * 0.1) * (1 + ($fcphysexp / 10))); } elsif ($health <= 3) { $force = (($power * 0.2) * (1 + ($fcphysexp / 10))); } elsif ($health <= 5) { $force = (($power * 0.4) * (1 + ($fcphysexp / 10))); } elsif ($health <= 10) { $force = (($power * 0.6) * (1 + ($fcphysexp / 10))); } elsif ($health <= 15) { $force = (($power * 0.8) * (1 + ($fcphysexp / 10))); } elsif ($health <= 20) { $force = (($power * 1.0) * (1 + ($fcphysexp / 10))); } elsif ($health <= 25) { $force = (($power * 1.2) * (1 + ($fcphysexp / 10))); } elsif ($health <= 30) { $force = (($power * 1.4) * (1 + ($fcphysexp / 10))); } elsif ($health <= 35) { $force = (($power * 1.8) * (1 + ($fcphysexp / 10))); } elsif ($health <= 40) { $force = (($power * 2.0) * (1 + ($fcphysexp / 10))); } elsif ($health <= 45) { $force = (($power * 2.2) * (1 + ($fcphysexp / 10))); } elsif ($health <= 50) { $force = (($power * 2.6) * (1 + ($fcphysexp / 10))); } elsif ($health <= 55) { $force = (($power * 2.8) * (1 + ($fcphysexp / 10))); } elsif ($health <= 60) { $force = (($power * 3.2) * (1 + ($fcphysexp / 10))); } elsif ($health <= 65) { $force = (($power * 3.6) * (1 + ($fcphysexp / 10))); } elsif ($health <= 70) { $force = (($power * 3.8) * (1 + ($fcphysexp / 10))); } elsif ($health <= 75) { $force = (($power * 4.0) * (1 + ($fcphysexp / 10))); } elsif ($health <= 80) { $force = (($power * 4.2) * (1 + ($fcphysexp / 10))); } elsif ($health <= 85) { $force = (($power * 4.4) * (1 + ($fcphysexp / 10))); } elsif ($health <= 90) { $force = (($power * 4.6) * (1 + ($fcphysexp / 10))); } elsif ($health <= 95) { $force = (($power * 5.0) * (1 + ($fcphysexp / 10))); } elsif ($health <= 100) { $force = (($power * 5.4) * (1 + ($fcphysexp / 10))); } else { $force = (($power * 5.4) * (1 + ($fcphysexp / 10))); } } ##DAMAGEBEING########################## ##RESETFIGHT########################### #get rid of person for a moment, JIC sub resetfight { $beinginroom = 0; $beinghealth = 0; $beingattack = 0; $beingdefend = 0; $beingarmor = 0; $beingluck = 0; $beingname = " "; $beinghandle = " "; $beinglife = 0; $beingphase = 0; $beingweapon = 0; } ##RESETFIGHT########################### #(these are simple for now and will be improved) ##ATTACKBEING############################ #assault something sub attackbeing { if ($beingname eq "droid1") { if ($droid1attacktrig2 == 1) { } else { $beingattack = 40; $droid1attacktrig = 1; } } elsif ($beingname eq "droid2") { if ($droid2attacktrig2 == 1) { } else { $beingattack = 40; $droid2attacktrig = 1; } } else { } if ($beinghealth > 0) { if ($spellragetime > 0) { if ($class == 8) { #dosent affect guns! } elsif ($class == 10) { #dosent affect guns! } elsif ($class == 11) { #dosent affect guns! } elsif ($class == 12) { #dosent affect guns! } elsif ($class == 13) { #dosent affect guns! } elsif ($class == 14) { #dosent affect cannons! } elsif ($class == 16) { #dosent affect lasers! } elsif ($class == 17) { #dosent affect explosives! } else { $force = $force * 3; } } else { } if ($class == 8) { if ($bullet9mmamount >= 1) { if ($gingertype eq 'SMG 9MM') { if ($smg9mmcapacity <= 0) { infinitenewlines(); print"*CLICK*\n\n\n\n\n\n"; soundFX_play_click(); $smg9mmcapacity = 0; sleep(1); print"\n"; } elsif ($smg9mmsetnbr == 1) { $fired9mm = 1; infinitenewlines(); print color 'bold black'; print"*"; print color 'bold yellow'; print"POP"; print color 'reset'; print color 'bold black'; print"*\n\n\n\n\n\n"; $counter9mm = $counter9mm + 1; print color 'reset'; soundFX_play_pop2(); sleep(1); print"\n"; $smg9mmcapacity = $smg9mmcapacity - 1; $bullet9mmamount = $bullet9mmamount - 1; attackingluck(); } elsif ($smg9mmsetnbr == 2) { if ($bullet9mmamount >= 3) { $fired9mm = 1; $brstfired = 1; infinitenewlines(); if ($smg9mmcapacity <= 3) { $gpop = $smg9mmcapacity; $force = $smg9mmcapacity * $prj9mm; $smg9mmcapacity = 0; $bullet9mmamount = $bullet9mmamount - $smg9mmcapacity; } else { $gpop = 3; $bullet9mmamount = $bullet9mmamount - 3; $smg9mmcapacity = $smg9mmcapacity - 3; } gpop(); print"\n\n\n\n\n\n"; sleep(1); print"\n"; $gpop = 0; attackingluck(); } else { $fired9mm = 1; if (($bullet9mmamount >= 2) && ($smg9mmcapacity >= 2)) { $brstfired = 1; } else { } infinitenewlines(); if ($smg9mmcapacity >= $bullet9mmamount) { $gpop = $bullet9mmamount; $force = $bullet9mmamount * $prj9mm; $bullet9mmamount = $bullet9mmamount - $bullet9mmamount; } else { $gpop = $smg9mmcapacity; $force = $smg9mmcapacity * $prj9mm; $bullet9mmamount = $bullet9mmamount - $smg9mmcapacity; } $smg9mmcapacity = 0; gpop(); print"*CLICK*\n\n\n\n\n\n"; soundFX_play_click(); sleep(1); print"\n"; $gpop = 0; attackingluck(); } } elsif ($smg9mmsetnbr == 3) { if ($bullet9mmamount >= 30) { $fired9mm = 1; $smgfired = 1; infinitenewlines(); if ($smg9mmcapacity <= 30) { $gpop = $smg9mmcapacity; $force = $smg9mmcapacity * $prj9mm; $smg9mmcapacity = 0; $bullet9mmamount = $bullet9mmamount - $smg9mmcapacity; } else { $gpop = 30; $bullet9mmamount = $bullet9mmamount - 30; $smg9mmcapacity = $smg9mmcapacity - 30; } gpop(); print"*CLICK*\n\n\n\n\n\n"; soundFX_play_click(); sleep(1); print"\n"; $gpop = 0; $bullet9mmamount = $bullet9mmamount - 30; attackingluck(); } else { $fired9mm = 1; $smgfired = 1; $force = $bullet9mmamount * $prj9mm; infinitenewlines(); if ($smg9mmcapacity >= $bullet9mmamount) { $gpop = $bullet9mmamount; $force = $bullet9mmamount * $prj9mm; $bullet9mmamount = $bullet9mmamount - $bullet9mmamount; } else { $gpop = $smg9mmcapacity; $force = $smg9mmcapacity * $prj9mm; $bullet9mmamount = $bullet9mmamount - $smg9mmcapacity; } $smg9mmcapacity = 0; gpop(); print"*CLICK*\n\n\n\n\n\n"; soundFX_play_click(); sleep(1); print"\n"; $gpop = 0; $bullet9mmamount = $bullet9mmamount - $bullet9mmamount; attackingluck(); } } else { #do nothing } } elsif ($gingertype eq 'semiautomatic pistol') { if ($semiautopistolcapacity <= 0) { infinitenewlines(); print"*CLICK*\n\n\n\n\n\n"; soundFX_play_click(); $semiautopistolcapacity = 0; sleep(1); print"\n"; } else { $fired9mm = 1; infinitenewlines(); print color 'bold black'; print"*"; print color 'bold yellow'; print"POP"; print color 'reset'; print color 'bold black'; print"*\n\n\n\n\n\n"; $counter9mm = $counter9mm + 1; print color 'reset'; soundFX_play_pop0(); sleep(1); print"\n"; $bullet9mmamount = $bullet9mmamount - 1; $semiautopistolcapacity = $semiautopistolcapacity - 1; attackingluck(); } } else { $fired9mm = 1; infinitenewlines(); print color 'bold black'; print"*"; print color 'bold yellow'; print"POP"; print color 'reset'; print color 'bold black'; print"*\n\n\n\n\n\n"; $counter9mm = $counter9mm + 1; print color 'reset'; soundFX_play_pop0(); sleep(1); print"\n"; $bullet9mmamount = $bullet9mmamount - 1; attackingluck(); } } else { $noammoclick = 1; infinitenewlines(); print"*CLICK*\n\n\n\n\n\n"; soundFX_play_click(); sleep(1); print"\n"; #forgot to load the gun eh? } } elsif ($class == 10) { if ($bullet45calamount >= 1) { if ($gingertype eq '.45 SMG Carbine') { if ($smg45calcapacity <= 0) { infinitenewlines(); print"*CLICK*\n\n\n\n\n\n"; soundFX_play_click(); $smg45calcapacity = 0; sleep(1); print"\n"; } elsif ($smg45calsetnbr == 1) { $fired45cal = 1; infinitenewlines(); print color 'bold black'; print"*"; print color 'bold yellow'; print"POP"; print color 'reset'; print color 'bold black'; print"*\n\n\n\n\n\n"; $counter45cal = $counter45cal + 1; print color 'reset'; soundFX_play_pop1(); sleep(1); print"\n"; $smg45calcapacity = $smg45calcapacity - 1; $bullet45calamount = $bullet45calamount - 1; attackingluck(); } elsif ($smg45calsetnbr == 2) { if ($bullet45calamount >= 3) { $fired45cal = 1; $brst45calfired = 1; infinitenewlines(); if ($smg45calcapacity <= 3) { $gpop = $smg45calcapacity; $force = $smg45calcapacity * $prj45cal; $bullet45calamount = $bullet45calamount - $smg45calcapacity; $smg45calcapacity = 0; } else { $gpop = 3; $bullet45calamount = $bullet45calamount - 3; $smg45calcapacity = $smg45calcapacity - 3; } gpop45(); print"\n\n\n\n\n\n"; sleep(1); print"\n"; $gpop = 0; attackingluck(); } else { $fired45cal = 1; if (($bullet45calamount >= 2) && ($smg45calcapacity >= 2)) { $brst45calfired = 1; } else { } infinitenewlines(); if ($smg45calcapacity >= $bullet45calamount) { $gpop = $bullet45calamount; $force = $bullet45calamount * $prj45cal; $bullet45calamount = $bullet45calamount - $bullet45calamount; } else { $gpop = $smg45calcapacity; $force = $smg45calcapacity * $prj9mm; $bullet45calamount = $bullet45calamount - $smg45calcapacity; } $smg45calcapacity = 0; gpop45(); print"*CLICK*\n\n\n\n\n\n"; soundFX_play_click(); sleep(1); print"\n"; $gpop = 0; attackingluck(); } } elsif ($smg45calsetnbr == 3) { if ($bullet45calamount >= 32) { $fired45cal = 1; $smg45calfired = 1; infinitenewlines(); if ($smg45calcapacity <= 32) { $gpop = $smg45calcapacity; $force = $smg45calcapacity * $prj45cal; $bullet45calamount = $bullet45calamount - $smg45calcapacity; $smg45calcapacity = 0; } else { $gpop = 32; $bullet45calamount = $bullet45calamount - 32; $smg45calcapacity = $smg45calcapacity - 32; } gpop45(); print"*CLICK*\n\n\n\n\n\n"; soundFX_play_click(); sleep(1); print"\n"; $gpop = 0; attackingluck(); } else { $fired45cal = 1; $smg45calfired = 1; $force = $bullet45calamount * $prj45cal; infinitenewlines(); if ($smg45calcapacity >= $bullet45calamount) { $gpop = $bullet45calamount; $force = $bullet45calamount * $prj45cal; $bullet45calamount = $bullet45calamount - $bullet45calamount; } else { $gpop = $smg45calcapacity; $force = $smg45calcapacity * $prj9mm; $bullet45calamount = $bullet45calamount - $smg45calcapacity; } $smg45calcapacity = 0; gpop45(); print"*CLICK*\n\n\n\n\n\n"; soundFX_play_click(); sleep(1); print"\n"; $gpop = 0; attackingluck(); } } else { #do nothing } } elsif ($gingertype eq '.45 automatic pistol') { if ($pistol45calcapacity <= 0) { infinitenewlines(); print"*CLICK*\n\n\n\n\n\n"; soundFX_play_click(); $pistol45calcapacity = 0; sleep(1); print"\n"; } else { $fired45cal = 1; infinitenewlines(); print color 'bold black'; print"*"; print color 'bold yellow'; print"POP"; print color 'reset'; print color 'bold black'; print"*\n\n\n\n\n\n"; $counter45cal = $counter45cal + 1; print color 'reset'; soundFX_play_pop1(); sleep(1); print"\n"; $pistol45calcapacity = $pistol45calcapacity - 1; $bullet45calamount = $bullet45calamount - 1; attackingluck(); } } else { $fired45cal = 1; infinitenewlines(); print color 'bold black'; print"*"; print color 'bold yellow'; print"POP"; print color 'reset'; print color 'bold black'; print"*\n\n\n\n\n\n"; $counter45cal = $counter45cal + 1; print color 'reset'; soundFX_play_pop1(); sleep(1); print"\n"; $bullet45calamount = $bullet45calamount - 1; attackingluck(); } } else { $noammoclick = 1; infinitenewlines(); print"*CLICK*\n\n\n\n\n\n"; soundFX_play_click(); sleep(1); print"\n"; #forgot to load the gun eh? } } elsif ($class == 12) { if ($sg12pcapacity <= 0) { infinitenewlines(); print"*CLICK*\n\n\n\n\n\n"; soundFX_play_click(); $sg12pcapacity = 0; sleep(1); print"\n"; } elsif ($slug12gaamount >= 1) { $fired12ga = 1; infinitenewlines(); print color 'bold white'; print"*"; print color 'bold yellow'; print"BOOM"; print color 'reset'; print color 'bold white'; print"*\n\n\n\n\n\n"; $counter12ga = $counter12ga + 1; print color 'reset'; soundFX_play_boom(); sleep(1); print"\n"; $sg12pcapacity = $sg12pcapacity - 1; $slug12gaamount = $slug12gaamount - 1; attackingluck(); } else { $noammoclick = 1; infinitenewlines(); print"*CLICK*\n\n\n\n\n\n"; soundFX_play_click(); sleep(1); print"\n"; #forgot to load the gun eh? } } elsif ($class == 17) { if ($rpgx14capacity <= 0) { infinitenewlines(); print"*CLICK*\n\n\n\n\n\n"; soundFX_play_click(); $rpgx14capacity = 0; sleep(1); print"\n"; } elsif ($explosiveRPGX14amount >= 1) { $firedRPGX14 = 1; rpgfireprint(); $counterRPGX14 = $counterRPGX14 + 1; print color 'reset'; print"\n"; $rpgx14capacity = $rpgx14capacity - 1; $explosiveRPGX14amount = $explosiveRPGX14amount - 1; attackingluck(); } else { $noammoclick = 1; infinitenewlines(); print"*CLICK*\n\n\n\n\n\n"; soundFX_play_click(); sleep(1); print"\n"; #forgot to load the rocket launcher eh? } } elsif ($class == 2) { $attackedaxe = 1; attackingluck(); } elsif ($class == 1) { $attackedsword = 1; attackingluck(); } elsif ($class == 9) { $attackedblunt = 1; attackingluck(); } else { attackingluck(); } } else { } } sub beingattacked { if ($beingarmor == 1) { if ($class == 4) { $attackdamage = $force - $beingdefend; } else { $attackdamage = $force; } } elsif ($beingarmor == 2) { if ($class == 4) { $attackdamage = $force - $beingdefend; } elsif ($class == 1) { if ($beingdefend > 0) { $psudobeingdefend = $beingdefend / 6; } else { $psudobeingdefend = $beingdefend } $attackdamage = $force - $psudobeingdefend; $psudobeingdefend = 0; } elsif ($class == 2) { if ($beingdefend > 0) { $psudobeingdefend = $beingdefend / 4; } else { $psudobeingdefend = $beingdefend } $attackdamage = $force - $psudobeingdefend; $psudobeingdefend = 0; } else { $attackdamage = $force; } } elsif ($beingarmor == 3) { if ($class == 4) { $attackdamage = $force - $beingdefend; } elsif ($class == 1) { if ($beingdefend > 0) { $psudobeingdefend = $beingdefend / 4.5; } else { $psudobeingdefend = $beingdefend } $attackdamage = $force - $psudobeingdefend; $psudobeingdefend = 0; } elsif ($class == 2) { if ($beingdefend > 0) { $psudobeingdefend = $beingdefend / 3; } else { $psudobeingdefend = $beingdefend } $attackdamage = $force - $psudobeingdefend; $psudobeingdefend = 0; } else { $attackdamage = $force; } } else { $attackdamage = $force; } $beinghealth = $beinghealth - $attackdamage; $attackdamage = 0; } ##ATTACKBEING############################ ##BOMBBEING############################## sub bombbeing { if ($beinghealth > 0) { $beinghealth = $beinghealth - $explosivecharge; } else { } } ##BOMBBEING############################## ##NUKEBEING############################## sub nukebeing { if ($beinghealth > 0) { $beinghealth = $beinghealth - 100000000000000000; } else { } } ##NUKEBEING############################## sub armor_reset { $armorclass = 0; $armortype = "NA"; $armorginger = "none"; $armordefend = 0; $armordur = 0; } ##BEINGATTACKING######################### #get assaulted by something sub beingattacking { if ($beinginroom == 1) { $wprotectrand = int(rand(4)); if ($spellshocktrig == 1) { $info = " You cast shock and paralize the being "; $info2 = " "; } elsif ($beingphase >= 1) { $beinghealth = $beinghealth - $spelltoicelife; $beingphase = $beingphase - 1; } else { if ($armorginger eq 'leather vest') { $evadearmor = int(rand(4)); if ($evadearmor == 2) { $psudobeingattack = $beingattack; } elsif ($leathervestdur <= 0) { $psudobeingattack = $beingattack; $leathervestarmor = 0; armor_reset(); } elsif ($leathervestdur <= $armordefend) { $psudobeingattack = $beingattack - $leathervestdur; $leathervestarmor = 0; armor_reset(); } else { $psudobeingattack = $beingattack - $armordefend; $leathervestdur = $leathervestdur - $armordefend; } } elsif ($armorginger eq 'red t-shirt') { $evadearmor = int(rand(4)); if ($evadearmor == 2) { $psudobeingattack = $beingattack; } elsif ($evadearmor == 3) { $psudobeingattack = $beingattack; } elsif ($redtshirtdur <= 0) { $psudobeingattack = $beingattack; $redtshirtarmor = 0; armor_reset(); } elsif ($redtshirtdur <= $armordefend) { $psudobeingattack = $beingattack - $redtshirtdur; $redtshirtarmor = 0; armor_reset(); } else { $psudobeingattack = $beingattack - $armordefend; $redtshirtdur = $redtshirtdur - $armordefend; } } elsif ($armorginger eq 'ring mail vest') { $evadearmor = int(rand(5)); if ($evadearmor == 2) { $psudobeingattack = $beingattack; } elsif ($evadearmor == 3) { $psudobeingattack = $beingattack; } elsif ($ringmailvestdur <= 0) { $psudobeingattack = $beingattack; $ringmailvestarmor = 0; armor_reset(); } elsif ($ringmailvestdur <= $armordefend) { $psudobeingattack = $beingattack - $ringmailvestdur; $ringmailvestarmor = 0; armor_reset(); } else { $psudobeingattack = $beingattack - $armordefend; $ringmailvestdur = $ringmailvestdur - $armordefend; } } elsif ($armorginger eq 'white robe') { $evadearmor = int(rand(4)); if ($evadearmor == 2) { $psudobeingattack = $beingattack; } elsif ($evadearmor == 3) { $psudobeingattack = $beingattack; } elsif ($whiterobedur <= 0) { $psudobeingattack = $beingattack; $whiterobearmor = 0; armor_reset(); } elsif ($whiterobedur <= $armordefend) { $psudobeingattack = $beingattack - $whiterobedur; $whiterobearmor = 0; armor_reset(); } else { $psudobeingattack = $beingattack - $armordefend; $whiterobedur = $whiterobedur - $armordefend; } } else { $psudobeingattack = $beingattack; } if ($psudobeingattack <= 0) { $psudobeingattack = 0; } else { } if ($weapprotect > 0) { if ($wprotectrand == 2) { $wprotectattack = $psudobeingattack - $wprotect; if ($beingattack == 0) { #funtimes (quote from /dev/urandom) } elsif ($wprotectattack <= 0) { #your weapon absorbed all the damage $info = " You blocked the attack with your weapon! "; $info2 = " "; } else { $health = $health - $wprotectattack; $beingattackbodydam = $wprotectattack; $info = " Your weapon absorbed some of the attack! "; $info2 = " "; } } else { $health = $health - $psudobeingattack; $beingattackbodydam = $psudobeingattack } } else { $health = $health - $psudobeingattack; } } } else { } beingattackbody(); $beingattackbodydam = 0; $psudobeingattack = 0; $wprotectattack = 0; } sub beingattackbody { $bodyparthit = int(rand(20)); if ($bodyparthit == 1) { $bodyhealth_head = $bodyhealth_head - $beingattack; } elsif ($bodyparthit == 2) { $bodyhealth_kneck = $bodyhealth_kneck - $beingattack; } elsif ($bodyparthit == 3) { $bodyparthit = int(rand(8)); if ($bodyparthit == 2) { $bodyhealth_torso = $bodyhealth_torso - ($psudobeingattack * 2); } else { $bodyhealth_torso = $bodyhealth_torso - $psudobeingattack; } } elsif ($bodyparthit == 5) { $bodyparthit = int(rand(4)); if ($bodyparthit == 2) { $bodyhealth_legR = $bodyhealth_legR - ($beingattack * 2); } else { $bodyhealth_legR = $bodyhealth_legR - $beingattack; } } elsif ($bodyparthit == 7) { $bodyparthit = int(rand(4)); if ($bodyparthit == 2) { $bodyhealth_legL = $bodyhealth_legL - ($beingattack * 2); } else { $bodyhealth_legL = $bodyhealth_legL - $beingattack; } } elsif ($bodyparthit == 9) { $bodyparthit = int(rand(4)); if ($bodyparthit == 2) { $bodyhealth_armR = $bodyhealth_armR - ($beingattackbodydam * 2); } else { $bodyhealth_armR = $bodyhealth_armR - $beingattackbodydam; } } elsif ($bodyparthit == 11) { $bodyparthit = int(rand(4)); if ($bodyparthit == 2) { $bodyhealth_armL = $bodyhealth_armL - ($beingattackbodydam * 2); } else { $bodyhealth_armL = $bodyhealth_armL - $beingattackbodydam; } } elsif ($bodyparthit == 14) { $bodyparthit = int(rand(4)); if ($bodyparthit == 2) { $bodyhealth_chest = $bodyhealth_chest - ($psudobeingattack * 2); } else { $bodyhealth_chest = $bodyhealth_chest - $psudobeingattack } } else { #No Damage } } ##BEINGATTACKING######################### ##DOES THE BEING HAVE LUCK? DID IT DOGE YOUR ATTACK?##### sub attackingluck { $evadeinfo = 0; $beingluckrand1 = int(rand(11)); $pbeingluck = $beingluck; $pbeingluck = $pbeingluck - $accuracy; #apply the accuracy weapon attribute if ($firedRPGX14 == 1) { $pbeingluck = $pbeingluck - 3; } elsif ((($smg45calfired == 1) or ($brst45calfired == 1)) and ($gingertype eq '.45 SMG Carbine')) { $pbeingluck = $pbeingluck - 1; } elsif (($fired45cal== 1) and ($gingertype eq '.45 automatic pistol')) { $pbeingluck = $pbeingluck + 1; } elsif (($fired9mm == 1) and ($gingertype eq 'semiautomatic pistol')) { if ($visualblind != 0) { #leave as be, laser aiming requires sight } else { $pbeingluck = $pbeingluck - 1; } } else { #blah } if (($bodypart_armR == 0) or ($bodypart_armL == 0)) { if ($firedRPGX14 == 1) { $pbeingluck = $pbeingluck + 5; } elsif ((($smg45calfired == 1) or ($brst45calfired == 1) or ($fired45cal == 1)) and ($gingertype eq '.45 SMG Carbine')) { $pbeingluck = $pbeingluck + 4; } elsif (($fired12ga == 1) and ($gingertype eq '12GA pump action shotgun')) { $pbeingluck = $pbeingluck + 4; } elsif (($fired45cal == 1) and ($gingertype eq '.45 automatic pistol')) { $pbeingluck = $pbeingluck + 3; } elsif (($fired9mm == 1) and ($gingertype eq 'semiautomatic pistol')) { $pbeingluck = $pbeingluck + 3; } else { $pbeingluck = $pbeingluck + 2; } } else { #NA } if ($visualpsyc != 0) { $pbeingluck = $pbeingluck + 2; } else { #blah } if ($visualblind != 0) { $pbeingluck = $pbeingluck + 5; } else { #blah } if ($pbeingluck <= 0) { $pbeingluck = 0; } elsif ($pbeingluck >= 10) { $pbeingluck = 10; } else { #waste space } if ($spellshocktrig >= 1) { beingattacked(); } elsif ($nobeingevade >= 1) { beingattacked(); } else { if ($pbeingluck == 10) { if ($beingluckrand1 >= 10) { beingattacked(); } else { $evadeinfo = 1; } } elsif ($pbeingluck == 9) { if ($beingluckrand1 >= 9) { beingattacked(); } else { $evadeinfo = 1; } } elsif ($pbeingluck == 8) { if ($beingluckrand1 >= 8) { beingattacked(); } else { $evadeinfo = 1; } } elsif ($pbeingluck == 7) { if ($beingluckrand1 >= 7) { beingattacked(); } else { $evadeinfo = 1; } } elsif ($pbeingluck == 6) { if ($beingluckrand1 >= 6) { beingattacked(); } else { $evadeinfo = 1; } } elsif ($pbeingluck == 5) { if ($beingluckrand1 >= 5) { beingattacked(); } else { $evadeinfo = 1; } } elsif ($pbeingluck == 4) { if ($beingluckrand1 >= 4) { beingattacked(); } else { $evadeinfo = 1; } } elsif ($pbeingluck == 3) { if ($beingluckrand1 >= 3) { beingattacked(); } else { $evadeinfo = 1; } } elsif ($pbeingluck == 2) { if ($beingluckrand1 >= 2) { beingattacked(); } else { $evadeinfo = 1; } } elsif ($pbeingluck == 1) { if ($beingluckrand1 >= 1) { beingattacked(); } else { $evadeinfo = 1; } } elsif ($pbeingluck == 0) { beingattacked(); } else { beingattacked(); } } } ##DOES THE BEING HAVE LUCK? DID IT DOGE YOUR ATTACK?##### ##START#BAR#################################################################### ##START#BAR#################################################################### sub startbar { t5(); t6(); if ($debugmode == 1) { print colored ("DEBUG MODE ON:$health:",'red on_white'); print color 'reset'; } else { } print color "$colorprompt"; } ##START#BAR#################################################################### ##START#BAR#################################################################### ##STDIN#START################################################################## ##STDIN#START################################################################## sub stdinstart { $start = ; chomp($start); print color 'reset'; if ($start eq "exit") { bigassfuckingnuke_run(); } elsif ($start eq "EXIT") { bigassfuckingnuke_run(); } elsif ($start eq "quit") { bigassfuckingnuke_run(); } elsif ($start eq "QUIT") { bigassfuckingnuke_run(); } elsif ($start eq "i") { inventorylist(); } elsif ($start eq "I") { inventorylist(); } elsif ($start eq "x") { showweapons(); } elsif ($start eq "X") { showweapons(); } elsif ($start eq "z") { showarmor(); } elsif ($start eq "Z") { showarmor(); } elsif ($start eq "N") { north(); } elsif ($start eq "S") { if ($room eq "sbm2") { if ($sbm2blocked == 1) { $smb2cantgo = 1; } else { } } else { } south(); } elsif ($start eq "E") { east(); } elsif ($start eq "W") { west(); } elsif ($start eq "n") { north(); } elsif ($start eq "s") { if ($room eq "sbm2") { if ($sbm2blocked == 1) {