• 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 Music Boots, need small fix.

Sopelek

New Member
Joined
Jan 4, 2009
Messages
46
Reaction score
0
Hmm everything will be ok, but i have one problem. When player wear it and running everything works fine, but if player haven't anything on boots slot, and go do quest for it. When he open chest boots are wearing to boots slot, and server is debugging, I restart and everything is fine, anyone know how to fix it? It will be very helpfull.

/Sorry for bad english, I'm learning ;d.

Lua:
local itemid = 9931
local delay = 444 -- delay between each check, increase it if it lags your server
 
local function equalPos(pos1, pos2)
	return pos1.x == pos2.x and pos1.y == pos2.y and pos1.z == pos2.z
end
 
local function sparkleCheck(cid, prevpos, slot)
	if getPlayerSlotItem(cid, slot).itemid == 9931 then
		local currpos = getCreaturePosition(cid)
		if not equalPos(currpos, prevpos) then
			doSendMagicEffect(currpos, CONST_ME_SOUND_BLUE)
		end
		return addEvent(sparkleCheck, delay, cid, currpos, slot)
	end
end
 
function onEquip(cid, item, slot)
	return addEvent(sparkleCheck, delay, cid, getCreaturePosition(cid), slot)
end
 
function onAddItem(moveitem, tileitem, position, cid)
    return doSendMagicEffect(position, CONST_ME_SOUND_BLUE)
end
 
Back
Top Bottom