Hareketsiz Kalan Oyuncuyu Bayrağa Dönüştürme

1/15/2016
Oyununuzda hareketsiz kalan, AFK olarak tabir ettiğimiz oyuncuları kendi krallığının bayrağına otomatik olarak dönüşmesini sağlayabilirsiniz.

Bayraklar

Krallık Kod
Shinsoo 20035
Chunjo 20037
Jinno 20036
AFK.quest

 quest afk begin
 state start begin
  when login begin
  local nomove_time = 60*30 -- Dönüşmeden önce geçmesi gereken süre
  loop_timer("nomove",nomove_time)
  pc.setqf("x_coord",pc.get_x())
  pc.setqf("y_coord",pc.get_y())
  pc.setqf("polymorphed",0)
  end
  
  when nomove.timer begin
   if pc.getqf("polymorphed") == 1 then
   pc.setqf("polymorphed",0)
   return
   end
   if pc.getqf("x_coord") == pc.get_x() and pc.getqf("y_coord") == pc.get_y() then
    if afk.check() != false then
     if pc.get_empire() == 1 then
     pc.polymorph(20035,100000)
     elseif pc.get_empire() == 2 then
     pc.polymorph(20037,100000)
     elseif pc.get_empire() == 3 then
     pc.polymorph(20036,100000)
     end
                say_title("Yönetim:")   
                say("Oyunda 30 dakikadan uzun bir süre,")   
                say("hareketsiz kaldığınız için AFK")  
                say("bayrağına dönüştünüz.")  
                say_reward("Bilgi:") 
                say_reward("Oyuna dönmek için devam'a tıklayın.") 
                say_reward("") 
    pc.setqf("polymorphed",1)
    wait()
    pc.remove_polymorph()
    end
   else
   pc.setqf("x_coord",pc.get_x())
   pc.setqf("y_coord",pc.get_y())
   end
  end
  
  function check()
  local mapx = {4,5,24,25,44,45,61,62,63,64,65,66,67,68,69,70,71,72,73,104,108,109,112,113,203,208,212,216,217,301,302,303,304,351,352} -- Yasaklı haritalar
   for i=1, table.getn(mapx) do
    if pc.get_map_index() == mapx[i] then
    return false
    end
   end
   if pc.is_dead() or pc.is_mount() or pc.is_polymorphed() or pc.in_dungeon() then
   return false
   end
  end
  
   
  when logout or disconnect begin
  pc.remove_polymorph()
  end
 end
end 
Kod Açıklama
local nomove_time = 60*30 Geçmesi gereken süre 30 dakikadır
if pc.get_empire() == 1 then Shinsoo krallığıdır
if pc.get_empire() == 2 then Chunjo krallığıdır
if pc.get_empire() == 3 then Jinno krallığıdır
local mapx Dönüşmesi engelli harita kodları

Arama Etiketi: metin2 afk quest

Uğur 23, Ankara

Benzer Yazılar