Or am I going to have to do a nested set of ifelse statements?
begin spawn1Script; usage: startscript spawn1Scriptshort i1set i1 to Random 10001if ( i1 > 8000 ) PlaceAtPC "scrib diseased" 1 128 0elseif ( i1 > 6000 ) PlaceAtPC "guar_feral" 1 128 0elseif ( i1 > 4000 ) PlaceAtPC "rat_diseased" 1 128 0elseif ( i1 > 2000 ) PlaceAtPC "netch_bull" 1 128 0else PlaceAtPC "kagouti_diseased" 1 128 0endifStopScript spawn1Scriptend, or (equivalent, but using < test, from lesser to greater values)
begin spawn2Script; usage: startscript spawn2Scriptshort i1set i1 to Random 1001if ( i1 < 200 ) PlaceAtPC "scrib diseased" 1 128 0elseif ( i1 < 400 ) PlaceAtPC "guar_feral" 1 128 0elseif ( i1 < 600 ) PlaceAtPC "rat_diseased" 1 128 0elseif ( i1 < 800 ) PlaceAtPC "netch_bull" 1 128 0else PlaceAtPC "kagouti_diseased" 1 128 0endifStopScript spawn2Scriptend
Begin MV_SH_TrainBotIf (GetAttacked == 1) StartCombat PlayerEndifIf (OnDeath == 1) Resurrect StopCombat Position 1430, 0, -300, 0 Face 762,0 EndifIf ( player->gethealth < 10 ) Stopcombat Position 1430, 0, -300, 0 Face 762,0 Messagebox "Training ended due to master's low health" Cast "MV_SH_DevHeal" Player ;heal player 1000pts each Fatigue, Health, Magicka. Prevents loop Cast "MV_SH_DevHealSelf" "MV_SH_Skeleton" ; Heals self as wellendif End
Begin MV_SH_TrainContrl short button short QuestionState if ( menumode == 1 ) return endif if ( OnActivate == 0 ) if ( QuestionState == 0 ) Return endif endif if ( QuestionState == 0 ) MessageBox "Would you like to use this device?" "Yes" "No" set QuestionState to 10 endif ;Ask second question if ( QuestionState == 10 ) Set button to GetButtonPressed if ( button == 0 ) MessageBox "What function do you want to use?" "Begin Training" "End Training" set QuestionState to 20 elseif ( button == 1 ) set QuestionState to 0 endif Return endif ;perform cure or give message if ( QuestionState == 20 ) Set button to GetButtonPressed if ( button == 0 ) MV_SH_Skeleton -> StartCombat Player Set QuestionState to 0 endif if ( button == 1 ) MV_SH_Skeleton -> StopCombat MV_SH_skeleton -> Position 1430, 0, -300, 0 MV_SH_Skeleton -> Face 762,0 Cast "MV_SH_DevHeal" "MV_SH_Skeleton" ; heals the skeleton back to full Set QuestionState to 0 endif endifend