diff options
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/goodbye.txt | 2 | ||||
-rw-r--r-- | npc/functions/news.txt | 4 | ||||
-rw-r--r-- | npc/functions/nurse.txt | 4 | ||||
-rw-r--r-- | npc/functions/random-talk.txt | 12 |
4 files changed, 11 insertions, 11 deletions
diff --git a/npc/functions/goodbye.txt b/npc/functions/goodbye.txt index 620883b8c..b52146188 100644 --- a/npc/functions/goodbye.txt +++ b/npc/functions/goodbye.txt @@ -28,7 +28,7 @@ function script goodbye_msg { l("Cheers!"), l("Take care!"); - return .byemsg$[rand(getarraysize(.byemsg$))]; + return any_of(.byemsg$); } diff --git a/npc/functions/news.txt b/npc/functions/news.txt index df0c4dc90..eb2a9c5b8 100644 --- a/npc/functions/news.txt +++ b/npc/functions/news.txt @@ -296,7 +296,7 @@ function script GameNews { mesc l("This somehow affected the whole economy."); next; mesc l("Some adventurer broke what was previously thought as maximum level, and is now level 40!"); - mes l("##9Was that not sufficient, this someone acquired MAGIC and is now under @@'s group.", (rand(0,1) ? "Colin" : "Luca")); + mes l("##9Was that not sufficient, this someone acquired MAGIC and is now under @@'s group.", (rand2(0,1) ? "Colin" : "Luca")); next; mesc l("The Magic Council finished the reform on their guest hall."); mesc l("Soren, the architect responsible for it, is very happy with the new design."); @@ -396,7 +396,7 @@ function script Journalman { mesc l("The Monster King Army left the cities! What will happen next? Anxiety grows!"); break; case 2: - mesc l("The Monster King Army is attacking towns at random! Players already caused a loss of about @@ officers!", ($MK_TEMPVAR+rand(-1,1))/5); + mesc l("The Monster King Army is attacking towns at random! Players already caused a loss of about @@ officers!", ($MK_TEMPVAR+rand2(-1,1))/5); break; default: Exception(l("I do now know what this means: GS-@@-ICXN-@@", $GAME_STORYLINE, $@MK_TEMPVAR), RB_DEFAULT|RB_SPEECH); break; diff --git a/npc/functions/nurse.txt b/npc/functions/nurse.txt index 0e6b0b4b4..7335c74f6 100644 --- a/npc/functions/nurse.txt +++ b/npc/functions/nurse.txt @@ -27,7 +27,7 @@ function script Nurse { mesn getarg(0); // Random message - .@temp = rand(1,4); + .@temp = rand2(1,4); switch (.@temp) { case 1: mesq l("You don't look too well; let me treat your wounds."); @@ -72,7 +72,7 @@ function script Nurse { sc_end(SC_SLOWPOISON); percentheal 100,100; // We can also use "recovery()" but that revives players :o mesn getarg(0); - @temp = rand(1,4); + @temp = rand2(1,4); if(@temp == 1) mesq l("Here you go!"); if(@temp == 2) mesq l("Painless, wasn't it?"); if(@temp == 3) mesq l("You should be more careful."); diff --git a/npc/functions/random-talk.txt b/npc/functions/random-talk.txt index 4a4202f34..b9df6783a 100644 --- a/npc/functions/random-talk.txt +++ b/npc/functions/random-talk.txt @@ -19,7 +19,7 @@ function script hello { - switch (rand(3)) { + switch (rand2(3)) { case 0: npctalkonce(l("Heya!")); break; @@ -38,7 +38,7 @@ function script hello { } function script moubootalk { - switch (rand(4)) { + switch (rand2(4)) { case 0: npctalkonce(l("Moooooo!")); break; @@ -57,7 +57,7 @@ function script moubootalk { function script sailortalk { - .@rand = rand(8); + .@rand = rand2(8); if (.@rand == 0) goodbye; if (.@rand == 1) npctalkonce(l("Arr, I'm bored!")); if (.@rand == 2) npctalkonce(l("Hey! Good to hear from you!")); @@ -101,7 +101,7 @@ function script villagertalk { return; } - switch (rand(4)) { + switch (rand2(4)) { case 0: darn_or_smile(); break; @@ -123,7 +123,7 @@ function script villagertalk { } function script legiontalk { - switch (rand(15)) { + switch (rand2(15)) { case 0: npctalkonce(l("Do I look like a tree? I feel like one.")); //speech( @@ -183,7 +183,7 @@ function script legiontalk { } function script asleep { - switch(rand(5)) { + switch(rand2(5)) { case 0: npctalkonce(l("Zzzzzzzzz...")); break; case 1: npctalkonce(l("Rrrr... Pchhhh...")); break; case 2: npctalkonce(l("Ggrmm... Grmmmm...")); break; |