Code: Select all
[h: Num1 = 1] [h: Num2 = 3]
[h: Num3 = 4] [h: Num4 = 12]
[h: Num5 = 13] [h: Num6 = 19]
[h: Num7 = 20] [h: Num8 = 24]
[h: Num9 = 25] [h: Num10 = 29]
[h: Num11 = 30] [h: Num12 = 32]
[h: Num13 = 33] [h: Num14 = 39]
[h: Num15 = 40] [h: Num16 = 44]
[h: Num17 = 45] [h: Num18 = 49]
[h: Num19 = 50 ] [h: Num20 = 54]
[h: Num21 = 55] [h: Num22 = 61]
[h: Num23 = 62] [h: Num24 = 64]
[h: Num25 = 65] [h: Num26 = 67]
[h: Num27 = 68] [h: Num28 = 77]
[h: Num29 = 78] [h: Num30 = 85]
[h: Num31 = 86] [h: Num32 = 92]
[h: Num33 = 93] [h: Num34 = 100]
[h:EncounterChanceRoll = d100]
[h:RandomEncounterRoll = d100]
[h: status=input(
"LastEnc|No,Yes|Was there a random event last month?|RADIO")]
[h,if(LastEnc == 1),code: {[h: EncounterChance = 25]}; {[h: EncounterChance = 75]}]
[h,if(RandomEncounterRoll <= Num2 && EncounterChanceRoll <= EncounterChance),code: { [h:RandomNumber = 1d6] [r: "Assassination Attempt"] }; {[r:"There are no kingdom events this month."]}]
[h,if(RandomEncounterRoll >= Num3 && RandomEncounterRoll <= Num4 && EncounterChanceRoll <= EncounterChance),code: { [h:RandomNumber = 1d4] [r: "Bandit Activity"] }; {[r:"There are no kingdom events this month."]}]
[h,if(RandomEncounterRoll >= Num5 && RandomEncounterRoll <= Num6 && EncounterChanceRoll <= EncounterChance),code: { [h:RandomNumber = 1d4] [r: "Disaster"] }; {[r:"There are no kingdom events this month."]}]
[h,if(RandomEncounterRoll >= Num7 && RandomEncounterRoll <= Num8 && EncounterChanceRoll <= EncounterChance),code: { [h:RandomNumber = 1] [r: "Economic Boom"] }; {[r:"There are no kingdom events this month."]}]
[h,if(RandomEncounterRoll >= Num9 && RandomEncounterRoll <= Num10 && EncounterChanceRoll <= EncounterChance),code: { [h:RandomNumber = 1d6] [r: "Feud"] }; {[r:"There are no kingdom events this month."]}]
[h,if(RandomEncounterRoll >= Num11 && RandomEncounterRoll <= Num12 && EncounterChanceRoll <= EncounterChance),code: { [h:RandomNumber = 1] [r: "Food Shortage"] }; {[r:"There are no kingdom events this month."]}]
[h,if(RandomEncounterRoll >= Num13 && RandomEncounterRoll <= Num14 && EncounterChanceRoll <= EncounterChance),code: { [h:RandomNumber = 1d4] [r: "Food Surplus"] }; {[r:"There are no kingdom events this month."]}]
[h,if(RandomEncounterRoll >= Num15 && RandomEncounterRoll <= Num16 && EncounterChanceRoll <= EncounterChance),code: { [h:RandomNumber = 1] [r: "Good Weather"] }; {[r:"There are no kingdom events this month."]}]
[h,if(RandomEncounterRoll >= Num17 && RandomEncounterRoll <= Num18 && EncounterChanceRoll <= EncounterChance),code: { [h:RandomNumber = 1] [r: "Monster Attack"] }; {[r:"There are no kingdom events this month."]}]
[h,if(RandomEncounterRoll == Num19 && RandomEncounterRoll == Num20 && EncounterChanceRoll <= EncounterChance),code: { [h:RandomNumber = 1d8] [r: "Natural Blessing"] }; {[r:"There are no kingdom events this month."]}]
[h,if(RandomEncounterRoll >= Num21 && RandomEncounterRoll <= Num22 && EncounterChanceRoll <= EncounterChance),code: { [h:RandomNumber = 1d8] [r: "Outstanding Success"] }; {[r:"There are no kingdom events this month."]}]
[h,if(RandomEncounterRoll == Num23 && RandomEncounterRoll == Num24 && EncounterChanceRoll <= EncounterChance),code: { [h:RandomNumber = 1] [r: "Plague"] }; {[r:"There are no kingdom events this month."]}]
[h,if(RandomEncounterRoll >= Num25 && RandomEncounterRoll <= Num26 && EncounterChanceRoll <= EncounterChance),code: { [h:RandomNumber = 1] [r: "Political Calm"] }; {[r:"There are no kingdom events this month."]}]
[h,if(RandomEncounterRoll >= Num27 && RandomEncounterRoll <= Num28 && EncounterChanceRoll <= EncounterChance),code: { [h:RandomNumber = 1] [r: "Public Scandal"] }; {[r:"There are no kingdom events this month."]}]
[h,if(RandomEncounterRoll >= Num29 && RandomEncounterRoll <= Num30 && EncounterChanceRoll <= EncounterChance),code: { [h:RandomNumber = 1] [r: Sensational Crime"] }; {[r:"There are no kingdom events this month."]}]
[h,if(RandomEncounterRoll >= Num31 && RandomEncounterRoll <= Num32 && EncounterChanceRoll <= EncounterChance),code: { [h:RandomNumber = 1] [r: "New Vassals"] }; {[r:"There are no kingdom events this month."]}]
[h,if(RandomEncounterRoll >= Num33 && RandomEncounterRoll <= Num34 && EncounterChanceRoll <= EncounterChance),code: { [h:RandomNumber = 1d4] [r: "Visiting Celebrity"] }; {[r:"There are no kingdom events this month."]}]
[h,if(RandomEncounterRoll >= Num29 && RandomEncounterRoll = Num30 && EncounterChanceRoll = EncounterChance),code: { [h:RandomNumber = 1] [r: Sensational Crime"] }; {[r:"There are no kingdom events this month."]}] [h,if(RandomEncounterRoll >= Num31 && RandomEncounterRoll = Num32 && EncounterChanceRoll = EncounterChance),code: { [h:RandomNumber = 1] [r: "New Vassals"] }; {[r:"There are no kingdom events this month."]}] [h,if(RandomEncounterRoll >= Num33 && RandomEncounterRoll = Num34 && EncounterChanceRoll = EncounterChance),code: { [h:RandomNumber = 1d4] [r: "Visiting Celebrity"] }; {[r:"There are no kingdom events this month."]}]