# Random Monster RPG Problem

**URL:** <https://forum.kirupa.com/t/random-monster-rpg-problem/45655>\
**Category:** programming\
**Created:** [March 16, 2004, 8:45pm UTC](https://forum.kirupa.com/t/random-monster-rpg-problem/45655 "2004-03-16T20:45:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![WarrOrange](https://avatars.discourse-cdn.com/v4/letter/w/dbc845/32.png) [@WarrOrange](https://forum.kirupa.com/u/WarrOrange)\
**Post date:** [March 16, 2004, 8:45pm UTC](https://forum.kirupa.com/t/random-monster-rpg-problem/45655/1 "2004-03-16T20:45:41Z")

</div>

I have just tried to program my random monster AS but it doesnt seem to work… it would be nice if someone could point out a couple of flaws for me. [AS] function Monster() {  
temp = Math.floor(Math.random() \* (100 - 0)) + 0;  
if (temp = 25 or temp \< 25){  
((Monster == “Grey”))  
}  
else if (temp \< 51 && temp \> 25){  
((Monster == “Blue”))  
}  
else if (temp \< 76 && temp \> 50){  
((Monster == “Green”))  
}  
else if (temp \> 76){  
((Monster == “Black”))  
}  
}  
setInterval(Monster, 0); [/AS]
