JU
pedido

Action De Baú

Por juniinhocadete, 14 de ago. de 2012 em Scripts

5
814
14 de agosto de 2012 às 18:52

Preciso de um action de baú que mim de : 1kk de experiencia, de 1kk a 5kk de gold, e me teletransporte pro templo, e que seja possivel fazer a quest sempre.

e quando você abrisse o baú apecer 1 mensagem para todo servidor : o player 'seunome' completou castle.

AJUDA = REP+

LuckOakeL
14 de agosto de 2012 às 19:17

actions.xml:

 

<action actionid="xxxx" script="castlechest.lua.lua"/>

 

Substitua o xxxx pelo action id que desejar.

 

castlechest.lua:

 

function onUse(cid, item)

min = 1000000 -- Mínimo de gold que o player irá ganhar

max = 5000000 -- Máximo de gold que o player irá ganhar

town = getTownTemplePosition(getPlayerTown(cid))

 

doPlayerAddItem(cid, 2149, math.random(min, max))

doPlayerAddExp(cid,1000000)

doTeleportThing(cid, town)

broadcastMessage(""..getCreatureName(cid).." completou o castle!")

return true

end

 

Editado Agosto 14 por LuckOake

14 de agosto de 2012 às 20:33

actions.xml:

 

<action actionid="xxxx" script="castlechest.lua.lua"/>

 

Substitua o xxxx pelo action id que desejar.

 

castlechest.lua:

 

function onUse(cid, item)

min = 1000000 -- Mínimo de gold que o player irá ganhar

max = 5000000 -- Máximo de gold que o player irá ganhar

town = getTownTemplePosition(getPlayerTown(cid))

 

doPlayerAddItem(cid, 2149, math.random(min, max))

doPlayerAddExp(cid,1000000)

doTeleportThing(cid, town)

broadcastMessage(""..getCreatureName(cid).." completou o castle!")

return true

end

 

 

 

Mnw, quando eu cliko no baú tomo debug :/

LuckOakeL
14 de agosto de 2012 às 20:38

Desculpe, erro meu.

 

 

function onUse(cid, item)

min = 1000000 -- Mínimo de gold que o player irá ganhar

max = 5000000 -- Máximo de gold que o player irá ganhar

town = getTownTemplePosition(getPlayerTown(cid))

 

doPlayerAddItem(cid, 2149, math.random(min, max))

doPlayerAddExp(cid,1000000)

doTeleportThing(cid, town)

broadcastMessage(""..getCreatureName(cid).." completou o castle!", MESSAGE_STATUS_WARNING)

return true

end

 

Editado Agosto 14 por LuckOake

14 de agosto de 2012 às 23:05

Desculpe, erro meu.

 

 

function onUse(cid, item)

min = 1000000 -- Mínimo de gold que o player irá ganhar

max = 5000000 -- Máximo de gold que o player irá ganhar

town = getTownTemplePosition(getPlayerTown(cid))

 

doPlayerAddItem(cid, 2149, math.random(min, max))

doPlayerAddExp(cid,1000000)

doTeleportThing(cid, town)

broadcastMessage(""..getCreatureName(cid).." completou o castle!", MESSAGE_STATUS_WARNING)

return true

end

 

 

Vlw ae cara, funcionou :]

To sem REP, amanhã bem cedinho te dou teu REP+

Abraços :D