Se quiser posso adicionar pra você, mas se vc sabe tá ai...
script.lua:
local function trocar(cid, pid)
local atual = getPlayerStorageValue(cid, 333335)
local outfit2 = {lookType = atual, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons}
local target = getCreatureTarget(cid)
local position1 = getCreaturePosition(target)
doSendMagicEffect(position1, 28)
doSendMagicEffect(getCreaturePosition(cid), 29)
doCreatureChangeOutfit(cid, outfit2)
setPlayerStorageValue(cid, 333335, -1)
end
function onCastSpell(cid, var)
local target = getCreatureTarget(cid)
if isPlayer(target) then
if getPlayerStorageValue(cid, 3333351) < os.time () then
local atual = getCreatureOutfit(cid).lookType
local outfit = {lookType = 132, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons}
local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+0, z=getThingPosition(getCreatureTarget(cid)).z}
doSendMagicEffect(position1, 67)
doSendMagicEffect(getCreaturePosition(cid), 66)
doCreatureSay(cid,"MuHahAHahAHah", TALKTYPE_MONSTER)
setPlayerStorageValue(cid, 333335, atual)
doCreatureChangeOutfit(cid, outfit)
addEvent(trocar, 10000, cid) -- 10s com a roupa...
setPlayerStorageValue(cid, 3333351, os.time () + 11)
else
doPlayerSendTextMessage(cid, 19, "Voce só pode usar essa magia daqui "..getPlayerStorageValue(cid, 3333351) - os.time ().." segundos ")
return false
end
else
doPlayerSendCancel(cid, "Isso nao eh player")
return false
end
return true
end




info
Grupo: Cavaleiro
Registrado: 28/08/12
Posts: 171
Reputação: +4
doSendMagicEffect(position1, 72)