• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

CreatureEvent Walking Effect On Outfit

Critico

Sexy
Joined
Mar 25, 2010
Messages
370
Reaction score
176
Credits: AnneMotta & Vodkart

Description: When walking with full addon of some outfits,will leave an effect on player.


creaturescript/script

outfiteffect.lua
Lua:
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 = {
[136] = 3, [128] = 3, -- citizen
[270] = 27,[273] = 27, -- jester
[156] = 61,[152] = 61, -- assassin
[147] = 44,[143] = 44, -- barbarian
[148] = 45,[144] = 45, -- druid
[157] = 68,[153] = 68, -- beggar
[149] = 36,[145] = 36, -- wizard
[279] = 17,[278] = 17, -- brotherwood
[137] = 39,[129] = 39, -- hunter
[141] = 66,[133] = 66, -- summoner
[142] = 34,[134] = 34, -- warrior
[155] = 31,[151] = 31, -- pirate
[158] = 46,[154] = 46, -- shaman
[288] = 6,[289] = 6 -- demonhunter
}
                local o,c= effect[old.lookType],effect[current.lookType]
                if getPlayerAccess(cid) > 2 then return true
                elseif (not o or not c or old.lookAddons == 3 and o) then stopEvent(events[getPlayerGUID(cid)]) end
           if current.lookAddons == 3 and c then
                                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}) end
return true
end

creaturescript.xml add tags:

Code:
<event type="login" name="EffectOutLogin" event="script" value="outfiteffect.lua"/>
<event type="outfit" name="OutfitEffects" event="script" value="outfiteffect.lua"/>


configuration:

[136] = 3, [128] = 3, -- citizen


[OUTFIT ID] = NUMBER EFFECT
 
also the effect only comes out when the player are walking, is more for servers for fun...
 
is it comming behind or on the player?
 
By checking the cordinates i think i getting the picture :)
 
BUMP! its possible to make on player when are stand? i already make appears stand i want it, but appears so fast... its possible make more slowly?? here my script:

Lua:
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 = {
[287] = 66,[287] = 66, -- demonhunter
[345] = 48,[346] = 48 -- demonhunter
}
                local o,c= effect[old.lookType],effect[current.lookType]
                if getPlayerAccess(cid) > 2 then return true
                elseif (not o or not c or old.lookAddons == 3 and o) then stopEvent(events[getPlayerGUID(cid)]) end
           if current.lookAddons == 3 and c then
                                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, 50, cid, c, frompos)
                                doSendMagicEffect(getPlayerPosition(cid), CONST_ME_YELLOWENERGY)
                                end return true end
WalkEffect(cid, c, {x=0, y=0, z=0}) end
return true
end
 
Back
Top