vamos la script funfando 99% perfect
intao vamos começar...
abra o actions.xml pelo bloco de notas e ache "-- Others" e adicione os scripts assim
-- Others <action itemid="5792" script="dice.lua" /> <action itemid="5794" script="dice2.lua" /> <action itemid="5793" script="dice1.lua" /> <action itemid="5796" script="dice4.lua" /> <action itemid="5795" script="dice3.lua" /> <action itemid="5797" script="dice5.lua" />
<_<
agora crie 6 arquivos lua e renomeia assim " dice.lua " , " dice2.lua " , " dice1.lua ", " dice4.lua " , "dice3.lua " , dice5.lua "
vo mandar por ordem
dice.lua
--Action by Sequeled-- function onUse(cid, item, frompos, item2, topos) if getPlayerAccess(cid) < 6 then lol = math.random(206,207) doSendAnimatedText(getPlayerPosition(cid), "Rolled 5", lol) doSendMagicEffect(frompos, 26) else doPlayerAddHealth(cid,-200) end doTransformItem(item.uid,item.itemid+1) return 0 end
pronto o primeiro falta 5 ainda
dice1.lua
--Action by Sequeled-- function onUse(cid, item, frompos, item2, topos) if getPlayerAccess(cid) < 6 then lol = math.random(206,207) doSendAnimatedText(getPlayerPosition(cid), "Rolled 6", lol) doSendMagicEffect(frompos, 26) else doPlayerAddHealth(cid,-200) end doTransformItem(item.uid,item.itemid+1) return 0 end
dice2.lua
--Action by Sequeled-- function onUse(cid, item, frompos, item2, topos) if getPlayerAccess(cid) < 6 then lol = math.random(206,207) doSendAnimatedText(getPlayerPosition(cid), "Rolled 2", lol) doSendMagicEffect(frompos, 26) else doPlayerAddHealth(cid,-200) end doTransformItem(item.uid,item.itemid+1) return 0 end
dice3.lua
--Action by Sequeled-- function onUse(cid, item, frompos, item2, topos) if getPlayerAccess(cid) < 6 then lol = math.random(206,207) doSendAnimatedText(getPlayerPosition(cid), "Rolled 4", lol) doSendMagicEffect(frompos, 26) else doPlayerAddHealth(cid,-200) end doTransformItem(item.uid,item.itemid+1) return 0 end
dice4.lua
--Action by Sequeled-- function onUse(cid, item, frompos, item2, topos) if getPlayerAccess(cid) < 6 then lol = math.random(206,207) doSendAnimatedText(getPlayerPosition(cid), "Rolled 3", lol) doSendMagicEffect(frompos, 26) else doPlayerAddHealth(cid,-200) end doTransformItem(item.uid,item.itemid+1) return 0 end
dice5.lua
--Action by Sequeled-- function onUse(cid, item, frompos, item2, topos) if getPlayerAccess(cid) < 6 then lol = math.random(206,207) doSendAnimatedText(getPlayerPosition(cid), "Rolled 1", lol) doSendMagicEffect(frompos, 26) else doPlayerAddHealth(cid,-200) end doTransformItem(item.uid,item.itemid-5) return 1 end
Não copiem fora de ordem se não o script não funcionara!!!!
depois é só fazer com o gm /n dice 1
espero q gostem comentem ae flws