Merge branch '9-introduce-creature-skin-dust-system' into 'master'

Resolve "Introduce creature Skin & Dust system"

Closes #9

See merge request ErikasKontenis/Sabrehaven!25
This commit is contained in:
Erikas Kontenis 2020-01-01 18:59:19 +00:00
commit 0b0624a20b
17 changed files with 207 additions and 7 deletions

View File

@ -1 +1 @@
next: 17574
next: 17578

View File

@ -188,6 +188,8 @@
<action itemid="5710" script="misc/shovel.lua" />
<action itemid="3483" allowfaruse="1" script="misc/fishing_rod.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 -->
<action itemid="4867" script="misc/botanist_container.lua" />

View 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

View File

@ -19675,8 +19675,8 @@ Attributes = {Capacity=7,FluidSource=BLOOD,ExpireTarget=4322,TotalExpireTime=12
TypeID = 4322
Name = "a dead lizard templar"
Flags = {Corpse,Expire}
Attributes = {ExpireTarget=4323,TotalExpireTime=1200}
Flags = {Container,Corpse,Expire}
Attributes = {Capacity=7,ExpireTarget=4323,TotalExpireTime=1200}
TypeID = 4323
Name = "a dead lizard templar"
@ -19690,8 +19690,8 @@ Attributes = {Capacity=7,FluidSource=BLOOD,ExpireTarget=4325,TotalExpireTime=12
TypeID = 4325
Name = "a dead lizard sentinel"
Flags = {Corpse,Expire}
Attributes = {ExpireTarget=4326,TotalExpireTime=1200}
Flags = {Container,Corpse,Expire}
Attributes = {Capacity=7,ExpireTarget=4326,TotalExpireTime=1200}
TypeID = 4326
Name = "a dead lizard sentinel"
@ -19705,8 +19705,8 @@ Attributes = {Capacity=7,FluidSource=BLOOD,ExpireTarget=4328,TotalExpireTime=12
TypeID = 4328
Name = "a dead lizard snakecharmer"
Flags = {Corpse,Expire}
Attributes = {ExpireTarget=4329,TotalExpireTime=1200}
Flags = {Container,Corpse,Expire}
Attributes = {Capacity=7,ExpireTarget=4329,TotalExpireTime=1200}
TypeID = 4329
Name = "a dead lizard snakecharmer"

View File

@ -85,4 +85,13 @@ VANISH,! -> "If you are heavily wounded or poisoned, feel free to
"wisdom" -> "Talk to the hermit Eremo on the isle of Cormaya about this blessing."
"solitude" -> *
"stake",QuestValue(17576)=6,Count(5941)<=0 -> "I think you have forgotten to bring your stake, my child."
"stake",QuestValue(17576)=6 -> Type=5941, Amount=1, "Yes, I was informed what to do. Are you prepared to receive my line of the prayer?", Topic=10
Topic=10,"yes",Count(Type)>=Amount -> "So receive my prayer: 'Wicked curses shall be broken'. Now, bring your stake to Kasmir in Darashia for the next line of the prayer. I will inform him what to do.", SetQuestValue(17576,7)
Topic=10,"yes" -> "I think you have forgotten to bring your stake, my child."
Topic=10 -> "I will wait for you."
"stake",QuestValue(17576)=7 -> "You should visit Kasmir in Darashia now, my child."
"stake",QuestValue(17576)>7 -> "You already received my line of the prayer."
"stake" -> "A blessed stake? That's a strange request. Maybe Quentin knows more, he is one of the oldest monks after all."
}

View File

@ -107,4 +107,13 @@ VANISH,! -> "Bye ... and now I'll have a quick drink."
"solitude", QuestValue(101) > 0 -> *
"wisdom" -> "Talk to the hermit Eremo on the isle of Cormaya about this blessing."
"solitude" -> *
"stake",QuestValue(17576)=9,Count(5941)<=0 -> "I think you have forgotten to bring your stake, pilgrim."
"stake",QuestValue(17576)=9 -> Type=5941, Amount=1, "Yes, I was informed what to do. Are you prepared to <hicks> receive my line of the prayer?", Topic=10
Topic=10,"yes",Count(Type)>=Amount -> "So receive my prayer: 'Your hand shall be guided - your feet shall walk in <hicks> harmony'. Now, bring your stake to Tyrias in <hicks> Liberty Bay for the next line of the prayer. I will inform him what to do.", SetQuestValue(17576,10)
Topic=10,"yes" -> "I think you have forgotten to bring your stake, pilgrim."
Topic=10 -> "I will wait for you."
"stake",QuestValue(17576)=10 -> "You should visit Tyrias in Liberty Bay now."
"stake",QuestValue(17576)>10 -> "You have already received my line of the prayer. Don't make me do more work than necessary!"
"stake" -> "A blessed stake? That's a <hicks> strange request. Maybe Quentin knows more, he is one of the oldest monks after all."
}

View File

@ -148,4 +148,12 @@ Topic=11 -> "Maybe another time."
"mission" -> "Sorry, I don't have any missions for you."
"task" -> "Sorry, I don't have any missions for you."
# Wooden_Stake_Quest
"stake",ExpiringQuestValue(17577)>0 -> "Sorry, but I'm still exhausted from the last ritual. Please come back later."
"stake",QuestValue(17576)=11 -> "Ten prayers for a blessed stake? Don't tell me they made you travel whole Tibia for it! Listen, child, if you bring me a wooden stake, I'll bless it for you. <chuckles>", SetQuestValue(17576,12)
"stake",QuestValue(17576)=12,ExpiringQuestValue(17577)<0 -> Type=5941, Amount=1, "Would you like to receive a spiritual prayer to bless your stake?", Topic=12
Topic=12,"yes",Count(Type)>=Amount -> "<mumbles> Sha Kesh Mar!", Delete(Type), Create(5942), SetExpiringQuestValue(17577, 604800000)
Topic=12,"yes" -> "You don't have a wooden stake."
Topic=12 -> "Maybe another time."
}

