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

Tibia Rox

Member
Joined
Feb 4, 2009
Messages
1,181
Reaction score
9
Location
U.S.A
I need a script so that when you click on a stone [1355], your skills are boosted by 10 for 30 minutes, and when you use it the effect of a flame goes over the player, like when you say exori flam.


Edit: I also need an action script that when you use a knife [2566] on a fallen tree [4247], you get some special leaves [8109] in your backpack.

Thanks in advance!
 
Last edited:
#1
LUA:
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 30 * 60 * 1000) 
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setConditionParam(condition, CONDITION_PARAM_SUBID, 4)
setConditionParam(condition, CONDITION_PARAM_SKILL_MELEE, 10)
setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, 10)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, 10)

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if not hasCondition(cid, CONDITION_ATTRIBUTES, 4) then
		doAddCondition(cid, condition)
		doSendMagicEffect(getThingPos(cid), CONST_ME_FIREATTACK)
	else
		doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
	end
	return true
end

#2
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if itemEx.itemid == 4247 and getPlayerStorageValue(cid, 16384) == -1 then
		doPlayerAddItem(cid, 8109, 1)
		setPlayerStorageValue(cid, 16384, 1)
		return true
	end
end

Did you want to deny re-using in some waY?
 
Last edited:
Yes, use the knife only once and never be able to use it again, and use the stone once every 30 minutes.

Edit: Second script isnt working.
 
Last edited:
Back
Top