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

[ACTION] Boots which play sounds when walk.

Sopelek

New Member
Joined
Jan 4, 2009
Messages
46
Reaction score
0
Hello, My idea it's boots which play sounds when you walk. I mean when you walk it's play sound like trumpet, and all instruments, It's possible? And maybe anyone know how to do it?


/Sorry for my english, I'm learning.
Sopelek.

@edit.
Play but without right-click.
 
Last edited:
Currently impossible - onMove() creatureevent needed or use onThink() which checks player position and send effect if there was change.
 
Code:
function onThink(cid, interval)
	if (getPlayerSlotItem(cid, SLOT_FEET).itemid == boots id) then
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_SOUND_GREEN)
	end
	return true
end

;P
 
What action line i must add?
<action itemid="2641" event="script" value="other/freedom.lua"/>

This not work, cause when TFS is loading, I see error :
[Warning - Event::loadScript] Event onUse not found (data/actions/scripts/other/freedom.lua)
 
Damn.

[11/11/2009 14:26:34] Lua Script Error: [GlobalEvent Interface]
[11/11/2009 14:26:34] data/globalevents/scripts/freedom.lua:eek:nThink

[11/11/2009 14:26:34] luaGetPlayerSlotItem(). Player not found
 
lol he wants the boots to send the effect each 2~10 seconds
and in your creatureevents script theres no time interval to send the effect so it looks a globalevent.
 
Oke i added it to creaturescript now it doesn't give error, but don't play _._ I changed ID boots, and don't play ;<

In creature i added :
[CODE}<event type="think" name="Freedom" event="script" value="freedom.lua"/>[/CODE]

And yours script Chojrak.
 
Have you added:
Code:
registerCreatureEvent(cid, "Freedom")

In login.lua?

@Edit:
Lava Shitan:
Code:
function onThink(interval, lastExecution, thinkInterval)
	for _, cid in ipairs(getPlayersOnline()) do
		if (getPlayerSlotItem(cid, SLOT_FEET).itemid == boots id) then
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_SOUND_GREEN)
		end
	end
	return true
end
 
It's simple, just check what returns:
Code:
getPlayerSlotItem(cid, SLOT_FEET).itemid

By:
Code:
print(getPlayerSlotItem(cid, SLOT_FEET).itemid)
 
Back
Top