mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-06-15 21:24:28 +02:00
implement dusting and skinning tools. still quests are todo
This commit is contained in:
parent
aec5fa5072
commit
745cba4bb2
@ -188,6 +188,8 @@
|
|||||||
<action itemid="5710" script="misc/shovel.lua" />
|
<action itemid="5710" script="misc/shovel.lua" />
|
||||||
<action itemid="3483" allowfaruse="1" script="misc/fishing_rod.lua" />
|
<action itemid="3483" allowfaruse="1" script="misc/fishing_rod.lua" />
|
||||||
<action itemid="5865" script="misc/juice_squeezer.lua" />
|
<action itemid="5865" script="misc/juice_squeezer.lua" />
|
||||||
|
<action itemid="5908" script="misc/skinning_dusting.lua"/>
|
||||||
|
<action itemid="5942" script="misc/skinning_dusting.lua"/>
|
||||||
|
|
||||||
<!-- Miscellaneous -->
|
<!-- Miscellaneous -->
|
||||||
<action itemid="4867" script="misc/botanist_container.lua" />
|
<action itemid="4867" script="misc/botanist_container.lua" />
|
||||||
|
80
data/actions/scripts/misc/skinning_dusting.lua
Normal file
80
data/actions/scripts/misc/skinning_dusting.lua
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
local config = {
|
||||||
|
[5908] = {
|
||||||
|
-- Minotaurs
|
||||||
|
[4011] = {value = 25000, newItem = 5878},
|
||||||
|
[4047] = {value = 25000, newItem = 5878},
|
||||||
|
[4057] = {value = 25000, newItem = 5878},
|
||||||
|
[4052] = {value = 25000, newItem = 5878},
|
||||||
|
|
||||||
|
-- Low Class Lizards
|
||||||
|
[4321] = {value = 25000, newItem = 5876},
|
||||||
|
[4327] = {value = 25000, newItem = 5876},
|
||||||
|
[4324] = {value = 25000, newItem = 5876},
|
||||||
|
|
||||||
|
-- Dragons
|
||||||
|
[4025] = {value = 25000, newItem = 5877},
|
||||||
|
|
||||||
|
-- Dragon Lords
|
||||||
|
[4062] = {value = 25000, newItem = 5948},
|
||||||
|
|
||||||
|
-- Behemoths
|
||||||
|
[4112] = {value = 35000, newItem = 5893},
|
||||||
|
|
||||||
|
-- Bone Beasts
|
||||||
|
[4212] = {value = 25000, newItem = 5925},
|
||||||
|
},
|
||||||
|
[5942] = {
|
||||||
|
-- Demon
|
||||||
|
[4097] = {value = 25000, newItem = 5906},
|
||||||
|
|
||||||
|
-- Vampires
|
||||||
|
[4137] = {value = 25000, newItem = 5905}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
|
||||||
|
local skin = config[item.itemid][target.itemid]
|
||||||
|
if not skin then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local random, effect, transform = math.random(1, 100000), CONST_ME_MAGIC_GREEN, true
|
||||||
|
if type(skin[1]) == 'table' then
|
||||||
|
local _skin
|
||||||
|
for i = 1, #skin do
|
||||||
|
_skin = skin[i]
|
||||||
|
if random <= _skin.value then
|
||||||
|
if isInArray({7441, 7442, 7444, 7445}, target.itemid) then
|
||||||
|
player:addItem(_skin.newItem, _skin.amount or 1)
|
||||||
|
effect = CONST_ME_HITAREA
|
||||||
|
else
|
||||||
|
player:addItem(_skin.newItem, _skin.amount or 1)
|
||||||
|
end
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
elseif random <= skin.value then
|
||||||
|
if isInArray({7441, 7442, 7444, 7445}, target.itemid) then
|
||||||
|
player:addItem(skin.newItem, skin.amount or 1)
|
||||||
|
effect = CONST_ME_HITAREA
|
||||||
|
else
|
||||||
|
player:addItem(skin.newItem, skin.amount or 1)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if isInArray({7441, 7442, 7444, 7445}, target.itemid) then
|
||||||
|
player:say('The attempt of sculpting failed miserably.', TALKTYPE_MONSTER_SAY)
|
||||||
|
effect = CONST_ME_HITAREA
|
||||||
|
else
|
||||||
|
effect = CONST_ME_POFF
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
toPosition:sendMagicEffect(effect)
|
||||||
|
if transform then
|
||||||
|
target:transform(skin.after or target.itemid + 1)
|
||||||
|
target:decay()
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
@ -19675,8 +19675,8 @@ Attributes = {Capacity=7,FluidSource=BLOOD,ExpireTarget=4322,TotalExpireTime=12
|
|||||||
|
|
||||||
TypeID = 4322
|
TypeID = 4322
|
||||||
Name = "a dead lizard templar"
|
Name = "a dead lizard templar"
|
||||||
Flags = {Corpse,Expire}
|
Flags = {Container,Corpse,Expire}
|
||||||
Attributes = {ExpireTarget=4323,TotalExpireTime=1200}
|
Attributes = {Capacity=7,ExpireTarget=4323,TotalExpireTime=1200}
|
||||||
|
|
||||||
TypeID = 4323
|
TypeID = 4323
|
||||||
Name = "a dead lizard templar"
|
Name = "a dead lizard templar"
|
||||||
@ -19690,8 +19690,8 @@ Attributes = {Capacity=7,FluidSource=BLOOD,ExpireTarget=4325,TotalExpireTime=12
|
|||||||
|
|
||||||
TypeID = 4325
|
TypeID = 4325
|
||||||
Name = "a dead lizard sentinel"
|
Name = "a dead lizard sentinel"
|
||||||
Flags = {Corpse,Expire}
|
Flags = {Container,Corpse,Expire}
|
||||||
Attributes = {ExpireTarget=4326,TotalExpireTime=1200}
|
Attributes = {Capacity=7,ExpireTarget=4326,TotalExpireTime=1200}
|
||||||
|
|
||||||
TypeID = 4326
|
TypeID = 4326
|
||||||
Name = "a dead lizard sentinel"
|
Name = "a dead lizard sentinel"
|
||||||
@ -19705,8 +19705,8 @@ Attributes = {Capacity=7,FluidSource=BLOOD,ExpireTarget=4328,TotalExpireTime=12
|
|||||||
|
|
||||||
TypeID = 4328
|
TypeID = 4328
|
||||||
Name = "a dead lizard snakecharmer"
|
Name = "a dead lizard snakecharmer"
|
||||||
Flags = {Corpse,Expire}
|
Flags = {Container,Corpse,Expire}
|
||||||
Attributes = {ExpireTarget=4329,TotalExpireTime=1200}
|
Attributes = {Capacity=7,ExpireTarget=4329,TotalExpireTime=1200}
|
||||||
|
|
||||||
TypeID = 4329
|
TypeID = 4329
|
||||||
Name = "a dead lizard snakecharmer"
|
Name = "a dead lizard snakecharmer"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user