View File

@ -66,6 +66,11 @@ VANISH,! -> "Lady? Lady?? Hm. How strange..."
"equipment" -> *
"special" -> "My offers are permanently extraordinarily cheap."
"stake" -> Type=5941, Amount=1, Price=5000, "Making a stake from a chair? Are you insane??! I won't waste my chairs on you for free! You will have to pay for it, but since I consider your plan a blasphemy, it will cost 5000 gold pieces. Okay?", Topic=142
Topic=142,"yes",CountMoney>=Price -> "Argh... my heart aches! Alright... a promise is a promise. Here - take this wooden stake, and now get lost.", DeleteMoney, Create(Type), Idle
Topic=142,"yes" -> "You can't even pay for that."
Topic=142,"no" -> "Phew. No chair-killing."
@"gen-t-furniture-statues-s.ndb"
@"gen-t-furniture-tables-s.ndb"
@"gen-t-furniture-chairs-s.ndb"

View File

@ -71,4 +71,13 @@ VANISH,! -> "No patience, no manners."
"heal$",HP<40 -> "Let me see what I can do, kid.", HP=40, EffectOpp(13)
"heal$" -> "Stop the whining, kid, that are only some scratches. Dwarfenheart knows no pain."
"time" -> "I think it's the fourth age of the yellow flame, isn't it?"
"stake",QuestValue(17576)=5,Count(5941)<=0 -> "I think you have forgotten to bring your stake, kid."
"stake",QuestValue(17576)=5 -> Type=5941, Amount=1, "Yes, I was informed what to do. Are you prepared to receive my line of the prayer?", Topic=10
Topic=10,"yes",Count(Type)>=Amount -> "So receive my prayer: 'Unclean spirits shall be repelled'. Now, bring your stake to Amanda in Edron for the next line of the prayer. I will inform her what to do.", SetQuestValue(17576,6)
Topic=10,"yes" -> "I think you have forgotten to bring your stake, kid."
Topic=10 -> "I will wait for you."
"stake",QuestValue(17576)=6 -> "You should visit Amanda in Edron now, kid."
"stake",QuestValue(17576)>6 -> "You already received my line of the prayer."
"stake" -> "A blessed stake? That's a strange request. Maybe Quentin knows more, he is one of the oldest monks after all."
}

