mob/verb/visualize()
if(pray()) world << "God: I see you read Matthew 21:22" ; return //return if prayer is successful
if(!usr.prayerhad) prayer=input("Input your prayer") as text
world << prayer
usr.prayercount+=1
world << "You prayed [usr.prayercount] times"
mob/proc/pray()
if(src.prayercount<=5 && src.prayercount>0 && prob(10))
world << "Your wish has come true!"
src.prayercount=0
return 1
if(src.prayercount<=10 && src.prayercount>5 && prob(25))
world << "Your wish has come true!"
src.prayercount=0
return 1
if(src.prayercount<=15 && src.prayercount>10 && prob(40))
world << "Your wish has come true!"
src.prayercount=0
return 1
if(src.prayercount<=20 && src.prayercount>15 && prob(65))
world << "Your wish has come true!"
src.prayercount=0
return 1
if(src.prayercount<=25 && src.prayercount>20 && prob(80))
world << "Your wish has come true!"
src.prayercount=0
return 1
if(src.prayercount<=30 && src.prayercount>25 && prob(100))
world << "Your wish has come true!"
src.prayercount=0
return 1
mob/var/
prayercount=0 //amount of times you pray
prayerhad=0 //if you had prayed or not
var/prayer// your prayer text string
Problem description: At the very top return happens without the if statement checking the proc and without the world say. Also, is there a way to be make the proc shorter and simpler? I feel its messy.