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

Solved Need Blessed wooden stake script

Status
Not open for further replies.

eyteew

es neko nesaprotu :D
Joined
Nov 25, 2009
Messages
104
Reaction score
0
Location
Thais
Hello


Im looking for blessed wooden stake script.. i can't find it :(

will be very thankful for help!
 
Urot/data/actions/scripts/tools/ and name it blessed_wooden_stake.lua
||
||
||
\/
Code:
local config = {
	level = 2
}

local DUSTS = {
	-- Demons
	[2956] = {25000, 5905},

	-- Vampires
	[2916] = {25000, 5906}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(getPlayerLevel(cid) < config.level) then
		doPlayerSendCancel(cid, "You have to be at least Level " .. config.level .. " to use this tool.")
		return true
	end

	local dust = DUSTS[itemEx.itemid]
	if(not dust) then
		doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
		return true
	end

	local random = math.random(1, 100000)
	if(random <= dust[1]) then
		doSendMagicEffect(toPosition, CONST_ME_GROUNDSHAKER)
		doPlayerAddItem(cid, dust[2], 1)
	elseif(dust[3] and random >= dust[3]) then
		doSendMagicEffect(toPosition, CONST_ME_GROUNDSHAKER)
		doPlayerAddItem(cid, dust[4], 1)
	else
		doSendMagicEffect(toPosition, CONST_ME_POFF)
	end

	doTransformItem(itemEx.uid, itemEx.itemid + 1)
	return true
end

Urot/data/actions/actions.xml
add this
||
||
||
||
\/
Code:
	<action itemid="5942" event="script" value="tools/blessed_wooden_stake.lua"/>
 
Last edited:
Status
Not open for further replies.
Back
Top