RaffaeL_RsK

verificare_elixire.lua

Oct 5th, 2019
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.71 KB | None | 0 0
  1. quest check_potions begin
  2.     state start begin
  3.         function potionCheck()
  4.             mapIndex = {63, 113, 114} -- indexul mapei in care actioneaza
  5.             ePot = {
  6.                 72725, 72726, 72727, 72728, 72729, 72730
  7.             }
  8.  
  9.             for m = 1, table.getn(mapIndex), 1 do
  10.                 for p = 1, table.getn(ePot), 1 do
  11.                     if (pc.get_map_index() == mapIndex[m]) then
  12.                         if (pc.count_item(ePot[p]) >=1) then
  13.                         chat("Nu poti intra in aceasta harta cu elixire in inventar")
  14.                         warp_to_village()
  15.                     end
  16.                 end
  17.             end
  18.             return mapIndex, ePot
  19.         end
  20.  
  21.         when login or enter begin
  22.             local t = 5
  23.             loop_timer("pot_check", t)
  24.             check_potions.potionCheck()
  25.         end
  26.         when pot_check.timer begin
  27.             check_potions.potionCheck()
  28.         end
  29.     end
  30. end
Advertisement
Add Comment
Please, Sign In to add comment