Skip to content

Commit

Permalink
Merge branch 'main' into fix-custom-attribute-string/bool/double
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas authored Oct 26, 2023
2 parents a0a2c4b + f9e3924 commit 1a013c2
Show file tree
Hide file tree
Showing 9 changed files with 142 additions and 105 deletions.
4 changes: 0 additions & 4 deletions data-otservbr-global/monster/bosses/doctor_marrow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ monster.corpse = 18074
monster.speed = 180
monster.manaCost = 0

monster.events = {
"DoctorMarrowHealth",
}

monster.changeTarget = {
interval = 4000,
chance = 15,
Expand Down
189 changes: 94 additions & 95 deletions data-otservbr-global/npc/imbuement_assistant.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,212 +106,212 @@ local imbuementPackagesData = {
text = "skill club",
moneyRequired = 6250,
itemList = {
{itemId = 9657, count = 20},
{itemId = 22189, count = 15},
{itemId = 10405, count = 10}
}
{ itemId = 9657, count = 20 },
{ itemId = 22189, count = 15 },
{ itemId = 10405, count = 10 },
},
},
["blockade"] = {
text = "skill shield",
moneyRequired = 16150,
itemList = {
{itemId = 9641, count = 20},
{itemId = 11703, count = 25},
{itemId = 20199, count = 25}
}
{ itemId = 9641, count = 20 },
{ itemId = 11703, count = 25 },
{ itemId = 20199, count = 25 },
},
},
["chop"] = {
text = "skill axe",
moneyRequired = 13050,
itemList = {
{itemId = 10196, count = 20}, -- orc tooth
{itemId = 11447, count = 25}, -- battle stone
{itemId = 21200, count = 20} -- moohtant horn
}
{ itemId = 10196, count = 20 }, -- orc tooth
{ itemId = 11447, count = 25 }, -- battle stone
{ itemId = 21200, count = 20 }, -- moohtant horn
},
},
["epiphany"] = {
text = "magic level",
moneyRequired = 10650,
itemList = {
{itemId = 9635, count = 25}, -- elvish talisman
{itemId = 11452, count = 15}, -- broken shamanic staff
{itemId = 10309, count = 15} -- strand of medusa hair
}
{ itemId = 9635, count = 25 }, -- elvish talisman
{ itemId = 11452, count = 15 }, -- broken shamanic staff
{ itemId = 10309, count = 15 }, -- strand of medusa hair
},
},
["precision"] = {
text = "skill distance",
moneyRequired = 6750,
itemList = {
{itemId = 11464, count = 25}, -- elven scouting glass
{itemId = 18994, count = 20}, -- elven hoof
{itemId = 10298, count = 10} -- metal spike
}
{ itemId = 11464, count = 25 }, -- elven scouting glass
{ itemId = 18994, count = 20 }, -- elven hoof
{ itemId = 10298, count = 10 }, -- metal spike
},
},
["slash"] = {
text = "skill sword",
moneyRequired = 6550,
itemList = {
{itemId = 9691, count = 25}, -- lion's mane
{itemId = 21202, count = 25}, -- mooh'tah shell
{itemId = 9654, count = 5} -- war crystal
}
{ itemId = 9691, count = 25 }, -- lion's mane
{ itemId = 21202, count = 25 }, -- mooh'tah shell
{ itemId = 9654, count = 5 }, -- war crystal
},
},
-- Additional attributes packages
["featherweight"] = {
text = "capacity increase",
moneyRequired = 12250,
itemList = {
{itemId = 25694, count = 20}, -- fairy wings
{itemId = 25702, count = 10}, -- little bowl of myrrh
{itemId = 20205, count = 5} -- goosebump leather
}
{ itemId = 25694, count = 20 }, -- fairy wings
{ itemId = 25702, count = 10 }, -- little bowl of myrrh
{ itemId = 20205, count = 5 }, -- goosebump leather
},
},
["strike"] = {
text = "critical",
moneyRequired = 16700,
itemList = {
{itemId = 11444, count = 20}, -- protective charm
{itemId = 10311, count = 25}, -- sabretooth
{itemId = 22728, count = 5} -- vexclaw talon
}
{ itemId = 11444, count = 20 }, -- protective charm
{ itemId = 10311, count = 25 }, -- sabretooth
{ itemId = 22728, count = 5 }, -- vexclaw talon
},
},
["swiftness"] = {
text = "speed",
moneyRequired = 5225,
itemList = {
{itemId = 17458, count = 15}, -- damselfly wing
{itemId = 10302, count = 25}, -- compass
{itemId = 14081, count = 20} -- waspoid wing
}
{ itemId = 17458, count = 15 }, -- damselfly wing
{ itemId = 10302, count = 25 }, -- compass
{ itemId = 14081, count = 20 }, -- waspoid wing
},
},
["vampirism"] = {
text = "life leech",
moneyRequired = 10475,
itemList = {
{itemId = 9685, count = 25}, -- vampire teeth
{itemId = 9633, count = 15}, -- bloody pincers
{itemId = 9663, count = 5} -- piece of dead brain
}
{ itemId = 9685, count = 25 }, -- vampire teeth
{ itemId = 9633, count = 15 }, -- bloody pincers
{ itemId = 9663, count = 5 }, -- piece of dead brain
},
},
["vibrancy"] = {
text = "paralysis removal",
moneyRequired = 15000,
itemList = {
{itemId = 22053, count = 20}, -- wereboar hooves
{itemId = 23507, count = 15}, -- crystallized anger
{itemId = 28567, count = 5} -- quill
}
{ itemId = 22053, count = 20 }, -- wereboar hooves
{ itemId = 23507, count = 15 }, -- crystallized anger
{ itemId = 28567, count = 5 }, -- quill
},
},
["void"] = {
text = "mana leech",
moneyRequired = 17400,
itemList = {
{itemId = 11492, count = 25}, -- rope belt
{itemId = 20200, count = 25}, -- silencer claws
{itemId = 22730, count = 5} -- some grimeleech wings
}
{ itemId = 11492, count = 25 }, -- rope belt
{ itemId = 20200, count = 25 }, -- silencer claws
{ itemId = 22730, count = 5 }, -- some grimeleech wings
},
},
-- Elemental damage packages
["electrify"] = {
text = "energy damage",
moneyRequired = 3770,
itemList = {
{itemId = 18993, count = 25}, -- rorc feather
{itemId = 21975, count = 5}, -- peacock feather fan
{itemId = 23508, count = 1} -- energy vein
}
{ itemId = 18993, count = 25 }, -- rorc feather
{ itemId = 21975, count = 5 }, -- peacock feather fan
{ itemId = 23508, count = 1 }, -- energy vein
},
},
["frost"] = {
text = "ice damage",
moneyRequired = 9750,
itemList = {
{itemId = 9661, count = 25}, -- frosty heart
{itemId = 21801, count = 10}, -- seacrest hair
{itemId = 9650, count = 5} -- polar bear paw
}
{ itemId = 9661, count = 25 }, -- frosty heart
{ itemId = 21801, count = 10 }, -- seacrest hair
{ itemId = 9650, count = 5 }, -- polar bear paw
},
},
["reap"] = {
text = "death damage",
moneyRequired = 3475,
itemList = {
{itemId = 11484, count = 25}, -- pile of grave earth
{itemId = 9647, count = 20}, -- demonic skeletal hand
{itemId = 10420, count = 5} -- petrified scream
}
{ itemId = 11484, count = 25 }, -- pile of grave earth
{ itemId = 9647, count = 20 }, -- demonic skeletal hand
{ itemId = 10420, count = 5 }, -- petrified scream
},
},
["scorch"] = {
text = "fire damage",
moneyRequired = 15875,
itemList = {
{itemId = 9636, count = 25}, -- fiery heart
{itemId = 5920, count = 5}, -- green dragon scale
{itemId = 5954, count = 5} -- demon horn
}
{ itemId = 9636, count = 25 }, -- fiery heart
{ itemId = 5920, count = 5 }, -- green dragon scale
{ itemId = 5954, count = 5 }, -- demon horn
},
},
["venom"] = {
text = "earth damage",
moneyRequired = 1820,
itemList = {
{itemId = 9686, count = 25}, -- swamp grass
{itemId = 9640, count = 20}, -- poisonous slime
{itemId = 21194, count = 2} -- slime heart
}
{ itemId = 9686, count = 25 }, -- swamp grass
{ itemId = 9640, count = 20 }, -- poisonous slime
{ itemId = 21194, count = 2 }, -- slime heart
},
},
-- Elemental protection packages
["cloud fabric"] = {
text = "energy protection",
moneyRequired = 13775,
itemList = {
{itemId = 9644, count = 20}, -- wyvern talisman
{itemId = 14079, count = 15}, -- crawler head plating
{itemId = 9665, count = 10} -- wyrm scale
}
{ itemId = 9644, count = 20 }, -- wyvern talisman
{ itemId = 14079, count = 15 }, -- crawler head plating
{ itemId = 9665, count = 10 }, -- wyrm scale
},
},
["demon presence"] = {
text = "holy protection",
moneyRequired = 20250,
itemList = {
{itemId = 9639, count = 25}, -- cultish robe
{itemId = 9638, count = 25}, -- cultish mask
{itemId = 10304, count = 20} -- hellspawn tail
}
{ itemId = 9639, count = 25 }, -- cultish robe
{ itemId = 9638, count = 25 }, -- cultish mask
{ itemId = 10304, count = 20 }, -- hellspawn tail
},
},
["dragon hide"] = {
text = "fire protection",
moneyRequired = 10850,
itemList = {
{itemId = 5877, count = 20}, -- green dragon leather
{itemId = 16131, count = 10}, -- blazing bone
{itemId = 11658, count = 5} -- draken sulphur
}
{ itemId = 5877, count = 20 }, -- green dragon leather
{ itemId = 16131, count = 10 }, -- blazing bone
{ itemId = 11658, count = 5 }, -- draken sulphur
},
},
["lich shroud"] = {
text = "death protection",
moneyRequired = 5650,
itemList = {
{itemId = 11466, count = 25}, -- flask of embalming fluid
{itemId = 22007, count = 20}, -- gloom wolf fur
{itemId = 9660, count = 5} -- mystical hourglass
}
{ itemId = 11466, count = 25 }, -- flask of embalming fluid
{ itemId = 22007, count = 20 }, -- gloom wolf fur
{ itemId = 9660, count = 5 }, -- mystical hourglass
},
},
["quara scale"] = {
text = "ice protection",
moneyRequired = 3650,
itemList = {
{itemId = 10295, count = 25}, -- winter wolf fur
{itemId = 10307, count = 15}, -- thick fur
{itemId = 14012, count = 10} -- deepling warts
}
{ itemId = 10295, count = 25 }, -- winter wolf fur
{ itemId = 10307, count = 15 }, -- thick fur
{ itemId = 14012, count = 10 }, -- deepling warts
},
},
["snake skin"] = {
text = "earth protection",
moneyRequired = 12550,
itemList = {
{itemId = 17823, count = 25}, -- piece of swampling wood
{itemId = 9694, count = 20}, -- snake skin
{itemId = 11702, count = 10} -- brimstone fangs
}
}
{ itemId = 17823, count = 25 }, -- piece of swampling wood
{ itemId = 9694, count = 20 }, -- snake skin
{ itemId = 11702, count = 10 }, -- brimstone fangs
},
},
}

