[Updated]Random Combat Generator

Started by Kazamatta, April 15, 2012, 08:42:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Kazamatta

I forgot who the original poster and where i got it from if anyone knows tell me and i will give proper credit. (This is same copy i got originally, I haven't edited it yet)

Random Combat Generator:

UseLib("def.js");

function OnEnter(){
i = Rnd(1,3); //a random number from 1 to 3
if ( i == 1){
AddContent(6001001,1001004,3,0); //add three rats
EnterCombat();
}
else if ( i == 2){
AddContent(6001004,1001004,2,0); //add two spiders
EnterCombat();
}else{
//do nothing here
}
return true;
}
function OnExit(){
foreach(4,"AlterVisibility(Current.ID,false);");
}