Ir para conteúdo

Featured Replies

  • Respostas 7
  • Visualizações 584
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Se eu entendi bem o que você quer... Em actions/scripts, crie um arquivo:   treemonster.lua     Em actions.xml: <action actionid="ACTION_ID_DA_ARVORE" script="treemo

  • @bismarkzika    

Postado
  • Autor
17 horas atrás, Dwarfer disse:

Se configurar corretamente, vai funcionar. Observe se tá colocando o actionid correto na árvore e na tag.

em vez de:

<action actionid="ACTION_ID_DA_ARVORE" script="treemonster.lua" />

Coloquei:

<action itemid="ACTION_ID_DA_ARVORE" event="script" value="treemonster.lua"/>, e funcionou tem alguma forma de colocar 1 exaust no tempo q ele pode bater exemplo: Eu bati na arvore dps de 30seg eu posso bater novamente.

 

Postado
  • Solução

@bismarkzika

 

Spoiler

local tempo = 30 -- tempo em segundos

local monsters = {
    [80] = {"Dwarf", "Rotworm", "Orc"}, --[chance] = {para cair um dos monstros}
    [60] = {"Dwarf Soldier", "Elf Scout", "Tarantula"},
    [50] = {"Dwarf Guard", "Cyclops Drone", "Cyclops Smith"},
    [40] = {"Dwarf Geomancer", "Cyclops Smith", "Elf Arcanist"},
    [30] = {"Axeitus Headbanger", "Dragon", "Frost Dragon Hatchling"},
    [10] = {"Foreman Kneebiter", "Dragon Lord", "Giant Spider"}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, 23491) >= os.time() then
    doPlayerSendCancel(cid, "You must wait " .. tempo .. " to use again.")
    doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
    return true
end
local e = {2,3,4,5,6,9}
local t = {}
for _, v in pairs(monsters) do 
table.insert(t, _)
end
table.sort(t)
for _, v in pairs(t) do
if math.random(1, 100) < v then
c = v
break
end
end
local m = monsters[c][math.random(1,#monsters[c])]
local monster = doCreateMonster(m, getPlayerPosition(cid))
doSendMagicEffect(getCreaturePosition(monster), CONST_ME_TELEPORT)
doSendMagicEffect(toPosition, e[math.random(1,#e)])
doCreatureSay(monster, m.." was hidden on top of the tree! HAHAHA!", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 23491, tempo + os.time())
return true
end

 

 

Contato:

 

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo