diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-01-08 00:44:54 -0200 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-01-08 00:44:54 -0200 |
commit | 1a2475bd668e65d9ce3f2c58256b0cbf7c099485 (patch) | |
tree | 23ab1b62ea18719f505e5ad0c81e4ac435edb7d5 /npc | |
parent | 9004a6e4569dcd0cd78b1c0dbcfcc3a10efacb47 (diff) | |
download | serverdata-1a2475bd668e65d9ce3f2c58256b0cbf7c099485.tar.gz serverdata-1a2475bd668e65d9ce3f2c58256b0cbf7c099485.tar.bz2 serverdata-1a2475bd668e65d9ce3f2c58256b0cbf7c099485.tar.xz serverdata-1a2475bd668e65d9ce3f2c58256b0cbf7c099485.zip |
Optimize how game news menu is handled
Diffstat (limited to 'npc')
-rw-r--r-- | npc/functions/news.txt | 39 |
1 files changed, 11 insertions, 28 deletions
diff --git a/npc/functions/news.txt b/npc/functions/news.txt index 3a09566bd..4cd772eb5 100644 --- a/npc/functions/news.txt +++ b/npc/functions/news.txt @@ -281,35 +281,18 @@ function script Journalman { @menu=0; while (@menu != 1) { - select - l("Thanks for your help!"), - l("Release 7 (Current)"), - l("Release 6"), - l("Release 5"), - l("Release 4"), - l("Release 3"), - l("Release 2"); + menuint + l("Thanks for your help!"), 1, + l("Release 8 (Current)"), 20190110, + l("Release 7"), 20181226, + l("Release 6"), 20180727, + l("Release 5"), 20180630, + l("Release 4"), 20180531, + l("Release 3"), 20180408, + l("Release 2"), 20180323; mes ""; - switch (@menu) { - case 2: - GameNews(20181226); - break; - case 3: - GameNews(20180727); - break; - case 4: - GameNews(20180630); - break; - case 5: - GameNews(20180531); - break; - case 6: - GameNews(20180408); - break; - case 7: - GameNews(20180323); - break; - } + if (@menuret > 1) + GameNews(@menuret); } mesn getarg(0); |