Jump to content
Sign in to follow this  
FapFap

Quest in time

Recommended Posts

Can someone tell me how to make a Quest appear on npc ex: every 3 hours and stays for 30min then done.. after 3 hour again appear and soo..

I need help with this asap..

Share this post


Link to post
Share on other sites
On 15.09.2017 at 0:18 AM, FapFap said:

Может кто подскажет как сделать квест появляются на НПС например, каждые 3 часа и остается в течение 30 минут, затем сделать.. опять через 3 часа появляются и соо..

Мне нужна помощь с этим как можно скорее..

 

-- function.lua

 

    function QuestTimeForFapFap ( role )
         
    local now_hour= os.date("%H")
    local now_mins= os.date("%M") 

   
    now_hour= tonumber(now_hour)
    now_mins= tonumber(now_mins)
    timer = {00,03,06,09,12,15,18,21} -- You Hour
    
    for i,v in ipairs(timer) do
    if now_hour == v then 
    if now_mins <= 30 then -- You Minute
    return 1
                     end
               end
         end
    end

 

--MissionSDK.lua

 

elseif conditions.func == QuestTimeForFapFap then
                local ret = QuestTimeForFapFap ( character, conditions.p1 )
                if ret ~= LUA_TRUE then
                return LUA_FALSE
                end

 

 

--MissionScript(01-08). lua  add this trigger to you mission

 

MisBeginCondition( QuestTimeForFapFap )

 

 

P.S Not tested!

 

Edited by Pastuh

Share this post


Link to post
Share on other sites
11 minutes ago, FapFap said:

@Pastuh Hey script works but i get this errors on lua.err.txt  ( like 1,000kb in 10 seconds LOL )
This are the errors......
lol.png
lol2.png

On 15.09.2017 at 0:18 AM, FapFap said:

Может кто подскажет как сделать квест появляются на НПС например, каждые 3 часа и остается в течение 30 минут, затем сделать.. опять через 3 часа появляются и соо..

Мне нужна помощь с этим как можно скорее..

 

Code with errors is not my what is it used for ?

Send me the file in PM.

Edited by Pastuh

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...