Boa noite galera,
Atualmente estou desenvolvendo um OT Global 8.6 e tava procurando se alguem possuía algum script pronto do Demon Oak. Bom, achei, no entanto, eles não estão funcionando (são mais do que um), mesmo assim não acusa erro no console, portanto imagino que o script esteja correto, no entanto, parece que não está.
O primeiro, o mais importante, é este movement, que deveria adicionar um Storage ao player e fazer o Demon Oak gritar assim que o player pisasse nos tiles.
demonOakSquares.lua
local voices = {
'Release me and you will be rewarded greatefully!',
'What is this? Demon Legs lying here? Someone might have lost them!',
'I\'m trapped, come here and free me fast!!',
'I can bring your beloved back from the dead, just release me!',
'What a nice shiny golden armor. Come to me and you can have it!',
'Find a way in here and release me! Pleeeease hurry!',
'You can have my demon set, if you help me get out of here!'
}
local startUid = 9000
function onStepIn(cid, item, position, fromPosition)
local player = isPlayer(cid)
if not player then
return true
end
local status = math.max(getPlayerStorageValue(cid,Storage.DemonOak.Squares), 0)
if item.uid - startUid == status + 1 then
setPlayerStorageValue(cid, Storage.DemonOak.Squares, status + 1)
doCreatureSayWithRadius(cid, voices[math.random(#voices)], TALKTYPE_MONSTER_YELL, false, player, DEMON_OAK_POSITION)
end
return true
end
Este é a parte do movements.xml em que o código esta definido, os UIDs são os que estao definidos nos tiles do jogo.
<movevent event="StepIn" fromuid="9001" touid="9005" script="demonOakSquares.lua" />
Agradeço qualquer ajuda. Estou usando TFS 0.3.6 (Crying Damson V8)