Postado Abril 2, 2017 8 anos globalevent Spoiler local ws = { pos = {x = 10160, y = 10054, z = 7}, day = {"Saturday", "Sunday"}, tim = 10 -- tempo em minutos que o bau fica no mapa } function removeChest(ws) local t = getTileItemById(ws.pos, 1740).uid if t then doRemoveItem(t, 1) doSendMagicEffect(ws.pos, CONST_ME_POFF) end end function onTime() local x = os.date("%A") if isInArray(ws.day, x) then local tp = doCreateItem(1740, 1, ws.pos) doItemSetAttribute(tp, "aid", 123123) addEvent(removeChest, ws.tim * 60 * 1000, ch) end return true end actions Spoiler local i = { [1] = {id = 9980, c = 5}, [2] = {id = 9941, c = 5}, [3] = {id = 11249, c = 2}, [4] = {id = 6570, c = 1}, [5] = {id = 6571, c = 1} } local st = 1212123 function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, st) <= 0 then a = math.random(1, #i) for c , info in pairs(i) do doPlayerAddItem(cid, i[a].id, i[a].c) doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) doPlayerSendTextMessage(cid,22,"You received "..info.c.." " .. getItemNameById(info.id) .. ".") setPlayerStorageValue(cid, st, os.time() + 1 * 24 * 60 * 1000) end else doPlayerSendCancel(cid, "Sorry, you can get the rewards just once by day.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end return true end GitHub: https://github.com/s3kk Conteúdo: [SERVER] Heromassa[GESIOR] Gesior 2012 modificado por Sekk[GESIOR] Shop Addons & Mounts - TFS 1.x[GESIOR] Outfitter para Characters e Rank[SISTEMA] Castle 24h[TALKACTION] Multi Element Wand[ACTION] Multi Elemental Arrow & Shield[PROGRAMAÇÃO] Compilar TFS 0.4 no Linux[PROGRAMAÇÃO] Compilando TFS 0.4 no MSVC(x64 e x32) [INFRAESTRUTURA] Configuração COMPLETA Google VM + Tibia 11.x
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.