View File

@ -135,4 +135,13 @@ Topic=8,"i$","will$" -> *
Topic=9,"yes" -> "So by the powers of the gods your souls are now bound together for eternity. May the gods watch with grace over your further live as a married couple. Go now and celebrate your marriage!", EffectOpp(14), EffectMe(13), Idle
Topic=9,"i$","will$" -> *
Topic=9,"no" -> "Your neglection of love hurts my heart. Leave now!", Idle
"stake",QuestValue(17576)=7,Count(5941)<=0 -> "I think you have forgotten to bring your stake, pilgrim."
"stake",QuestValue(17576)=7 -> Type=5941, Amount=1, "Yes, I was informed what to do. Are you prepared to receive my line of the prayer?", Topic=10
Topic=10,"yes",Count(Type)>=Amount -> "So receive my prayer: 'Let there be honour and humility'. Now, bring your stake to Rahkem in Ankrahmun for the next line of the prayer. I will inform him what to do.", SetQuestValue(17576,8)
Topic=10,"yes" -> "I think you have forgotten to bring your stake, pilgrim."
Topic=10 -> "I will wait for you."
"stake",QuestValue(17576)=8 -> "You should visit Rahkem in Ankrahmun now, pilgrim."
"stake",QuestValue(17576)>8 -> "You already received my line of the prayer."
"stake" -> "A blessed stake? That is a strange request. Maybe Quentin knows more, he is one of the oldest monks after all."
}

View File

@ -130,5 +130,13 @@ Topic=3 -> "As you wish."
"wisdom" -> "Talk to the hermit Eremo on the isle of Cormaya about this blessing."
"solitude" -> *
"stake",QuestValue(17576)=3,Count(5941)<=0 -> "I think you have forgotten to bring your stake."
"stake",QuestValue(17576)=3 -> Type=5941, Amount=1, "Yes, I was informed what to do. Are you prepared to receive my line of the prayer?", Topic=10
Topic=10,"yes",Count(Type)>=Amount -> "So receive my prayer: 'Peace may fill your soul - evil shall be cleansed'. Now, bring your stake to Yberius in the Venore temple for the next line of the prayer. I will inform him what to do.", SetQuestValue(17576,4)
Topic=10,"yes" -> "I think you have forgotten to bring your stake."
Topic=10 -> "I will wait for you."
"stake",QuestValue(17576)=4 -> "You should visit Yberius in the Venore temple now."
"stake",QuestValue(17576)>4 -> "You already received my line of the prayer."
"stake" -> "A blessed stake? That is a strange request. Maybe Quentin knows more, he is one of the oldest monks after all."
}

View File

