• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

@Invisible - Click to Invisible!

Aleria

New Member
Joined
Mar 6, 2011
Messages
83
Reaction score
0
Hello!

I will make this short.

I use Avesta SQL!
I want an action(?) that if you right-click on a special item you turn into invisible (stealth ring/utana vid) and if you click again you go back to normal (visible).

Thanks!
 
Last edited:
LUA:
local condition = createConditionObject(CONDITION_INVISIBLE)
setConditionParam(condition, CONDITION_PARAM_TICKS, -1)

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if hasCondition(cid, CONDITION_INVISIBLE) then
		doRemoveCondition(cid, CONDITION_INVISIBLE)
	else
		doAddCondition(cid, condition)
	end
	return true
end
 
this is more likely to work then
LUA:
local condition = createConditionObject(CONDITION_INVISIBLE)
setConditionParam(condition, CONDITION_PARAM_TICKS, -1)
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getCreatureCondition(cid, CONDITION_INVISIBLE) == TRUE then
		doRemoveCondition(cid, CONDITION_INVISIBLE)
	else
		doAddCondition(cid, condition)
	end
	return TRUE
end
 
Back
Top