Mr.Blue 3 Posted April 24, 2015 Share Posted April 24, 2015 the idea is a map spawn a metin and he must destroy it before the time is done or he must retry after hour i found some problems hope some 1 helps me quest test begin state start begin when login or level_up with pc.get_map_index() == 74 begin loop_timer("check_time", 1) set_state(kill) end end state kill begin when letter begin send_letter(" تجربة ") end when button or info begin if pc.getqf("time_retry") <= get_time() then local Blue = {{100, 22, 8001},{101, 22,8002},{102, 22, 8003},{103, 22,8011},{104, 22,8013},{105, 22,8024},{106, 22,8026},{107, 22,8027},{108, 22,8027},{109, 22,8027}} for i = 1,1 do if pc.level > Blue[i][1] then mob.spawn(Blue[i][3], pc.get_local_x()+5, pc.get_local_y()+5, 1) pc.setqf("limit_time", get_time()+60*5) end end end when Blue[i][3].kill begin local count = pc.getqf("state") + 1 if count <= 1 then pc.setqf("state", count) q.set_counter(" يجب قتل ", 1 ) end if count >= 1 pc.getqf("limit_time") == get_time() then say(" fail ") say(" اعد المحاولة بعد ساعة ") pc.setqf("time_retry", get_time()+60*60*1) elseif count == 1 and get_time() < pc.getqf("limit_time") then say (" mbrok exp ") pc.give_exp(Blue[i][2]) clear_letter() set_state(__COMPLETE__) end end end state __COMPLETE__ begin end end 1 Link to comment Share on other sites More sharing options...
Mr.Blue 3 Posted April 25, 2015 Author Share Posted April 25, 2015 guys D: Link to comment Share on other sites More sharing options...
Premium Solution MrLibya 554 Posted April 25, 2015 Premium Solution Share Posted April 25, 2015 at least u could ask me on skype u know + i dont know what u want with the time so i think this will work quest test begin state start begin function get_table() if test.table_info == nil then test.table_info={ {100, 22, 8001}, {101, 22, 8002}, {102, 22, 8003}, {103, 22, 8011}, {104, 22, 8013}, {105, 22, 8024}, {106, 22, 8026}, {107, 22, 8027}, {108, 22, 8027}, {109, 22, 8027}, } end return test.table_info end when login or levelup with pc.get_map_index() == 74 begin set_state(kill) end end state kill begin when letter begin send_letter(" تجربة ") end when button or info begin local table = test.get_table() if pc.getqf("time_retry") <= get_time() then for i,v in ipairs(table) do if pc.level > v[1] then mob.spawn(v[3], pc.get_local_x()+5, pc.get_local_y()+5, 1) pc.setqf("limit_time", get_time()+60*5) pc.setqf("mob_vnum", v[3]) end end end end when kill with npc.get_race() == pc.getqf("mob_vnum") begin local count = pc.getqf("state") + 1 local table = test.get_table() for i,v in ipairs(table) do if count <= 1 then pc.setqf("state", count) q.set_counter(" يجب قتل ", 1 ) elseif count >= 1 and pc.getqf("limit_time") >= get_time() then say(" fail ") say(" اعد المحاولة بعد ساعة ") pc.setqf("time_retry", get_time()+60*60*1) elseif count == 1 and get_time() < pc.getqf("limit_time") then say(" mbrok exp ") pc.give_exp(v[2]) clear_letter() set_state(__COMPLETE__) end end end end state __COMPLETE__ begin end end 1 If you're going to do something, then do it right. Link to comment Share on other sites More sharing options...
Mr.Blue 3 Posted April 25, 2015 Author Share Posted April 25, 2015 at least u could ask me on skype u know + i dont know what u want with the time so i think this will work quest test begin state start begin function get_table() if test.table_info == nil then test.table_info={ {100, 22, 8001}, {101, 22, 8002}, {102, 22, 8003}, {103, 22, 8011}, {104, 22, 8013}, {105, 22, 8024}, {106, 22, 8026}, {107, 22, 8027}, {108, 22, 8027}, {109, 22, 8027}, } end return test.table_info end when login or levelup with pc.get_map_index() == 74 begin set_state(kill) end end state kill begin when letter begin send_letter(" تجربة ") end when button or info begin local table = test.get_table() if pc.getqf("time_retry") <= get_time() then for i,v in ipairs(table) do if pc.level > v[1] then mob.spawn(v[3], pc.get_local_x()+5, pc.get_local_y()+5, 1) pc.setqf("limit_time", get_time()+60*5) pc.setqf("mob_vnum", v[3]) end end end end when kill with npc.get_race() == pc.getqf("mob_vnum") begin local count = pc.getqf("state") + 1 local table = test.get_table() for i,v in ipairs(table) do if count <= 1 then pc.setqf("state", count) q.set_counter(" يجب قتل ", 1 ) elseif count >= 1 and pc.getqf("limit_time") >= get_time() then say(" fail ") say(" اعد المحاولة بعد ساعة ") pc.setqf("time_retry", get_time()+60*60*1) elseif count == 1 and get_time() < pc.getqf("limit_time") then say(" mbrok exp ") pc.give_exp(v[2]) clear_letter() set_state(__COMPLETE__) end end end end state __COMPLETE__ begin end end u always in away mode ^^ thx <3 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now