@ -120,4 +120,20 @@ VANISH,! -> "Remember: If you are heavily wounded or poisoned, I
"time" -> "Now, it is %T. Ask Gorn for a watch, if you need one."
"stake",QuestValue(17576)=0 -> "A blessed stake to defeat evil spirits? I do know an old prayer which is said to grant sacred power and to be able to bind this power to someone, or something. ...",
"However, this prayer needs the combined energy of ten priests. Each of them has to say one line of the prayer. ...",
"I could start with the prayer, but since the next priest has to be in a different location, you probably will have to travel a lot. ...",
"Is this stake really important enough to you so that you are willing to take this burden?", Topic=1
Topic=1,"yes" -> "Alright, I guess you need a stake first. Maybe Gamon can help you, the leg of a chair or something could just do. Try asking him for a stake, and if you have one, bring it back to me.", SetQuestValue(17576,1)
Topic=1 -> "Fine. You are free to decline my offer."
"stake",QuestValue(17576)=1,Count(5941)<=0 -> "I guess you couldn't convince Gamon to give you a stake, eh?"
"stake",QuestValue(17576)=1 -> Type=5941, Amount=1, "Ah, I see you brought a stake with you. Are you ready to receive my line of the prayer then?", Topic=2
Topic=2,"yes",Count(Type)>=Amount -> "So receive my prayer: 'Light shall be near - and darkness afar'. Now, bring your stake to Tibra in the Carlin church for the next line of the prayer. I will inform her what to do.", SetQuestValue(17576,2)
Topic=2,"yes" -> "Where did you lost that stake?"
Topic=2 -> "I will wait for you."
"stake",QuestValue(17576)=2 -> "You should visit Tibra in the Carlin church now."
"stake",QuestValue(17576)>2 -> "You already received my line of the prayer."
}

View File

@ -210,4 +210,13 @@ Topic=3,"yes",CountMoney<Price -> "Sorry, you do not have enough gold
Topic=3,"yes" -> "Here you are. Look in your spellbook for the pronunciation of this spell.", DeleteMoney, EffectOpp(13), TeachSpell(String)
Topic=3 -> "Maybe next time."
"stake",QuestValue(17576)=8,Count(5941)<=0 -> "I think you have forgotten to bring your stake, pilgrim."
"stake",QuestValue(17576)=8 -> Type=5941, Amount=1, "Yes, I was informed what to do. Are you prepared to receive my line of the prayer?", Topic=10
Topic=10,"yes",Count(Type)>=Amount -> "So receive my prayer: 'Let there be power and compassion'. Now, bring your stake to Brewster in Port Hope for the next line of the prayer. I will inform him what to do.", SetQuestValue(17576,9)
Topic=10,"yes" -> "I think you have forgotten to bring your stake, pilgrim."
Topic=10 -> "I will wait for you."
"stake",QuestValue(17576)=9 -> "You should visit Brewster in Port Hope now."
"stake",QuestValue(17576)>9 -> "You already received my line of the prayer."
"stake" -> "A blessed stake? That is a strange request. Maybe Quentin knows more, he is one of the oldest monks after all."
}

View File

@ -109,4 +109,14 @@ Topic=1,"yes",CountMoney<Price -> "Don't be ashamed, but you lack the gold."
Topic=3,"yes" -> "So tell me, what shadows your soul, my child.", Topic=4
Topic=3 -> "As you wish."
Topic=4 -> "Meditate on that and pray for your soul."
"stake",QuestValue(17576)=2,Count(5941)<=0 -> "I think you have forgotten to bring your stake, my child."
"stake",QuestValue(17576)=2 -> Type=5941, Amount=1, "Yes, I was informed what to do. Are you prepared to receive my line of the prayer?", Topic=10
Topic=10,"yes",Count(Type)>=Amount -> "So receive my prayer: 'Hope may fill your heart - doubt shall be banned'. Now, bring your stake to Maealil in the elven settlement for the next line of the prayer. I will inform him what to do.", SetQuestValue(17576,3)
Topic=10,"yes" -> "I think you have forgotten to bring your stake, my child."
Topic=10 -> "I will wait for you."
"stake",QuestValue(17576)=3 -> "You should visit Maealil in the elven settlement now, my child."
"stake",QuestValue(17576)>3 -> "You already received my line of the prayer."
"stake" -> "A blessed stake? That is a strange request, my child. Maybe Quentin knows more, he is one of the oldest monks after all."
}

View File

