View Single Post
  #1  
Old 04-11-2004, 06:27 PM
govtcheeze
Hill Giant
 
Join Date: Mar 2004
Location: South Florida
Posts: 247
Default New idea (i think)

From what I can tell, placeholder mobs are not implemented.

I think an easy way to accompish this would be to add a field to npc_type called placeholder usigned int and PHchance usigned int.

placeholder would have the ID of the mob that can spawn in its place. PHchance would be a number 1-100 indicating how likely the other mob would spawn. Can be as simple as:

Code:
if(rand(1,100) < PHchance)
  spawn mob with an ID of placeholder
You could even cascade them, where a mob could have a placeholder, who is also a placeholder. In this case:

Code:
if(rand(1,100) < PHchance) {
  if(mob with id of placeholder has a zero in its placeholder field, spawn this mob)
  else
    make a recursive call to this function
}
Something to chew on...
Reply With Quote