From fa768d6b1301c8ed5806b36ea2671d8c672a572f Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 20 Mar 2018 08:56:38 -0300 Subject: Stop using getgmlevel() and use is_gm() is_admin() and is_staff(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Our four power levels: getgmlevel() → Sponsors, etc. is_staff() → GM 5, Developers, test server, etc. is_gm() → GM 80, Game Master, controls the world is_admin() → GM 99, Administrator, controls the uniserver (pun intended) --- npc/003-1/michel.txt | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'npc/003-1/michel.txt') diff --git a/npc/003-1/michel.txt b/npc/003-1/michel.txt index 1024e401c..736aa2424 100644 --- a/npc/003-1/michel.txt +++ b/npc/003-1/michel.txt @@ -39,8 +39,9 @@ mes("5."+.@name$[4]+" ("+.@value[4]+")"); next; - + // Anyone with GM Level, staff or not, is allowed to latest GM logs if (!getgmlevel()) close; + mes ""; .@nb = query_sql("select char_name, command from `atcommandlog` ORDER BY atcommand_id DESC LIMIT 10", .@name$, .@value$); mes l("##BLatest GM Commands##b"); @@ -55,22 +56,24 @@ mes("9."+.@name$[8]+" ("+.@value$[8]+")"); mes("10."+.@name$[9]+" ("+.@value$[9]+")"); - if (getgmlevel() < 99) close; + // Only Admins are allowed to change the HoF Scoreboard + if (!is_admin()) close; + next; - if (getgmlevel()) mes "##BGM Information##b"; - if (getgmlevel()) mes "We are currently relying in Karma to generate this Hall Of Fame."; - if (getgmlevel()) mes ""; - if (getgmlevel()) mes "##B Manual Edition ##b"; - if (getgmlevel()) mes "To reliably change Karma values, you must use @set Karma."; - if (getgmlevel()) mes "But before, check on MySQL the previous karma value, because this command overrides it."; - if (getgmlevel()) mes "Therefore, it is advised to DON'T change this by hand."; - if (getgmlevel()) mes ""; - if (getgmlevel()) mes "##B Scripting Edition ##b"; - if (getgmlevel()) mes "Is known to work. This hall of fame will need a few minutes to update itself."; - if (getgmlevel()) mes ""; - if (getgmlevel()) mes "##B Technical Notes ##b"; - if (getgmlevel()) mes "In future we may start Fame field directly (but it is not displayed on client, thus, we decided to use Karma)."; - //if (getgmlevel()) set Karma, Karma + 5; + mes "##BGM Information##b"; + mes "We are currently relying in Karma to generate this Hall Of Fame."; + mes ""; + mes "##B Manual Edition ##b"; + mes "To reliably change Karma values, you must use @set Karma."; + mes "But before, check on MySQL the previous karma value, because this command overrides it."; + mes "Therefore, it is advised to DON'T change this by hand."; + mes ""; + mes "##B Scripting Edition ##b"; + mes "Is known to work. This hall of fame will need a few minutes to update itself."; + mes ""; + mes "##B Technical Notes ##b"; + mes "In future we may start Fame field directly (but it is not displayed on client, thus, we decided to use Karma)."; + //set Karma, Karma + 5; close; OnInit: -- cgit v1.2.3-70-g09d2