Gente, quero colocar para apenas quem tiver um determinado item na backpack pode usar a talkaction .
Qual função devo colocar ?
Obrigado
Gente, quero colocar para apenas quem tiver um determinado item na backpack pode usar a talkaction .
Qual função devo colocar ?
Obrigado
Me ajudo? Dou rep+
[*]---------[*]----------[*]
Te ajudei ? De rep+
if getPlayerItemCount(cid, 1111) >= 1 then
seria isso?
"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬
"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein
-- Script by LuckOake
function onSay(cid, words, param)
local waittime = 10 -- Tempo de exhaustion
local storage = 6853
ppos = getCreaturePosition(cid)
parea1 = {x=ppos.x-7, y=ppos.y-5, z=ppos.z}
parea2 = {x=ppos.x+7, y=ppos.y+5, z=ppos.z}
level = 1 -- Level que o player necessita para usar a talk
item = 6578
if getPlayerLevel(cid) < level then
doPlayerSendCancel(cid, "Você precisa de level "..level.." para usar essa magia.") return true
elseif isVip(cid) == FALSE then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "você precisa ser vip.") return true
end
if getPlayerItemCount(cid, item) >= 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você precisa do item xxxx na sua backpack para usar essa magia.")
return true
end
if exhaustion.check(cid, storage) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. exhaustion.get(cid, storage) .. " segundos para usar a spell novamente.")
return true
end
for _, pid in ipairs(getPlayersOnline()) do
if isInArea(getCreaturePosition(pid), parea1, parea2) then
if getPlayerAccess(pid) <= 2 then
doCreatureSetNoMove(pid, true)
doSendMagicEffect(getCreaturePosition(pid), 30)
setPlayerStorageValue(pid, 1634, 1)
addEvent(setPlayerStorageValue, 1000, pid, 1634, -1)
doCreatureSay(pid, "*time stopped*", TALKTYPE_MONSTER)
addEvent(doCreatureSay, 1000, pid, "*time is back to normal*", TALKTYPE_MONSTER)
addEvent(doCreatureSetNoMove, 1000, pid, false)
else
end
end
end
doCreatureSetNoMove(cid, false)
exhaustion.set(cid, storage, waittime)
doCreatureSay(cid, "stop time", TALKTYPE_MONSTER)
return true
end
Eu add ele no script mas ta dando efeito ao contrario ele usa sem o item e quando ta com o item nao pode usar a talk
OBS: Sou noob em script devo ter feito errado =)
Me ajudo? Dou rep+
[*]---------[*]----------[*]
Te ajudei ? De rep+
troca o >= 1 para <= 0... pensei q ia usar de outra maneira ^^
"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬
"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein
Funfo certinho brigadao
Me ajudo? Dou rep+
[*]---------[*]----------[*]
Te ajudei ? De rep+
sanado, movido
"Só a beira do abismo que os seres humanos acham forças para mudar."... E isso me da nojo... ¬¬
"Insanity is doing the exact... same fucking thing... over and over again expecting... shit to change... That. Is. Crazy." -Vass/Einstein