@ -75,4 +75,12 @@ VANISH,! -> "Remember: If you are heavily wounded or poisoned, I
"time" -> "Now, it is %T."
"stake",QuestValue(17576)=10,Count(5941)<=0 -> "You don't even have that strange stake with you."
"stake",QuestValue(17576)=10 -> Type=5941, Amount=1, "Brewster sent me a strange message about some strange hocus-pocus. I think it's nonsense, but since you have come that far, I'll play along. Are you ready?", Topic=10
Topic=10,"yes",Count(Type)>=Amount -> "So receive my prayer: 'Your mind shall be a vessel for joy, light and wisdom' - uh, wow, something happened. Well, I guess that's it, but next time if you need some mumbo jumbo rather go to Chondur.", SetQuestValue(17576,11), Delete(Type), Create(5942)
Topic=10,"yes" -> "You don't even have that strange stake with you."
Topic=10 -> "No problem, I have other things to do."
"stake",QuestValue(17576)>10 -> "I won't do that rubbish again. Go pester Chondur with your hocus-pocus."
"stake" -> "A blessed stake? I don't believe in things like that. If anyone does, it's probably old Quentin."
}

View File

@ -31,6 +31,7 @@ VANISH,! -> "Guut bye. Coming back soon."
"excalibug" -> "You want sell me excalibug for 1000 platinum coins and an enchanted armor?", Topic=3
"thanks" -> "Me enjoy doing that."
"thank","you" -> *
"obsidian","knife" -> "Me remembering... but long time since seeing such a knife. Maybe can make one from obsidian lance. But only if you paying one draconian steel. Cyclops friend maybe can refine."
"spear" -> Type=3277, Amount=1, Price=10, "You will buy a spear for %P gold?", Topic=1
"rapier" -> Type=3272, Amount=1, Price=15, "You will buy a rapier for %P gold?", Topic=1
@ -146,5 +147,13 @@ topic=7,"yes" -> "Here you have it.", Create(Type),SetQuestValue(325,4)
topic=7,"no" -> "Stop make fun of old dwarf."
topic=7 -> "You joke with me!"
"draconian","steel",ExpiringQuestValue(17575)>0 -> "I am still busy with your draconian steel which you gave me moments ago. Maybe come back later when I will need another one."
"obsidian","lance",ExpiringQuestValue(17575)>0 -> *
"draconian","steel",ExpiringQuestValue(17575)<0 -> "You bringing me draconian steel and obsidian lance in exchange for obsidian knife?", Topic=8
"obsidian","lance",ExpiringQuestValue(17575)<0 -> *
Topic=8,"yes",Count(5889)>=1,Count(3313)>=1 -> "Here you have it.", DeleteAmount(5889,1), DeleteAmount(3313,1), Create(5908), SetExpiringQuestValue(17575, 72000000)
Topic=8,"yes" -> "No obsidian lance, no draconian steel."
Topic=8 -> "Stop make fun of old dwarf."
}

View File

@ -98,4 +98,13 @@ VANISH,! -> "Remember: If you are heavily wounded or poisoned, I
"solitude" -> *
"time" -> "Now, it is %T. Ask Shiantis for a watch, if you need one."
"stake",QuestValue(17576)=4,Count(5941)<=0 -> "I think you have forgotten to bring your stake."
"stake",QuestValue(17576)=4 -> Type=5941, Amount=1, "Yes, I was informed what to do. Are you prepared to receive my line of the prayer?", Topic=10
Topic=10,"yes",Count(Type)>=Amount -> "So receive my prayer: 'Protection will be granted - from dangers at hand'. Now, bring your stake to Isimov in the dwarven settlement for the next line of the prayer. I will inform him what to do.", SetQuestValue(17576,5)
Topic=10,"yes" -> "I think you have forgotten to bring your stake."
Topic=10 -> "I will wait for you."
"stake",QuestValue(17576)=5 -> "You should visit Isimov in the dwarven settlement now."
"stake",QuestValue(17576)>5 -> "You already received my line of the prayer."
"stake" -> "A blessed stake? That is a strange request. Maybe Quentin knows more, he is one of the oldest monks after all."
}