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

onEquip send effect on character til taken off. REP++

AbsoluteX

Learning Lua
Joined
Nov 9, 2009
Messages
121
Reaction score
3
Location
Australia
Hey guys, im just after a fairly simple script(I think).

What it does is when you equip a certain item it sends a magic effect on your character untill the item is taken off..
For example if i equip a ring of healing, it will send the blue shimmer effect on my character every 1-2 secs until its taken off.

Thanks in advance!
 
creaturescripts.xml
Code:
<event type="think" name="effect" event="script" value="effect.lua"/>

login.lua
Code:
registerCreatureEvent(cid, "effect")
effect.lua
Lua:
local ITEM_ID = 7899
function onThink(cid, interval, lastExecution)
	if exhaustion.check(cid, 23056) then return true end
	if (getPlayerSlotItem(cid, CONST_SLOT_ARMOR).itemid == ITEM_ID) then
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
		exhaustion.set(cid, 23056, 2)
	end
	return true
end
 
Back
Top