PHP Code:
--[[
-- Loyalty System
-- Quest Writer By : HaveBeen™
]]--
quest loyalty begin
state start begin
function dialog()
say_title("Loyalty System: ")
say("")
---
say_reward("Do you want to is your account lock? ")
local s = select(locale.yes,locale.no)
if(s == 2) then return end
say_title("Loyalty System: ")
say("")
---
say("Enter the time(Second)")
say("")
local second = tonumber(input(""))
say_title("Loyalty System: ")
say("")
---
say(" Is the final decision ? ")
local y = select(locale.yes,locale.no)
if(y == 2) then return end
say_title("Loyalty System: ")
say("")
---
local m = math.floor(seconds*60)
game.set_event_flag(pc.get_name().."_remaining",m)
game.set_event_flag(pc.get_name().."_remaining_time",get_global_time())
pc.setqf("clicked",1)
command("quit")
say("Oke See you later ")
say("")
wait()
end
function check()
if(game.get_event_flag(pc.get_name().."_remaining") > get_global_time() - game.get_event_flag(pc.get_name().."_remaining_time")) then
return false
else
return true
end
end
when xxxx.use with pc.getqf("clicked") != 1 begin
loyalty.dialog()
end
when login begin
if(loyalty.check() == true) then
game.set_event_flag(pc.get_name().."_remaining",0)
pc.delqf("clicked")
elseif(loyalty.check() == false) then
command("quit")
end
end
end
end
PHP Code:
math.floor
Mfg HaveBeen™