FANDOM


Spawn script by Taz.

Using "RC_Core.rcm"
; Date/Time: 7:25:04 PM on 10/7/2010
; By Naddaz on TAZCO
;Spawn npc random levels and stats.
Function Main()

        NPC = Actor()
		Target = ContextActor()
		SetActorLevel(Actor(), Rand(1, 3))
		Npclvl% = ActorLevel(Actor())


If (Npclvl = 1)
		Mobhealth% = Rand(75, 100) ;lvl 1 mob total health
		Mobstr% = Rand(0, 1) ;lvl 1 mob total strength
		mobtou% = Rand(1, 1) ;lvl 1 mob total toughness
		SetMaxAttribute(Actor(), "Health", Mobhealth)
		SetAttribute(Actor(), "Health", Mobhealth)
		SetMaxAttribute(Actor(), "Strength", mobstr)
		SetAttribute(Actor(), "Strength", mobstr)
		SetMaxAttribute(Actor(), "Toughness", mobtou)
		SetAttribute(Actor(), "Toughness", mobtou)

Endif

   If (Npclvl = 2)
		Mobhealth = Rand(120, 145)
		Mobstr% = Rand(1, 1) ;lvl 2 mob total strength
		mobtou% = Rand(1, 2) ;lvl 2 mob total toughness
		SetMaxAttribute(Actor(), "Health", Mobhealth)
		SetAttribute(Actor(), "Health", Mobhealth)
		SetMaxAttribute(Actor(), "Strength", mobstr)
		SetAttribute(Actor(), "Strength", mobstr)
		SetMaxAttribute(Actor(), "Toughness", mobtou)
		SetAttribute(Actor(), "Toughness", mobtou)

Endif

If (Npclvl = 3)
		Mobhealth = Rand(145, 200)
		Mobstr% = Rand(2, 3) ;lvl 3 mob total strength
		mobtou% = Rand(2, 3) ;lvl 3 mob total toughness
		SetMaxAttribute(Actor(), "Health", Mobhealth)
		SetAttribute(Actor(), "Health", Mobhealth)
		SetMaxAttribute(Actor(), "Strength", mobstr)
		SetAttribute(Actor(), "Strength", mobstr)
		SetMaxAttribute(Actor(), "Toughness", mobtou)
		SetAttribute(Actor(), "Toughness", mobtou)

Endif


End Function