From 44862dca9b6f26513f23ea1fd79365c7a8d33d9e Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 1 Jun 2019 21:30:02 -0300 Subject: Use rand2() instead of rand() in several places --- npc/003-1/ishi.txt | 2 +- npc/003-1/lieutenantdausen.txt | 4 ++-- npc/003-1/quirino.txt | 2 +- npc/003-1/swezanne.txt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'npc/003-1') diff --git a/npc/003-1/ishi.txt b/npc/003-1/ishi.txt index e371acfc5..2283af685 100644 --- a/npc/003-1/ishi.txt +++ b/npc/003-1/ishi.txt @@ -159,7 +159,7 @@ L_Items: //debugmes "Setting reward"; // could be if (!.@lucked) but for sanity... if (.@reward$ == "") - set .@reward$, @Items$[rand(getarraysize(@Items$))]; + .@reward$=any_of(@Items$); //debugmes "Check weight"; .@weight = checkweight(.@reward$,1); diff --git a/npc/003-1/lieutenantdausen.txt b/npc/003-1/lieutenantdausen.txt index 7f0569819..74503a99a 100644 --- a/npc/003-1/lieutenantdausen.txt +++ b/npc/003-1/lieutenantdausen.txt @@ -286,7 +286,7 @@ OnInit: // Render random guard answer after bringing him water function script GuardsGratitude { - switch (rand(6)) + switch (rand2(6)) { case 0: .@message$ = l("God bless you! You have saved me from sweltering!"); @@ -307,7 +307,7 @@ function script GuardsGratitude { .@message$ = l("Who are you? Thanks for the help."); break; default: - .@message$="Thank you!"; + .@message$=l("Thank you!"); break; } diff --git a/npc/003-1/quirino.txt b/npc/003-1/quirino.txt index 44cb3a007..669cb61ed 100644 --- a/npc/003-1/quirino.txt +++ b/npc/003-1/quirino.txt @@ -91,7 +91,7 @@ L_SignUp: if(@cartinventorylist_count>=1) goto L_Full; // Warp player - if (rand(1,2) == 1) + if (rand2(1,2) == 1) warp "001-8", rand(42, 57), 42; else warp "001-8", rand(42, 57), 57; diff --git a/npc/003-1/swezanne.txt b/npc/003-1/swezanne.txt index ade6a9b8a..d201f62b0 100644 --- a/npc/003-1/swezanne.txt +++ b/npc/003-1/swezanne.txt @@ -29,7 +29,7 @@ L_Heroics: next; mesn; - .@d=rand(1,6); + .@d=rand2(1,6); if (.@d == 1) .@deed$="protected our cities!"; else if (.@d == 2) .@deed$="did great acts of bravery!"; -- cgit v1.2.3-60-g2f50