// fun if you want to typecast humans/monkeys/etc without writing long path-filled lines. /proc/ishuman(A) if(istype(A, /mob/living/carbon/human)) return 1 return 0 /proc/ismonkey(A) if(A && istype(A, /mob/living/carbon/monkey)) return 1 return 0 /proc/isbrain(A) if(A && istype(A, /mob/living/carbon/brain)) return 1 return 0 /proc/isalien(A) if(istype(A, /mob/living/carbon/alien)) return 1 return 0 /proc/isalienadult(A) if(istype(A, /mob/living/carbon/alien/humanoid)) return 1 return 0 /proc/islarva(A) if(istype(A, /mob/living/carbon/alien/larva)) return 1 return 0 /proc/isslime(A) if(istype(A, /mob/living/simple_animal/slime)) return 1 return 0 /proc/isrobot(A) if(istype(A, /mob/living/silicon/robot)) return 1 return 0 /proc/isanimal(A) if(istype(A, /mob/living/simple_animal)) return 1 return 0 /proc/iscorgi(A) if(istype(A, /mob/living/simple_animal/pet/dog/corgi)) return 1 return 0 /proc/iscrab(A) if(istype(A, /mob/living/simple_animal/crab)) return 1 return 0 /proc/iscat(A) if(istype(A, /mob/living/simple_animal/pet/cat)) return 1 return 0 /proc/ismouse(A) if(istype(A, /mob/living/simple_animal/mouse)) return 1 return 0 /proc/isbear(A) if(istype(A, /mob/living/simple_animal/hostile/bear)) return 1 return 0 /proc/iscarp(A) if(istype(A, /mob/living/simple_animal/hostile/carp)) return 1 return 0 /proc/isclown(A) if(istype(A, /mob/living/simple_animal/hostile/retaliate/clown)) return 1 return 0 /proc/isAI(A) if(istype(A, /mob/living/silicon/ai)) return 1 return 0 /proc/ispAI(A) if(istype(A, /mob/living/silicon/pai)) return 1 return 0 /proc/iscarbon(A) if(istype(A, /mob/living/carbon)) return 1 return 0 /proc/issilicon(A) if(istype(A, /mob/living/silicon)) return 1 return 0 /proc/isliving(A) if(istype(A, /mob/living)) return 1 return 0 /proc/isobserver(A) if(istype(A, /mob/dead/observer)) return 1 return 0 /proc/isnewplayer(A) if(istype(A, /mob/new_player)) return 1 return 0 /proc/isovermind(A) if(istype(A, /mob/camera/blob)) return 1 return 0 /proc/isdrone(A) if(istype(A, /mob/living/simple_animal/drone)) return 1 return 0 /proc/isswarmer(A) if(istype(A, /mob/living/simple_animal/hostile/swarmer)) return 1 return 0 /proc/islimb(A) if(istype(A, /obj/item/organ/limb)) return 1 return 0 /proc/isloyal(A) //Checks to see if the person contains a loyalty implant, then checks that the implant is actually inside of them for(var/obj/item/weapon/implant/loyalty/L in A) if(L && L.implanted) return 1 return 0 /proc/check_zone(zone) if(!zone) return "chest" switch(zone) if("eyes") zone = "head" if("mouth") zone = "head" if("l_hand") zone = "l_arm" if("r_hand") zone = "r_arm" if("l_foot") zone = "l_leg" if("r_foot") zone = "r_leg" if("groin") zone = "chest" return zone /proc/ran_zone(zone, probability = 80) zone = check_zone(zone) if(prob(probability)) return zone var/t = rand(1, 18) // randomly pick a different zone, or maybe the same one switch(t) if(1) return "head" if(2) return "chest" if(3 to 6) return "l_arm" if(7 to 10) return "r_arm" if(11 to 14) return "l_leg" if(15 to 18) return "r_leg" return zone /proc/above_neck(zone) var/list/zones = list("head", "mouth", "eyes") if(zones.Find(zone)) return 1 else return 0 /proc/stars(n, pr) n = html_encode(n) if (pr == null) pr = 25 if (pr <= 0) return null else if (pr >= 100) return n var/te = n var/t = "" n = length(n) var/p = null p = 1 while(p <= n) if ((copytext(te, p, p + 1) == " " || prob(pr))) t = text("[][]", t, copytext(te, p, p + 1)) else t = text("[]*", t) p++ return sanitize(t) /proc/slur(n) var/phrase = html_decode(n) var/leng = lentext(phrase) var/counter=lentext(phrase) var/newphrase="" var/newletter="" while(counter>=1) newletter=copytext(phrase,(leng-counter)+1,(leng-counter)+2) if(rand(1,3)==3) if(lowertext(newletter)=="o") newletter="u" if(lowertext(newletter)=="s") newletter="ch" if(lowertext(newletter)=="a") newletter="ah" if(lowertext(newletter)=="u") newletter="oo" if(lowertext(newletter)=="c") newletter="k" if(rand(1,20)==20) if(newletter==" ") newletter="...huuuhhh..." if(newletter==".") newletter=" *BURP*." switch(rand(1,20)) if(1) newletter+="'" if(10) newletter+="[newletter]" if(20) newletter+="[newletter][newletter]" newphrase+="[newletter]";counter-=1 return newphrase /proc/stutter(n) var/te = html_decode(n) var/t = ""//placed before the message. Not really sure what it's for. n = length(n)//length of the entire word var/p = null p = 1//1 is the start of any word while(p <= n)//while P, which starts at 1 is less or equal to N which is the length. var/n_letter = copytext(te, p, p + 1)//copies text from a certain distance. In this case, only one letter at a time. if (prob(80) && (ckey(n_letter) in list("b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","y","z"))) if (prob(10)) n_letter = text("[n_letter]-[n_letter]-[n_letter]-[n_letter]")//replaces the current letter with this instead. else if (prob(20)) n_letter = text("[n_letter]-[n_letter]-[n_letter]") else if (prob(5)) n_letter = null else n_letter = text("[n_letter]-[n_letter]") t = text("[t][n_letter]")//since the above is ran through for each letter, the text just adds up back to the original word. p++//for each letter p is increased to find where the next letter will be. return copytext(sanitize(t),1,MAX_MESSAGE_LEN) /proc/derpspeech(message, stuttering) message = replacetext(message, " am ", " ") message = replacetext(message, " is ", " ") message = replacetext(message, " are ", " ") message = replacetext(message, "you", "u") message = replacetext(message, "help", "halp") message = replacetext(message, "grief", "grife") message = replacetext(message, "space", "spess") message = replacetext(message, "carp", "crap") message = replacetext(message, "reason", "raisin") if(prob(50)) message = uppertext(message) message += "[stutter(pick("!", "!!", "!!!"))]" if(!stuttering && prob(15)) message = stutter(message) return message /proc/Gibberish(t, p)//t is the inputted message, and any value higher than 70 for p will cause letters to be replaced instead of added /* Turn text into complete gibberish! */ var/returntext = "" for(var/i = 1, i <= length(t), i++) var/letter = copytext(t, i, i+1) if(prob(50)) if(p >= 70) letter = "" for(var/j = 1, j <= rand(0, 2), j++) letter += pick("#","@","*","&","%","$","/", "<", ">", ";","*","*","*","*","*","*","*") returntext += letter return returntext /proc/ninjaspeak(n) //NINJACODE /* The difference with stutter is that this proc can stutter more than 1 letter The issue here is that anything that does not have a space is treated as one word (in many instances). For instance, "LOOKING," is a word, including the comma. It's fairly easy to fix if dealing with single letters but not so much with compounds of letters./N */ var/te = html_decode(n) var/t = "" n = length(n) var/p = 1 while(p <= n) var/n_letter var/n_mod = rand(1,4) if(p+n_mod>n+1) n_letter = copytext(te, p, n+1) else n_letter = copytext(te, p, p+n_mod) if (prob(50)) if (prob(30)) n_letter = text("[n_letter]-[n_letter]-[n_letter]") else n_letter = text("[n_letter]-[n_letter]") else n_letter = text("[n_letter]") t = text("[t][n_letter]") p=p+n_mod return copytext(sanitize(t),1,MAX_MESSAGE_LEN) /proc/shake_camera(mob/M, duration, strength=1) spawn(0) if(!M || !M.client || M.shakecamera) return var/oldeye=M.client.eye var/x M.shakecamera = 1 for(x=0; x