Postado Junho 1, 2017 8 anos function onUse(cid, item, item2, topos, frompos) local config = { time = 2, -- Tempo em minutos para usar novamente level = 1, -- Level minimo para dar USE storage = 42007, -- Não Altere Isso efeito = 28 -- Efeito que vai fazer } local monsters = {"Demon", "Minotaur", "orc"} -- Adicionar monstros aqui. O ultimo não pode ter virgula! if getPlayerLevel(cid) <= config.level then return doPlayerSendCancel(cid, "You do not have enough level to use this.") end if getPlayerStorageValue(cid, config.storage) > os.time() then local minutes = (math.ceil((getPlayerStorageValue(cid, config.storage) - os.time())/60)) local s = (math.ceil(((getPlayerStorageValue(cid, config.storage) - os.time())/60)) == 1 and "" or "s") return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Wait ".. minutes .." minute".. s .." to use again.") end pos = getThingPos(cid) doSendMagicEffect(pos, config.efeito) setPlayerStorageValue(cid, config.storage, config.time * 60 + os.time()) for i=1, math.random(1, 3) do doCreateMonster(monsters[math.random(1,#monsters)], getThingPos(cid)) end return true end Vê se funfa...
Postado Junho 1, 2017 8 anos Autor 44 minutos atrás, Weslley Kiyo disse: function onUse(cid, item, item2, topos, frompos) local config = { time = 2, -- Tempo em minutos para usar novamente level = 1, -- Level minimo para dar USE storage = 42007, -- Não Altere Isso efeito = 28 -- Efeito que vai fazer } local monsters = {"Demon", "Minotaur", "orc"} -- Adicionar monstros aqui. O ultimo não pode ter virgula! if getPlayerLevel(cid) <= config.level then return doPlayerSendCancel(cid, "You do not have enough level to use this.") end if getPlayerStorageValue(cid, config.storage) > os.time() then local minutes = (math.ceil((getPlayerStorageValue(cid, config.storage) - os.time())/60)) local s = (math.ceil(((getPlayerStorageValue(cid, config.storage) - os.time())/60)) == 1 and "" or "s") return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Wait ".. minutes .." minute".. s .." to use again.") end pos = getThingPos(cid) doSendMagicEffect(pos, config.efeito) setPlayerStorageValue(cid, config.storage, config.time * 60 + os.time()) for i=1, math.random(1, 3) do doCreateMonster(monsters[math.random(1,#monsters)], getThingPos(cid)) end return true end Vê se funfa... Apareceu isso data/actions/scripts/arvore.lua:onUse data/actions/scripts/arvore.lua:25: attempt to call global 'doCreateMonster' (a nil value) stack traceback: [C]: in function 'doCreateMonster' data/actions/scripts/arvore.lua:25: in function <data/actions/scripts/arvore.lua:1>
Postado Junho 1, 2017 8 anos function onUse(cid, item, item2, topos, frompos) local config = { time = 2, -- Tempo em minutos para usar novamente level = 1, -- Level minimo para dar USE storage = 42007, -- Não Altere Isso efeito = 28 -- Efeito que vai fazer } local monsters = {"Demon", "Minotaur", "orc"} -- Adicionar monstros aqui. O ultimo não pode ter virgula! if getPlayerLevel(cid) <= config.level then return doPlayerSendCancel(cid, "You do not have enough level to use this.") end if getPlayerStorageValue(cid, config.storage) > os.time() then local minutes = (math.ceil((getPlayerStorageValue(cid, config.storage) - os.time())/60)) local s = (math.ceil(((getPlayerStorageValue(cid, config.storage) - os.time())/60)) == 1 and "" or "s") return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Wait ".. minutes .." minute".. s .." to use again.") end pos = getThingPos(cid) doSendMagicEffect(pos, config.efeito) setPlayerStorageValue(cid, config.storage, config.time * 60 + os.time()) for i=1, math.random(1, 3) do doSummonMonster(monsters[math.random(1,#monsters)], getThingPos(cid)) end return true end Ou function onUse(cid, item, item2, topos, frompos) local config = { time = 2, -- Tempo em minutos para usar novamente level = 1, -- Level minimo para dar USE storage = 42007, -- Não Altere Isso efeito = 28 -- Efeito que vai fazer } local monsters = {"Demon", "Minotaur", "orc"} -- Adicionar monstros aqui. O ultimo não pode ter virgula! if getPlayerLevel(cid) <= config.level then return doPlayerSendCancel(cid, "You do not have enough level to use this.") end if getPlayerStorageValue(cid, config.storage) > os.time() then local minutes = (math.ceil((getPlayerStorageValue(cid, config.storage) - os.time())/60)) local s = (math.ceil(((getPlayerStorageValue(cid, config.storage) - os.time())/60)) == 1 and "" or "s") return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Wait ".. minutes .." minute".. s .." to use again.") end pos = getThingPos(cid) doSendMagicEffect(pos, config.efeito) setPlayerStorageValue(cid, config.storage, config.time * 60 + os.time()) for i=1, math.random(1, 3) do doCreateMonster(monsters[math.random(1,#monsters)], topos) end return true end ou function onUse(cid, item, item2, topos, frompos) local config = { time = 2, -- Tempo em minutos para usar novamente level = 1, -- Level minimo para dar USE storage = 42007, -- Não Altere Isso efeito = 28 -- Efeito que vai fazer } local monsters = {"Demon", "Minotaur", "orc"} -- Adicionar monstros aqui. O ultimo não pode ter virgula! if getPlayerLevel(cid) <= config.level then return doPlayerSendCancel(cid, "You do not have enough level to use this.") end if getPlayerStorageValue(cid, config.storage) > os.time() then local minutes = (math.ceil((getPlayerStorageValue(cid, config.storage) - os.time())/60)) local s = (math.ceil(((getPlayerStorageValue(cid, config.storage) - os.time())/60)) == 1 and "" or "s") return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Wait ".. minutes .." minute".. s .." to use again.") end pos = getThingPos(cid) doSendMagicEffect(pos, config.efeito) setPlayerStorageValue(cid, config.storage, config.time * 60 + os.time()) for i=1, math.random(1, 3) do doSummonMonster(monsters[math.random(1,#monsters)], topos) end return true end
Postado Junho 1, 2017 8 anos Autor @Weslley Kiyo Testei os 3 man na ordem... e surgio erro nos 3 : Lua Script Error: [Action Interface] data/actions/scripts/arvore.lua:onUse data/actions/scripts/arvore.lua:25: attempt to call global 'doSummonMonster' (a nil value) stack traceback: [C]: in function 'doSummonMonster' data/actions/scripts/arvore.lua:25: in function <data/actions/scripts/arvore.lua:1> Lua Script Error: [Action Interface] data/actions/scripts/arvore.lua:onUse data/actions/scripts/arvore.lua:25: attempt to call global 'doCreateMonster' (a nil value) stack traceback: [C]: in function 'doCreateMonster' data/actions/scripts/arvore.lua:25: in function <data/actions/scripts/arvore.lua:1> Lua Script Error: [Action Interface] data/actions/scripts/arvore.lua:onUse data/actions/scripts/arvore.lua:25: attempt to call global 'doSummonMonster' (a nil value) stack traceback: [C]: in function 'doSummonMonster' data/actions/scripts/arvore.lua:25: in function <data/actions/scripts/arvore.lua:1> 5 horas atrás, Weslley Kiyo disse: function onUse(cid, item, item2, topos, frompos) local config = { time = 2, -- Tempo em minutos para usar novamente level = 1, -- Level minimo para dar USE storage = 42007, -- Não Altere Isso efeito = 28 -- Efeito que vai fazer } local monsters = {"Demon", "Minotaur", "orc"} -- Adicionar monstros aqui. O ultimo não pode ter virgula! if getPlayerLevel(cid) <= config.level then return doPlayerSendCancel(cid, "You do not have enough level to use this.") end if getPlayerStorageValue(cid, config.storage) > os.time() then local minutes = (math.ceil((getPlayerStorageValue(cid, config.storage) - os.time())/60)) local s = (math.ceil(((getPlayerStorageValue(cid, config.storage) - os.time())/60)) == 1 and "" or "s") return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Wait ".. minutes .." minute".. s .." to use again.") end pos = getThingPos(cid) doSendMagicEffect(pos, config.efeito) setPlayerStorageValue(cid, config.storage, config.time * 60 + os.time()) for i=1, math.random(1, 3) do doSummonMonster(monsters[math.random(1,#monsters)], getThingPos(cid)) end return true end Ou function onUse(cid, item, item2, topos, frompos) local config = { time = 2, -- Tempo em minutos para usar novamente level = 1, -- Level minimo para dar USE storage = 42007, -- Não Altere Isso efeito = 28 -- Efeito que vai fazer } local monsters = {"Demon", "Minotaur", "orc"} -- Adicionar monstros aqui. O ultimo não pode ter virgula! if getPlayerLevel(cid) <= config.level then return doPlayerSendCancel(cid, "You do not have enough level to use this.") end if getPlayerStorageValue(cid, config.storage) > os.time() then local minutes = (math.ceil((getPlayerStorageValue(cid, config.storage) - os.time())/60)) local s = (math.ceil(((getPlayerStorageValue(cid, config.storage) - os.time())/60)) == 1 and "" or "s") return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Wait ".. minutes .." minute".. s .." to use again.") end pos = getThingPos(cid) doSendMagicEffect(pos, config.efeito) setPlayerStorageValue(cid, config.storage, config.time * 60 + os.time()) for i=1, math.random(1, 3) do doCreateMonster(monsters[math.random(1,#monsters)], topos) end return true end ou function onUse(cid, item, item2, topos, frompos) local config = { time = 2, -- Tempo em minutos para usar novamente level = 1, -- Level minimo para dar USE storage = 42007, -- Não Altere Isso efeito = 28 -- Efeito que vai fazer } local monsters = {"Demon", "Minotaur", "orc"} -- Adicionar monstros aqui. O ultimo não pode ter virgula! if getPlayerLevel(cid) <= config.level then return doPlayerSendCancel(cid, "You do not have enough level to use this.") end if getPlayerStorageValue(cid, config.storage) > os.time() then local minutes = (math.ceil((getPlayerStorageValue(cid, config.storage) - os.time())/60)) local s = (math.ceil(((getPlayerStorageValue(cid, config.storage) - os.time())/60)) == 1 and "" or "s") return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Wait ".. minutes .." minute".. s .." to use again.") end pos = getThingPos(cid) doSendMagicEffect(pos, config.efeito) setPlayerStorageValue(cid, config.storage, config.time * 60 + os.time()) for i=1, math.random(1, 3) do doSummonMonster(monsters[math.random(1,#monsters)], topos) end return true end
Postado Junho 1, 2017 8 anos function onUse(cid, item, item2, topos, frompos) local config = { time = 2, -- Tempo em minutos para usar novamente level = 1, -- Level minimo para dar USE storage = 42007, -- Não Altere Isso efeito = 28 -- Efeito que vai fazer } local monsters = {{"Demon", 3}, {"Minotaur", 3}, {"orc", 3}} -- Adicionar monstros aqui. O ultimo não pode ter virgula! local array = {} -- não mecha aqui if getPlayerLevel(cid) <= config.level then return doPlayerSendCancel(cid, "You do not have enough level to use this.") end if getPlayerStorageValue(cid, config.storage) > os.time() then local minutes = (math.ceil((getPlayerStorageValue(cid, config.storage) - os.time())/60)) local s = (math.ceil(((getPlayerStorageValue(cid, config.storage) - os.time())/60)) == 1 and "" or "s") return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Wait ".. minutes .." minute".. s .." to use again.") end pos = getThingPos(cid) doSendMagicEffect(pos, config.efeito) setPlayerStorageValue(cid, config.storage, config.time * 60 + os.time()) local rand = array[math.random(#array)] for j = 1, rand[2] do doCreateMonster(rand[1], getClosestFreeTile(cid, frompos)) end return true end Agora vai, eu confio no coração das cartas huewhuehwu OBS: desculpa, é pq ontem e hoje ando ocupado por isso não tenho como testa-los aqui.
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.