function onSay(cid, words, param, channel)
if channel == x then
...
end
return true
end
Talkaction Que So Funciona Em Determinado Channel
Por Diley007, 19 de jul. de 2012 em Scripts
info
Grupo: Artesão
Registrado: 17/01/12
Posts: 137
Reputação: -1
Char no Tibia: Nao Tenho

function onSay(cid, words, param, channel) if channel == x then ... end return true end
tem como voce colocar pra mim nesse script
function onSay(cid, words)
item = 2148
quantidade = 1
local storage = 5555555
if getPlayerStorageValue(cid, storage) >= 1 then
return true
else
setPlayerStorageValue(cid, storage, 1)
end
doPlayerAddItem(cid, item, quantidade)
return true
end
local t = {
item = 2148,
quantidade = 1,
storage = 5555555
}
function onSay(cid, words, param, channel)
if channel == CHANNEL_HELP then
if getPlayerStorageValue(cid, t.storage) >= 1 then
doPlayerSendCancel(cid, "Você já pegou seu item.")
else
doPlayerAddItem(cid, t.item, t.quantidade)
setPlayerStorageValue(cid, t.storage, 1)
doPlayerSendTextMessage(cid, 22, "Você ganhou ".. t.quantidade .." ".. getItemNameById(t.item) ..".")
end
else
doPlayerSendTextMessage(cid, 22, "Você só pode usar este comando no Help.")
end
return true
end
Ali está para falar só no HELP, troque pelo que você quer.
Editado Julho 20 por Leoxtibia
info
Grupo: Artesão
Registrado: 17/01/12
Posts: 137
Reputação: -1
Char no Tibia: Nao Tenho

local t = { item = 2148, quantidade = 1, storage = 5555555 } function onSay(cid, words, param, channel) if channel == CHANNEL_HELP then if getPlayerStorageValue(cid, t.storage) >= 1 then doPlayerSendCancel(cid, "Você já pegou seu item.") else doPlayerAddItem(cid, t.item, t.quantidade) setPlayerStorageValue(cid, t.storage, 1) doPlayerSendTextMessage(cid, 22, "Você ganhou ".. t.quantidade .." ".. getItemNameById(t.item) ..".") end else doPlayerSendTextMessage(cid, 22, "Você só pode usar este comando no Help.") end return true end
Ali está para falar só no HELP, troque pelo que você quer.
nao deu certo...
e tipo testei no help, ai aparece que voce ganhou o item mas nao deu o item, ele nao aparece na bag
Editado Julho 20 por Diley007
Então você deve ter feito algo errado, testei aqui e funcionou. Deixa eu ver seu script e sua tag.
info
Grupo: Artesão
Registrado: 17/01/12
Posts: 137
Reputação: -1
Char no Tibia: Nao Tenho

Então você deve ter feito algo errado, testei aqui e funcionou. Deixa eu ver seu script e sua tag.
deu deu, pode deixar vlw aeee....
aff ou so mais tarde que posso da REP+, mais vai ser sem falta...
Editado Julho 20 por Diley007




info
Grupo: Artesão
Registrado: 17/01/12
Posts: 137
Reputação: -1
Char no Tibia: Nao Tenho
quero uma talkaction que so funciona em determinado channel, e possivel ne ?
REP+
Editado Julho 19 por Diley007