LE

Ajuda!talkactions !evento Gold

Por leandroskt8, 06 de fev. de 2012 em Archived

ajuda!talkactions !eventgold
tibia
script
otserv
8
748
leandroskt8L
06 de fevereiro de 2012 às 16:49

O.giflá amigos e colaboradores.

Venho aqui pedir um script que quando good digitasse !evento gold ou /evento gold todos player que tivesse em volta ganhasse,500k o efeito de aria tipo exura gran mas res.

eventgold.jpgE o efect esse numero 27 .

efect.jpg

A intensão e todos player que tiver perto de min ganha 500k no momento que eu acionar o comando. Espero que alguém me ajude.

bepokemonB
06 de fevereiro de 2012 às 18:24

function onSay(cid, words, param)
local range = 1
p = string.explode(param, ',')
if not p[2] then
doPlayerSendCancel(cid, "Not enough params, use: "..words.." itemid, quant.")
return true
end
for _,pid in ipairs(getPlayersOnline()) do
if getDistanceBetween(getThingPos(pid), getThingPos(cid)) <= range then
doPlayerAddItem(pid, p[1], p[2])
doPlayerSendTextMessage(pid, MESSAGE_INFO_DESCR, getCreatureName(cid).." awarded you with "..p[2].." "..p[1]..".")
doSendMagicEffect(getThingPos(pid), 27)
end
end
return true
end

 

Como utilizar: /comando itemid, quantidade

Ele vai dar a quantidade de itemid para os players que tiverem em uma distancia menor ou igual a range.

Editado Fevereiro 6 por Byerne

leoeL
06 de fevereiro de 2012 às 18:39

Byerne sera que tem como fazer

so que para todos que estiverem online e nao precisa esta perto?

rogerioceneR
06 de fevereiro de 2012 às 19:21

EU TENHO 1 SCRIPT AK QUE TA ITEM PARA TODOS OS PLAYERS ONLINE

 

 

 

function onSay(cid, words, param, channel) -- Script by Dubler, written for megaevo.net

local t = string.explode(param, ",")

if t[1] ~= nil and t[2] ~= nil then

local list = {}

for i, tid in ipairs(getPlayersOnline()) do -- Script by Dubler, written for megaevo.net

list = tid

end

for i = 1, #list do

doPlayerAddItem(list,t[1],t[2])

end -- Script by Dubler, written for megaevo.net

doBroadcastMessage(getPlayerName(cid) .. " Presenteou: " .. t[2] .." ".. getItemNameById(t[1]) .. " Para Todos Os Jogadores Online!")

else

doPlayerPopupFYI(cid, "No parm...\nSend:\n /itemadd itemid,how_much_items\nexample:\n /itemadd 2160,10")

end

return true

end -- Script by Dubler, written for megaevo.net

 

DEPOIS VAI NA PASTA TALKACTION XML E COLE ESSA TAG

 

<talkaction log="yes" words="/evento" access="5" event="script" value="additem.lua"/>

DAI VC DIGITA POR EXEMPLO /evento 2160 , 100 (daria 100 crystal coins para todos player online)

OBS : TEM QUE COLOCAR A VIRGULA

leandroskt8L
06 de fevereiro de 2012 às 19:49

function onSay(cid, words, param)

local range = 1

p = string.explode(param, ',')

if not p[2] then

doPlayerSendCancel(cid, "Not enough params, use: "..words.." itemid, quant.")

return true

end

for _,pid in ipairs(getPlayersOnline()) do

if getDistanceBetween(getThingPos(pid), getThingPos(cid)) <= range then

doPlayerAddItem(pid, p[1], p[2])

doPlayerSendTextMessage(pid, MESSAGE_INFO_DESCR, getCreatureName(cid).." awarded you with "..p[2].." "..p[1]..".")

doSendMagicEffect(getThingPos(pid), 27)

end

end

return true

end

teria como pegar mais longe apenas players que ta perto de min que ganha mais vlw muito bom era bem que queria ;) rep+ button_ok.png

 

EU TENHO 1 SCRIPT AK QUE TA ITEM PARA TODOS OS PLAYERS ONLINE

 

 

 

function onSay(cid, words, param, channel) -- Script by Dubler, written for megaevo.net

local t = string.explode(param, ",")

if t[1] ~= nil and t[2] ~= nil then

local list = {}

for i, tid in ipairs(getPlayersOnline()) do -- Script by Dubler, written for megaevo.net

list = tid

end

for i = 1, #list do

doPlayerAddItem(list,t[1],t[2])

end -- Script by Dubler, written for megaevo.net

doBroadcastMessage(getPlayerName(cid) .. " Presenteou: " .. t[2] .." ".. getItemNameById(t[1]) .. " Para Todos Os Jogadores Online!")

else

doPlayerPopupFYI(cid, "No parm...\nSend:\n /itemadd itemid,how_much_items\nexample:\n /itemadd 2160,10")

end

return true

end -- Script by Dubler, written for megaevo.net

 

DEPOIS VAI NA PASTA TALKACTION XML E COLE ESSA TAG

 

<talkaction log="yes" words="/evento" access="5" event="script" value="additem.lua"/>

DAI VC DIGITA POR EXEMPLO /evento 2160 , 100 (daria 100 crystal coins para todos player online)

OBS : TEM QUE COLOCAR A VIRGULA

esse aqui tabem e muito util obg.

rep-1.png

Editado Fevereiro 11 por godleandro

coyotestarkC
07 de fevereiro de 2012 às 00:18

muito bom este script, otimo para eventos como natal.

mas tive que retirar esta parte.

 

else

doPlayerPopupFYI(cid, "No parm...\nSend:\n /itemadd itemid,how_much_items\nexample:\n /itemadd 2160,10")

end

function onSay(cid, words, param, channel) -- Script by Dubler, written for megaevo.net
local t = string.explode(param, ",")
if t[1] ~= nil and t[2] ~= nil then
local list = {}
for i, tid in ipairs(getPlayersOnline()) do -- Script by Dubler, written for megaevo.net
list[i] = tid
end
for i = 1, #list do
doPlayerAddItem(list[i],t[1],t[2])
end -- Script by Dubler, written for megaevo.net
doBroadcastMessage(getPlayerName(cid) .. " Presenteou: " .. t[2] .." ".. getItemNameById(t[1]) .. " Para Todos Os Jogadores Online!")
else
doPlayerPopupFYI(cid, "No parm...\nSend:\n /itemadd itemid,how_much_items\nexample:\n /itemadd 2160,10")
end
return true
end -- Script by Dubler, written for megaevo.net

bepokemonB
07 de fevereiro de 2012 às 15:22

Não entendi pra que ele fez uma tabela list com todos os players online, se já tinha o comando retornando uma tabela exatamente igual ...

leandroskt8L
07 de fevereiro de 2012 às 22:31

Byerne tem como aumentar distancia não tipo exura gran mas res, porque tipow so 8sm que pega queria que pegasse mais 8 .