Thread: Random Race?
View Single Post
  #1  
Old 07-15-2017, 02:27 PM
Baelu
Sarnak
 
Join Date: Jun 2017
Posts: 30
Default Random Race?

So I was looking around for a code to make npc's have a random race upon spawn. I know how to write it for the most part but im having trouble finding which command to use. Only one I see on wiki is

Code:
quest::npcrace(raceid) # Temporarily changes the NPC's race
however my concern is what is the limitations on the 'temporary' change? Would that be the best line to use for what im trying to do?

If anyone is unclear I simply want the npc to be a random race when spawning.

Would this actually work? (Dont have time to test atm)

Code:
Sub EVENT_SPAWN {
$rand = quest::ChooseRandom(1..12,522,130);
quest::npcrace($rand) # Temporarily changes the NPC's race
}
}
Reply With Quote