froy
Active Member
- Joined
- Sep 30, 2009
- Messages
- 151
- Solutions
- 3
- Reaction score
- 36
Hello!
Im trying somehow implement the skinning system into Ezzz's server from the distro section.
I've edited the dat and spr file and got new item ids for the skinning knife and the leathers..
Minotaur leather 5091
green dragon leather 5092
red dragon leather 5093
<action itemid="5090" script="nostalrius/skinning_knife.lua" />
Anyone got some other way of doing this? Or is simply the nostalrius using some other functions/langue?
I cannot use the knife, it doesn't let me use the item...
Im trying somehow implement the skinning system into Ezzz's server from the distro section.
I've edited the dat and spr file and got new item ids for the skinning knife and the leathers..
Minotaur leather 5091
green dragon leather 5092
red dragon leather 5093
<action itemid="5090" script="nostalrius/skinning_knife.lua" />
Code:
local config = {
level = 2
}
local SKINS = {
-- Minotaurs
[4011] = {25000, 5091},
[4052] = {25000, 5091},
[4057] = {25000, 5091},
[4047] = {25000, 5091},
-- Dragons
[4286] = {25000, 5092},
-- Dragon Lords
[4062] = {25000, 5093},
}
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 skin = SKINS[itemEx.itemid]
if(not skin) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
return true
end
local random, effect = math.random(1, 100000), CONST_ME_GROUNDSHAKER
if(random <= skin[1]) then
doPlayerAddItem(cid, skin[2], 1)
elseif(skin[3] and random >= skin[3]) then
doPlayerAddItem(cid, skin[4], 1)
else
effect = CONST_ME_POFF
end
doSendMagicEffect(toPosition, effect)
doTransformItem(itemEx.uid, itemEx.itemid + 1)
return true
end
Anyone got some other way of doing this? Or is simply the nostalrius using some other functions/langue?
I cannot use the knife, it doesn't let me use the item...
Last edited: