• 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!

Lua [Movements] Item With Effect + Show Effect on Player With Effect Around All together and mixed up

samuel157

/root
Joined
Mar 19, 2010
Messages
447
Solutions
3
Reaction score
49
Location
São Paulo, Brazil
GitHub
Samuel10M
Lua:
local ret = {}

function SairEfeito(cid)

if not isCreature(cid) then return LUA_ERROR end

local pos = getCreaturePosition(cid)

doSendAnimatedText(pos, "Rolex!", 255)

doSendMagicEffect(pos, 40)

ret[getPlayerGUID(cid)] = addEvent(SairEfeito, 5000, cid)

end

function onEquip(cid, item, slot)

if (getPlayerStorageValue(cid, 78975) == -1) then

SairEfeito(cid)

setPlayerStorageValue(cid, 78975, 1)

end

return true

end

function onDeEquip(cid, item, slot)

stopEvent(ret[getPlayerGUID(cid)])

ret[getPlayerGUID(cid)] = nil

setPlayerStorageValue(cid, 78975, -1)

return true

end

Effect around

Lua:
local ret = {}

function SairEfeito(cid)

if not isCreature(cid) then return LUA_ERROR end

local pos = getPlayerPosition(cid)

local effectPositions = {

{x = pos.x - 2, y = pos.y - 2, z = pos.z},

{x = pos.x + 2, y = pos.y - 2, z = pos.z},

}

doSendDistanceShoot(pos, ePos, 30)

doSendMagicEffect(ePos, 39)

ret[getPlayerGUID(cid)] = addEvent(SairEfeito, 5000, cid)

end

function onEquip(cid, item, slot)

if (getPlayerStorageValue(cid, 78975) == -1) then

SairEfeito(cid)

setPlayerStorageValue(cid, 78975, 1)

end

return true

end

function onDeEquip(cid, item, slot)

stopEvent(ret[getPlayerGUID(cid)])

ret[getPlayerGUID(cid)] = nil

setPlayerStorageValue(cid, 78975, -1)

return true

end


I want a script that takes effect when equipping a wand with id 2189 and another 8931 and 8851 each weapon equipped in the slot hand has an event type
Screenshot_1.png
 
Back
Top