From e54b9c7ef75ba7bcf982a1227684a8e20b2db567 Mon Sep 17 00:00:00 2001 From: Luan Colombo <94877887+luancolombo@users.noreply.github.com> Date: Mon, 30 Oct 2023 20:12:41 +0000 Subject: [PATCH] feat: The Paleworm loot and mount (#1758) Fix paleworm loot items, and add the haze mount script. --- .../quests/feaster_of_souls/the_pale_worm.lua | 2 ++ .../scripts/actions/mounts/haze_mount.lua | 25 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 data-otservbr-global/scripts/actions/mounts/haze_mount.lua diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/the_pale_worm.lua b/data-otservbr-global/monster/quests/feaster_of_souls/the_pale_worm.lua index 8f1258b6e70..41bf63ad767 100644 --- a/data-otservbr-global/monster/quests/feaster_of_souls/the_pale_worm.lua +++ b/data-otservbr-global/monster/quests/feaster_of_souls/the_pale_worm.lua @@ -95,6 +95,8 @@ monster.loot = { { name = "bloody tears", chance = 1500 }, { name = "ghost chestplate", chance = 150 }, { name = "spooky hood", chance = 150 }, + { name = "pale worm's scalp", chance = 1200 }, + { name = "spectral scrap of cloth", chance = 250 }, { name = "fabulous legs", chance = 150 }, { name = "phantasmal axe", chance = 150 }, { name = "ghost backpack", chance = 150 }, diff --git a/data-otservbr-global/scripts/actions/mounts/haze_mount.lua b/data-otservbr-global/scripts/actions/mounts/haze_mount.lua new file mode 100644 index 00000000000..bd289b57df9 --- /dev/null +++ b/data-otservbr-global/scripts/actions/mounts/haze_mount.lua @@ -0,0 +1,25 @@ +local config = { + [32629] = { mountId = 162, message = "You are now versed to ride the haze!" }, +} + +local hazemount = Action() + +function hazemount.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local mount = config[item.itemid] + + if not mount then + return true + end + + if not player:hasMount(mount.mountId) then + player:addMount(mount.mountId) + player:say(mount.message, TALKTYPE_MONSTER_SAY) + item:remove(1) + else + player:sendTextMessage(19, "You already have this mount") + end + return true +end + +hazemount:id(32629) +hazemount:register()