Zmovir 41 Postado Março 8, 2012 Share Postado Março 8, 2012 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+ Link para o comentário https://xtibia.com/forum/topic/182041-talkaction-vale-rep/ Compartilhar em outros sites More sharing options...
Vodkart 1515 Postado Março 8, 2012 Share Postado Março 8, 2012 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 Link para o comentário https://xtibia.com/forum/topic/182041-talkaction-vale-rep/#findComment-1213080 Compartilhar em outros sites More sharing options...
Zmovir 41 Postado Março 8, 2012 Autor Share Postado Março 8, 2012 Valew rep+ Link para o comentário https://xtibia.com/forum/topic/182041-talkaction-vale-rep/#findComment-1213082 Compartilhar em outros sites More sharing options...
Posts Recomendados