Postado Janeiro 16, 2018 7 anos Entao galera, uso esse script em meu ot. Mas o problema é! Quando mudo para outros addons os efeito continuam, sera que pode ajeitar o script para que ao mudar de addon ele n ficasse com o addon Effects do addon antigo ?!function onLogin(cid) registerCreatureEvent(cid, "EffectOutLogin") registerCreatureEvent(cid, "OutfitEffects") return doCreatureChangeOutfit(cid,{lookType = getCreatureOutfit(cid).lookType, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons}) end local events = {} function onOutfit(cid, old, current) local effect = { [131] = 36, [139] = 36, -- Kina [129] = 49,[137] = 49, -- Pala [130] = 66,[138] = 66 -- Mage } local o,c= effect[old.lookType],effect[current.lookType] if getPlayerAccess(cid) > 2 then return true end function WalkEffect(cid, c, pos) if not isCreature(cid) then return LUA_ERROR end if c then frompos = getThingPos(cid) if frompos.x ~= pos.x or frompos.y ~= pos.y or frompos.z ~= pos.z then doSendMagicEffect(frompos, c) end events[getPlayerGUID(cid)] = addEvent(WalkEffect, 100, cid, c, frompos) end return true end WalkEffect(cid, c, {x=0, y=0, z=0}) return true end
Postado Janeiro 17, 2018 7 anos Tente isto: Spoiler function onLogin(cid) registerCreatureEvent(cid, "EffectOutLogin") registerCreatureEvent(cid, "OutfitEffects") return doCreatureChangeOutfit(cid,{lookType = getCreatureOutfit(cid).lookType, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons}) end local events = {} function onOutfit(cid, old, current) local effect = { [131] = 36, [139] = 36, -- Kina [129] = 49,[137] = 49, -- Pala [130] = 66,[138] = 66 -- Mage } local outfit, effect = current.lookType, effect[current.lookType] if getPlayerAccess(cid) > 2 then return true end function WalkEffect(cid, effect, outfit, pos) if not isCreature(cid) then return true end if (getCreatureOutfit(cid).lookType ~= outfit) return true end if effect then frompos = getThingPos(cid) if frompos.x ~= pos.x or frompos.y ~= pos.y or frompos.z ~= pos.z then doSendMagicEffect(frompos, effect) end events[getPlayerGUID(cid)] = addEvent(WalkEffect, 100, cid, effect, getCreatureOutfit(cid).lookType, frompos) end return true end WalkEffect(cid, effect, outfit, {x=0, y=0, z=0}) return true end
Postado Janeiro 17, 2018 7 anos Autor Agora, Bruno Carvalho disse: Tente isto: Ocultar conteúdo function onLogin(cid) registerCreatureEvent(cid, "EffectOutLogin") registerCreatureEvent(cid, "OutfitEffects") return doCreatureChangeOutfit(cid,{lookType = getCreatureOutfit(cid).lookType, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons}) end local events = {} function onOutfit(cid, old, current) local effect = { [131] = 36, [139] = 36, -- Kina [129] = 49,[137] = 49, -- Pala [130] = 66,[138] = 66 -- Mage } local outfit, effect = current.lookType, effect[current.lookType] if getPlayerAccess(cid) > 2 then return true end function WalkEffect(cid, effect, outfit, pos) if not isCreature(cid) then return true end if (getCreatureOutfit(cid).lookType ~= outfit) return true end if effect then frompos = getThingPos(cid) if frompos.x ~= pos.x or frompos.y ~= pos.y or frompos.z ~= pos.z then doSendMagicEffect(frompos, effect) end events[getPlayerGUID(cid)] = addEvent(WalkEffect, 100, cid, effect, getCreatureOutfit(cid).lookType, frompos) end return true end WalkEffect(cid, effect, outfit, {x=0, y=0, z=0}) return true end Nao esta sando o efeito em nenhum addo que era pra esta saindo =[
Postado Janeiro 17, 2018 7 anos Aqui está (tinha esquecido um then) Spoiler function onLogin(cid) registerCreatureEvent(cid, "EffectOutLogin") registerCreatureEvent(cid, "OutfitEffects") return doCreatureChangeOutfit(cid,{lookType = getCreatureOutfit(cid).lookType, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons}) end local events = {} function onOutfit(cid, old, current) local effect = { [131] = 36, [139] = 36, -- Kina [129] = 49,[137] = 49, -- Pala [130] = 66,[138] = 66 -- Mage } local outfit, effect = current.lookType, effect[current.lookType] if getPlayerAccess(cid) > 2 then return true end function WalkEffect(cid, effect, outfit, pos) if not isCreature(cid) then return true end if effect and (getCreatureOutfit(cid).lookType == outfit) then frompos = getThingPos(cid) if frompos.x ~= pos.x or frompos.y ~= pos.y or frompos.z ~= pos.z then doSendMagicEffect(frompos, effect) end events[getPlayerGUID(cid)] = addEvent(WalkEffect, 100, cid, effect, getCreatureOutfit(cid).lookType, frompos) end return true end WalkEffect(cid, effect, outfit, {x=0, y=0, z=0}) return true end
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.