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

Skinning knife like in WoW.

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,855
Solutions
18
Reaction score
671
Hello.
I wanna ask you for one function.

I need to make skinning knife like in World of Warcraft.
You must drop off from corpse all items to use skinning knife on it.

Ex. You need to skin Wolf, you need to drop off from his body all meats and hams (corpse must be empty), after that you can use skinning knife.

Anyone can help me out with this function ?
Thanks in advance,
Fresh.
 
It seemed nice so I made the script and parsed it with the ordinary obsidian knife. Keep in mind that the obsidian knife has old corpses!

So here you are :)
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local SKINS = {
		-- Minotaurs
		[2830] = {25000, 5878},
		[2871] = {25000, 5878},
		[2866] = {25000, 5878},
		[2876] = {25000, 5878},
		[3090] = {25000, 5878},

		-- Lizards
		[4259] = {25000, 5876},
		[4262] = {25000, 5876},
		[4256] = {25000, 5876},

		-- Dragons
		[3104] = {25000, 5877},
		[2844] = {25000, 5877},

		-- Dragon Lords
		[2881] = {25000, 5948},

		-- Behemoths
		[2931] = {25000, 5893},

		-- Bone Beasts
		[3031] = {25000, 5925}
	}
	
	local a = getContainerSize(itemEx.uid)
	local canSkin = SKINS[itemEx.itemid]
	
	if(canSkin) then
		for i = 0, a do
			local b = getContainerItem(itemEx.uid, i)
			if(b.itemid == 0) then
				local random, effect = math.random(1, 100000), CONST_ME_GROUNDSHAKER
				if(random <= canSkin[1]) then
					doPlayerAddItem(cid, canSkin[2], 1)
				elseif(canSkin[3] and random >= canSkin[3]) then
					doPlayerAddItem(cid, canSkin[4], 1)
				else
					effect = CONST_ME_POFF
				end

				doSendMagicEffect(toPosition, effect)
				doTransformItem(itemEx.uid, itemEx.itemid + 1)
			else
				doPlayerSendCancel(cid, "You have to clean the corpse before you can skin it.")
				break
			end
		end
	else
		doPlayerSendCancel(cid, "You can only skin corpse.")
	end
	
return true
end
 
Back
Top