exclusivo para o XTibia
denunciar se aparecer em outro forum
Pra quem não sabe , a Voodoo Skull é uma caveira que diz a "sorte" do dia.
Uma "sorte" que na realidade é mais uma piada do que sorte mesmo.
primeiro precisamos acertar o item voodoo skull
editar o arquivo data\items\items.xml
<item id="5669" name="voodoo skull"> <attribute key="weight" value="1000"/> </item> <item id="5670" name="voodoo skull"> <attribute key="weight" value="1000"/> <attribute key="decayTo" value="5669"/> <attribute key="duration" value="3600"/> </item>
duration value="3600" = 1 hora (3600 segundos)
No Tibia Geral o tempo da previsão é 1 dia.
incluir a chamada do script em data\actions\actions.xml
<action itemid="5669" script="Voodoo_Skull.lua" /> <action itemid="5670" script="Voodoo_Skull.lua" />
e finalmente o script em data\actions\scripts\Voodoo_Skull.lua
-- Voodoo Skull - Le uma Sorte (By Conde Sapo) function onUse(cid, item, frompos, item2, topos) if item.itemid == 5669 then rand = math.random(1, 9) if rand == 1 then doPlayerSay(cid, "It's not winning that matters, but winning in style." ,16) elseif rand == 2 then doPlayerSay(cid, "Today's your lucky day. Probably." ,16) elseif rand == 3 then doPlayerSay(cid, "Do not meddle in the affairs of dragons, for you are crunchy and taste good with ketchup.",16) elseif rand == 4 then doPlayerSay(cid,"That is one stupid question." ,16) elseif rand == 5 then doPlayerSay(cid, "You'll need more rum for that.",16) elseif rand == 6 then doPlayerSay(cid, "Do or do not. There is no try." ,16) elseif rand == 7 then doPlayerSay(cid, "You should do something you always wanted to." ,16) elseif rand == 8 then doPlayerSay(cid, "Never say 'Oops', always say 'Ah, interesting!'" ,16) elseif rand == 9 then doPlayerSay(cid, "If you walk under a ladder and it falls down on you it probably means bad luck.",16) end doSendMagicEffect(cid, frompos, 1) doTransformItem(item.uid, 5670) else doPlayerSendTextMessage(cid,16,"It's not time yet.") -- Cor Verde doPlayerSendCancel(cid,"It's not time yet.") end doDecayItem(item.uid) return 1 end
O Item que vai prever a "sorte" é 5669
Dando o use nesse item , ele diz uma "sorte" aleatoria e transforma no item 5670 (Decay de 1 hora)
Se clicar no item 5670 só vem a mensagem "It's not time yet." (não é a hora ainda)
Após 1 hora o item 5670 se transforma de novo no item 5669 e permite uma nova "sorte"
Ps1.: Essas são as previsões de "sorte" originais.
Substituir a gosto.
Ps2.:
doPlayerSendTextMessage(cid,16,"It's not time yet.") -- Cor Verde doPlayerSendCancel(cid,"It's not time yet.")
Não há necessidade das 2 mensagens. Pode-se optar por apenas 1 delas.
Divirtam-se com as previsões.