From a0343cfafd2477f2cef58a4736609d7d98a055cf Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 3 Aug 2019 14:19:23 -0300 Subject: NEW atcommand: @strangecoin - receive the 30 daily strange coins for GM Event --- npc/003-2/lua.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/npc/003-2/lua.txt b/npc/003-2/lua.txt index 1388d8c1f..606ac8f6e 100644 --- a/npc/003-2/lua.txt +++ b/npc/003-2/lua.txt @@ -44,6 +44,11 @@ L_GMItems: goto L_Menu; L_GMEvent: +OnGMCoinClaim: + if (!is_gm() || #GMEVENT_T > gettimetick(2)) { + dispbottom l("ERROR: You already took the coins today. Please wait @@ more.", FuzzyTime(#GMEVENT_T)), 1; + end; + } #GMEVENT_T=gettimetick(2)+(60*60*24); getitem StrangeCoin, 30; //logmes(strcharinfo(0)+" just took thirty event coins."); @@ -398,6 +403,7 @@ OnInit: setunitdata(.@npcId, UDT_WEAPON, BugSlayer); setunitdata(.@npcId, UDT_HAIRSTYLE, 12); setunitdata(.@npcId, UDT_HAIRCOLOR, 5); + bindatcmd "strangecoin", "Lua#003-2::OnGMCoinClaim", 60, 100, 1; .sex = G_FEMALE; .distance = 4; -- cgit v1.2.3-60-g2f50