local function purchaseItems(npc, player, message)
Expand All @@ -321,7 +321,7 @@ local function purchaseItems(npc, player, message)
npcHandler:setTopic(player:getId(), 2)
playerImbuementData[player:getId()] = {
moneyRequired = packageData.moneyRequired,
itemList = packageData.itemList
itemList = packageData.itemList,
}
end
end
Expand All @@ -337,7 +337,6 @@ local function creatureSayCallback(npc, creature, type, message)
if MsgContains(message, "imbuement packages") then
npcHandler:setTopic(playerId, 1)
npcHandler:say(imbuementPackages, npc, creature)
-- Skill increase packages
elseif imbuementPackagesData[message] then
purchaseItems(npc, player, message)
elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 2 then
Expand Down
18 changes: 18 additions & 0 deletions data/items/items.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67826,6 +67826,10 @@
<attribute key="duration" value="10"/>
<attribute key="fluidSource" value="blood"/>
</item>
<item id="42075" article="a" name="puddle of goo">
<attribute key="decayTo" value="0"/>
<attribute key="duration" value="10"/>
</item>
<item id="42207" article="a" name="dead crape man">
<attribute key="decayTo" value="0"/>
<attribute key="duration" value="60"/>
Expand Down Expand Up @@ -67964,6 +67968,20 @@
<attribute key="duration" value="10"/>
<attribute key="fluidSource" value="blood"/>
</item>
<item id="42247" article="a" name="dead monster">
<attribute key="containerSize" value="30"/>
<attribute key="decayTo" value="42248"/>
<attribute key="duration" value="60"/>
</item>
<item id="42248" article="a" name="dead monster">
<attribute key="containerSize" value="30"/>
<attribute key="decayTo" value="42249"/>
<attribute key="duration" value="300"/>
</item>
<item id="42249" article="a" name="dead monster">
<attribute key="decayTo" value="0"/>
<attribute key="duration" value="300"/>
</item>
<item id="42267" name="seafarer chair">
<attribute key="primarytype" value="furniture"/>
<attribute key="wrapableto" value="23398"/>
Expand Down
7 changes: 6 additions & 1 deletion data/libs/encounters_lib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,12 @@ function Encounter:spawnMonsters(config)
spawn(monster)
end
if event then
monster:registerEvent(event)
if type(event) == "string" then
event = { event }
end
for _, event in ipairs(event) do
monster:registerEvent(event)
end
end
if timeLimit then
self:addEvent(function(monsterId)
Expand Down
Loading

0 comments on commit 1a013c2

Please sign in to comment.