I figured out the above. Pretty simple. Ok, everything i got working correctly. I'm doing this tournament where the tournament will occure once a month. I'm going to re-use the scripts so any local variables that I use have to be reset to 0 in those scripts for these scripts to work correctly. This script works correctly.
Begin SM_tourneyScriptshort stateif ( state == 6 )set state to 0endifif ( state == 0 ) if ( SMTourney == 2 ) set state to 1endifelseif ( state == 1 ) "SM_daglin selarar"->positioncell, 4945.83, 3534.95, 15170.00, 0, "Sadrith Mora, Guild of Fighters" "Hrundi"->positioncell, 4585.85, 3534.94, 15170.00, 0 "Sadrith Mora, Guild of Fighters" "SM_Ilden Mirel"->positioncell, 5288.38, 3309.33, 15170.00, 0 "Sadrith Mora, Guild of Fighters" "Sondryn Irathi"->positioncell, 4386.50, 3849.92, 15170.00, 0 "Sadrith Mora, Guild of Fighters" "Sondryn SM_Irathi"->positioncell, 4386.50, 3849.92, 15170.00, 0 "Sadrith Mora, Guild of Fighters" "SM_2orcshaman"->positioncell, 5221.71, 3952.97, 15170.00, 0 "Sadrith Mora, Guild of Fighters" "Hasell"->positioncell, 4223.53, 3293.14, 15170.00, 0 "sadrith Mora, guild of fighters" set SMTourney to 3 set state to 2elseif ( state == 2 ) if ( SMTourney == 4 ) "SM_Daglin Selarar"->equip, "Icicle" "SM_Daglin Selarar"->startcombat, "Hrundi" "Hrundi"->startcombat, "SM_Daglin selarar" set state to 3endifelseif ( state == 3 ) if ( "SM_Daglin Selarar"->GetHealthGetRatio <= 0.5 ) set state to 4 set prone to 1 elseif ( "Hrundi"->gethealthgetratio <= 0.5 ) set prone to 2 set state to 4 endifelseif ( state == 4 ) "SM_Daglin Selarar"->StopCombat "Hrundi"->stopcombat "SM_Daglin Selarar"->modcurrenthealth, 1000 "Hrundi"->modcurrenthealth 1000 set state to 5elseif ( state == 5 ) If ( getpcCell "Sadrith Mora, Guild of Fighters" == 0 ) "hrundi"->positioncell, 4174.11, 4610.41, 15170.00, 0 "Sadrith Mora, Guild of Fighters" "Hasell"->positioncell, 4747.93, 3354.42, 15170.00, 0 "Sadrith Mora, Guild of Fighters" "SM_2Orcshaman"->positioncell, 4825.67, 3264.14, 15682.00, 0 "Sadrith Mora, Guild of Fighters" "SM_Daglin Selarar"->positioncell, 5436.42, 4303.79, 14786.00, 0 "Sadrith Mora, Guild of Fighters" "SM_Ilden Mirel"->positioncell, 5557.41, 3483.18, 15170.00, 0 "Sadrith Mora, Guild of Fighters" "Sondryn SM_Irathi"->positioncell, 5675.06, 4101.49, 14786.00, 0 "Sadrith mora, guild of fighters""Sondryn Irathi"->positioncell, 5646.06, 4564.49, 14786.00, 0 "Sadrith mora, guild of fighters" set state to 6 stopscript, SM_tourneyScriptendifendifend
I set state to 6 at the end b/c when the script wil get restarted it will not be stuck on state 5 and just do the last command it will set state to 0 then actually do the whole script again. The problem is i can't get this script to do the same. I'm not not very familar on these local variables. Any help?
begin SM_Tourney_dayScriptshort daysPassedshort myDay;stop once enough time has passed.if ( Prone == 3 )Journal "SM_Tourney" 30set dayspassed to 0set myday to 0startscript, "SM_TourneyScript"StopScript SM_Tourney_dayscriptendif;when stronghold starts building, store the current dayif ( daysPassed == 0 )set myDay to Dayset daysPassed to 1endif;if we've already set a day, count the daysif ( myDay != Day );presumably it went up...set daysPassed to daysPassed + 1set myDay to Dayendif;wait x days for the stronghold to be built, give journal, set global;make sure player is NOT in the cell while the stuff goes "poof"if ( daysPassed > 1 )set Prone to 3set SMTourney to 2endifEnd
I thought maybe if i set dayspassed to 0 and myday to 0 that would work but it didn't
*edit* I got it to work. I just got rid of this bottom script and re worded the other script