Postado Agosto 15, 2015 9 anos Video Demonstração https://www.youtube.com/watch?v=U26l7CZtwGk Instalando Crie um arquivo chamado rob.lua na pasta actions e coloque: local money = {} local player = {} local position = {} local config = { corpseId = 3058, -- Item Id timee = 6000 -- Seconds } local function allowMovement(cid) if not isPlayer(cid) then return end doCreatureSetNoMove(cid, false) end local function stealMoney(cid) position = getDistanceBetween(getPlayerPosition(player), getPlayerPosition(cid)) if position < 2 then doPlayerRemoveMoney(cid, money) doPlayerAddMoney(player, money) doPlayerSendTextMessage(player,MESSAGE_INFO_DESCR,"Você roubou "..money.." gold!") doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'VOCÊ ACABA DE SER ROUBADO!') else doPlayerSendTextMessage(player,MESSAGE_INFO_DESCR,"Roubo cancelado.") end end function onUse(cid, item, fromPosition, itemEx, toPosition) if isPlayer(itemEx.uid) then doSetItemOutfit(itemEx.uid, config.corpseId, config.timee) doCreatureSetNoMove(itemEx.uid, true) addEvent(allowMovement, config.timee, itemEx.uid) money = getPlayerMoney(itemEx.uid) player = cid doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,'Roubando...') doPlayerSendTextMessage(itemEx.uid,MESSAGE_INFO_DESCR,'Você foi nocauteado!') addEvent(stealMoney, config.timee-3000, itemEx.uid) end return true end actions.xml <action itemid="2411" event="script" value="rob.lua"/> Créditos CandleJack Editado Dezembro 7, 2015 9 anos por Azhaurn (veja o histórico de edições)
Postado Agosto 15, 2015 9 anos Tópico aprovado, obrigado por comaprtilhar. Este tópico foi movido: Para: "OTServ → Scripting → Actions e TalkActions" STYLLER OT 2022
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.