Ir para conteúdo
  • 0

Talkaction por vocação


Adriez

Pergunta

Posts Recomendados

  • 0

ganhou rep ++, deu certo, tu teria um script de q não pode atacar players da guild eu ate tenho mais eu do !attackguild on ou off da pra atacar

 

--script by Notorious
function onSay(cid, words, param)
local storageId = 101
if isPlayerPzLocked(cid) then
doPlayerSendCancel(cid, "You cannot use this command during battle.")
return true
end
if getPlayerGuildId(cid) <= 0 then
doPlayerSendCancel(cid, "You are not a guild member.")
return true
end
if param == '' then
local status = {
[1] = {"OFF"},
[-1] = {"ON"}
}
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Currently Status: "..status[getPlayerStorageValue(cid, storageId)][1].."")
return true
end
if param == 'on' and getPlayerStorageValue(cid, storageId) == 1 then
doPlayerSetStorageValue(cid, storageId, -1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Now you can attack guild members.")
return true
end
if param == 'off' and getPlayerStorageValue(cid, storageId) == -1 then
doPlayerSetStorageValue(cid, storageId, 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Now you can't attack guild members.")
return true
end
return true
end

 

 

Usa isso:

--- script
local vocs = {9, 10, 11, 12}
local failout = {73,75,302,266,45,10} -- outfits proibidas

function onSay(cid, words, param, channel)
local t = string.explode(param, ",")
t[1] = tonumber(t[1])
if not isInArray(vocs, getPlayerVocation(cid)) then
doPlayerSendCancel(cid,"Sua vocação não pode usar este comando.")
elseif(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
elseif not(t[1]) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.")
elseif isInArray(failout, t[1]) then
doPlayerSendCancel(cid,"Não pode usar estas outfit.")
elseif(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, "Such outfit does not exist.")
else
local tmp = getCreatureOutfit(cid)
tmp.lookType = t[1]
doCreatureChangeOutfit(cid, tmp)
end
return true
end

 

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...