ZM

[Talkaction] Vale Rep+

Por Zmovir, 07 de mar. de 2012 em Archived

script
3
492
ZmovirZ
07 de março de 2012 às 21:25

Bom galera eu editei um script aki para poder so trocar de outfit quando tiver tal item mais mesmo ele tendo o item manda a mensagem que ele nao tem o outfit troca mais manda a mensagem que ele nao tem o item mesmo tendo se alguem puder ajuda ai segue o script:

 

function onSay(cid, words, param, channel)

if(param == '') then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite algum numero ate 367.")

return true

end

 

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

t[1] = tonumber(t[1])

if(not t[1]) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite algum numero ate 367.")

return true

end

 

local pid = cid

if(t[1] <= 1 or t[1] == 135 or (t[1] > 160 and t[1] < 192) or t[1] > 351) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Esse outfit nao existe.")

return true

elseif(t[1] == 302 or t[1] == 266 or t[1] == 75) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Voce nao pode usar esse outfit.")

return true

elseif getPlayerItemCount(cid, 8982) >= 0 then

doPlayerRemoveItem(cid, 8982, 1)

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Voce precisa de um " .. getItemNameById(8982) .. " para usar esse outfit.")

return true

end

 

local tmp = getCreatureOutfit(pid)

tmp.lookType = t[1]

 

doCreatureChangeOutfit(pid, tmp)

return true

end

 

 

vale REP+

VodkartV
07 de março de 2012 às 21:30
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite algum numero ate 367.")
return true
end

local t = string.explode(param, ",")
t[1] = tonumber(t[1])
if(not t[1]) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Digite algum numero ate 367.")
return true
end

local pid = cid
if(t[1] <= 1 or t[1] == 135 or (t[1] > 160 and t[1] < 192) or t[1] > 351) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Esse outfit nao existe.")
return true
elseif(t[1] == 302 or t[1] == 266 or t[1] == 75) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Voce nao pode usar esse outfit.")
return true
elseif getPlayerItemCount(cid, 8982) < 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Voce precisa de um " .. getItemNameById(8982) .. " para usar esse outfit.")
return true
end

local tmp = getCreatureOutfit(pid)
tmp.lookType = t[1]

doPlayerRemoveItem(cid, 8982, 1)
doCreatureChangeOutfit(pid, tmp)
return true
end

ZmovirZ
07 de março de 2012 às 21:35

Valew rep+