From af3b534cbc5ff1e83047bb80d99b1c2de456697d Mon Sep 17 00:00:00 2001 From: Clocksz Date: Fri, 11 Oct 2024 23:22:55 -0300 Subject: [PATCH] Revert "fix: quests from version 10 revised (#2855)" This reverts commit b503adbe3c346f403173ed65ca2f34d566fc1453. --- data-otservbr-global/lib/core/constants.lua | 33 + data-otservbr-global/lib/core/quests.lua | 190 +-- data-otservbr-global/lib/core/storages.lua | 1156 ++++++++--------- .../monster/humans/necromancer_servant.lua | 13 +- .../dark_trails/death_priest_shargon.lua | 6 +- .../bosses/ascending_ferumbras.lua | 0 .../bosses/death_dragon.lua | 0 .../bosses/destabilized_ferumbras.lua | 0 .../bosses/enraged_soul.lua | 0 .../bosses/ferumbras_mortal_shell.lua | 0 .../bosses/ferumbras_soul_splinter.lua | 0 .../bosses/mazoran.lua | 0 .../bosses/plagirath.lua | 0 .../bosses/ragiaz.lua | 0 .../bosses/razzagorn.lua | 0 .../bosses/redeemed_soul.lua | 0 .../bosses/shulgrax.lua | 0 .../bosses/sin_devourer.lua | 0 .../bosses/tarbaz.lua | 0 .../bosses/the_lord_of_the_lice.lua | 0 .../bosses/the_shatterer.lua | 0 .../bosses/zamulosh.lua | 0 .../bosses/zamulosh2.lua | 4 + .../bosses/zamulosh3.lua | 1 + .../damned_soul.lua | 0 .../desperate_soul.lua | 0 .../disgusting_ooze.lua | 0 .../ferumbras_essence.lua | 0 .../lovely/lovely_deer.lua | 0 .../lovely/lovely_frazzlemaw.lua | 0 .../lovely/lovely_polar_bear.lua | 0 .../lovely/lovely_rotworm.lua | 0 .../lovely/lovely_scorpion.lua | 0 .../lovely/lovely_snake.lua | 0 .../lovely/lovely_souleater.lua | 0 .../lovely/lovely_yielothax.lua | 0 .../rage_of_mazoran.lua | 0 .../summons/enthralled_demon.lua | 0 .../summons/rift_fragment.lua | 0 .../summons/rift_invader.lua | 0 .../traps/bone_capsule.lua | 0 .../traps/despair.lua | 0 .../traps/electric_sparks.lua | 0 .../traps/eruption_of_destruction.lua | 0 .../traps/guilt.lua | 0 .../traps/void.lua | 0 data-otservbr-global/npc/a_beggar.lua | 6 +- data-otservbr-global/npc/a_behemoth.lua | 4 +- data-otservbr-global/npc/a_dragon_lord.lua | 4 +- data-otservbr-global/npc/a_drillworm.lua | 4 +- data-otservbr-global/npc/a_lost_basher.lua | 4 +- data-otservbr-global/npc/a_lost_husher.lua | 4 +- data-otservbr-global/npc/a_lost_thrower.lua | 4 +- .../npc/a_nightmare_scion.lua | 4 +- data-otservbr-global/npc/a_strange_fellow.lua | 4 +- data-otservbr-global/npc/a_sweaty_cyclops.lua | 8 +- data-otservbr-global/npc/a_vulcongra.lua | 4 +- data-otservbr-global/npc/a_wyrm.lua | 4 +- data-otservbr-global/npc/ahmet.lua | 8 +- data-otservbr-global/npc/ajax.lua | 4 +- data-otservbr-global/npc/alia.lua | 4 +- data-otservbr-global/npc/amanda.lua | 12 +- data-otservbr-global/npc/arito.lua | 12 +- data-otservbr-global/npc/azalea.lua | 4 +- data-otservbr-global/npc/barazbaz.lua | 22 +- data-otservbr-global/npc/barnabas_dee.lua | 54 +- data-otservbr-global/npc/benjamin.lua | 6 +- data-otservbr-global/npc/bertram.lua | 2 +- data-otservbr-global/npc/boozer.lua | 10 +- data-otservbr-global/npc/brewster.lua | 4 +- data-otservbr-global/npc/brodrosch.lua | 4 +- data-otservbr-global/npc/budrik.lua | 14 +- data-otservbr-global/npc/captain_bluebear.lua | 4 +- data-otservbr-global/npc/captain_haba.lua | 2 +- data-otservbr-global/npc/captain_seahorse.lua | 4 +- data-otservbr-global/npc/cedrik.lua | 4 +- data-otservbr-global/npc/chantalle.lua | 2 +- data-otservbr-global/npc/charos.lua | 8 +- data-otservbr-global/npc/chavis.lua | 44 +- data-otservbr-global/npc/chrystal.lua | 6 +- data-otservbr-global/npc/corym_ratter.lua | 2 +- data-otservbr-global/npc/costello.lua | 14 +- data-otservbr-global/npc/dalbrect.lua | 8 +- data-otservbr-global/npc/daniel_steelsoul.lua | 10 +- data-otservbr-global/npc/dermot.lua | 4 +- data-otservbr-global/npc/doubleday.lua | 107 -- data-otservbr-global/npc/dove.lua | 6 +- data-otservbr-global/npc/elliott.lua | 76 +- data-otservbr-global/npc/elyen_ravenlock.lua | 20 +- data-otservbr-global/npc/erayo.lua | 2 +- data-otservbr-global/npc/eroth.lua | 8 +- data-otservbr-global/npc/ezebeth.lua | 40 +- data-otservbr-global/npc/ferus.lua | 4 +- data-otservbr-global/npc/gnomargery.lua | 73 +- data-otservbr-global/npc/gnombold.lua | 68 +- data-otservbr-global/npc/gnome_trooper.lua | 59 +- data-otservbr-global/npc/gnomilly.lua | 65 +- data-otservbr-global/npc/gnommander.lua | 1 - data-otservbr-global/npc/hairycles.lua | 8 +- data-otservbr-global/npc/hugo.lua | 8 +- data-otservbr-global/npc/iptar-sin.lua | 4 +- data-otservbr-global/npc/isimov.lua | 4 +- data-otservbr-global/npc/jack.lua | 38 +- data-otservbr-global/npc/jacob.lua | 74 +- data-otservbr-global/npc/jondrin.lua | 31 +- data-otservbr-global/npc/jorge.lua | 109 +- data-otservbr-global/npc/kasmir.lua | 4 +- data-otservbr-global/npc/kazzan.lua | 12 +- data-otservbr-global/npc/kevin.lua | 130 +- data-otservbr-global/npc/kjesse.lua | 4 +- data-otservbr-global/npc/kroox.lua | 6 +- data-otservbr-global/npc/liane.lua | 6 +- data-otservbr-global/npc/lokur.lua | 4 +- data-otservbr-global/npc/lorietta.lua | 4 +- data-otservbr-global/npc/maealil.lua | 4 +- data-otservbr-global/npc/maeryn.lua | 4 +- data-otservbr-global/npc/markwin.lua | 4 +- data-otservbr-global/npc/marvin.lua | 15 +- data-otservbr-global/npc/mazarius.lua | 130 +- data-otservbr-global/npc/mother_of_jack.lua | 6 +- data-otservbr-global/npc/muhad.lua | 6 +- data-otservbr-global/npc/muriel.lua | 10 +- data-otservbr-global/npc/ninev.lua | 4 +- data-otservbr-global/npc/ninos.lua | 6 +- data-otservbr-global/npc/noodles.lua | 12 +- data-otservbr-global/npc/oblivion.lua | 20 +- data-otservbr-global/npc/olrik.lua | 6 +- data-otservbr-global/npc/omrabas.lua | 239 ++-- data-otservbr-global/npc/one_eyed_joe.lua | 115 +- data-otservbr-global/npc/padreia.lua | 10 +- data-otservbr-global/npc/prezil.lua | 4 +- data-otservbr-global/npc/quandons_ghost.lua | 25 +- data-otservbr-global/npc/queen_eloise.lua | 4 +- data-otservbr-global/npc/quentin.lua | 4 +- data-otservbr-global/npc/rabaz.lua | 12 +- data-otservbr-global/npc/rahkem.lua | 4 +- .../npc/rock_with_a_soft_spot.lua | 4 +- data-otservbr-global/npc/roswitha.lua | 8 +- data-otservbr-global/npc/sandomo.lua | 32 +- data-otservbr-global/npc/sholley.lua | 22 +- data-otservbr-global/npc/sister_of_jack.lua | 8 +- data-otservbr-global/npc/spectulus.lua | 28 +- data-otservbr-global/npc/talphion.lua | 4 +- data-otservbr-global/npc/tarun.lua | 10 +- .../npc/tereban_functions.lua | 48 +- data-otservbr-global/npc/terrence.lua | 22 +- data-otservbr-global/npc/the_beggar_king.lua | 5 +- data-otservbr-global/npc/tomruk_the_ruddy.lua | 25 +- data-otservbr-global/npc/tyrias.lua | 4 +- data-otservbr-global/npc/ubaid.lua | 4 +- data-otservbr-global/npc/umar.lua | 4 +- data-otservbr-global/npc/uzon.lua | 4 +- data-otservbr-global/npc/yberius.lua | 4 +- data-otservbr-global/npc/zarifan.lua | 23 +- .../npc/zedrulon_the_fallen.lua | 4 +- .../adventurers_guild/adventurers_stone.lua | 2 +- .../actions/adventurers_guild/magic_door.lua | 6 +- .../scripts/actions/bosses_levers/mazoran.lua | 24 + .../actions/bosses_levers/plagirath.lua | 24 + .../scripts/actions/bosses_levers/ragiaz.lua | 30 + .../actions/bosses_levers/razzagorn.lua | 24 + .../actions/bosses_levers/shulgrax.lua | 24 + .../scripts/actions/bosses_levers/tarbaz.lua | 24 + .../actions/bosses_levers/zamulosh.lua | 33 + .../actions/object/moonlight_crystals.lua | 10 +- .../actions/other/construction_kits.lua | 12 +- .../scripts/actions/other/destroy.lua | 2 +- .../scripts/actions/other/gems.lua | 34 +- .../actions/other/others/quest_system2.lua | 18 +- .../other/ursagrodon.lua} | 18 +- .../scripts/actions/tools/skinning.lua | 8 +- .../actions/valuables/random_items.lua | 18 - .../creaturescripts/customs/freequests.lua | 42 +- .../monster/lower_roshamuul.lua} | 0 .../others/map_attributes_loader.lua | 4 +- .../scripts/lib/register_actions.lua | 87 +- .../movements/teleport/adventurers_guild.lua | 4 +- .../movements/teleport/lower_roshamuul.lua | 28 + .../actions_treasure.lua | 26 +- .../actions_warrior_skeleton.lua | 13 +- .../creaturescripts_the_great_dragon_hunt.lua | 2 +- .../quests/dark_trails/actions_corpse.lua | 6 +- .../actions_lever_death_priest_shargon.lua | 80 +- .../dark_trails/actions_lever_the_ravager.lua | 24 +- ...aturescripts_kill_death_priest_shargon.lua | 11 +- .../creaturescripts_kill_the_ravager.lua | 4 +- .../movements_necrometer_tile_access.lua | 7 +- .../quests/fathers_burden/actions_corpse.lua | 4 +- .../actions_bone_flute.lua | 4 +- .../actions_bone_flute_wall.lua | 4 +- .../actions_boots_of_homecoming.lua | 0 .../actions_color_levers.lua | 22 +- .../actions_ferumbras_amulet.lua | 0 .../actions_ferumbras_lever.lua | 86 ++ .../actions_ferumbras_mana_keg.lua | 0 .../actions_flower_puzzle_lever.lua | 9 +- .../actions_grave_flower.lua | 0 .../actions_habitat_corrupted.lua | 24 +- .../actions_habitat_desert.lua | 23 +- .../actions_habitat_dimension.lua | 23 +- .../actions_habitat_grass.lua | 23 +- .../actions_habitat_ice.lua | 23 +- .../actions_habitat_lever.lua | 4 +- .../actions_habitat_mushroom.lua | 23 +- .../actions_habitat_roshamuul.lua | 23 +- .../actions_habitat_venom.lua | 24 +- .../actions_lever_first.lua | 10 +- .../actions_lever_four.lua | 10 +- .../actions_lever_second.lua | 10 +- .../actions_lever_third.lua | 16 +- .../actions_mysterious_scroll.lua | 4 +- .../actions_purified_soul.lua | 0 .../ferumbras_ascendant/actions_rat_lever.lua | 49 + .../actions_reward.lua | 4 +- .../actions_sacrifice.lua | 26 +- .../actions_statue.lua | 4 +- .../actions_tarbaz_notes.lua | 8 +- .../actions_teleportation_rod.lua | 15 +- .../actions_the_shatterer_lever.lua | 51 + .../actions_the_shatterer_levers.lua | 18 +- .../creaturescripts_bone_capsule.lua | 0 .../creaturescripts_bosses_kill.lua | 76 ++ .../creaturescripts_death_dragon.lua | 2 +- .../creaturescripts_disgusting_ooze_death.lua | 0 ...rescripts_ferumbras_mortal_shell_death.lua | 0 ...reaturescripts_ferumbras_soul_splinter.lua | 0 .../creaturescripts_rift_invader_death.lua | 24 +- .../creaturescripts_the_shatterer_kill.lua | 6 +- .../creaturescripts_zamulosh_clone.lua | 2 +- ...balevents_ferumbras_ascendant_effect_1.lua | 0 ...balevents_ferumbras_ascendant_effect_2.lua | 0 .../movements_blue_gem.lua | 24 +- .../movements_boss_teleport.lua | 36 + .../movements_desperate_soul.lua | 18 + .../movements_entrance.lua | 30 +- .../movements_flower_puzzle.lua | 0 .../movements_gate_of_deathstruction.lua | 2 +- .../movements_green_gem.lua | 24 +- .../movements_habitats_access.lua | 4 +- .../movements_lovely_monsters.lua | 15 +- .../movements_mazoran_fire.lua | 0 .../movements_plagirath_access.lua | 2 +- .../movements_razzagorn_access.lua | 2 +- .../movements_red_gem.lua | 30 +- .../movements_seal.lua | 45 +- .../movements_shulgrax_lever.lua | 2 +- .../movements_stair.lua | 14 +- .../movements_vortex.lua | 4 +- .../movements_zamulosh_teleport.lua | 6 +- .../actions_ferumbras_lever.lua | 104 -- .../ferumbras_ascension/actions_mazoran.lua | 105 -- .../ferumbras_ascension/actions_plagirath.lua | 102 -- .../ferumbras_ascension/actions_ragiaz.lua | 114 -- .../ferumbras_ascension/actions_rat_lever.lua | 102 -- .../ferumbras_ascension/actions_razzagorn.lua | 102 -- .../ferumbras_ascension/actions_shulgrax.lua | 102 -- .../ferumbras_ascension/actions_tarbaz.lua | 102 -- .../actions_the_shatterer_lever.lua | 112 -- .../ferumbras_ascension/actions_zamulosh.lua | 116 -- .../creaturescripts_bosses_kill.lua | 135 -- .../movements_boss_teleport.lua | 79 -- .../movements_desperate_soul.lua | 24 - .../formogar_mine_hoist/movements_hoist.lua | 2 +- .../actions_amforas.lua | 4 +- .../actions_ashes.lua | 4 +- .../actions_blood.lua | 4 +- .../actions_bones.lua | 4 +- .../actions_bookcase.lua | 4 +- .../actions_brain.lua | 4 +- .../actions_caixa.lua | 4 +- .../actions_candles.lua | 4 +- .../actions_cape.lua | 4 +- .../actions_chalk.lua | 4 +- .../quests/gravedigger/actions_flask.lua | 17 + .../actions_hallowed.lua | 4 +- .../gravedigger/actions_inscriptions.lua | 20 + .../actions_key1.lua | 2 +- .../actions_key2.lua | 10 +- .../quests/gravedigger/actions_monks.lua | 24 + .../actions_palanca.lua | 6 +- .../actions_pyramids1.lua | 8 +- .../actions_pyramids2.lua | 12 +- .../actions_sacrifice.lua | 6 +- .../actions_scroll.lua | 6 +- .../actions_statue.lua | 10 +- .../actions_tears.lua | 4 +- .../actions_tincture.lua | 4 +- .../actions_ancient_feud_entrances.lua | 2 +- .../quests/lions_rock/actions_lions_rock.lua | 28 +- .../lions_rock/movements_lions_rock.lua | 20 +- .../actions_bone.lua | 0 .../actions_chalk.lua | 0 .../actions_gravel.lua | 0 .../actions_mixture.lua | 0 .../actions_mortar.lua | 0 .../actions_resonance_chamber.lua | 0 .../actions_trough.lua | 3 +- .../actions_to_take_roots.lua | 20 +- ...s_mono_detector_strange_probing_device.lua | 106 -- .../actions_the_ancient_sewers.lua | 46 - .../actions_the_ancient_sewers.lua | 84 ++ .../actions_blue_pollen.lua | 41 - .../others/actions_ectoplasm_container.lua | 4 +- .../others/actions_exterminator_flask.lua | 4 +- .../quests/others/actions_fire_bug.lua | 12 +- .../quests/others/actions_holy_water.lua | 53 +- .../others/actions_steal_from_thieves.lua | 4 +- .../movements_lower_roshamuul.lua | 50 - .../quests/spike_tasks/actions_fertilizer.lua | 6 +- .../spike_tasks/actions_ghost_detector.lua | 22 +- .../quests/spike_tasks/actions_lode_stone.lua | 58 +- .../quests/spike_tasks/actions_nests.lua | 8 +- .../spike_tasks/actions_spirit_shovel.lua | 8 +- .../spike_tasks/actions_thermometer.lua | 4 +- .../spike_tasks/actions_tuning_fork.lua | 6 +- .../creaturescripts_lower_spike_kill.lua | 6 +- .../creaturescripts_middle_spike_kill.lua | 6 +- .../creaturescripts_upper_spike_kill.lua | 6 +- .../the_cursed_crystal/actions_MedusaOil.lua | 55 +- .../the_cursed_crystal/actions_Misc.lua | 134 +- .../the_cursed_crystal/actions_Ointment.lua | 9 +- .../movements_StepIn_CursedCrystal.lua | 82 +- .../actions_flask.lua | 19 - .../actions_inscriptions.lua | 20 - .../actions_monks.lua | 24 - .../creaturescripts_necromancer_servant.lua | 12 - .../movements_dormitory_teleport.lua | 6 +- .../movements_necromancer_servant.lua | 7 +- .../movements_sacrifice_teleport.lua | 20 +- .../movements_teleport.lua | 8 +- .../moviments_pythius_boss_teleport.lua | 2 +- .../movement-find-remains.lua | 4 +- .../actions_the_outlaw_camp_quest.lua | 2 +- .../actions_package.lua | 4 +- .../actions_waldos_posthorn.lua | 4 +- .../movements_geomantic_charges.lua | 6 +- .../the_tainted_soul/actions_star_herb.lua | 6 +- .../actions_ultimate_booze_beer_bottle.lua | 4 +- .../quests/tinder_box/actions_reward.lua | 12 + .../actions_tinder_box.lua | 2 - .../actions_reward.lua | 23 - .../movements_prohibit_entry.lua | 23 - .../to_blind_the_enemy_quest/mirror.lua | 4 +- data-otservbr-global/startup/tables/chest.lua | 77 +- .../startup/tables/corpse.lua | 21 +- .../startup/tables/door_quest.lua | 41 +- data-otservbr-global/startup/tables/item.lua | 540 +------- data-otservbr-global/startup/tables/lever.lua | 121 -- .../startup/tables/teleport.lua | 9 + data-otservbr-global/world/otservbr-npc.xml | 9 - data/items/items.xml | 25 +- data/libs/functions/player.lua | 10 +- 352 files changed, 3169 insertions(+), 5429 deletions(-) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/bosses/ascending_ferumbras.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/bosses/death_dragon.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/bosses/destabilized_ferumbras.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/bosses/enraged_soul.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/bosses/ferumbras_mortal_shell.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/bosses/ferumbras_soul_splinter.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/bosses/mazoran.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/bosses/plagirath.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/bosses/ragiaz.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/bosses/razzagorn.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/bosses/redeemed_soul.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/bosses/shulgrax.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/bosses/sin_devourer.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/bosses/tarbaz.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/bosses/the_lord_of_the_lice.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/bosses/the_shatterer.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/bosses/zamulosh.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/bosses/zamulosh2.lua (98%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/bosses/zamulosh3.lua (98%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/damned_soul.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/desperate_soul.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/disgusting_ooze.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/ferumbras_essence.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/lovely/lovely_deer.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/lovely/lovely_frazzlemaw.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/lovely/lovely_polar_bear.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/lovely/lovely_rotworm.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/lovely/lovely_scorpion.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/lovely/lovely_snake.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/lovely/lovely_souleater.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/lovely/lovely_yielothax.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/rage_of_mazoran.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/summons/enthralled_demon.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/summons/rift_fragment.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/summons/rift_invader.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/traps/bone_capsule.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/traps/despair.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/traps/electric_sparks.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/traps/eruption_of_destruction.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/traps/guilt.lua (100%) rename data-otservbr-global/monster/quests/{ferumbras_ascension => ferumbras_ascendant}/traps/void.lua (100%) create mode 100644 data-otservbr-global/scripts/actions/bosses_levers/mazoran.lua create mode 100644 data-otservbr-global/scripts/actions/bosses_levers/plagirath.lua create mode 100644 data-otservbr-global/scripts/actions/bosses_levers/ragiaz.lua create mode 100644 data-otservbr-global/scripts/actions/bosses_levers/razzagorn.lua create mode 100644 data-otservbr-global/scripts/actions/bosses_levers/shulgrax.lua create mode 100644 data-otservbr-global/scripts/actions/bosses_levers/tarbaz.lua create mode 100644 data-otservbr-global/scripts/actions/bosses_levers/zamulosh.lua rename data-otservbr-global/scripts/{quests/tinder_box_quest_chyllfroest/actions_ursagrodon.lua => actions/other/ursagrodon.lua} (71%) rename data-otservbr-global/scripts/{quests/roshamuul_quest/creaturescripts_lower_roshamuul.lua => creaturescripts/monster/lower_roshamuul.lua} (100%) create mode 100644 data-otservbr-global/scripts/movements/teleport/lower_roshamuul.lua rename data-otservbr-global/scripts/quests/{the_great_dragon_hunt_quest => adventurers_guild}/actions_treasure.lua (63%) rename data-otservbr-global/scripts/quests/{the_great_dragon_hunt_quest => adventurers_guild}/actions_warrior_skeleton.lua (52%) rename data-otservbr-global/scripts/quests/{the_great_dragon_hunt_quest => adventurers_guild}/creaturescripts_the_great_dragon_hunt.lua (84%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_bone_flute.lua (86%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_bone_flute_wall.lua (70%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_boots_of_homecoming.lua (100%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_color_levers.lua (57%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_ferumbras_amulet.lua (100%) create mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_ferumbras_lever.lua rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_ferumbras_mana_keg.lua (100%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_flower_puzzle_lever.lua (88%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_grave_flower.lua (100%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_habitat_corrupted.lua (94%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_habitat_desert.lua (93%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_habitat_dimension.lua (94%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_habitat_grass.lua (94%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_habitat_ice.lua (95%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_habitat_lever.lua (68%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_habitat_mushroom.lua (94%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_habitat_roshamuul.lua (95%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_habitat_venom.lua (95%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_lever_first.lua (64%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_lever_four.lua (58%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_lever_second.lua (65%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_lever_third.lua (62%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_mysterious_scroll.lua (72%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_purified_soul.lua (100%) create mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_rat_lever.lua rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_reward.lua (88%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_sacrifice.lua (60%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_statue.lua (80%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_tarbaz_notes.lua (61%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_teleportation_rod.lua (59%) create mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_the_shatterer_lever.lua rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/actions_the_shatterer_levers.lua (80%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/creaturescripts_bone_capsule.lua (100%) create mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_bosses_kill.lua rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/creaturescripts_death_dragon.lua (87%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/creaturescripts_disgusting_ooze_death.lua (100%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/creaturescripts_ferumbras_mortal_shell_death.lua (100%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/creaturescripts_ferumbras_soul_splinter.lua (100%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/creaturescripts_rift_invader_death.lua (72%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/creaturescripts_the_shatterer_kill.lua (93%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/creaturescripts_zamulosh_clone.lua (84%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/globalevents_ferumbras_ascendant_effect_1.lua (100%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/globalevents_ferumbras_ascendant_effect_2.lua (100%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/movements_blue_gem.lua (73%) create mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_boss_teleport.lua create mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_desperate_soul.lua rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/movements_entrance.lua (57%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/movements_flower_puzzle.lua (100%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/movements_gate_of_deathstruction.lua (90%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/movements_green_gem.lua (73%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/movements_habitats_access.lua (88%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/movements_lovely_monsters.lua (69%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/movements_mazoran_fire.lua (100%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/movements_plagirath_access.lua (86%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/movements_razzagorn_access.lua (87%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/movements_red_gem.lua (67%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/movements_seal.lua (63%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/movements_shulgrax_lever.lua (86%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/movements_stair.lua (60%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/movements_vortex.lua (71%) rename data-otservbr-global/scripts/quests/{ferumbras_ascension => ferumbras_ascendant}/movements_zamulosh_teleport.lua (79%) delete mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ferumbras_lever.lua delete mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/actions_mazoran.lua delete mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/actions_plagirath.lua delete mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ragiaz.lua delete mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/actions_rat_lever.lua delete mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/actions_razzagorn.lua delete mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/actions_shulgrax.lua delete mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/actions_tarbaz.lua delete mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/actions_the_shatterer_lever.lua delete mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/actions_zamulosh.lua delete mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_bosses_kill.lua delete mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/movements_boss_teleport.lua delete mode 100644 data-otservbr-global/scripts/quests/ferumbras_ascension/movements_desperate_soul.lua rename data-otservbr-global/scripts/quests/{the_gravedigger_of_drefia => gravedigger}/actions_amforas.lua (70%) rename data-otservbr-global/scripts/quests/{the_gravedigger_of_drefia => gravedigger}/actions_ashes.lua (60%) rename data-otservbr-global/scripts/quests/{the_gravedigger_of_drefia => gravedigger}/actions_blood.lua (57%) rename data-otservbr-global/scripts/quests/{the_gravedigger_of_drefia => gravedigger}/actions_bones.lua (53%) rename data-otservbr-global/scripts/quests/{the_gravedigger_of_drefia => gravedigger}/actions_bookcase.lua (68%) rename data-otservbr-global/scripts/quests/{the_gravedigger_of_drefia => gravedigger}/actions_brain.lua (74%) rename data-otservbr-global/scripts/quests/{the_gravedigger_of_drefia => gravedigger}/actions_caixa.lua (55%) rename data-otservbr-global/scripts/quests/{the_gravedigger_of_drefia => gravedigger}/actions_candles.lua (62%) rename data-otservbr-global/scripts/quests/{the_gravedigger_of_drefia => gravedigger}/actions_cape.lua (58%) rename data-otservbr-global/scripts/quests/{the_gravedigger_of_drefia => gravedigger}/actions_chalk.lua (63%) create mode 100644 data-otservbr-global/scripts/quests/gravedigger/actions_flask.lua rename data-otservbr-global/scripts/quests/{the_gravedigger_of_drefia => gravedigger}/actions_hallowed.lua (61%) create mode 100644 data-otservbr-global/scripts/quests/gravedigger/actions_inscriptions.lua rename data-otservbr-global/scripts/quests/{the_gravedigger_of_drefia => gravedigger}/actions_key1.lua (82%) rename data-otservbr-global/scripts/quests/{the_gravedigger_of_drefia => gravedigger}/actions_key2.lua (52%) create mode 100644 data-otservbr-global/scripts/quests/gravedigger/actions_monks.lua rename data-otservbr-global/scripts/quests/{the_gravedigger_of_drefia => gravedigger}/actions_palanca.lua (56%) rename data-otservbr-global/scripts/quests/{the_gravedigger_of_drefia => gravedigger}/actions_pyramids1.lua (53%) rename data-otservbr-global/scripts/quests/{the_gravedigger_of_drefia => gravedigger}/actions_pyramids2.lua (50%) rename data-otservbr-global/scripts/quests/{the_gravedigger_of_drefia => gravedigger}/actions_sacrifice.lua (61%) rename data-otservbr-global/scripts/quests/{the_gravedigger_of_drefia => gravedigger}/actions_scroll.lua (55%) rename data-otservbr-global/scripts/quests/{the_gravedigger_of_drefia => gravedigger}/actions_statue.lua (54%) rename data-otservbr-global/scripts/quests/{the_gravedigger_of_drefia => gravedigger}/actions_tears.lua (59%) rename data-otservbr-global/scripts/quests/{the_gravedigger_of_drefia => gravedigger}/actions_tincture.lua (60%) rename data-otservbr-global/scripts/quests/{roshamuul_quest => lower_roshamuul}/actions_bone.lua (100%) rename data-otservbr-global/scripts/quests/{roshamuul_quest => lower_roshamuul}/actions_chalk.lua (100%) rename data-otservbr-global/scripts/quests/{roshamuul_quest => lower_roshamuul}/actions_gravel.lua (100%) rename data-otservbr-global/scripts/quests/{roshamuul_quest => lower_roshamuul}/actions_mixture.lua (100%) rename data-otservbr-global/scripts/quests/{roshamuul_quest => lower_roshamuul}/actions_mortar.lua (100%) rename data-otservbr-global/scripts/quests/{roshamuul_quest => lower_roshamuul}/actions_resonance_chamber.lua (100%) rename data-otservbr-global/scripts/quests/{roshamuul_quest => lower_roshamuul}/actions_trough.lua (66%) rename data-otservbr-global/scripts/quests/oramond/{to_take_roots => chavis_tasks}/actions_to_take_roots.lua (60%) delete mode 100644 data-otservbr-global/scripts/quests/oramond/probing/actions_mono_detector_strange_probing_device.lua delete mode 100644 data-otservbr-global/scripts/quests/oramond/the_ancient_sewers/actions_the_ancient_sewers.lua create mode 100644 data-otservbr-global/scripts/quests/oramond/the_glooth_brothers_tasks/actions_the_ancient_sewers.lua delete mode 100644 data-otservbr-global/scripts/quests/oramond/the_powder_of_the_stars/actions_blue_pollen.lua delete mode 100644 data-otservbr-global/scripts/quests/roshamuul_quest/movements_lower_roshamuul.lua delete mode 100644 data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_flask.lua delete mode 100644 data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_inscriptions.lua delete mode 100644 data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_monks.lua delete mode 100644 data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/creaturescripts_necromancer_servant.lua create mode 100644 data-otservbr-global/scripts/quests/tinder_box/actions_reward.lua rename data-otservbr-global/scripts/quests/{tinder_box_quest_chyllfroest => tinder_box}/actions_tinder_box.lua (99%) delete mode 100644 data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/actions_reward.lua delete mode 100644 data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/movements_prohibit_entry.lua diff --git a/data-otservbr-global/lib/core/constants.lua b/data-otservbr-global/lib/core/constants.lua index e69de29bb2d..0672aa00c8d 100644 --- a/data-otservbr-global/lib/core/constants.lua +++ b/data-otservbr-global/lib/core/constants.lua @@ -0,0 +1,33 @@ +ROSHAMUUL_MORTAR_THROWN = 20200 +ROSHAMUUL_KILLED_FRAZZLEMAWS = 20201 +ROSHAMUUL_KILLED_SILENCERS = 20202 +ROSHAMUUL_GOLD_RECORD = 20203 + +SPIKE_FAME_POINTS = 27890 + +SPIKE_UPPER_PACIFIER_MAIN = 27891 +SPIKE_UPPER_PACIFIER_DAILY = 27892 +SPIKE_UPPER_MOUND_MAIN = 27893 +SPIKE_UPPER_MOUND_DAILY = 27894 +SPIKE_UPPER_TRACK_MAIN = 27895 +SPIKE_UPPER_TRACK_DAILY = 27896 +SPIKE_UPPER_KILL_MAIN = 27897 +SPIKE_UPPER_KILL_DAILY = 27898 + +SPIKE_MIDDLE_CHARGE_MAIN = 27899 +SPIKE_MIDDLE_CHARGE_DAILY = 27900 +SPIKE_MIDDLE_MUSHROOM_MAIN = 27901 +SPIKE_MIDDLE_MUSHROOM_DAILY = 27902 +SPIKE_MIDDLE_NEST_MAIN = 27903 +SPIKE_MIDDLE_NEST_DAILY = 27904 +SPIKE_MIDDLE_KILL_MAIN = 27905 +SPIKE_MIDDLE_KILL_DAILY = 27906 + +SPIKE_LOWER_PARCEL_MAIN = 27907 +SPIKE_LOWER_PARCEL_DAILY = 27908 +SPIKE_LOWER_UNDERCOVER_MAIN = 27909 +SPIKE_LOWER_UNDERCOVER_DAILY = 27910 +SPIKE_LOWER_LAVA_MAIN = 27911 +SPIKE_LOWER_LAVA_DAILY = 27912 +SPIKE_LOWER_KILL_MAIN = 27913 +SPIKE_LOWER_KILL_DAILY = 27914 diff --git a/data-otservbr-global/lib/core/quests.lua b/data-otservbr-global/lib/core/quests.lua index 8d7d9ede37c..8623ba7072a 100644 --- a/data-otservbr-global/lib/core/quests.lua +++ b/data-otservbr-global/lib/core/quests.lua @@ -115,49 +115,49 @@ if not Quests then }, [3] = { name = "Spike Task", - startStorageId = Storage.Quest.U10_20.SpikeTaskQuest.QuestLine, + startStorageId = Storage.SpikeTaskQuest.QuestLine, startStorageValue = 1, missions = { [1] = { name = "First Task", - storageId = Storage.Quest.U10_20.SpikeTaskQuest.Gnomilly, + storageId = Storage.SpikeTaskQuest.Gnomilly, missionId = 1021, startValue = 0, endValue = 100, description = function(player) - return string.format("You have %d points of task. You need 100 points to take Cave Explorer outfit.", (math.max(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Gnomilly), 0))) + return string.format("You have %d points of task. You need 100 points to take Cave Explorer outfit.", (math.max(player:getStorageValue(Storage.SpikeTaskQuest.Gnomilly), 0))) end, }, [2] = { name = "Second Task", - storageId = Storage.Quest.U10_20.SpikeTaskQuest.Gnombold.Points, + storageId = Storage.SpikeTaskQuest.Gnombold.Points, missionId = 1022, startValue = 0, endValue = 100, description = function(player) - return string.format("You have %d points of task. You need 100 points to take first addon.", (math.max(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Gnombold.Points), 0))) + return string.format("You have %d points of task. You need 100 points to take first addon.", (math.max(player:getStorageValue(Storage.SpikeTaskQuest.Gnombold.Points), 0))) end, }, [3] = { name = "Third Task", - storageId = Storage.Quest.U10_20.SpikeTaskQuest.Gnomargery.Points, + storageId = Storage.SpikeTaskQuest.Gnomargery.Points, missionId = 1023, startValue = 0, endValue = 100, description = function(player) - return string.format("You have %d points of task. You need 100 points to take second addon.", (math.max(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Gnomargery.Points), 0))) + return string.format("You have %d points of task. You need 100 points to take second addon.", (math.max(player:getStorageValue(Storage.SpikeTaskQuest.Gnomargery.Points), 0))) end, }, }, }, [4] = { name = "A Father's Burden", - startStorageId = Storage.Quest.U8_6.AFathersBurden.QuestLog, + startStorageId = Storage.FathersBurden.QuestLog, startStorageValue = 1, missions = { [1] = { name = "The Birthday Presents", - storageId = Storage.Quest.U8_6.AFathersBurden.Status, + storageId = Storage.FathersBurden.Status, missionId = 1024, startValue = 1, endValue = 2, @@ -169,7 +169,7 @@ if not Quests then }, [2] = { name = "The Magic Bow - Sinew", - storageId = Storage.Quest.U8_6.AFathersBurden.Sinew, + storageId = Storage.FathersBurden.Sinew, missionId = 1025, startValue = 1, endValue = 2, @@ -180,7 +180,7 @@ if not Quests then }, [3] = { name = "The Magic Bow - Wood", - storageId = Storage.Quest.U8_6.AFathersBurden.Wood, + storageId = Storage.FathersBurden.Wood, missionId = 1026, startValue = 1, endValue = 2, @@ -192,7 +192,7 @@ if not Quests then }, [4] = { name = "The Magic Robe - Cloth", - storageId = Storage.Quest.U8_6.AFathersBurden.Cloth, + storageId = Storage.FathersBurden.Cloth, missionId = 1027, startValue = 1, endValue = 2, @@ -204,7 +204,7 @@ if not Quests then }, [5] = { name = "The Magic Robe - Silk", - storageId = Storage.Quest.U8_6.AFathersBurden.Silk, + storageId = Storage.FathersBurden.Silk, missionId = 1028, startValue = 1, endValue = 2, @@ -215,7 +215,7 @@ if not Quests then }, [6] = { name = "The Magic Rod - Crystal", - storageId = Storage.Quest.U8_6.AFathersBurden.Crystal, + storageId = Storage.FathersBurden.Crystal, missionId = 1029, startValue = 1, endValue = 2, @@ -226,7 +226,7 @@ if not Quests then }, [7] = { name = "The Magic Rod - Root", - storageId = Storage.Quest.U8_6.AFathersBurden.Root, + storageId = Storage.FathersBurden.Root, missionId = 1030, startValue = 1, endValue = 2, @@ -237,7 +237,7 @@ if not Quests then }, [8] = { name = "The Magic Shield - Iron", - storageId = Storage.Quest.U8_6.AFathersBurden.Iron, + storageId = Storage.FathersBurden.Iron, missionId = 1031, startValue = 1, endValue = 2, @@ -249,7 +249,7 @@ if not Quests then }, [9] = { name = "The Magic Shield - Scale", - storageId = Storage.Quest.U8_6.AFathersBurden.Scale, + storageId = Storage.FathersBurden.Scale, missionId = 1032, startValue = 1, endValue = 2, @@ -3111,7 +3111,7 @@ if not Quests then }, [3] = { name = "Pythius the Rotten", - storageId = Storage.Quest.U8_4.TheHiddenCityOfBeregar.FirewalkerBoots, + storageId = Storage.QuestChests.FirewalkerBoots, missionId = 10230, startValue = 1, endValue = 1, @@ -3488,12 +3488,12 @@ if not Quests then }, [24] = { name = "The Postman Missions", - startStorageId = Storage.Quest.U7_24.ThePostmanMissions.Mission01, + startStorageId = Storage.Postman.Mission01, startStorageValue = 1, missions = { [1] = { name = "Mission 01 - Check Postal Routes", - storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission01, + storageId = Storage.Postman.Mission01, missionId = 10252, startValue = 1, endValue = 6, @@ -3508,7 +3508,7 @@ if not Quests then }, [2] = { name = "Mission 02 - Fix Mailbox", - storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission02, + storageId = Storage.Postman.Mission02, missionId = 10253, startValue = 1, endValue = 3, @@ -3520,7 +3520,7 @@ if not Quests then }, [3] = { name = "Mission 03 - Bill Delivery", - storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission03, + storageId = Storage.Postman.Mission03, missionId = 10254, startValue = 1, endValue = 3, @@ -3533,7 +3533,7 @@ if not Quests then }, [4] = { name = "Mission 04 - Aggressive Dogs", - storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission04, + storageId = Storage.Postman.Mission04, missionId = 10255, startValue = 1, endValue = 2, @@ -3544,7 +3544,7 @@ if not Quests then }, [5] = { name = "Mission 05 - Present Delivery", - storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission05, + storageId = Storage.Postman.Mission05, missionId = 10256, startValue = 1, endValue = 4, @@ -3558,7 +3558,7 @@ if not Quests then }, [6] = { name = "Mission 06 - New Uniforms", - storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission06, + storageId = Storage.Postman.Mission06, missionId = 10257, startValue = 1, endValue = 13, @@ -3582,7 +3582,7 @@ if not Quests then }, [7] = { name = "Mission 07 - Measurements", - storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission07, + storageId = Storage.Postman.Mission07, missionId = 10258, startValue = 1, endValue = 9, @@ -3599,7 +3599,7 @@ if not Quests then }, [8] = { name = "Mission 08 - Missing Courier", - storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission08, + storageId = Storage.Postman.Mission08, missionId = 10259, startValue = 1, endValue = 3, @@ -3611,7 +3611,7 @@ if not Quests then }, [9] = { name = "Mission 09 - Dear Santa", - storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission09, + storageId = Storage.Postman.Mission09, missionId = 10260, startValue = 1, endValue = 4, @@ -3624,7 +3624,7 @@ if not Quests then }, [10] = { name = "Mission 10 - Mintwallin", - storageId = Storage.Quest.U7_24.ThePostmanMissions.Mission10, + storageId = Storage.Postman.Mission10, missionId = 10261, startValue = 1, endValue = 3, @@ -3636,7 +3636,7 @@ if not Quests then }, [11] = { name = "Postman Rank", - storageId = Storage.Quest.U7_24.ThePostmanMissions.Rank, + storageId = Storage.Postman.Rank, missionId = 10262, startValue = 1, endValue = 5, @@ -4382,12 +4382,12 @@ if not Quests then }, [30] = { name = "The White Raven Monastery", - startStorageId = Storage.Quest.U7_24.TheWhiteRavenMonastery.QuestLog, + startStorageId = Storage.WhiteRavenMonastery.QuestLog, startStorageValue = 1, missions = { [1] = { name = "Access to the Isle of Kings", - storageId = Storage.Quest.U7_24.TheWhiteRavenMonastery.Passage, + storageId = Storage.WhiteRavenMonastery.Passage, missionId = 10315, startValue = 1, endValue = 2, @@ -4398,7 +4398,7 @@ if not Quests then }, [2] = { name = "The Investigation", - storageId = Storage.Quest.U7_24.TheWhiteRavenMonastery.Diary, + storageId = Storage.WhiteRavenMonastery.Diary, missionId = 10316, startValue = 1, endValue = 2, @@ -4412,12 +4412,12 @@ if not Quests then }, [31] = { name = "Tibia Tales", - startStorageId = Storage.Quest.U8_1.TibiaTales.DefaultStart, + startStorageId = Storage.TibiaTales.DefaultStart, startStorageValue = 1, missions = { [1] = { name = "To Appease the Mighty", - storageId = Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest, + storageId = Storage.TibiaTales.ToAppeaseTheMightyQuest, missionId = 10317, startValue = 0, endValue = 4, @@ -4431,7 +4431,7 @@ if not Quests then }, [2] = { name = "Arito's Task", - storageId = Storage.Quest.U8_1.TibiaTales.AritosTask, + storageId = Storage.TibiaTales.AritosTask, missionId = 10318, startValue = 1, endValue = 3, @@ -4443,7 +4443,7 @@ if not Quests then }, [3] = { name = "Lion's Rock", - storageId = Storage.Quest.U10_70.LionsRock.Questline, + storageId = Storage.LionsRock.Questline, missionId = 10319, startValue = 1, endValue = 11, @@ -4451,25 +4451,25 @@ if not Quests then [1] = function(player) return string.format( "You have discovered the Lion's Rock. If you pass the following tests you may enter the inner sanctum.\n\nThe Lion's Strength %d/1\nThe Lion's Beauty %d/1\nThe Lion's Tears %d/1", - (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsStrength), 0)), - (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsBeauty), 0)), - (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsTears), 0)) + (math.max(player:getStorageValue(Storage.LionsRock.OuterSanctum.LionsStrength), 0)), + (math.max(player:getStorageValue(Storage.LionsRock.OuterSanctum.LionsBeauty), 0)), + (math.max(player:getStorageValue(Storage.LionsRock.OuterSanctum.LionsTears), 0)) ) end, [2] = function(player) return string.format( "You have discovered the Lion's Rock. If you pass the following tests you may enter the inner sanctum.\n\nThe Lion's Strength %d/1\nThe Lion's Beauty %d/1\nThe Lion's Tears %d/1", - (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsStrength), 0)), - (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsBeauty), 0)), - (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsTears), 0)) + (math.max(player:getStorageValue(Storage.LionsRock.OuterSanctum.LionsStrength), 0)), + (math.max(player:getStorageValue(Storage.LionsRock.OuterSanctum.LionsBeauty), 0)), + (math.max(player:getStorageValue(Storage.LionsRock.OuterSanctum.LionsTears), 0)) ) end, [3] = function(player) return string.format( "You have discovered the Lion's Rock. If you pass the following tests you may enter the inner sanctum.\n\nThe Lion's Strength %d/1\nThe Lion's Beauty %d/1\nThe Lion's Tears %d/1", - (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsStrength), 0)), - (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsBeauty), 0)), - (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsTears), 0)) + (math.max(player:getStorageValue(Storage.LionsRock.OuterSanctum.LionsStrength), 0)), + (math.max(player:getStorageValue(Storage.LionsRock.OuterSanctum.LionsBeauty), 0)), + (math.max(player:getStorageValue(Storage.LionsRock.OuterSanctum.LionsTears), 0)) ) end, [4] = "You have passed the three tests of Lion's Rock and thus lit the three mystical pyramids. You may enter the inner sanctum now. - What other secrets could be hidden down there?", @@ -4477,28 +4477,28 @@ if not Quests then [6] = function(player) return string.format( "lions' enemies in this area of the temple. What could be the resolution?\n\nblood %d/1\negg %d/1\neye %d/1\npoison %d/1", - (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.SnakeSign), 0)), - (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.LizardSign), 0)), - (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.ScorpionSign), 0)), - (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.HyenaSign), 0)) + (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.SnakeSign), 0)), + (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.LizardSign), 0)), + (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.ScorpionSign), 0)), + (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.HyenaSign), 0)) ) end, [7] = function(player) return string.format( "lions' enemies in this area of the temple. What could be the resolution?\n\nblood %d/1\negg %d/1\neye %d/1\npoison %d/1", - (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.SnakeSign), 0)), - (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.LizardSign), 0)), - (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.ScorpionSign), 0)), - (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.HyenaSign), 0)) + (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.SnakeSign), 0)), + (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.LizardSign), 0)), + (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.ScorpionSign), 0)), + (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.HyenaSign), 0)) ) end, [8] = function(player) return string.format( "lions' enemies in this area of the temple. What could be the resolution?\n\nblood %d/1\negg %d/1\neye %d/1\npoison %d/1", - (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.SnakeSign), 0)), - (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.LizardSign), 0)), - (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.ScorpionSign), 0)), - (math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.HyenaSign), 0)) + (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.SnakeSign), 0)), + (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.LizardSign), 0)), + (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.ScorpionSign), 0)), + (math.max(player:getStorageValue(Storage.LionsRock.InnerSanctum.HyenaSign), 0)) ) end, [9] = 'In the north-west area of the Inner Sanctum, find the southern rectangular room to the south-west. In this room you will find 4 "sun" floor inscriptions as well as a rock in the center. The sun inscriptions represent gem slots.', @@ -4507,7 +4507,7 @@ if not Quests then }, [4] = { name = "Against the Spider Cult", - storageId = Storage.Quest.U8_1.TibiaTales.AgainstTheSpiderCult, + storageId = Storage.TibiaTales.AgainstTheSpiderCult, missionId = 10320, startValue = 1, endValue = 6, @@ -4522,7 +4522,7 @@ if not Quests then }, [5] = { name = "An Interest In Botany", - storageId = Storage.Quest.U8_6.AnInterestInBotany.Questline, + storageId = Storage.TibiaTales.AnInterestInBotany.Questline, missionId = 10321, startValue = 1, endValue = 4, @@ -4538,17 +4538,17 @@ if not Quests then }, [6] = { name = "Graves Sanctified - In Progress", - storageId = Storage.Quest.U8_1.RestInHallowedGround.HolyWater, + storageId = Storage.TibiaTales.RestInHallowedGround.HolyWater, missionId = 10322, startValue = 1, endValue = 15, description = function(player) - return string.format("You sanctified %d of 15 graves.", (math.max(player:getStorageValue(Storage.Quest.U8_1.RestInHallowedGround.HolyWater), 0))) + return string.format("You sanctified %d of 15 graves.", (math.max(player:getStorageValue(Storage.TibiaTales.RestInHallowedGround.HolyWater), 0))) end, }, [7] = { name = "Into the Bone Pit", - storageId = Storage.Quest.U8_1.TibiaTales.IntoTheBonePit, + storageId = Storage.TibiaTales.IntoTheBonePit, missionId = 10323, startValue = 1, endValue = 3, @@ -4561,7 +4561,7 @@ if not Quests then }, [8] = { name = "Rest in Hallowed Ground", - storageId = Storage.Quest.U8_1.RestInHallowedGround.Questline, + storageId = Storage.TibiaTales.RestInHallowedGround.Questline, missionId = 10324, startValue = 1, endValue = 5, @@ -4576,7 +4576,7 @@ if not Quests then }, [9] = { name = "The Exterminator", - storageId = Storage.Quest.U8_1.TibiaTales.TheExterminator, + storageId = Storage.TibiaTales.TheExterminator, missionId = 10325, startValue = 1, endValue = 3, @@ -4590,7 +4590,7 @@ if not Quests then }, [10] = { name = "The Ultimate Booze", - storageId = Storage.Quest.U8_1.TibiaTales.UltimateBoozeQuest, + storageId = Storage.TibiaTales.UltimateBoozeQuest, missionId = 10326, startValue = 1, endValue = 3, @@ -4603,7 +4603,7 @@ if not Quests then }, [11] = { name = "Jack to the Future", - storageId = Storage.Quest.U8_7.JackFutureQuest.QuestLine, + storageId = Storage.TibiaTales.JackFutureQuest.QuestLine, missionId = 10327, startValue = 1, endValue = 11, @@ -4636,7 +4636,7 @@ if not Quests then }, [12] = { name = "The Cursed Crystal", - storageId = Storage.Quest.U10_70.TheCursedCrystal.Questline, + storageId = Storage.TibiaTales.TheCursedCrystal.Questline, missionId = 10328, startValue = 0, endValue = 4, @@ -4675,7 +4675,7 @@ if not Quests then }, [14] = { name = "To Outfox a Fox", - storageId = Storage.Quest.U8_1.ToOutfoxAFoxQuest, + storageId = Storage.TibiaTales.ToOutfoxAFoxQuest, missionId = 10432, startValue = 1, endValue = 2, @@ -5153,12 +5153,12 @@ if not Quests then }, [35] = { name = "Oramond", - startStorageId = Storage.Quest.U10_50.OramondQuest.QuestLine, + startStorageId = Storage.Oramond.QuestLine, startStorageValue = 1, missions = { [1] = { name = "To Take Roots", - storageId = Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Mission, + storageId = Storage.Oramond.MissionToTakeRoots, missionId = 10360, startValue = 1, endValue = 3000, @@ -5597,25 +5597,43 @@ if not Quests then }, }, }, - [40] = { + [40] = { -- FREE SLOT FOR A SIMPLE QUEST + name = "XXXXXXXXXXXX", + startStorageId = Storage.AdventurersGuild.GreatDragonHunt.WarriorSkeleton, + startStorageValue = 1, + missions = { + [1] = { + name = "XXXXXXXXXXXX", + storageId = Storage.AdventurersGuild.GreatDragonHunt.WarriorSkeleton, + missionId = 10387, + startValue = 1, + endValue = 2, + states = { + [1] = "XXXXXXXXXXXX", + [2] = "XXXXXXXXXXXX", + }, + }, + }, + }, + [41] = { name = "Adventurers Guild", - startStorageId = Storage.Quest.U9_80.AdventurersGuild.QuestLine, + startStorageId = Storage.AdventurersGuild.QuestLine, startStorageValue = 1, missions = { [1] = { name = "The Great Dragon Hunt", - storageId = Storage.Quest.U10_80.TheGreatDragonHunt.WarriorSkeleton, + storageId = Storage.AdventurersGuild.GreatDragonHunt.WarriorSkeleton, missionId = 10388, startValue = 0, endValue = 2, description = function(player) return ("You are exploring the Kha'zeel Dragon Lairs. Others obviously found a terrible end here. \z - But the dragon hoards might justify the risks. You killed %d/50 dragons and dragon lords."):format(math.max(player:getStorageValue(Storage.Quest.U10_80.TheGreatDragonHunt.DragonCounter), 0)) + But the dragon hoards might justify the risks. You killed %d/50 dragons and dragon lords."):format(math.max(player:getStorageValue(Storage.AdventurersGuild.GreatDragonHunt.DragonCounter), 0)) end, }, [2] = { name = "The Lost Brother", - storageId = Storage.Quest.U10_80.TheLostBrotherQuest, + storageId = Storage.AdventurersGuild.TheLostBrother, missionId = 11000, startValue = 1, endValue = 3, @@ -5627,7 +5645,7 @@ if not Quests then }, }, }, - [41] = { + [42] = { name = "Dawnport", startStorageId = Storage.Quest.U10_55.Dawnport.Questline, startStorageValue = 1, @@ -5722,7 +5740,7 @@ if not Quests then }, }, }, - [42] = { + [43] = { name = "The Rookie Guard", startStorageId = Storage.Quest.U9_1.TheRookieGuard.Questline, startStorageValue = 1, @@ -5904,7 +5922,7 @@ if not Quests then }, }, }, - [43] = { + [44] = { name = "The New Frontier", startStorageId = Storage.Quest.U8_54.TheNewFrontier.Questline, startStorageValue = 1, @@ -6153,7 +6171,7 @@ if not Quests then }, }, }, - [44] = { + [45] = { name = "Spirithunters Quest", startStorageId = Storage.Quest.U8_7.SpiritHunters.Mission01, startStorageValue = 1, @@ -6193,7 +6211,7 @@ if not Quests then }, }, }, - [45] = { + [46] = { name = "Threatened Dreams", startStorageId = Storage.Quest.U11_40.ThreatenedDreams.QuestLine, startStorageValue = 1, @@ -6288,7 +6306,7 @@ if not Quests then }, }, }, - [46] = { + [47] = { name = "Blood Brothers", startStorageId = Storage.Quest.U8_4.BloodBrothers.QuestLine, startStorageValue = 1, @@ -6341,7 +6359,7 @@ if not Quests then }, }, }, - [47] = { + [48] = { name = "Grave Danger", startStorageId = Storage.Quest.U12_20.GraveDanger.QuestLine, startStorageValue = 1, @@ -6518,14 +6536,14 @@ if not Quests then }, }, }, - [48] = { + [49] = { name = "The Outlaw Camp", - startStorageId = Storage.Quest.U6_4.OutlawCampQuest, + startStorageId = Storage.QuestChests.OutlawCamp, startStorageValue = 1, missions = { [1] = { name = "Outlaw Treasure", - storageId = Storage.Quest.U6_4.OutlawCampQuest, + storageId = Storage.QuestChests.OutlawCamp, missionId = 10451, startValue = 1, endValue = 1, diff --git a/data-otservbr-global/lib/core/storages.lua b/data-otservbr-global/lib/core/storages.lua index 1c4033b09bc..cfbda04a03b 100644 --- a/data-otservbr-global/lib/core/storages.lua +++ b/data-otservbr-global/lib/core/storages.lua @@ -414,6 +414,11 @@ Storage = { RewardMask = 50370, RewardBackpack = 50371, }, + Grimvale = { + -- Reserved storage from 50380 - 50399 + SilverVein = 50380, + WereHelmetEnchant = 50381, + }, HeroRathleton = { -- Reserved storage from 50400 - 50419 QuestLine = 50400, @@ -424,6 +429,42 @@ Storage = { AccessTeleport2 = 50405, AccessTeleport3 = 50406, }, + FerumbrasAscension = { + -- Reserved storage from 50420 - 50469 + RiftRunner = 50420, -- Scroll + TheShattererTimer = 50421, + TheLordOfTheLiceTimer = 50422, + Tarbaz = 50431, + Razzagorn = 50432, + Ragiaz = 50433, + Zamulosh = 50434, + Shulgrax = 50435, + Mazoran = 50436, + Plagirath = 50437, + Access = 50438, + TheShatterer = 50439, + ZamuloshTeleports = 50440, + BasinCounter = 50441, + TheLordOfTheLiceAccess = 50442, + FirstDoor = 50443, + MonsterDoor = 50444, + TarbazDoor = 50445, + HabitatsAccess = 50446, + HabitatsTimer = 50447, + TarbazNotes = 50448, + ColorLever = 50449, + BoneFluteWall = 50450, + BoneFlute = 50451, + Ring = 50452, + Statue = 50453, + Fount = 50454, + Vampire = 50455, + Flower = 50456, + Ring2 = 50457, + Bone = 50458, + Reward = 50459, + TheShattererLever = 50460, + }, ForgottenKnowledge = { -- Reserved storage from 50470 - 50519 AccessDeath = 50470, @@ -464,6 +505,145 @@ Storage = { AmuletTimer = 50520, AmuletStatus = 50521, }, + GravediggerOfDrefia = { + -- Reserved storage from 50760 - 50849 + QuestStart = 50760, + Mission01 = 50761, + Mission02 = 50762, + Mission03 = 50763, + Mission04 = 50764, + Mission05 = 50765, + Mission06 = 50766, + Mission07 = 50767, + Mission08 = 50768, + Mission09 = 50769, + Mission10 = 50770, + Mission11 = 50771, + Mission12 = 50772, + Mission13 = 50773, + Mission14 = 50774, + Mission15 = 50775, + Mission16 = 50776, + Mission17 = 50777, + Mission18 = 50778, + Mission19 = 50779, + Mission20 = 50780, + Mission21 = 50781, + Mission22 = 50782, + Mission23 = 50783, + Mission24 = 50784, + Mission25 = 50785, + Mission26 = 50786, + Mission27 = 50787, + Mission28 = 50788, + Mission29 = 50789, + Mission30 = 50790, + Mission31 = 50791, + Mission32 = 50792, + Mission32a = 50793, + Mission32b = 50794, + Mission33 = 50795, + Mission34 = 50796, + Mission35 = 50797, + Mission36 = 50798, + Mission36a = 50799, + Mission37 = 50800, + Mission38 = 50801, + Mission38a = 50802, + Mission38b = 50803, + Mission38c = 50804, + Mission39 = 50805, + Mission40 = 50806, + Mission41 = 50807, + Mission42 = 50808, + Mission43 = 50809, + Mission44 = 50810, + Mission45 = 50811, + Mission46 = 50812, + Mission47 = 50813, + Mission48 = 50814, + Mission49 = 50815, + Mission50 = 50816, + Mission51 = 50817, + Mission52 = 50818, + Mission53 = 50819, + Mission54 = 50820, + Mission55 = 50821, + Mission56 = 50822, + Mission57 = 50823, + Mission58 = 50824, + Mission59 = 50825, + Mission60 = 50826, + Mission61 = 50827, + Mission62 = 50828, + Mission63 = 50829, + Mission64 = 50830, + Mission65 = 50831, + Mission66 = 50832, + Mission67 = 50833, + Mission68 = 50834, + Mission69 = 50835, + Mission70 = 50836, + Mission71 = 50837, + Mission72 = 50838, + Mission73 = 50839, + Mission74 = 50840, + Bookcase = 50841, + }, + Oramond = { + -- Reserved storage from 50850 - 50879 + QuestLine = 50850, + VotingPoints = 50851, + MissionToTakeRoots = 50852, + HarvestedRootCount = 50853, + TaskProbing = 50854, + DoorBeggarKing = 50855, + MissionAbandonedSewer = 50856, + DoorAbandonedSewer = 50857, + }, + DarkTrails = { + -- Reserved storage from 50880 - 50909 + Mission01 = 50881, + Mission02 = 50882, + Mission03 = 50883, + Mission04 = 50884, + Mission05 = 50885, + Mission06 = 50886, + Mission07 = 50887, + Mission08 = 50888, + Mission09 = 50889, + Mission10 = 50890, + Mission11 = 50891, + Mission12 = 50892, + Mission13 = 50893, + Mission14 = 50894, + Mission15 = 50895, + Mission16 = 50896, + Mission17 = 50897, + Mission18 = 50898, + Outfit = 50899, -- final storage + DoorQuandon = 50901, + DoorHideout = 50902, + }, + SpikeTaskQuest = { + -- Reserved storage from 50910 - 50959 + QuestLine = 50910, + Gnomilly = 50911, + Gnombold = { + Points = 50912, + Nests = 50913, + Fertilise = 50914, + Kill = 50915, + Charges = 50916, + }, + Gnomargery = { + Points = 50920, + Deliver = 50921, + Undercover = 50922, + Temperature = 50923, + Kill = 50924, + }, + }, OutfitQuest = { -- Reserved storage from 50960 - 51039 -- Until all outfit quests are completed @@ -471,15 +651,142 @@ Storage = { Ref = 50961, -- Golden Outfit GoldenOutfit = 51015, + DeeplingAnchor = 51023, RoyalCostumeOutfit = 51026, }, + Postman = { + -- Reserved storage from 51360 - 51389 + Mission01 = 51360, + Mission02 = 51361, + Mission03 = 51362, + Mission04 = 51363, + Mission05 = 51364, + Mission06 = 51365, + Mission07 = 51366, + Mission08 = 51367, + Mission09 = 51368, + Mission10 = 51369, + Rank = 51370, + Door = 51371, + TravelCarlin = 51372, + TravelEdron = 51373, + TravelVenore = 51374, + TravelCormaya = 51375, + MeasurementsBenjamin = 51376, + MeasurementsKroox = 51377, + MeasurementsDove = 51378, + MeasurementsLiane = 51379, + MeasurementsChrystal = 51380, + MeasurementsOlrik = 51381, + }, TheHuntForTheSeaSerpent = { -- Reserved storage from 51410 - 51419 }, + TibiaTales = { + -- Reserved storage from 51480 - 51539 + DefaultStart = 51480, + UltimateBoozeQuest = 51481, + AgainstTheSpiderCult = 51482, + AnInterestInBotany = { + Questline = 51483, + ChestDoor = 51484, + BotanyAlmanach = 51485, + }, + AritosTask = 51486, + ToAppeaseTheMightyQuest = 51487, + IntoTheBonePit = 51488, + TheExterminator = 51489, + AritosTaskDoor = 51490, + RestInHallowedGround = { + Questline = 51491, + HolyWater = 51492, + Graves = { + Grave1 = 51493, + Grave2 = 51494, + Grave3 = 51495, + Grave4 = 51496, + Grave5 = 51497, + Grave6 = 51498, + Grave7 = 51499, + Grave8 = 51500, + Grave9 = 51501, + Grave10 = 51502, + Grave11 = 51503, + Grave12 = 51504, + Grave13 = 51505, + Grave14 = 51506, + Grave15 = 51507, + Grave16 = 51508, + }, + }, + JackFutureQuest = { + QuestLine = 51509, + Furniture01 = 51510, + Furniture02 = 51511, + Furniture03 = 51512, + Furniture04 = 51513, + Furniture05 = 51514, + Mother = 51515, + Sister = 51516, + Statue = 51517, + LastMissionState = 51518, + }, + TheCursedCrystal = { + Oneeyedjoe = 51530, + MedusaOil = 51531, + Questline = 51532, + }, + ToBlindTheEnemy = { + Questline = 51533, + DwarvenShield = 51534, + MorningStar = 51535, + BP1 = 51536, + BP2 = 51537, + }, + ToOutfoxAFoxQuest = { + Questline = 51538, + MiningHelmet = 51539, + }, + -- TowerDefenceQuest: when there is space, bring this quest that is in update 8.1 to Tibia Tales + }, BanutaSecretTunnel = { -- Reserved storage from 51680 - 51689 DeeperBanutaShortcut = 51680, }, + QuestChests = { + -- Reserved storage from 51730 - 51999 + + TutorialShovel = 51732, + TutorialRope = 51733, + FormorgarMinesHoistSkeleton = 51737, + FormorgarMinesHoistChest = 51738, + -- Custom Quests, currently not using system.lua (aid 2000) + BlackKnightTreeCrownShield = 51739, + BlackKnightTreeCrownArmor = 51740, + BlackKnightTreeKey = 51741, + SilverBrooch = 51744, + FamilyBrooch = 51745, + DCQGhoul = 51746, + FirewalkerBoots = 51747, + DeeperFibulaKey = 51748, + ParchmentRoomQuest = 51750, + WarzoneReward1 = 51751, + WarzoneReward2 = 51752, + WarzoneReward3 = 51753, + FathersBurdenWood = 51754, + FathersBurdenIron = 51755, + FathersBurdenRoot = 5176, + FathersBurdenCrystal = 51757, + FathersBurdenSilk = 51758, + FathersBurdenCloth = 51759, + WhisperMoss = 51766, + OldParchment = 51767, + DragahsSpellbook = 51768, + StealFromThieves = 51769, + OutlawCamp = 51770, -- quest log to The Outlaw Camp + WitchHouseQuest = 51771, + SimonTheBeggarsFavoriteStaff = 51772, + }, HorestisTomb = { -- Reserved storage from 52020 - 52029 JarFloor1 = 52020, @@ -488,6 +795,31 @@ Storage = { JarFloor4 = 52023, JarFloor5 = 52024, }, + WhiteRavenMonastery = { + -- Reserved storage from 52030 - 52039 + QuestLog = 52030, + Passage = 52031, + Diary = 52032, + Door = 52033, + }, + FathersBurden = { + -- Reserved storage from 52040 - 52059 + QuestLog = 52040, + Progress = 52041, + Status = 52042, + Sinew = 52043, + Wood = 52044, + Cloth = 52045, + Silk = 52046, + Crystal = 52047, + Root = 52048, + Iron = 52049, + Scale = 52050, + Corpse = { + Scale = 52051, + Sinew = 52052, + }, + }, Diapason = { -- Reserved storage from 52120 - 52129 Lyre = 52120, @@ -495,6 +827,33 @@ Storage = { Edala = 52122, EdalaTimer = 52123, }, + AdventurersGuild = { + -- Reserved storage from 52130 - 52159 + Stone = 52130, + MagicDoor = 52131, + CharosTrav = 52132, + FreeStone = { + Alia = 52133, + Amanda = 52134, + Brewster = 52135, + Isimov = 52136, + Kasmir = 52137, + Kjesse = 52138, + Lorietta = 52139, + Maealil = 52140, + Quentin = 52141, + RockWithASoftSpot = 52142, + Tyrias = 52143, + Yberius = 52144, + Rahkem = 52145, + }, + GreatDragonHunt = { + WarriorSkeleton = 52146, + DragonCounter = 52147, + }, + QuestLine = 52148, + TheLostBrother = 52149, + }, HallsOfHope = { -- Reserved storage from 52200 - 52219 Questline = 52200, @@ -557,6 +916,24 @@ Storage = { Lever = 52278, Mainland = 52279, }, + LionsRock = { + -- Reserved storage from 52290 - 52309 + Questline = 52290, + OuterSanctum = { + Skeleton = 52291, + LionsStrength = 52292, + LionsBeauty = 52293, + LionsTears = 52294, + }, + InnerSanctum = { + SnakeSign = 52295, + LizardSign = 52296, + ScorpionSign = 52297, + HyenaSign = 52298, + Message = 52299, + }, + Time = 52300, + }, GraveDanger = { -- Reserved storage from 52310 - 52339 Questline = 52310, @@ -623,10 +1000,7 @@ Storage = { }, -- Start of quests per version -- Use the reserved storage keys accordingly - KeysUpdate = 39999, - U5_0 = { -- update 5.0 - Reserved Storages 40000 - DeeperFibulaKey = 40000, - }, + KeysUpdate = 40000, PreU6_0 = { -- update pre-6.0 - Reserved Storages 40001 - 40020 OrnamentedShield = { Rewards = { @@ -674,7 +1048,6 @@ Storage = { DemonShield = 40078, }, }, - OutlawCampQuest = 40079, }, U7_1 = { -- update 7.1 - Reserved Storages 40121 - 40140 DragonTower = { @@ -748,36 +1121,8 @@ Storage = { Wand = 10111, }, }, - ThePostmanMissions = { - Mission01 = 10112, - Mission02 = 10113, - Mission03 = 10114, - Mission04 = 10115, - Mission05 = 10116, - Mission06 = 10117, - Mission07 = 10118, - Mission08 = 10119, - Mission09 = 10120, - Mission10 = 10121, - Rank = 10122, - Door = 10123, - TravelCarlin = 10124, - TravelEdron = 10125, - TravelVenore = 10126, - TravelCormaya = 10127, - MeasurementsBenjamin = 10128, - MeasurementsKroox = 10129, - MeasurementsDove = 10130, - MeasurementsLiane = 10131, - MeasurementsChrystal = 10132, - MeasurementsOlrik = 10133, - }, - TheWhiteRavenMonastery = { - QuestLog = 10134, - Passage = 10135, - Diary = 10136, - Door = 10137, - }, + ThePostmanMissions = {}, + TheWhiteRavenMonastery = {}, VoodooDoll = {}, }, U7_3 = { -- update 7.3 - Reserved Storages 40351 - 40400 @@ -921,8 +1266,6 @@ Storage = { Hengis = 40666, }, }, - OldParchment = 40667, - WhisperMoss = 40668, }, U7_8 = { -- update 7.8 - Reserved Storages 40761 - 41000 AssassinOutfits = { @@ -1176,8 +1519,6 @@ Storage = { NorsemanOutfit = 41306, NoblemanFirstAddon = 41307, NoblemanSecondAddon = 41308, - FormorgarMinesHoistSkeleton = 41309, - FormorgarMinesHoistChest = 41310, }, }, U8_1 = { -- update 8.1 - Reserved Storages 41351 - 41650 @@ -1192,142 +1533,99 @@ Storage = { KosheiAmuletPart3 = 41357, KosheiAmuletPart4 = 41358, }, - RestInHallowedGround = { - Questline = 41400, - HolyWater = 41401, - Graves = { - Grave1 = 41402, - Grave2 = 41403, - Grave3 = 41404, - Grave4 = 41405, - Grave5 = 41406, - Grave6 = 41407, - Grave7 = 41408, - Grave8 = 41409, - Grave9 = 41410, - Grave10 = 41411, - Grave11 = 41412, - Grave12 = 41413, - Grave13 = 41414, - Grave14 = 41415, - Grave15 = 41416, - Grave16 = 41417, - }, - }, SecretService = { - Quest = 41440, - TBIMission01 = 41441, - AVINMission01 = 41442, - CGBMission01 = 41443, - TBIMission02 = 41444, - AVINMission02 = 41445, - CGBMission02 = 41446, - TBIMission03 = 41447, - AVINMission03 = 41448, - CGBMission03 = 41449, - TBIMission04 = 41450, - AVINMission04 = 41451, - CGBMission04 = 41452, - TBIMission05 = 41453, - AVINMission05 = 41454, - CGBMission05 = 41455, - TBIMission06 = 41456, - AVINMission06 = 41457, - CGBMission06 = 41458, - Mission07 = 41459, - RottenTree = 41460, - AHX17L89 = 41461, - FamilySignetRing = 41462, - MagicSpellbook = 41463, - BuildingPlans = 41464, - SuspiciousDocuments = 41465, - Book = 41466, - RottenHeartOfTree = 41467, - LotteryTicket = 41468, - PoemScroll = 41469, - IntelligenceReports = 41470, + Quest = 41359, + TBIMission01 = 41360, + AVINMission01 = 41361, + CGBMission01 = 41362, + TBIMission02 = 41363, + AVINMission02 = 41364, + CGBMission02 = 41365, + TBIMission03 = 41366, + AVINMission03 = 41367, + CGBMission03 = 41368, + TBIMission04 = 41369, + AVINMission04 = 41370, + CGBMission04 = 41371, + TBIMission05 = 41372, + AVINMission05 = 41373, + CGBMission05 = 41374, + TBIMission06 = 41375, + AVINMission06 = 41376, + CGBMission06 = 41377, + Mission07 = 41378, + RottenTree = 41379, + AHX17L89 = 41380, + FamilySignetRing = 41381, + MagicSpellbook = 41382, + BuildingPlans = 41383, + SuspiciousDocuments = 41384, + Book = 41385, + RottenHeartOfTree = 41386, + LotteryTicket = 41387, + PoemScroll = 41388, + IntelligenceReports = 41389, }, StrongPotions = { - Reward = 41471, - }, - TibiaTales = { - DefaultStart = 41472, - UltimateBoozeQuest = 41473, - AgainstTheSpiderCult = 41474, - AritosTask = 41475, - ToAppeaseTheMightyQuest = 41476, - IntoTheBonePit = 41477, - TheExterminator = 41478, - AritosTaskDoor = 41479, + Reward = 41390, }, TheTravellingTrader = { - Mission01 = 41480, - Mission02 = 41481, - Mission03 = 41482, - Mission04 = 41483, - Mission05 = 41484, - Mission06 = 41485, - Mission07 = 41486, - }, - ToBlindTheEnemy = { - Questline = 41487, - DwarvenShield = 41488, - MorningStar = 41489, - BP1 = 41490, - BP2 = 41491, - }, - ToOutfoxAFoxQuest = { - Questline = 41492, - MiningHelmet = 41493, + Mission01 = 41391, + Mission02 = 41392, + Mission03 = 41393, + Mission04 = 41394, + Mission05 = 41395, + Mission06 = 41396, + Mission07 = 41397, }, TowerDefenceQuest = { - Questline = 41494, - Door = 41495, + Questline = 41398, + Door = 41399, }, - WaterfallQuest = 41496, + WaterfallQuest = 41400, WhatAFoolishQuest = { - Questline = 41500, - Mission1 = 41501, - Mission2 = 41502, - Mission3 = 41503, - Mission4 = 41504, - Mission5 = 41505, - Mission6 = 41506, - Mission7 = 41507, - Mission8 = 41508, - Mission9 = 41509, - Mission10 = 41510, - Mission11 = 41511, - PieBuying = 41512, - PieBoxTimer = 41513, - TriangleTowerDoor = 41514, - EmperorBeardShave = 41515, - JesterOutfit = 41516, - WhoopeeCushion = 41517, - QueenEloiseCatDoor = 41518, - CatBasket = 41519, - ScaredCarina = 41520, - InflammableSulphur = 41521, - SpecialLeaves = 41522, - Cigar = 41523, - Contract = 41524, + Questline = 41401, + Mission1 = 41402, + Mission2 = 41403, + Mission3 = 41404, + Mission4 = 41405, + Mission5 = 41406, + Mission6 = 41407, + Mission7 = 41408, + Mission8 = 41409, + Mission9 = 41410, + Mission10 = 41411, + Mission11 = 41412, + PieBuying = 41413, + PieBoxTimer = 41414, + TriangleTowerDoor = 41415, + EmperorBeardShave = 41416, + JesterOutfit = 41417, + WhoopeeCushion = 41418, + QueenEloiseCatDoor = 41419, + CatBasket = 41420, + ScaredCarina = 41421, + InflammableSulphur = 41422, + SpecialLeaves = 41423, + Cigar = 41424, + Contract = 41425, CookieDelivery = { - SimonTheBeggar = 41525, - Markwin = 41526, - Ariella = 41527, - Hairycles = 41528, - Djinn = 41529, - AvarTar = 41530, - OrcKing = 41531, - Lorbas = 41532, - Wyda = 41533, - Hjaern = 41534, + SimonTheBeggar = 41426, + Markwin = 41427, + Ariella = 41428, + Hairycles = 41429, + Djinn = 41430, + AvarTar = 41431, + OrcKing = 41432, + Lorbas = 41433, + Wyda = 41434, + Hjaern = 41435, }, - OldWornCloth = 41535, - LostDisguise = 41536, - ScaredKazzan = 41537, - MagicalWatch = 41538, - BagBookKnife = 41539, + OldWornCloth = 41436, + LostDisguise = 41437, + ScaredKazzan = 41438, + MagicalWatch = 41439, + BagBookKnife = 41440, }, }, U8_2 = { -- update 8.2 - Reserved Storages 41651 - 41900 @@ -1412,19 +1710,18 @@ Storage = { GoldenGoblet = 41724, CompromisingLetter = 41725, RewardEnd = 41726, - StealFromThieves = 41727, }, TrollSabotageQuest = { - Questline = 41728, - JumpTimer = 41729, + Questline = 41727, + JumpTimer = 41728, }, VampireHunterQuest = { - Rank = 41730, - Door = 41731, - BloodSkull = 41732, + Rank = 41729, + Door = 41730, + BloodSkull = 41731, }, TheMutatedPumpkin = { - Skinned = 41733, + Skinned = 41732, }, }, U8_4 = { -- update 8.4 - Reserved Storages 41901 - 42145 @@ -1853,28 +2150,7 @@ Storage = { }, -- 42781 - 42830 }, U8_6 = { -- update 8.6 - Reserved Storages 42951 - 43200 - AFathersBurden = { - QuestLog = 42951, - Progress = 42952, - Status = 42953, - Sinew = 42954, - Wood = 42955, - Cloth = 42956, - Silk = 42957, - Crystal = 42958, - Root = 42959, - Iron = 42960, - Scale = 42961, - Corpse = { - Scale = 42962, - Sinew = 42963, - }, - }, - AnInterestInBotany = { - Questline = 42964, - ChestDoor = 42965, - BotanyAlmanach = 42966, - }, + AFathersBurden = {}, TheSpiritWillGetYou = {}, WayfarerOutfits = {}, WrathOfTheEmperor = { @@ -1937,36 +2213,24 @@ Storage = { AnnualAutumnVintage = {}, Bewitched = {}, DemonsLullaby = {}, - JackFutureQuest = { - QuestLine = 43300, - Furniture01 = 43301, - Furniture02 = 43302, - Furniture03 = 43303, - Furniture04 = 43304, - Furniture05 = 43305, - Mother = 43306, - Sister = 43307, - Statue = 43308, - LastMissionState = 43309, - }, LastCreepStanding = {}, ResearchAndDevelopment = {}, RottinWoodAndTheMarriedMen = { - Questline = 43310, - RottinStart = 43311, - Trap = 43312, - Corpse = 43313, - Time = 43314, - Mission03 = 43315, - FirstTime = 43316, + Questline = 43231, + RottinStart = 43232, + Trap = 43233, + Corpse = 43234, + Time = 43235, + Mission03 = 43236, + FirstTime = 43237, }, SpiritHunters = { - Mission01 = 43317, - TombUse = 43318, - CharmUse = 43319, - NightstalkerUse = 43320, - SouleaterUse = 43321, - GhostUse = 43322, + Mission01 = 43238, + TombUse = 43239, + CharmUse = 43240, + NightstalkerUse = 43241, + SouleaterUse = 43242, + GhostUse = 43243, }, TheColoursOfMagic = {}, }, @@ -2119,27 +2383,6 @@ Storage = { WarpathMiniWorldChange = {}, }, U9_80 = { -- update 9.80 - Reserved Storages 44001 - 44100 - AdventurersGuild = { - Stone = 52130, - MagicDoor = 52131, - CharosTrav = 52132, - FreeStone = { - Alia = 52133, - Amanda = 52134, - Brewster = 52135, - Isimov = 52136, - Kasmir = 52137, - Kjesse = 52138, - Lorietta = 52139, - Maealil = 52140, - Quentin = 52141, - RockWithASoftSpot = 52142, - Tyrias = 52143, - Yberius = 52144, - Rahkem = 52145, - }, - QuestLine = 52148, - }, ChildOfDestiny = {}, GoblinMerchant = {}, VenoreDailyTasks = {}, @@ -2149,265 +2392,52 @@ Storage = { HuntingForTokens = {}, OpticordingSphere = {}, SmallSapphire = {}, - TheGravediggerOfDrefia = { - QuestStart = 44200, - Mission01 = 44201, - Mission02 = 44203, - Mission03 = 44204, - Mission04 = 44205, - Mission05 = 44206, - Mission06 = 44207, - Mission07 = 44208, - Mission08 = 44209, - Mission09 = 44210, - Mission10 = 44211, - Mission11 = 44212, - Mission12 = 44213, - Mission13 = 44214, - Mission14 = 44215, - Mission15 = 44216, - Mission16 = 44217, - Mission17 = 44218, - Mission18 = 44219, - Mission19 = 44220, - Mission20 = 44221, - Mission21 = 44222, - Mission22 = 44223, - Mission23 = 44224, - Mission24 = 44225, - Mission25 = 44226, - Mission26 = 44227, - Mission27 = 44228, - Mission28 = 44229, - Mission29 = 44230, - Mission30 = 44231, - Mission31 = 44232, - Mission32 = 44233, - Mission32a = 44234, - Mission32b = 44235, - Mission33 = 44236, - Mission34 = 44237, - Mission35 = 44238, - Mission36 = 44239, - Mission36a = 44240, - Mission37 = 44241, - Mission38 = 44242, - Mission38a = 44243, - Mission38b = 44244, - Mission38c = 44245, - Mission39 = 44246, - Mission40 = 44247, - Mission41 = 44248, - Mission42 = 44249, - Mission43 = 44250, - Mission44 = 44251, - Mission45 = 44252, - Mission46 = 44253, - Mission47 = 44254, - Mission48 = 44255, - Mission49 = 44256, - Mission50 = 44257, - Mission51 = 44258, - Mission52 = 44259, - Mission53 = 44260, - Mission54 = 44261, - Mission55 = 44262, - Mission56 = 44263, - Mission57 = 44264, - Mission58 = 44265, - Mission59 = 44266, - Mission60 = 44267, - Mission61 = 44268, - Mission62 = 44269, - Mission63 = 44270, - Mission64 = 44271, - Mission65 = 44272, - Mission66 = 44273, - Mission67 = 44274, - Mission68 = 44275, - Mission69 = 44276, - Mission70 = 44277, - Mission71 = 44278, - Mission72 = 44279, - Mission73 = 44280, - Mission74 = 44281, - Mission75 = 44282, - Mission76 = 44283, - Bookcase = 44285, - SmallDragonTears1 = 44286, - SmallDragonTears2 = 44287, - SmallDragonTears3 = 44288, - }, + TheGravediggerOfDrefia = {}, TheRepenters = {}, }, U10_20 = { -- update 10.20 - Reserved Storages 44301 - 44400 - SpikeTaskQuest = { - QuestLine = 44301, - Gnomilly = 44302, - Gnombold = { - Points = 44303, - Nests = 44304, - Fertilise = 44305, - Kill = 44306, - Charges = 44307, - }, - Gnomargery = { - Points = 44308, - Deliver = 44309, - Undercover = 44310, - Temperature = 44311, - Kill = 44312, - }, - Spike_Fame_Points = 44313, - Spike_Upper_Pacifier_Main = 44314, - Spike_Upper_Pacifier_Daily = 44315, - Spike_Upper_Mound_Main = 44316, - Spike_Upper_Mound_Daily = 44317, - Spike_Upper_Track_Main = 44318, - Spike_Upper_Track_Daily = 44319, - Spike_Upper_Kill_Main = 44320, - Spike_Upper_Kill_Daily = 44321, - Spike_Middle_Charge_Main = 44322, - Spike_Middle_Charge_Daily = 44323, - Spike_Middle_Mushroom_Main = 44324, - Spike_Middle_Mushroom_Daily = 44325, - Spike_Middle_Nest_Main = 44326, - Spike_Middle_Nest_Daily = 44327, - Spike_Middle_Kill_Main = 44328, - Spike_Middle_Kill_Daily = 44329, - Spike_Lower_Parcel_Main = 44330, - Spike_Lower_Parcel_Daily = 44331, - Spike_Lower_Undercover_Main = 44332, - Spike_Lower_Undercover_Daily = 44333, - Spike_Lower_Lava_Main = 44334, - Spike_Lower_Lava_Daily = 44335, - Spike_Lower_Kill_Main = 44336, - Spike_Lower_Kill_Daily = 44337, - }, + CaveExplorerOutfits = {}, + SpikeTasks = {}, SpiritGroundsMiniWorldChange = {}, }, U10_30 = { -- update 10.30 - Reserved Storages 44401 - 44500 DreamWardenOutfits = {}, - RoshamuulQuest = { - Roshamuul_Mortar_Thrown = 44401, - Roshamuul_Killed_Frazzlemaws = 44402, - Roshamuul_Killed_Silencers = 44403, - Roshamuul_Gold_Record = 44404, - }, + Roshamuul = {}, }, U10_37 = { -- update 10.37 - Reserved Storages 44501 - 44550 - TinderBoxQuestChyllfroest = { - Reward = 44501, - Obedience = 44502, - }, + TinderBox = {}, ChyllfroestMiniWorldChange = {}, }, U10_50 = { -- update 10.50 - Reserved Storages 44551 - 44750 - DarkTrails = { - Mission01 = 44551, - Mission02 = 44552, - Mission03 = 44553, - Mission04 = 44554, - Mission05 = 44555, - Mission06 = 44556, - Mission07 = 44557, - Mission08 = 44558, - Mission09 = 44559, - Mission10 = 44560, - Mission11 = 44561, - Mission12 = 44562, - Mission13 = 44563, - Mission14 = 44564, - Mission15 = 44565, - Mission16 = 44567, - Mission17 = 44568, - Mission18 = 44569, - Outfit = 44570, - DoorQuandon = 44571, - DoorHideout = 44572, - RewardSmallNotebook = 44573, - Reward05GlothAndBelongings = 44574, - Reward10GlothAndBelongings = 44575, - OramondTaskProbing = 44576, - }, - GloothEngineerOutfits = { - Addon1 = 44577, - Addon2 = 44578, - }, - OramondQuest = { - QuestLine = 44579, - VotingPoints = 44580, - ToTakeRoots = { - Mission = 44581, - Count = 44582, - Door = 44583, - }, - Probing = { - Mission = 44584, - MonoDetector = 44585, - }, - TheAncientSewers = { - Mission = 44586, - Door = 44587, - }, - ThePowderOfTheStars = { - Mission = 44588, - }, - }, + DarkTrails = {}, + GloothEngineerOutfits = {}, + Oramond = {}, Rathleton = {}, }, U10_55 = { -- update 10.55 - Reserved Storages 44751 - 44800 Dawnport = { - VocationReward = 44751, - Questline = 44752, - GoMain = 44753, - TheLostAmulet = 44754, - TheStolenLogBook = 44755, - TheRareHerb = 44756, - TheDormKey = 44757, - StrangeAmulet = 44758, - TornLogBook = 44759, - HerbFlower = 44760, - MorriskTroll = 44761, - MorrisTrollCount = 44762, - MorrisGoblin = 44763, - MorrisGoblinCount = 44764, - MorrisMinos = 44765, - MorrisMinosCount = 44766, - }, - SanctuaryOfTheLizardGod = { - LegionHelmet = 44767, - LizardGodTeleport = 44768, + VocationReward = 20000, + Questline = 20001, + GoMain = 20002, + TheLostAmulet = 20003, + TheStolenLogBook = 20004, + TheRareHerb = 20005, + TheDormKey = 20006, + StrangeAmulet = 20007, + TornLogBook = 20008, + HerbFlower = 20009, + MorriskTroll = 20010, + MorrisTrollCount = 20011, + MorrisGoblin = 20012, + MorrisGoblinCount = 20013, + MorrisMinos = 20014, + MorrisMinosCount = 20015, }, }, U10_70 = { -- update 10.70 - Reserved Storages 44801 - 44950 HeroOfRathleton = {}, - LionsRock = { - Questline = 44801, - OuterSanctum = { - Skeleton = 44802, - LionsStrength = 44803, - LionsBeauty = 44804, - LionsTears = 44805, - }, - InnerSanctum = { - SnakeSign = 44806, - LizardSign = 44807, - ScorpionSign = 44808, - HyenaSign = 44809, - Message = 44810, - }, - Time = 44811, - LionsRockFields = 44812, - }, - TheCursedCrystal = { - Questline = 44813, - Oneeyedjoe = 44814, - MedusaOil = 44815, - Time = 44816, - SheetOfPaper = 44817, - SmallCrystalBell = 44818, - }, + LionsRock = {}, + TheCursedCrystal = {}, TheFireFeatheredSerpentWorldChange = {}, TwentyMilesBeneathTheSea = {}, }, @@ -2416,107 +2446,22 @@ Storage = { Cartography101 = {}, ChakoyaIcebergMiniWorldChange = {}, GrimvaleMineWorldChange = {}, - GrimvaleQuest = { - AncientFeudDoors = 45150, - AncientFeudShortcut = 45151, - SilverVein = 45152, - WereHelmetEnchant = 45153, + Grimvale = { + AncientFeudDoors = 44956, + AncientFeudShortcut = 44957, }, HiveOutpostMiniWorldChange = {}, JungleCampMiniWorldChange = {}, NightmareIslesMiniWorldChange = {}, + NightmareTeddy = {}, PoacherCavesMiniWorldChange = {}, - TheGreatDragonHunt = { - WarriorSkeleton = 45180, - DragonCounter = 45181, - Achievement = 45182, - }, - TheLostBrotherQuest = 45183, + TheGreatDragonHunt = {}, TheTaintedSouls = {}, }, U10_90 = { -- update 10.90 - Reserved Storages 45201 - 45350 - FerumbrasAscension = { - RiftRunner = 45201, -- Scroll - TheShattererTimer = 45202, - TheLordOfTheLiceTimer = 45203, - Tarbaz = 45204, - Razzagorn = 45205, - Ragiaz = 45206, - Zamulosh = 45207, - Shulgrax = 45208, - Mazoran = 45209, - Plagirath = 45210, - Access = 45211, - TheShatterer = 45212, - ZamuloshTeleports = 45213, - BasinCounter = 45214, - TheLordOfTheLiceAccess = 45215, - FirstDoor = 45216, - MonsterDoor = 45217, - TarbazDoor = 45218, - HabitatsAccess = 45219, - HabitatsTimer = 45220, - TarbazNotes = 45221, - ColorLever = 45222, - BoneFluteWall = 45223, - BoneFlute = 45224, - Ring = 45225, - Statue = 45226, - Fount = 45227, - Vampire = 45228, - Flower = 45229, - Ring2 = 45230, - Bone = 45231, - Reward = 45232, - TheShattererLever = 45233, - TheLordOfTheLiceTime = 45234, - TarbazTime = 45235, - RagiazTime = 45236, - PlagirathTime = 45237, - RazzagornTime = 45238, - ZamuloshTime = 45239, - MazoranTime = 45240, - ShulgraxTime = 45241, - FerumbrasMortalShellTime = 45242, - ZamuloshSummon = 45243, - FerumbrasEssence = 45244, - DesperateSoul = 45245, - FlowerPuzzleTimer = 45246, - Crystals = { - Crystal1 = 45247, - Crystal2 = 45248, - Crystal3 = 45249, - Crystal4 = 45250, - Crystal5 = 45251, - Crystal6 = 45252, - Crystal7 = 45253, - Crystal8 = 45254, - AllCrystals = 45255, - }, - Habitats = { - Roshamuul = 45256, - Grass = 45257, - Mushroom = 45258, - Desert = 45259, - Venom = 45260, - Ice = 45261, - Corrupted = 45262, - Dimension = 45263, - AllHabitats = 45264, - }, - Elements = { - First = 45265, - Second = 45266, - Third = 45267, - Four = 45268, - Active = 45269, - Done = 45270, - }, - TheRiteOfEternalNight = 45271, - StoneCoffinsBones = 45272, - VampireTeeth = 45273, - }, + FerumbrasAscension = {}, Krailos = {}, + RiftWarriorOutfits = {}, }, U10_94 = { -- update 10.94 - Reserved Storages 45351 - 45450 HeartOfDestruction = {}, @@ -2824,7 +2769,43 @@ GlobalStorage = { Chance = 60020, Active = 60021, }, - + FerumbrasAscendant = { + -- Reserved storage from 60030 - 60069 + ZamuloshSummon = 60030, + FerumbrasEssence = 60031, + DesperateSoul = 60032, + FlowerPuzzleTimer = 60033, + Crystals = { + Crystal1 = 60040, + Crystal2 = 60041, + Crystal3 = 60042, + Crystal4 = 60043, + Crystal5 = 60044, + Crystal6 = 60045, + Crystal7 = 60046, + Crystal8 = 60047, + AllCrystals = 60048, + }, + Habitats = { + Roshamuul = 60050, + Grass = 60051, + Mushroom = 60052, + Desert = 60053, + Venom = 60054, + Ice = 60055, + Corrupted = 60056, + Dimension = 60057, + AllHabitats = 60058, + }, + Elements = { + First = 60060, + Second = 60061, + Third = 60062, + Four = 60063, + Active = 60064, + Done = 60065, + }, + }, HeroRathleton = { -- Reserved storage from 60070 - 60089 FirstMachines = 60070, @@ -2897,6 +2878,7 @@ GlobalStorage = { ExpBoost = 65004, SwordOfFury = 65005, GloothFairyTimer = 65006, + LionsRockFields = 65007, TheMummysCurse = 65008, OberonEventTime = 65009, PrinceDrazzakEventTime = 65010, @@ -2921,21 +2903,21 @@ startupGlobalStorages = { GlobalStorage.HeroRathleton.MaxxenRunning, GlobalStorage.HeroRathleton.LavaCounter, GlobalStorage.HeroRathleton.FourthMachines, - Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal1, - Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal2, - Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal3, - Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal4, - Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal5, - Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal6, - Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal7, - Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal8, - Storage.Quest.U10_90.FerumbrasAscension.Crystals.AllCrystals, - Storage.Quest.U10_90.FerumbrasAscension.FerumbrasEssence, + GlobalStorage.FerumbrasAscendant.Crystals.Crystal1, + GlobalStorage.FerumbrasAscendant.Crystals.Crystal2, + GlobalStorage.FerumbrasAscendant.Crystals.Crystal3, + GlobalStorage.FerumbrasAscendant.Crystals.Crystal4, + GlobalStorage.FerumbrasAscendant.Crystals.Crystal5, + GlobalStorage.FerumbrasAscendant.Crystals.Crystal6, + GlobalStorage.FerumbrasAscendant.Crystals.Crystal7, + GlobalStorage.FerumbrasAscendant.Crystals.Crystal8, + GlobalStorage.FerumbrasAscendant.Crystals.AllCrystals, + GlobalStorage.FerumbrasAscendant.FerumbrasEssence, GlobalStorage.Feroxa.Active, - Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, - Storage.Quest.U10_90.FerumbrasAscension.Elements.Active, - Storage.Quest.U10_90.FerumbrasAscension.Elements.First, - Storage.Quest.U10_90.FerumbrasAscension.Elements.Second, - Storage.Quest.U10_90.FerumbrasAscension.Elements.Third, - Storage.Quest.U10_90.FerumbrasAscension.Elements.Done, + GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats, + GlobalStorage.FerumbrasAscendant.Elements.Active, + GlobalStorage.FerumbrasAscendant.Elements.First, + GlobalStorage.FerumbrasAscendant.Elements.Second, + GlobalStorage.FerumbrasAscendant.Elements.Third, + GlobalStorage.FerumbrasAscendant.Elements.Done, } diff --git a/data-otservbr-global/monster/humans/necromancer_servant.lua b/data-otservbr-global/monster/humans/necromancer_servant.lua index b6fa4e885d5..87ef0c03885 100644 --- a/data-otservbr-global/monster/humans/necromancer_servant.lua +++ b/data-otservbr-global/monster/humans/necromancer_servant.lua @@ -20,10 +20,6 @@ monster.corpse = 18174 monster.speed = 105 monster.manaCost = 0 -monster.events = { - "NecromancerServantDeath", -} - monster.changeTarget = { interval = 5000, chance = 8, @@ -63,14 +59,7 @@ monster.voices = { chance = 10, } -monster.loot = { - { name = "gold coin", chance = 74230, maxCount = 70 }, - { name = "poison arrow", chance = 74230, maxCount = 5 }, - { name = "book of necromantic rituals", chance = 74230 }, - { name = "incantation fragment", chance = 100000 }, - { name = "necromantic robe", chance = 54230 }, - { name = "boots of haste", chance = 5000 }, -} +monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -45 }, diff --git a/data-otservbr-global/monster/quests/dark_trails/death_priest_shargon.lua b/data-otservbr-global/monster/quests/dark_trails/death_priest_shargon.lua index 61eb2974aa5..c64a01061b9 100644 --- a/data-otservbr-global/monster/quests/dark_trails/death_priest_shargon.lua +++ b/data-otservbr-global/monster/quests/dark_trails/death_priest_shargon.lua @@ -14,7 +14,7 @@ monster.outfit = { } monster.events = { - "DeathPriestShargonDeath", + "ShargonDeath", } monster.bosstiary = { @@ -61,6 +61,10 @@ monster.flags = { canWalkOnPoison = true, } +monster.events = { + "ShargonKill", +} + monster.light = { level = 0, color = 0, diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ascending_ferumbras.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ascending_ferumbras.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ascending_ferumbras.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ascending_ferumbras.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/death_dragon.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/death_dragon.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/bosses/death_dragon.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/death_dragon.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/destabilized_ferumbras.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/destabilized_ferumbras.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/bosses/destabilized_ferumbras.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/destabilized_ferumbras.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/enraged_soul.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/enraged_soul.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/bosses/enraged_soul.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/enraged_soul.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ferumbras_mortal_shell.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_mortal_shell.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ferumbras_mortal_shell.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_mortal_shell.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ferumbras_soul_splinter.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_soul_splinter.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ferumbras_soul_splinter.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_soul_splinter.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/mazoran.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/mazoran.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/bosses/mazoran.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/mazoran.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/plagirath.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/plagirath.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/bosses/plagirath.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/plagirath.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ragiaz.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ragiaz.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/bosses/ragiaz.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ragiaz.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/razzagorn.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/razzagorn.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/bosses/razzagorn.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/razzagorn.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/redeemed_soul.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/redeemed_soul.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/bosses/redeemed_soul.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/redeemed_soul.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/shulgrax.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/shulgrax.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/bosses/shulgrax.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/shulgrax.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/sin_devourer.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/sin_devourer.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/bosses/sin_devourer.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/sin_devourer.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/tarbaz.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/tarbaz.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/bosses/tarbaz.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/tarbaz.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/the_lord_of_the_lice.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/the_lord_of_the_lice.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/bosses/the_lord_of_the_lice.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/the_lord_of_the_lice.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/the_shatterer.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/the_shatterer.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/bosses/the_shatterer.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/the_shatterer.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/zamulosh.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/zamulosh.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/bosses/zamulosh.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/zamulosh.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/zamulosh2.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/zamulosh2.lua similarity index 98% rename from data-otservbr-global/monster/quests/ferumbras_ascension/bosses/zamulosh2.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/zamulosh2.lua index e3f7a2cfceb..5adb3a046bc 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/zamulosh2.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/zamulosh2.lua @@ -14,6 +14,10 @@ monster.outfit = { lookMount = 0, } +monster.events = { + "AscendantBossesDeath", +} + monster.health = 300000 monster.maxHealth = 300000 monster.race = "undead" diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/zamulosh3.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/zamulosh3.lua similarity index 98% rename from data-otservbr-global/monster/quests/ferumbras_ascension/bosses/zamulosh3.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/zamulosh3.lua index bb0671d663a..ec8cb0ade3a 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascension/bosses/zamulosh3.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/zamulosh3.lua @@ -15,6 +15,7 @@ monster.outfit = { } monster.events = { + "AscendantBossesDeath", "ZamuloshClone", } diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/damned_soul.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/damned_soul.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/damned_soul.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/damned_soul.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/desperate_soul.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/desperate_soul.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/desperate_soul.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/desperate_soul.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/disgusting_ooze.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/disgusting_ooze.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/disgusting_ooze.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/disgusting_ooze.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/ferumbras_essence.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/ferumbras_essence.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/ferumbras_essence.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/ferumbras_essence.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_deer.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_deer.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_deer.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_deer.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_frazzlemaw.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_frazzlemaw.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_frazzlemaw.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_frazzlemaw.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_polar_bear.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_polar_bear.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_polar_bear.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_polar_bear.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_rotworm.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_rotworm.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_rotworm.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_rotworm.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_scorpion.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_scorpion.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_scorpion.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_scorpion.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_snake.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_snake.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_snake.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_snake.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_souleater.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_souleater.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_souleater.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_souleater.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_yielothax.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_yielothax.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/lovely/lovely_yielothax.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_yielothax.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/rage_of_mazoran.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/rage_of_mazoran.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/rage_of_mazoran.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/rage_of_mazoran.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/summons/enthralled_demon.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/summons/enthralled_demon.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/summons/enthralled_demon.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/summons/enthralled_demon.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/summons/rift_fragment.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/summons/rift_fragment.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/summons/rift_fragment.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/summons/rift_fragment.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/summons/rift_invader.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/summons/rift_invader.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/summons/rift_invader.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/summons/rift_invader.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/traps/bone_capsule.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/traps/bone_capsule.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/traps/bone_capsule.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/traps/bone_capsule.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/traps/despair.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/traps/despair.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/traps/despair.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/traps/despair.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/traps/electric_sparks.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/traps/electric_sparks.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/traps/electric_sparks.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/traps/electric_sparks.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/traps/eruption_of_destruction.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/traps/eruption_of_destruction.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/traps/eruption_of_destruction.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/traps/eruption_of_destruction.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/traps/guilt.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/traps/guilt.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/traps/guilt.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/traps/guilt.lua diff --git a/data-otservbr-global/monster/quests/ferumbras_ascension/traps/void.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/traps/void.lua similarity index 100% rename from data-otservbr-global/monster/quests/ferumbras_ascension/traps/void.lua rename to data-otservbr-global/monster/quests/ferumbras_ascendant/traps/void.lua diff --git a/data-otservbr-global/npc/a_beggar.lua b/data-otservbr-global/npc/a_beggar.lua index 91e95946f90..b82b41f86be 100644 --- a/data-otservbr-global/npc/a_beggar.lua +++ b/data-otservbr-global/npc/a_beggar.lua @@ -58,7 +58,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end if MsgContains(message, "want") then - if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission01) == 1 then + if player:getStorageValue(Storage.DarkTrails.Mission01) == 1 then npcHandler:setTopic(playerId, 1) end npcHandler:say("The guys from the magistrate sent you here, didn't they?", npc, creature) @@ -72,8 +72,8 @@ local function creatureSayCallback(npc, creature, type, message) "If you brought enough of the stuff you'll see that the king will grant you entrance in his {palace}.", }, npc, creature, 100) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission01, 2) -- Mission 1 end - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission02, 1) -- Mission 2 start + player:setStorageValue(Storage.DarkTrails.Mission01, 2) -- Mission 1 end + player:setStorageValue(Storage.DarkTrails.Mission02, 1) -- Mission 2 start end end return true diff --git a/data-otservbr-global/npc/a_behemoth.lua b/data-otservbr-global/npc/a_behemoth.lua index fe06f68c87e..90d69692804 100644 --- a/data-otservbr-global/npc/a_behemoth.lua +++ b/data-otservbr-global/npc/a_behemoth.lua @@ -51,7 +51,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) + local SPIKE_STORAGE = player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -67,7 +67,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) + player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_dragon_lord.lua b/data-otservbr-global/npc/a_dragon_lord.lua index d9f8ec599b4..cb675223c9a 100644 --- a/data-otservbr-global/npc/a_dragon_lord.lua +++ b/data-otservbr-global/npc/a_dragon_lord.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) + local SPIKE_STORAGE = player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) + player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_drillworm.lua b/data-otservbr-global/npc/a_drillworm.lua index b5ca4e30b73..3926cd2e616 100644 --- a/data-otservbr-global/npc/a_drillworm.lua +++ b/data-otservbr-global/npc/a_drillworm.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) + local SPIKE_STORAGE = player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) + player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_lost_basher.lua b/data-otservbr-global/npc/a_lost_basher.lua index 7f590caa367..8e9f09fa87a 100644 --- a/data-otservbr-global/npc/a_lost_basher.lua +++ b/data-otservbr-global/npc/a_lost_basher.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) + local SPIKE_STORAGE = player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) + player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_lost_husher.lua b/data-otservbr-global/npc/a_lost_husher.lua index fb12261e2f2..ffc3c939229 100644 --- a/data-otservbr-global/npc/a_lost_husher.lua +++ b/data-otservbr-global/npc/a_lost_husher.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) + local SPIKE_STORAGE = player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) + player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_lost_thrower.lua b/data-otservbr-global/npc/a_lost_thrower.lua index 2b3a419cfef..c76d9ff5f2f 100644 --- a/data-otservbr-global/npc/a_lost_thrower.lua +++ b/data-otservbr-global/npc/a_lost_thrower.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) + local SPIKE_STORAGE = player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) + player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_nightmare_scion.lua b/data-otservbr-global/npc/a_nightmare_scion.lua index f6727500fd5..2edccc9de07 100644 --- a/data-otservbr-global/npc/a_nightmare_scion.lua +++ b/data-otservbr-global/npc/a_nightmare_scion.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) + local SPIKE_STORAGE = player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) + player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_strange_fellow.lua b/data-otservbr-global/npc/a_strange_fellow.lua index 63213c31e96..24b2f8a96cc 100644 --- a/data-otservbr-global/npc/a_strange_fellow.lua +++ b/data-otservbr-global/npc/a_strange_fellow.lua @@ -58,7 +58,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission03) ~= 1 then + if player:getStorageValue(Storage.Postman.Mission03) ~= 1 then return true end if MsgContains(message, "bill") then @@ -69,7 +69,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "yes") then if player:removeItem(3216, 1) and npcHandler:getTopic(playerId) == 7 then npcHandler:say("Ok, ok, I'll take it. I guess I have no other choice anyways. And now leave me alone in my misery please.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission03, 2) + player:setStorageValue(Storage.Postman.Mission03, 2) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "hat") then diff --git a/data-otservbr-global/npc/a_sweaty_cyclops.lua b/data-otservbr-global/npc/a_sweaty_cyclops.lua index 712288aeb66..b045b2ad1b4 100644 --- a/data-otservbr-global/npc/a_sweaty_cyclops.lua +++ b/data-otservbr-global/npc/a_sweaty_cyclops.lua @@ -70,8 +70,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 2) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("Me need gift for woman. We dance, so me want to give her bast skirt. But she big is. So I need many to make big one. Bring three okay? Me wait.", npc, creature) - if player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.DefaultStart) ~= 1 then - player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.DefaultStart, 1) + if player:getStorageValue(Storage.OutfitQuest.FriendsandTraders.DefaultStart) ~= 1 then + player:setStorageValue(Storage.OutfitQuest.FriendsandTraders.DefaultStart, 1) end player:setStorageValue(Storage.Quest.U7_8.FriendsandTraders.TheSweatyCyclops, 1) npcHandler:setTopic(playerId, 3) @@ -101,8 +101,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 2) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("Me need gift for woman. We dance, so me want to give her bast skirt. But she big is. So I need many to make big one. Bring three okay? Me wait.", npc, creature) - if player:getStorageValue(Storage.Quest.U7_8.FriendsAndTraders.DefaultStart) ~= 1 then - player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.DefaultStart, 1) + if player:getStorageValue(Storage.OutfitQuest.FriendsandTraders.DefaultStart) ~= 1 then + player:setStorageValue(Storage.OutfitQuest.FriendsandTraders.DefaultStart, 1) end player:setStorageValue(Storage.Quest.U7_8.FriendsAndTraders.TheSweatyCyclops, 1) npcHandler:setTopic(playerId, 3) diff --git a/data-otservbr-global/npc/a_vulcongra.lua b/data-otservbr-global/npc/a_vulcongra.lua index ff8fc5e1563..3c844506ea6 100644 --- a/data-otservbr-global/npc/a_vulcongra.lua +++ b/data-otservbr-global/npc/a_vulcongra.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) + local SPIKE_STORAGE = player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) + player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/a_wyrm.lua b/data-otservbr-global/npc/a_wyrm.lua index c2a6d10adb6..a2bdeaca8e4 100644 --- a/data-otservbr-global/npc/a_wyrm.lua +++ b/data-otservbr-global/npc/a_wyrm.lua @@ -50,7 +50,7 @@ end local function greetCallback(npc, creature) local player = Player(creature) - local SPIKE_STORAGE = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) + local SPIKE_STORAGE = player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) if table.contains({ -1, 3 }, SPIKE_STORAGE) then npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") @@ -66,7 +66,7 @@ local function greetCallback(npc, creature) return true end - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, SPIKE_STORAGE + 1) + player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, SPIKE_STORAGE + 1) table.insert(UNDERCOVER_CONTACTED[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) npcHandler:setMessage(MESSAGE_GREET, "Pssst! Keep it down! ") diff --git a/data-otservbr-global/npc/ahmet.lua b/data-otservbr-global/npc/ahmet.lua index 8a3db7e2d97..b9d8ecc914b 100644 --- a/data-otservbr-global/npc/ahmet.lua +++ b/data-otservbr-global/npc/ahmet.lua @@ -115,13 +115,13 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "mission") or MsgContains(message, "quest") then - if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.StealFromThieves) < 1 then + if player:getStorageValue(Storage.QuestChests.StealFromThieves) < 1 then npcHandler:say({ "What are you talking about?? I was robbed!!!! Someone catch those filthy thieves!!!!! GUARDS! ...", ".... Like usual, they hide at the slightest sign of trouble! YOU! Want to earn some quick money?", }, npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.StealFromThieves) == 1 or player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.StealFromThieves) == 2 then + elseif player:getStorageValue(Storage.QuestChests.StealFromThieves) == 1 or player:getStorageValue(Storage.QuestChests.StealFromThieves) == 2 then npcHandler:say("Did you find my stuff?", npc, creature) npcHandler:setTopic(playerId, 3) end @@ -144,11 +144,11 @@ local function creatureSayCallback(npc, creature, type, message) " I saw them running out of town and then to the north. Maybe they hide at the oasis.", }, npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.StealFromThieves, 1) + player:setStorageValue(Storage.QuestChests.StealFromThieves, 1) elseif npcHandler:getTopic(playerId) == 3 then if player:removeItem(235, 1) then npcHandler:say("GREAT! If you ever need a job as my personal security guard, let me know. Here is the reward I promised you.", npc, creature) - player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.StealFromThieves, 3) + player:setStorageValue(Storage.QuestChests.StealFromThieves, 3) player:addItem(3031, 100) player:addItem(3725, 100) npcHandler:setTopic(playerId, 0) diff --git a/data-otservbr-global/npc/ajax.lua b/data-otservbr-global/npc/ajax.lua index 7421c9f7a65..209d75d2447 100644 --- a/data-otservbr-global/npc/ajax.lua +++ b/data-otservbr-global/npc/ajax.lua @@ -132,12 +132,12 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 11) end elseif MsgContains(message, "axe") then - if player:getStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon) == 16 and player:getStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddonWaitTimer) < os.time() then + if player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) == 16 and player:getStorageValue(Storage.OutfitQuest.BarbarianAddonWaitTimer) < os.time() then npcHandler:say("Axe is done! For you. Take. Wear like me.", npc, creature) player:addOutfitAddon(147, 1) player:addOutfitAddon(143, 1) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) - player:setStorageValue(Storage.Quest.U7_8.BarbarianOutfits.BarbarianAddon, 17) + player:setStorageValue(Storage.OutfitQuest.BarbarianAddon, 17) player:addAchievement("Brutal Politeness") else npcHandler:say("Axe is not done yet!", npc, creature) diff --git a/data-otservbr-global/npc/alia.lua b/data-otservbr-global/npc/alia.lua index 361d1089b3c..ec100c289ea 100644 --- a/data-otservbr-global/npc/alia.lua +++ b/data-otservbr-global/npc/alia.lua @@ -69,11 +69,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia) ~= 1 + return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Alia) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia, 1) + player:setStorageValue(Storage.AdventurersGuild.FreeStone.Alia, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/amanda.lua b/data-otservbr-global/npc/amanda.lua index 7c00993f158..1b4630cfcee 100644 --- a/data-otservbr-global/npc/amanda.lua +++ b/data-otservbr-global/npc/amanda.lua @@ -52,19 +52,19 @@ end -- Mission (Tibia Tales: Rest In Hallowed Ground) local startMissionKeyword = keywordHandler:addKeyword({ "mission" }, StdModule.say, { npcHandler = npcHandler, text = "Well, I would do it myself but I can't leave town for a longer time. Would you be so kind to bring me a vial of holy water from the White Raven Monastery?" }, function(player) - return player:getStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline) == -1 + return player:getStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline) == -1 end) startMissionKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "I thank you a lot in advance. The power of the holy water from the White Raven Monastery is legendary. For my task it is indispensable. We talk about that when you get back.", reset = true }, nil, function(player) - player:setStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline, 1) + player:setStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline, 1) end) startMissionKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "It's your decision. I will ask the next believing mind that visits the temple of Banor's blood.", reset = true }) local function addMissionKeyword(text, value, newValue, addItem) keywordHandler:addKeyword({ "mission" }, StdModule.say, { npcHandler = npcHandler, text = text }, function(player) - return player:getStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline) == value + return player:getStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline) == value end, function(player) if newValue then - player:setStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline, newValue) + player:setStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline, newValue) end if addItem then @@ -100,11 +100,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Amanda) ~= 1 + return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Amanda) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Amanda, 1) + player:setStorageValue(Storage.AdventurersGuild.FreeStone.Amanda, 1) end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for 30 gold?" }) diff --git a/data-otservbr-global/npc/arito.lua b/data-otservbr-global/npc/arito.lua index a4a907c87e4..1eab9a186c3 100644 --- a/data-otservbr-global/npc/arito.lua +++ b/data-otservbr-global/npc/arito.lua @@ -51,7 +51,7 @@ npcType.onCloseChannel = function(npc, creature) end local function greetCallback(npc, player) - if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.AritosTask) == 2 then + if player:getStorageValue(Storage.TibiaTales.AritosTask) == 2 then npcHandler:setMessage(MESSAGE_GREET, "Thank god you are back!! Did you find....err...what we were talking about??") else npcHandler:setMessage(MESSAGE_GREET, "Be mourned, pilgrim in flesh. Be mourned in my tavern.") @@ -68,7 +68,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local AritosTask = player:getStorageValue(Storage.Quest.U8_1.TibiaTales.AritosTask) + local AritosTask = player:getStorageValue(Storage.TibiaTales.AritosTask) -- Check if the message contains "nomads" if MsgContains(message, "nomads") then @@ -90,10 +90,10 @@ local function creatureSayCallback(npc, creature, type, message) "The entrance to their hideout will be revealed in front of you. I don't know who is in charge there right now but please tell him that I won't spoil their secret...", "... well, I just told you but anyway .... I won't tell it to anybody else. Now hurry up before they get here!!", }, npc, creature) - if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart) <= 0 then - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) + if player:getStorageValue(Storage.TibiaTales.DefaultStart) <= 0 then + player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) end - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.AritosTask, 1) + player:setStorageValue(Storage.TibiaTales.AritosTask, 1) elseif AritosTask == 2 then npcHandler:say("And what did they say?? Do I have to give up everything here? Come on tell me!!", npc, creature) npcHandler:setTopic(playerId, 2) @@ -101,7 +101,7 @@ local function creatureSayCallback(npc, creature, type, message) -- Check if the message contains "Acquitted" and topic is 2 elseif MsgContains(message, "Acquitted") and npcHandler:getTopic(playerId) == 2 then npcHandler:say("These are great news!! Thank you for your help! I don't have much, but without you I wouldn't have anything so please take this as a reward.", npc, creature) - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.AritosTask, 3) + player:setStorageValue(Storage.TibiaTales.AritosTask, 3) player:addItem(3035, 100) end diff --git a/data-otservbr-global/npc/azalea.lua b/data-otservbr-global/npc/azalea.lua index 6568b427b9c..1dd4ff5f8a5 100644 --- a/data-otservbr-global/npc/azalea.lua +++ b/data-otservbr-global/npc/azalea.lua @@ -69,11 +69,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia) ~= 1 + return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Alia) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia, 1) + player:setStorageValue(Storage.AdventurersGuild.FreeStone.Alia, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/barazbaz.lua b/data-otservbr-global/npc/barazbaz.lua index 162a30899b1..3421dd672f2 100644 --- a/data-otservbr-global/npc/barazbaz.lua +++ b/data-otservbr-global/npc/barazbaz.lua @@ -54,17 +54,17 @@ local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() - if MsgContains(message, "ritual") and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission06) == 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission07) < 1 then + if MsgContains(message, "ritual") and player:getStorageValue(Storage.DarkTrails.Mission06) == 1 then npcHandler:say({ - "Ancient structures in the sewers you say? Well, our city has had a certain bloody past, even before it has been city at all. But to investigate the archives for what you may have found is a time-consuming process. ...", + "Ancient structures in the sewers you say? Well, our city has had a certain bloody past, even before it has \z + been city at all. But to investigate the archives for what you may have found is a time-consuming process. ...", "Usually, I'm too much bound to my duties to the city to sacrifice time for such an endeavour. ...", "But on the other hand, just now is the time of an important decision of the magistrate concerning the funding of the archives. It is a matter easily overlooked by our good citizens. ...", "If you'd be so kind to place just one of your votes for the funding of the archives, I would be inclined to take the time for your investigation in turn. ...", "Just go to Marvin in the magistrate and vote for a greater funding of the archives. Afterwards, I might be able to present you with some first results of my investigations on your behalf.", }, npc, creature, 10) - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission07, 1) - npcHandler:setTopic(playerId, 0) - elseif MsgContains(message, "abandoned sewers") and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission08) == 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission09) < 1 then + player:setStorageValue(Storage.DarkTrails.Mission07, 1) + elseif MsgContains(message, "abandoned sewers") and player:getStorageValue(Storage.DarkTrails.Mission08) == 1 then npcHandler:say({ "Excellent! Concerning the ancient ruins that you have found, well, if you are not familiar with the city's history, feel free to browse a few books here. I will only refer to some basics here, so I don't waste your time. ...", "The first humans that lived here and that we have any records of lived in slavery of an ancient evil. ...", @@ -73,24 +73,20 @@ local function creatureSayCallback(npc, creature, type, message) "Something like the ruins you have found. What you have seen there hints to a new incident, though. As if someone or something was searching for something. In the past, when those ruins were buried, people were primitive and superstitious. ...", "Today, we have advanced far more and could have the ruins investigated in a far more efficient way. And that is what I would just recommend you to do: get a necrometer from magistrate Jondrin upstairs and investigate the ruins thoroughly.", }, npc, creature, 10) - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission09, 1) - npcHandler:setTopic(playerId, 0) - elseif MsgContains(message, "notebook") and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission11) == 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission12) < 1 and player:getItemCount(11450) >= 1 then + player:setStorageValue(Storage.DarkTrails.Mission09, 1) + elseif (MsgContains(message, "notebook")) and (player:getStorageValue(Storage.DarkTrails.Mission11) == 1 and getPlayerItemCount(creature, 11450) == 1) then npcHandler:say({ - "I know that handwriting you describe! It belongs to a traveller from far away. Magistrate Sholley introduced him to me and she was quite excited to learn more about our city's past. ...", + " I know that handwriting you describe! It belongs to a traveller from far away. Magistrate Sholley introduced him to me and she was quite excited to learn more about our city's past. ...", "I should have thought of him right in the beginning when I heard the stuff you mentioned. But I haven't seen him for a while. You should ask Sholley about her friend to learn about his whereabouts.", }, npc, creature, 10) - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission12, 1) + player:setStorageValue(Storage.DarkTrails.Mission12, 1) doPlayerRemoveItem(creature, 11450, 1) - npcHandler:setTopic(playerId, 0) else npcHandler:say("You need to kill the {The Ravager}, click on statue and then come here say {ritual}, {abandoned sewers}, {notebook} and after this find Roswitha and talk with she.", npc, creature) - npcHandler:setTopic(playerId, 0) end return true end -npcHandler:setMessage(MESSAGE_GREET, "Oh, hello there!") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/barnabas_dee.lua b/data-otservbr-global/npc/barnabas_dee.lua index 50c6bcef9f4..9359d320a5d 100644 --- a/data-otservbr-global/npc/barnabas_dee.lua +++ b/data-otservbr-global/npc/barnabas_dee.lua @@ -55,42 +55,38 @@ local function creatureSayCallback(npc, creature, type, message) local playerId = player:getId() if MsgContains(message, "mission") then - if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ThePowderOfTheStars.Mission) == 1 then - npcHandler:say("Do you already have 15 units of blue pollen with you?", npc, creature) - npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ThePowderOfTheStars.Mission) < 1 then + if player:getStorageValue(Storage.Oramond.PeppermoonBell) < 1 then npcHandler:say({ "I am afraid my supplies of peppermoon bell powder have gone flat again. Please provide me with the pollen of this flower. ...", - "It only blooms underground in a cavern to the northwest. I will need 15 units of pollen. Bring them to me and we shall conduct a seance.", + "It only blooms underground in a cavern to the northwest. I will need 15 units of pollen. Bring them to me and we shall conduct a séance.", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.ThePowderOfTheStars.Mission, 1) - if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine) < 1 then - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine, 1) - end + player:setStorageValue(Storage.Oramond.PeppermoonBell, 1) + player:setStorageValue(Storage.Oramond.PeppermoonBellCount, 0) npcHandler:setTopic(playerId, 0) + if player:getStorageValue(Storage.Oramond.QuestLine) < 1 then + player:setStorageValue(Storage.Oramond.QuestLine, 1) + end + elseif player:getStorageValue(Storage.Oramond.PeppermoonBell) == 1 then + npcHandler:say("Ah! Did you bring me the peppermoon bell pollen I asked for?", npc, creature) + npcHandler:setTopic(playerId, 1) end - elseif MsgContains(message, "seance") and player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ThePowderOfTheStars.Mission) == 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission16) < 1 then - npcHandler:say("Ah! Did you bring me the peppermoon bell pollen I asked for?", npc, creature) - npcHandler:setTopic(playerId, 1) - elseif MsgContains(message, "yes") then + end + if MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - if player:getItemCount(21089) >= 15 then - if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission15) == 1 then + if player:getStorageValue(Storage.Oramond.PeppermoonBellCount) >= 15 then + if player:getStorageValue(Storage.DarkTrails.Mission15) == 1 then npcHandler:say("Ah! Well done! Now we shall proceed with the seance, yes?", npc, creature) - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.ThePowderOfTheStars.Mission, -1) - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission15, 2) + player:setStorageValue(Storage.Oramond.PeppermoonBell, -1) + player:setStorageValue(Storage.Oramond.PeppermoonBellCount, -15) + player:setStorageValue(Storage.DarkTrails.Mission15, 2) player:removeItem(21089, 15) npcHandler:setTopic(playerId, 2) else npcHandler:say("Ah! Well done! These 15 doses will suffice for now. Here, take this vote for your effort.", npc, creature) - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.ThePowderOfTheStars.Mission, -1) + player:setStorageValue(Storage.Oramond.PeppermoonBell, -1) + player:setStorageValue(Storage.Oramond.PeppermoonBellCount, -15) + player:setStorageValue(Storage.Oramond.VotingPoints, player:getStorageValue(Storage.Oramond.VotingPoints) + 1) player:removeItem(21089, 15) - local currentVotingPoints = player:getStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints) - if currentVotingPoints == -1 then - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints, 1) - else - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints, currentVotingPoints + 1) - end npcHandler:setTopic(playerId, 0) end else @@ -115,13 +111,17 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 5) elseif npcHandler:getTopic(playerId) == 5 then npcHandler:say("Ahhhhhhhh! ", npc, creature) - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission15, 3) - player:teleportTo(Position(33467, 32048, 8)) + player:setStorageValue(Storage.DarkTrails.Mission15, 3) + player:teleportTo(Position(33490, 32037, 8)) player:getPosition():sendMagicEffect(CONST_ME_ENERGYHIT) npcHandler:setTopic(playerId, 0) end + elseif MsgContains(message, "seance") then + if player:getStorageValue(Storage.DarkTrails.Mission15) == 3 then + npcHandler:say("Splendid. Let me make the final preparations... There. Are you ready, too?", npc, creature) + npcHandler:setTopic(playerId, 3) + end end - return true end diff --git a/data-otservbr-global/npc/benjamin.lua b/data-otservbr-global/npc/benjamin.lua index 4e4d908dcbe..ce3858886dc 100644 --- a/data-otservbr-global/npc/benjamin.lua +++ b/data-otservbr-global/npc/benjamin.lua @@ -68,10 +68,10 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "measurements") then local player = Player(creature) - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsBenjamin) ~= 1 then + if player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.MeasurementsBenjamin) ~= 1 then npcHandler:say("Oh they don't change that much since in the old days as... ", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsBenjamin, 1) + player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) + player:setStorageValue(Storage.Postman.MeasurementsBenjamin, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("...", npc, creature) diff --git a/data-otservbr-global/npc/bertram.lua b/data-otservbr-global/npc/bertram.lua index 4f908a68758..876c8ddf79d 100644 --- a/data-otservbr-global/npc/bertram.lua +++ b/data-otservbr-global/npc/bertram.lua @@ -61,7 +61,7 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "key") then if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission06) == 1 and player:getSex() == PLAYERSEX_FEMALE then local headItem = player:getSlotItem(CONST_SLOT_HEAD) - if headItem and headItem.itemid == 3576 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 5 then + if headItem and headItem.itemid == 3576 and player:getStorageValue(Storage.Postman.Rank) == 5 then player:addItem(7934, 1) player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission06, 2) npcHandler:say( diff --git a/data-otservbr-global/npc/boozer.lua b/data-otservbr-global/npc/boozer.lua index 40601c0b5ec..b63fa7620fb 100644 --- a/data-otservbr-global/npc/boozer.lua +++ b/data-otservbr-global/npc/boozer.lua @@ -59,21 +59,21 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.UltimateBoozeQuest) == 2 and player:removeItem(136, 1) then - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.UltimateBoozeQuest, 3) + if player:getStorageValue(Storage.TibiaTales.UltimateBoozeQuest) == 2 and player:removeItem(136, 1) then + player:setStorageValue(Storage.TibiaTales.UltimateBoozeQuest, 3) npcHandler:setTopic(playerId, 0) player:addItem(5710, 1) player:addItem(3035, 10) player:addExperience(100, true) npcHandler:say("Yessss! Now I only need to build my own small brewery, figure out the secret recipe, duplicate the dwarvish brew and BANG I'll be back in business! Here take this as a reward.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U8_1.TibiaTales.UltimateBoozeQuest) < 1 then + elseif player:getStorageValue(Storage.TibiaTales.UltimateBoozeQuest) < 1 then npcHandler:setTopic(playerId, 1) npcHandler:say("Shush!! I don't want everybody to know what I am up to. Listen, things are not going too well, I need a new attraction. Do you want to help me?", npc, creature) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.UltimateBoozeQuest, 1) + player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.TibiaTales.UltimateBoozeQuest, 1) player:addItem(138, 1) npcHandler:say("Good! Listen closely. Take this bottle and go to Kazordoon. I need a sample of their very special brown ale. You may find a cask in their brewery. Come back as soon as you got it.", npc, creature) end diff --git a/data-otservbr-global/npc/brewster.lua b/data-otservbr-global/npc/brewster.lua index 0ba87f44ebf..3314d49c2d2 100644 --- a/data-otservbr-global/npc/brewster.lua +++ b/data-otservbr-global/npc/brewster.lua @@ -84,11 +84,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Brewster) ~= 1 + return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Brewster) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Brewster, 1) + player:setStorageValue(Storage.AdventurersGuild.FreeStone.Brewster, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/brodrosch.lua b/data-otservbr-global/npc/brodrosch.lua index 96c0f43bad5..518d90efa52 100644 --- a/data-otservbr-global/npc/brodrosch.lua +++ b/data-otservbr-global/npc/brodrosch.lua @@ -123,8 +123,8 @@ end, function(player) end) addTravelKeyword("cormaya", { "Do you seek a ride to Cormaya for |TRAVELCOST|?", "Full steam ahead!", "We would like to serve you some time." }, 160, { "postman" }, Position(33311, 31989, 15), function(player) - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01) == 4 then - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01, 5) + if player:getStorageValue(Storage.Postman.Mission01) == 4 then + player:setStorageValue(Storage.Postman.Mission01, 5) end end) diff --git a/data-otservbr-global/npc/budrik.lua b/data-otservbr-global/npc/budrik.lua index 316d86ed05c..e874f8b91f5 100644 --- a/data-otservbr-global/npc/budrik.lua +++ b/data-otservbr-global/npc/budrik.lua @@ -58,21 +58,21 @@ local function creatureSayCallback(npc, creature, type, message) end if table.contains({ "mission", "quest" }, message:lower()) then - if player:getStorageValue(Storage.Quest.U8_1.ToOutfoxAFoxQuest.Questline) < 1 then + if player:getStorageValue(Storage.TibiaTales.ToOutfoxAFoxQuest.Questline) < 1 then npcHandler:say({ "Funny that you are asking me for a mission! There is indeed something you can do for me. Ever heard about The Horned Fox? Anyway, yesterday his gang has stolen my mining helmet during a raid. ...", "It belonged to my father and before that to my grandfather. That helmet is at least 600 years old! I need it back. Are you willing to help me?", }, npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.Quest.U8_1.ToOutfoxAFoxQuest.Questline) == 1 then + elseif player:getStorageValue(Storage.TibiaTales.ToOutfoxAFoxQuest.Questline) == 1 then if player:removeItem(139, 1) then - player:setStorageValue(Storage.Quest.U8_1.ToOutfoxAFoxQuest.Questline, 2) + player:setStorageValue(Storage.TibiaTales.ToOutfoxAFoxQuest.Questline, 2) player:addItem(875, 1) npcHandler:say("As I was just saying to the others, 'this brave fellow will bring me my mining helmet back' and here you are with it!! Here take my spare helmet, I don't need it anymore!", npc, creature) else npcHandler:say("We presume the hideout of The Horned Fox is somewhere in the south-west near the coast, good luck finding my mining helmet!", npc, creature) end - elseif player:getStorageValue(Storage.Quest.U8_1.ToOutfoxAFoxQuest.Questline) == 2 and player:getLevel() <= 40 and player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BudrikMinos) < 0 then + elseif player:getStorageValue(Storage.TibiaTales.ToOutfoxAFoxQuest.Questline) == 2 and player:getLevel() <= 40 and player:getStorageValue(Storage.Quest.U8_5.KillingInTheNameOf.BudrikMinos) < 0 then npcHandler:say({ "I am so angry I could spit grit! That damn {Horned Fox} and his attacks! Let's show those bull-heads that they have messed with the wrong people....", "I want you to kill 5000 minotaurs - no matter where - for me and all the dwarfs of Kazordoon! Are you willing to do that?", @@ -100,10 +100,10 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 1 then npcHandler:say("I knew you have the guts for that task! We presume the hideout of The Horned Fox somewhere in the south-west near the coast. Good luck!", npc, creature) npcHandler:setTopic(playerId, 0) - if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart) <= 0 then - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) + if player:getStorageValue(Storage.TibiaTales.DefaultStart) <= 0 then + player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) end - player:setStorageValue(Storage.Quest.U8_1.ToOutfoxAFoxQuest.Questline, 1) + player:setStorageValue(Storage.TibiaTales.ToOutfoxAFoxQuest.Questline, 1) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("Hussah! Let's bring war to those hoof-legged, dirt-necked, bull-headed minotaurs!! Come back to me when you are done with your {mission}.", npc, creature) player:setStorageValue(JOIN_STOR, 1) diff --git a/data-otservbr-global/npc/captain_bluebear.lua b/data-otservbr-global/npc/captain_bluebear.lua index fd2bcd2369a..8c0100583d4 100644 --- a/data-otservbr-global/npc/captain_bluebear.lua +++ b/data-otservbr-global/npc/captain_bluebear.lua @@ -68,8 +68,8 @@ local function addTravelKeyword(keyword, cost, destination, action, condition) end addTravelKeyword("carlin", 110, Position(32387, 31820, 6), function(player) - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01) == 1 then - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01, 2) + if player:getStorageValue(Storage.Postman.Mission01) == 1 then + player:setStorageValue(Storage.Postman.Mission01, 2) end end) diff --git a/data-otservbr-global/npc/captain_haba.lua b/data-otservbr-global/npc/captain_haba.lua index fd284e4309b..2d5bdef598a 100644 --- a/data-otservbr-global/npc/captain_haba.lua +++ b/data-otservbr-global/npc/captain_haba.lua @@ -99,7 +99,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("A'right, we are here to resupply our stock of baits to catch the sea serpent. Your first task is to bring me 5 fish they are easy to catch. When you got them ask me for the {bait} again.", npc, creature) - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) player:setStorageValue(Storage.Quest.U8_2.TheHuntForTheSeaSerpent.FishForASerpent, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then diff --git a/data-otservbr-global/npc/captain_seahorse.lua b/data-otservbr-global/npc/captain_seahorse.lua index 1f2ca7a0b98..05fc5c856e0 100644 --- a/data-otservbr-global/npc/captain_seahorse.lua +++ b/data-otservbr-global/npc/captain_seahorse.lua @@ -58,8 +58,8 @@ local function addTravelKeyword(keyword, cost, destination, action) end addTravelKeyword("venore", 40, Position(32954, 32022, 6), function(player) - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01) == 3 then - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01, 4) + if player:getStorageValue(Storage.Postman.Mission01) == 3 then + player:setStorageValue(Storage.Postman.Mission01, 4) end end) addTravelKeyword("thais", 160, Position(32310, 32210, 6)) diff --git a/data-otservbr-global/npc/cedrik.lua b/data-otservbr-global/npc/cedrik.lua index e54ee58c041..04778320b96 100644 --- a/data-otservbr-global/npc/cedrik.lua +++ b/data-otservbr-global/npc/cedrik.lua @@ -69,11 +69,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia) ~= 1 + return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Alia) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia, 1) + player:setStorageValue(Storage.AdventurersGuild.FreeStone.Alia, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/chantalle.lua b/data-otservbr-global/npc/chantalle.lua index 7164455312e..7986419417a 100644 --- a/data-otservbr-global/npc/chantalle.lua +++ b/data-otservbr-global/npc/chantalle.lua @@ -61,7 +61,7 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "key") then if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission06) == 1 then local headItem = player:getSlotItem(CONST_SLOT_HEAD) - if headItem and headItem.itemid == 3576 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 5 and player:getSex() ~= PLAYERSEX_FEMALE then + if headItem and headItem.itemid == 3576 and player:getStorageValue(Storage.Postman.Rank) == 5 and player:getSex() ~= PLAYERSEX_FEMALE then player:addItem(7934) player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.Mission06, 2) npcHandler:say("Oh my! You look so great in your uniform! You archpostmen are not only daring but also handsome. Here take it, that's the key you wanted. Just promise to visit me now and then!", npc, creature) diff --git a/data-otservbr-global/npc/charos.lua b/data-otservbr-global/npc/charos.lua index 3d02aee46d1..defab150d53 100644 --- a/data-otservbr-global/npc/charos.lua +++ b/data-otservbr-global/npc/charos.lua @@ -69,7 +69,7 @@ local function greetCallback(npc, creature) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.CharosTrav) > 6 then + if player:getStorageValue(Storage.AdventurersGuild.CharosTrav) > 6 then npcHandler:say("Sorry, you have traveled a lot.", npc, creature) npcHandler:resetNpc(creature) return false @@ -94,7 +94,7 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 0 then if MsgContains(message, "yes") then - npcHandler:say("Fine. You have " .. -player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.CharosTrav) + 7 .. " \z + npcHandler:say("Fine. You have " .. -player:getStorageValue(Storage.AdventurersGuild.CharosTrav) + 7 .. " \z attunements left. What is the new city of your choice? Thais, Carlin, Ab'Dendriel, Kazordoon, Venore, \z Ankrahmun, Edron, Darashia, Liberty Bay or Port Hope?", npc, creature) npcHandler:setTopic(playerId, 1) @@ -102,8 +102,8 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 1 then local cityTable = config.towns[message:lower()] if cityTable then - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.CharosTrav, player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.CharosTrav) + 1) - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.Stone, cityTable) + player:setStorageValue(Storage.AdventurersGuild.CharosTrav, player:getStorageValue(Storage.AdventurersGuild.CharosTrav) + 1) + player:setStorageValue(Storage.AdventurersGuild.Stone, cityTable) npcHandler:say("Goodbye traveler!", npc, creature) else npcHandler:say("Sorry, I don't know about this place.", npc, creature) diff --git a/data-otservbr-global/npc/chavis.lua b/data-otservbr-global/npc/chavis.lua index 0d59a7893f2..7b685cd145c 100644 --- a/data-otservbr-global/npc/chavis.lua +++ b/data-otservbr-global/npc/chavis.lua @@ -60,45 +60,36 @@ local function creatureSayCallback(npc, creature, type, message) -- START TASK if MsgContains(message, "food") then - if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Mission) < 1 then + if player:getStorageValue(Storage.Oramond.MissionToTakeRoots) <= 0 then npcHandler:say({ "Hey there, just to let you know - I am not a man of many words. I prefer 'deeds', you see? The poor of this city will not feed themselves. ...", "So in case you've got nothing better to do - and it sure looks that way judging by how long you're already loitering around in front of my nose - please help us. ...", "If you can find some of the nutritious, juicy {roots} in the outskirts of Rathleton, bring them here. We will gladly take bundles of five roots each, and hey - helping us, helps you in the long term, trust me.", }, npc, creature, 10) - if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine) < 1 then - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine, 1) + if player:getStorageValue(Storage.Oramond.QuestLine) <= 0 then + player:setStorageValue(Storage.Oramond.QuestLine, 1) end - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Mission, 1) + player:setStorageValue(Storage.Oramond.MissionToTakeRoots, 1) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Mission) == 1 then - if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Count) < 5 then + elseif player:getStorageValue(Storage.Oramond.MissionToTakeRoots) == 1 then + if player:getStorageValue(Storage.Oramond.HarvestedRootCount) < 5 then npcHandler:say("I am sorry, you didn't harvest enough roots. You need to harvest a bundle of at least five roots - and please try doing it yourself.", npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Count) >= 5 then + elseif player:getStorageValue(Storage.Oramond.HarvestedRootCount) >= 5 then npcHandler:say("Yes? You brought some juicy roots? How nice of you - that's one additional voice in the {magistrate} of {Rathleton} for you! ...", npc, creature) npcHandler:setTopic(playerId, 1) end end - elseif MsgContains(message, "yes") then - if npcHandler:getTopic(playerId) == 1 and player:removeItem(21291, 5) then - npcHandler:say("Spend it wisely, though, put in a word for the poor, will ye? Sure you will.", npc, creature) - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Count, player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Count) - 5) - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Mission, -1) - if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Door) < 1 then - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Door, 1) - end - local currentVotingPoints = player:getStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints) - if currentVotingPoints == -1 then - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints, 1) - else - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints, currentVotingPoints + 1) - end - npcHandler:setTopic(playerId, 0) - else - npcHandler:say("You don't have enough items.", npc, creature) - npcHandler:setTopic(playerId, 0) - end + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 then + npcHandler:say("Spend it wisely, though, put in a word for the poor, will ye? Sure you will.", npc, creature) + player:setStorageValue(Storage.Oramond.VotingPoints, player:getStorageValue(Storage.Oramond.VotingPoints) + 1) + + player:setStorageValue(Storage.Oramond.HarvestedRootCount, player:getStorageValue(Storage.Oramond.HarvestedRootCount) - 5) + player:removeItem(21291, 5) + + player:setStorageValue(Storage.Oramond.MissionToTakeRoots, 0) + player:setStorageValue(Storage.Oramond.DoorBeggarKing, 1) + npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "root") then npcHandler:say("They are nutritious, cost nothing and are good for the body hair. If you can bring us bundles of five juicy roots each - we will make it worth your while for the {magistrate}.", npc, creature) npcHandler:setTopic(playerId, 0) @@ -111,7 +102,6 @@ local function creatureSayCallback(npc, creature, type, message) }, npc, creature, 10) npcHandler:setTopic(playerId, 0) end - return true end diff --git a/data-otservbr-global/npc/chrystal.lua b/data-otservbr-global/npc/chrystal.lua index 60713967280..54c70da0e81 100644 --- a/data-otservbr-global/npc/chrystal.lua +++ b/data-otservbr-global/npc/chrystal.lua @@ -59,10 +59,10 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "measurements") then - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsChrystal) ~= 1 then + if player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.MeasurementsChrystal) ~= 1 then npcHandler:say("If its necessary ... ", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsChrystal, 1) + player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) + player:setStorageValue(Storage.Postman.MeasurementsChrystal, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("...", npc, creature) diff --git a/data-otservbr-global/npc/corym_ratter.lua b/data-otservbr-global/npc/corym_ratter.lua index 3615692dce4..91cc127471b 100644 --- a/data-otservbr-global/npc/corym_ratter.lua +++ b/data-otservbr-global/npc/corym_ratter.lua @@ -78,7 +78,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 1) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) player:setStorageValue(HiddenThreats.QuestLine, 1) player:setStorageValue(HiddenThreats.RatterDoor, 1) npcHandler:say("Nice! I have opened the mine for you. But take care of you! The monsters of depth won't spare you.", npc, creature) diff --git a/data-otservbr-global/npc/costello.lua b/data-otservbr-global/npc/costello.lua index bfd95edc9d4..d338eb95f13 100644 --- a/data-otservbr-global/npc/costello.lua +++ b/data-otservbr-global/npc/costello.lua @@ -61,12 +61,12 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "diary") then - if player:getStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.Diary) == 1 then + if player:getStorageValue(Storage.WhiteRavenMonastery.Diary) == 1 then npcHandler:say("Do you want me to inspect a diary?", npc, creature) npcHandler:setTopic(playerId, 2) end elseif MsgContains(message, "holy water") then - local cStorage = player:getStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline) + local cStorage = player:getStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline) if cStorage == 1 then npcHandler:say("Who are you to demand holy water from the White Raven Monastery? Who sent you??", npc, creature) npcHandler:setTopic(playerId, 3) @@ -74,14 +74,14 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("I already filled your vial with holy water.", npc, creature) end elseif MsgContains(message, "amanda") and npcHandler:getTopic(playerId) == 0 then - if player:getStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline) == 1 then + if player:getStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline) == 1 then npcHandler:say("Ahh, Amanda from Edron sent you! I hope she's doing well. So why did she send you here?", npc, creature) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("Thank you very much! From now on you may open the warded doors to the catacombs.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.Diary, 1) - player:setStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.Door, 1) + player:setStorageValue(Storage.WhiteRavenMonastery.Diary, 1) + player:setStorageValue(Storage.WhiteRavenMonastery.Door, 1) elseif npcHandler:getTopic(playerId) == 2 then if not player:removeItem(3212, 1) then npcHandler:say("Uhm, as you wish.", npc, creature) @@ -90,7 +90,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("By the gods! This is brother Fugio's handwriting and what I read is horrible indeed! You have done our order a great favour by giving this diary to me! Take this blessed Ankh. May it protect you in even your darkest hours.", npc, creature) player:addItem(3214, 1) - player:setStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.Diary, 2) + player:setStorageValue(Storage.WhiteRavenMonastery.Diary, 2) end elseif npcHandler:getTopic(playerId) == 3 then if not MsgContains(message, "amanda") then @@ -100,7 +100,7 @@ local function creatureSayCallback(npc, creature, type, message) end player:addItem(133, 1) - player:setStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline, 2) + player:setStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline, 2) npcHandler:say("Ohh, why didn't you tell me before? Sure you get some holy water if it's for Amanda! Here you are.", npc, creature) npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "no") and table.contains({ 1, 2 }, npcHandler:getTopic(playerId)) then diff --git a/data-otservbr-global/npc/dalbrect.lua b/data-otservbr-global/npc/dalbrect.lua index 87a23c48f32..9fc3053b60c 100644 --- a/data-otservbr-global/npc/dalbrect.lua +++ b/data-otservbr-global/npc/dalbrect.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "brooch") then - if player:getStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.Passage) == 1 then + if player:getStorageValue(Storage.WhiteRavenMonastery.Passage) == 1 then npcHandler:say("You have recovered my brooch! I shall forever be in your debt, my friend!", npc, creature) return true end @@ -94,8 +94,8 @@ local function creatureSayCallback(npc, creature, type, message) npc, creature ) - player:setStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.QuestLog, 1) -- Quest log - player:setStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.Passage, 1) + player:setStorageValue(Storage.WhiteRavenMonastery.QuestLog, 1) -- Quest log + player:setStorageValue(Storage.WhiteRavenMonastery.Passage, 1) end elseif MsgContains(message, "no") then if npcHandler:getTopic(playerId) == 1 then @@ -113,7 +113,7 @@ keywordHandler:addKeyword({ "passage" }, StdModule.say, { text = "I have only sailed to the isle of the kings once or twice. \z I dare not anger the monks by bringing travelers there without their permission.", }, function(player) - return player:getStorageValue(Storage.Quest.U7_24.TheWhiteRavenMonastery.Passage) ~= 1 + return player:getStorageValue(Storage.WhiteRavenMonastery.Passage) ~= 1 end) local travelNode = keywordHandler:addKeyword({ "passage" }, StdModule.say, { diff --git a/data-otservbr-global/npc/daniel_steelsoul.lua b/data-otservbr-global/npc/daniel_steelsoul.lua index 1beb347c2d8..9f3427a9b1e 100644 --- a/data-otservbr-global/npc/daniel_steelsoul.lua +++ b/data-otservbr-global/npc/daniel_steelsoul.lua @@ -64,11 +64,11 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:removeInteraction(npc, creature) npcHandler:resetNpc(creature) elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.AgainstTheSpiderCult) < 1 then + if player:getStorageValue(Storage.TibiaTales.AgainstTheSpiderCult) < 1 then npcHandler:setTopic(playerId, 1) npcHandler:say("Very good, we need heroes like you to go on a suici.....er....to earn respect of the authorities here AND in addition get a great reward for it. Are you interested in the job?", npc, creature) - elseif player:getStorageValue(Storage.Quest.U8_1.TibiaTales.AgainstTheSpiderCult) == 5 then - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.AgainstTheSpiderCult, 6) + elseif player:getStorageValue(Storage.TibiaTales.AgainstTheSpiderCult) == 5 then + player:setStorageValue(Storage.TibiaTales.AgainstTheSpiderCult, 6) npcHandler:setTopic(playerId, 0) player:addItem(814, 1) npcHandler:say("What? YOU DID IT?!?! That's...that's...er.... like I expected!! Here is your reward.", npc, creature) @@ -173,8 +173,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.AgainstTheSpiderCult, 1) + player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.TibiaTales.AgainstTheSpiderCult, 1) npcHandler:say({ "Very well, maybe you know that the orcs here in Edron learnt to raise giant spiders. It is going to become a serious threat. ...", "The mission is simple: go to the orcs and destroy all spider eggs that are hatched by the giant spider they have managed to catch. The orcs are located in the south of the western part of the island.", diff --git a/data-otservbr-global/npc/dermot.lua b/data-otservbr-global/npc/dermot.lua index ddaeda5cc86..3f66f7f89ec 100644 --- a/data-otservbr-global/npc/dermot.lua +++ b/data-otservbr-global/npc/dermot.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "present") then - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission05) == 2 then + if player:getStorageValue(Storage.Postman.Mission05) == 2 then npcHandler:say("You have a present for me?? Realy?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -70,7 +70,7 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 1 then if player:removeItem(3218, 1) then npcHandler:say("Thank you very much!", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission05, 3) + player:setStorageValue(Storage.Postman.Mission05, 3) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 2 then diff --git a/data-otservbr-global/npc/doubleday.lua b/data-otservbr-global/npc/doubleday.lua index 9476f544aea..ff57ada9c76 100644 --- a/data-otservbr-global/npc/doubleday.lua +++ b/data-otservbr-global/npc/doubleday.lua @@ -50,113 +50,6 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end -local function creatureSayCallback(npc, creature, type, message) - local player = Player(creature) - local playerId = player:getId() - - if not npcHandler:checkInteraction(npc, creature) then - return false - end - - if MsgContains(message, "experiment") then - if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.Mission) == -1 then - npcHandler:say({ - "Yes, well I am working on something very time-consuming at the moment. You see, a lot of us don't have time to go out much, to converse even just to meet and talk about recent discoveries. ...", - "So I thought about a device to help communication in this wonderful city. I already had a helper, he was easily... 'stressed' and quit. Didn't have time to find a new one. ...", - "So, if you'd like to help - there is a lot to do for me to bring my plans to fruition - and if you help me, you will earn my {votes} for the {magistrate} in turn! Are you in?", - }, npc, creature) - npcHandler:setTopic(playerId, 1) - end - elseif MsgContains(message, "yes") then - if npcHandler:getTopic(playerId) == 1 then - npcHandler:say({ - "Good! Quite good! You know, there are actually several things I want you to address. ...", - "First, there is the problem with {communication}, second I need someone to {probe} part of the sewers and last - {combinatorics}!", - }, npc, creature) - npcHandler:setTopic(playerId, 2) - elseif npcHandler:getTopic(playerId) == 3 then - npcHandler:say("Very nice, there you go! Just bring me the printout from the probe after deploying it! You can request a new probing {device} or a new {detector} if you lose it - but it takes some time for me to get a new one ready so be careful with that stuff.", npc, creature) - player:addItem(21192, 1) - player:addItem(21208, 1) - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.Mission, 1) - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.MonoDetector, os.time() + 30 * 60) - if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine) < 1 then - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine, 1) - end - npcHandler:setTopic(playerId, 0) - elseif npcHandler:getTopic(playerId) == 5 then - npcHandler:say("Hey, let's try to be reasonable here, alright? That's a bit too much for what you did, isn't it? It may seem that way but the number of votes I can offer isn't limitless.", npc, creature) - npcHandler:setTopic(playerId, 6) - elseif npcHandler:getTopic(playerId) == 8 then - npcHandler:say("Good, you just gained 1 genuine votes in the magistrate!", npc, creature) - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.Mission, -1) - local currentVotingPoints = player:getStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints) - if currentVotingPoints == -1 then - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints, 1) - else - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints, currentVotingPoints + 1) - end - npcHandler:setTopic(playerId, 0) - elseif npcHandler:getTopic(playerId) == 9 then - npcHandler:say("Alright, there you go - please, try to be more careful with my equipment next time!", npc, creature) - player:addItem(21192, 1) - player:addItem(21208, 1) - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.MonoDetector, os.time() + 30 * 60) - npcHandler:setTopic(playerId, 0) - end - elseif MsgContains(message, "probe") then - if npcHandler:getTopic(playerId) == 2 then - npcHandler:say({ - "Because of my {experiments} with the {glooth}, some things in the new sewers of Rathleton aren't exactly 'in order' anymore - if you follow me. A sort of mushroom has formed down there and some... 'things' now nest in the lower drainage areas. ...", - "Could you please just go down there and check if this is caused by... my... version of the {glooth}? You know, just some experiments I did to alter the basic elemental structure of the {glooth}, nothing personal. ...", - "If you'd just take this very tiny probing device I designed to analyse the {coloured glooth} and, you know, go down there and place it - oh, and I'll also give you this really tiny {detector}, modified to find a spot where to place the {probe} - so?", - }, npc, creature) - npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.Mission) == 2 then - npcHandler:say({ - "Very good, these readings do tell me a lot - the coloured glooth may be instable but it has some... 'interesting' effects on its surroundings. Oh - no worries, you will be perfectly safe. I will also take back my detector now, thanks. ..", - "Feel free to help me deploy more probes whenever you like.", - }, npc, creature) - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.Mission, 3) - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.OramondTaskProbing, 1) - npcHandler:setTopic(playerId, 0) - end - elseif MsgContains(message, "exchange") then - if npcHandler:getTopic(playerId) == 6 then - npcHandler:say("Well, let's see, you helped me 1 times before exchanging any votes - how many votes do you want me to give you in exchange?", npc, creature) - npcHandler:setTopic(playerId, 7) - elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.Mission) == 3 then - npcHandler:say("Well, let's see, you helped me 1 times before exchanging any votes - how many votes do you want me to give you in {exchange}?", npc, creature) - npcHandler:setTopic(playerId, 4) - end - elseif MsgContains(message, "2") then - if npcHandler:getTopic(playerId) == 4 then - npcHandler:say("Alright then, that's 2 vote(s) you want - I won't take them back, are you sure?", npc, creature) - npcHandler:setTopic(playerId, 5) - end - elseif MsgContains(message, "1") then - if npcHandler:getTopic(playerId) == 7 then - npcHandler:say("Alright then, that's 1 vote(s) you want - I won't take them back, are you sure?", npc, creature) - npcHandler:setTopic(playerId, 8) - end - elseif MsgContains(message, "mono detector") then - if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.MonoDetector) <= os.time() then - npcHandler:say({ - "To actually 'find' a suitable location to deploy the probing device for my measurements, you should use my mono detector. The device detects singular chemical structures of any material or fabric I feed it with and signals it! ...", - "If you have lost your detector or your probing device, I can hand out another - it will take some time, however. Do you need a new one?", - }, npc, creature) - npcHandler:setTopic(playerId, 9) - else - npcHandler:say("You must wait until the detector is ready again.", npc, creature) - end - end - - return true -end - -npcHandler:setMessage(MESSAGE_GREET, "Hello there, hmm just... just wait right there, I'll be with you in a second. Just getting this {experiment} done...") -npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) - npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- npcType registering the npcConfig table diff --git a/data-otservbr-global/npc/dove.lua b/data-otservbr-global/npc/dove.lua index 33ead9cf013..2dadf044189 100644 --- a/data-otservbr-global/npc/dove.lua +++ b/data-otservbr-global/npc/dove.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "measurements") then - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsDove) ~= 1 then + if player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.MeasurementsDove) ~= 1 then npcHandler:say("Oh no! I knew that day would come! I am slightly above the allowed weight and if you can't supply me with some grapes to slim down I will get fired. Do you happen to have some grapes with you? ", npc, creature) npcHandler:setTopic(playerId, 1) else @@ -70,8 +70,8 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 1 then if player:removeItem(3592, 1) then npcHandler:say("Oh thank you! Thank you so much! So listen ... ", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsDove, 1) + player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) + player:setStorageValue(Storage.Postman.MeasurementsDove, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("Oh, you don't have it.", npc, creature) diff --git a/data-otservbr-global/npc/elliott.lua b/data-otservbr-global/npc/elliott.lua index 741cfe91162..ced6e923d8a 100644 --- a/data-otservbr-global/npc/elliott.lua +++ b/data-otservbr-global/npc/elliott.lua @@ -54,80 +54,68 @@ local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() + -- Mission 3 start if MsgContains(message, "abandoned sewers") then - if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission05) == 1 then + if player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) < 21 then + npcHandler:say("You want to enter the abandoned sewers? That's rather dangerous and not a good idea, man. That part of the sewers was not sealed off for nothing, you know? ...", npc, creature) + npcHandler:say("But hey, it's your life, bro. So here's the deal. I'll let you into the abandoned sewers if you help me with our {mission}.", npc, creature) + npcHandler:setTopic(playerId, 0) + -- Mission 3 end + elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 21 then + npcHandler:say("Wow, you already did it, that's fast. I'm used to a more laid-back attitude from most people. It's a shame to risk losing you to some collapsing tunnels, but a deal is a deal. ...", npc, creature) + npcHandler:say("I hereby grant you the perMission to enter the abandoned part of the sewers. Take care, man! ...", npc, creature) + npcHandler:say("If you find something interesting, come back to talk about the {abandoned sewers}.", npc, creature) + player:setStorageValue(Storage.DarkTrails.Mission04, 1) + player:setStorageValue(Storage.Oramond.DoorAbandonedSewer, 1) + npcHandler:setTopic(playerId, 7) + elseif player:getStorageValue(Storage.DarkTrails.Mission05) == 1 then npcHandler:say("I'm glad to see you back alive and healthy. Did you find anything interesting that you want to {report}?", npc, creature) npcHandler:setTopic(playerId, 7) - elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission) < 22 then - npcHandler:say({ - "You want to enter the abandoned sewers? That's rather dangerous and not a good idea, man. That part of the sewers was not sealed off for nothing, you know? ...", - "But hey, it's your life, bro. So here's the deal. I'll let you into the abandoned sewers if you help me with our {mission}.", - }, npc, creature) - npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission) == 22 then - npcHandler:say({ - "Wow, you already did it, that's fast. I'm used to a more laid-back attitude from most people. It's a shame to risk losing you to some collapsing tunnels, but a deal is a deal. ...", - "I hereby grant you the permission to enter the abandoned part of the sewers. Take care, man! ...", - "If you find something interesting, come back to talk about the {abandoned sewers}.", - }, npc, creature) - if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission04) < 1 then - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission04, 1) - end - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission, -1) - npcHandler:setTopic(playerId, 0) end + -- Mission 3 start elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission) < 1 then + if npcHandler:getTopic(playerId) == 0 then npcHandler:say("The sewers need repair. You in?", npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission) < 22 then + -- Mission 3 end + elseif player:getStorageValue(Storage.DarkTrails.Mission03) == 1 then npcHandler:say("Elliott's keeps calling it that. It's just another job! You fixed some broken pipes and stuff? Let me check, {ok}?", npc, creature) npcHandler:setTopic(playerId, 3) end + -- Mission 3 start - sewer access elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 2 then npcHandler:say("Good. Broken pipe and generator pieces, there's smoke evading. That's how you recognise them. See how you can fix them using your hands. Need about, oh, twenty of them at least repaired. Report to me or Jacob", npc, creature) - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission, 1) - if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Door) < 1 then - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Door, 1) - end - if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine) < 1 then - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine, 1) - end + player:setStorageValue(Storage.Oramond.DoorAbandonedSewer, 1) + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 0) npcHandler:setTopic(playerId, 0) end + -- Task: The Ancient Sewers elseif MsgContains(message, "ok") then if npcHandler:getTopic(playerId) == 3 then - npcHandler:say("Good. Thanks, man. That's one vote you got for helping us with this. If you want to redo this task just say {abandoned sewers} to repeat it.", npc, creature) - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission, 22) - local currentVotingPoints = player:getStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints) - if currentVotingPoints == -1 then - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints, 1) - else - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints, currentVotingPoints + 1) - end + npcHandler:say("Good. Thanks, man. That's one vote you got for helping us with this.", npc, creature) + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 21) --goto Mission 3 end npcHandler:setTopic(playerId, 0) end + -- Final Mission 5 elseif MsgContains(message, "report") then - if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission05) == 1 then + if player:getStorageValue(Storage.DarkTrails.Mission05) == 1 then if npcHandler:getTopic(playerId) == 7 then - npcHandler:say({ - "A sacrificial site? Damn, sounds like some freakish cult or something. Just great. And this ancient structure you talked about that's not part of the sewers? You'd better see the local historian about that, man. ...", - "He can make more sense of what you found there. His name is Barazbaz. He should be in the magistrate building.", - }, npc, creature) - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission06, 1) -- Start mission 6 + npcHandler:say("A sacrificial site? Damn, sounds like some freakish cult or something. Just great. And this ancient structure you talked about that's not part of the sewers? You'd better see the local historian about that, man. ...", npc, creature) + npcHandler:say("He can make more sense of what you found there. His name is Barazbaz. He should be in the magistrate building.", npc, creature) + player:setStorageValue(Storage.DarkTrails.Mission06, 1) -- start Mission 6 npcHandler:setTopic(playerId, 0) else - npcHandler:say("You already reported this mission, go to the next.", npc, creature) + npcHandler:say("You already reported this Mission, go to the next.", npc, creature) + npcHandler:setTopic(playerId, 0) end end end - return true end npcHandler:setMessage(MESSAGE_GREET, "") -npcHandler:setMessage(MESSAGE_FAREWELL, " Yeah.") +npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye!") -- Need revision npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) diff --git a/data-otservbr-global/npc/elyen_ravenlock.lua b/data-otservbr-global/npc/elyen_ravenlock.lua index ee0882f7066..51c8b0a4a92 100644 --- a/data-otservbr-global/npc/elyen_ravenlock.lua +++ b/data-otservbr-global/npc/elyen_ravenlock.lua @@ -61,43 +61,43 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission60) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission61) < 1 then + if (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.GravediggerOfDrefia.Mission60) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission61) < 1 then npcHandler:say("Hello, brother. You come with a question to me, I believe?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission60) == 1 then + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission60) == 1 then npcHandler:say("And what is it you want? Do you bring news from the undead, or do you seek a dark {artefact}?", npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission45, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission45, 1) npcHandler:setTopic(playerId, 2) - elseif (MsgContains(message, "artefact") or MsgContains(message, "yes")) and npcHandler:getTopic(playerId) == 2 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission60) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission61) < 1 then + elseif (MsgContains(message, "artefact") or MsgContains(message, "yes")) and npcHandler:getTopic(playerId) == 2 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission60) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission61) < 1 then npcHandler:say({ "The scroll piece there? The symbols look promising, but it is incomplete. ...", "It is of little use to us. But it seems to be of interest to you ...", "In exchange for the scroll piece, you must assist me with something. {Agreed}?", }, npc, creature) npcHandler:setTopic(playerId, 3) - elseif (MsgContains(message, "agreed") or MsgContains(message, "yes")) and npcHandler:getTopic(playerId) == 3 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission60) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission61) < 1 then + elseif (MsgContains(message, "agreed") or MsgContains(message, "yes")) and npcHandler:getTopic(playerId) == 3 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission60) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission61) < 1 then npcHandler:say({ "I would have to sing to the Dark Shrines, but I cannot. ...", "I... cannot bear Urgith's breed. Everywhere, I hear them - scrabbling, squeaking ...", "Take this bone flute and play it in front of the five Dark Shrines so that they answer with song in return. You will find them in the Gardens of Night. ...", "If you have done that, you may have the scroll piece. Now go.", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission61, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission61, 1) player:addItem(18932, 1) npcHandler:setTopic(playerId, 0) - elseif MsgContains(message, "mission") and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission66) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission67) < 1 then + elseif MsgContains(message, "mission") and player:getStorageValue(Storage.GravediggerOfDrefia.Mission66) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission67) < 1 then npcHandler:say("Hello, brother. You have finished the dance?", npc, creature) npcHandler:setTopic(playerId, 4) - elseif (MsgContains(message, "yes")) and npcHandler:getTopic(playerId) == 4 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission66) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission67) < 1 then + elseif (MsgContains(message, "yes")) and npcHandler:getTopic(playerId) == 4 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission66) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission67) < 1 then npcHandler:say({ "You have indeed. The shrines have sung back to you. Well done, brother. Not many men take such an interest in our art. ...", "I will take the flute back. Our bargain stands. You may take the scroll.", }, npc, creature) player:removeItem(18932, 1) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission67, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission67, 1) npcHandler:setTopic(playerId, 0) else - npcHandler:say("Time is money, hurry.", npc, creature) + npcHandler:say({ "Time is money, hurry." }, npc, creature) end return true end diff --git a/data-otservbr-global/npc/erayo.lua b/data-otservbr-global/npc/erayo.lua index 35c00250f40..40b05205992 100644 --- a/data-otservbr-global/npc/erayo.lua +++ b/data-otservbr-global/npc/erayo.lua @@ -72,7 +72,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "addon") then - if player:hasOutfit(player:getSex() == PLAYERSEX_FEMALE and 156 or 152) and player:getStorageValue(Storage.Quest.U7_8.AssassinOutfits.AssassinFirstAddon) < 1 and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.Shipwrecked) == 2 then + if player:hasOutfit(player:getSex() == PLAYERSEX_FEMALE and 156 or 152) and player:getStorageValue(Storage.OutfitQuest.AssassinFirstAddon) < 1 and player:getStorageValue(Storage.Quest.U7_8.TheShatteredIsles.Shipwrecked) == 2 then npcHandler:say("Vescu gave you an assassin outfit? Haha. Noticed it lacks the head piece? You look a bit silly. Want my old head piece?", npc, creature) npcHandler:setTopic(playerId, 1) end diff --git a/data-otservbr-global/npc/eroth.lua b/data-otservbr-global/npc/eroth.lua index c53f22d7b49..e8b59fa681f 100644 --- a/data-otservbr-global/npc/eroth.lua +++ b/data-otservbr-global/npc/eroth.lua @@ -57,15 +57,15 @@ local function creatureSayCallback(npc, creature, type, message) -- Check if the message contains "mission" if MsgContains(message, "mission") then -- Check if player is starting the quest - if player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.Questline) < 1 then + if player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline) < 1 then npcHandler:say("Have you ever heard of Elvenbane? It is the castle west of Ab'Dendriel which is inhabited by villains from all over the continent. Any support in this war is welcome. Are you willing to help?", npc, creature) npcHandler:setTopic(playerId, 1) -- Check if player has completed certain objectives - elseif player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.Questline) == 2 and player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.DwarvenShield) == 1 and player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.MorningStar) == 1 and player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.BP1) == 1 and player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.BP2) == 1 then + elseif player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline) == 2 and player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.DwarvenShield) == 1 and player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.MorningStar) == 1 and player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.BP1) == 1 and player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.BP2) == 1 then npcHandler:say("I heard the blow! The reflection must have caused a overcharge of magical energy leading to the contraction and the implosion. Just like I hoped! Please take this as a reward. Thank you very much.", npc, creature) player:addItem(3082, 1) player:addItem(3035, 10) - player:setStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.Questline, 3) + player:setStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline, 3) npcHandler:setTopic(playerId, 0) end -- Check if the player has accepted the mission @@ -76,7 +76,7 @@ local function creatureSayCallback(npc, creature, type, message) "We don't really know how to destroy it but we suppose it may work if you reflect the invisible power of the ball. The beam should be adjusted to Ab'Dendriel. Take this mirror and give it a try. Good luck.", }, npc, creature) player:addItem(3463, 1) - player:setStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.Questline, 1) + player:setStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline, 1) npcHandler:setTopic(playerId, 0) end diff --git a/data-otservbr-global/npc/ezebeth.lua b/data-otservbr-global/npc/ezebeth.lua index 471ef400b25..2a3bff1ae45 100644 --- a/data-otservbr-global/npc/ezebeth.lua +++ b/data-otservbr-global/npc/ezebeth.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission01) == -1 then + if player:getStorageValue(Storage.DarkTrails.Mission01) == -1 then npcHandler:say("Well, there is little where we need help beyond the normal tasks you can do for the city. However, there is one thing out of the ordinary where some {assistance} would be appreciated.", npc, creature) npcHandler:setTopic(playerId, 1) else @@ -68,54 +68,32 @@ local function creatureSayCallback(npc, creature, type, message) end elseif MsgContains(message, "assistance") then if npcHandler:getTopic(playerId) == 1 then - npcHandler:say("It's nothing really important, so no one has yet found the time to look it up. It concerns the town's beggars that have started to behave {strange} lately.", npc, creature) + npcHandler:say(" It's nothing really important, so no one has yet found the time to look it up. It concerns the towns beggars that have started to behave {strange} lately.", npc, creature) npcHandler:setTopic(playerId, 2) end elseif MsgContains(message, "strange") then if npcHandler:getTopic(playerId) == 2 then npcHandler:say("They usually know better than to show up in the streets and harass our citizens, but lately they've grown more bold or desperate or whatever. I ask you to investigate what they are up to. If necessary, you may scare them away a bit.", npc, creature) - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission01, 1) -- Mission 1 start + player:setStorageValue(Storage.DarkTrails.Mission01, 1) -- Mission 1 start npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "outfit") then - if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission18) == 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Outfit) < 1 then + if player:getStorageValue(Storage.DarkTrails.Mission18) == 1 then npcHandler:say("Nice work, take your outfit.", npc, creature) - player:addOutfit(610, 0) - player:addOutfit(618, 0) - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Outfit, 1) + player:setStorageValue(Storage.DarkTrails.Outfit, 1) + doPlayerAddOutfit(610, 1) + doPlayerAddOutfit(618, 1) npcHandler:setTopic(playerId, 0) - else + elseif player:getStorageValue(Storage.DarkTrails.Outfit) == 1 then npcHandler:say("You already have the outfit.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif MsgContains(message, "addon") then - if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Outfit) == 1 then - if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints) >= 6 and player:getStorageValue(Storage.Quest.U10_50.GloothEngineerOutfits.Addon2) < 1 then - npcHandler:say("Receive the second addon.", npc, creature) - player:addOutfit(610, 2) - player:addOutfit(618, 2) - player:setStorageValue(Storage.Quest.U10_50.GloothEngineerOutfits.Addon2, 1) - npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints) >= 3 and player:getStorageValue(Storage.Quest.U10_50.GloothEngineerOutfits.Addon1) < 1 then - npcHandler:say("Receive the first addon.", npc, creature) - player:addOutfit(610, 1) - player:addOutfit(618, 1) - player:setStorageValue(Storage.Quest.U10_50.GloothEngineerOutfits.Addon1, 1) - npcHandler:setTopic(playerId, 0) - else - npcHandler:say({ - "We provide addons to people dedicated to our city. So the first addon is granted to someone who has voted for each of the available shortcuts and each dungeon at least once. ...", - "The second addon is granted to someone who has voted for each bossfight at least once.", - }, npc, creature) - npcHandler:setTopic(playerId, 0) - end - end end - return true end npcHandler:setMessage(MESSAGE_GREET, "Hello! I guess you are here for a {mission}.") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/ferus.lua b/data-otservbr-global/npc/ferus.lua index 8c166415530..549005d8da9 100644 --- a/data-otservbr-global/npc/ferus.lua +++ b/data-otservbr-global/npc/ferus.lua @@ -69,11 +69,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia) ~= 1 + return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Alia) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia, 1) + player:setStorageValue(Storage.AdventurersGuild.FreeStone.Alia, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/gnomargery.lua b/data-otservbr-global/npc/gnomargery.lua index b8c94ab9ba7..85998c3288b 100644 --- a/data-otservbr-global/npc/gnomargery.lua +++ b/data-otservbr-global/npc/gnomargery.lua @@ -90,50 +90,50 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "report" then if MsgContains(message, "delivery") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main) == -1 then + if player:getStorageValue(SPIKE_LOWER_PARCEL_MAIN) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main) == 4 then + elseif player:getStorageValue(SPIKE_LOWER_PARCEL_MAIN) == 4 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() - player:addExperience(3500, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Daily, os.time() + 72000) + player:addExperience(1589, true) + player:setStorageValue(SPIKE_LOWER_PARCEL_MAIN, -1) + player:setStorageValue(SPIKE_LOWER_PARCEL_DAILY, 86400) else npcHandler:say("Gnowful! Deliver the four parcels to some of our far away outposts in the caverns.", npc, creature) end elseif MsgContains(message, "undercover") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) == -1 then + if player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) == 3 then + elseif player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) == 3 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() - player:addExperience(3500, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Daily, os.time() + 72000) + player:addExperience(1589, true) + player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, -1) + player:setStorageValue(SPIKE_LOWER_UNDERCOVER_DAILY, 86400) else npcHandler:say("Gnowful! Get three reports from our undercover agents posing as monsters in the caves around us.", npc, creature) end elseif MsgContains(message, "temperature") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Main) == -1 then + if player:getStorageValue(SPIKE_LOWER_LAVA_MAIN) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Main) == 1 then + elseif player:getStorageValue(SPIKE_LOWER_LAVA_MAIN) == 1 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() - player:addExperience(3500, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Daily, os.time() + 72000) + player:addExperience(1589, true) + player:setStorageValue(SPIKE_LOWER_LAVA_MAIN, -1) + player:setStorageValue(SPIKE_LOWER_LAVA_DAILY, 86400) else npcHandler:say("Gnowful! Use the gnomish temperature measurement device to locate the hottest spot at the lava pools in the cave.", npc, creature) end elseif MsgContains(message, "kill") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main) == -1 then + if player:getStorageValue(SPIKE_LOWER_KILL_MAIN) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main) == 7 then + elseif player:getStorageValue(SPIKE_LOWER_KILL_MAIN) == 7 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() - player:addExperience(3500, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Daily, os.time() + 72000) + player:addExperience(1589, true) + player:setStorageValue(SPIKE_LOWER_KILL_MAIN, -1) + player:setStorageValue(SPIKE_LOWER_KILL_DAILY, 86400) else npcHandler:say("Gnowful! Just go out to the caves and kill at least seven drillworms.", npc, creature) end @@ -148,15 +148,15 @@ local function creatureSayCallback(npc, creature, type, message) ////PARCEL DELIVERY//// /////////////////////]] if MsgContains(message, "deliver") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(SPIKE_LOWER_PARCEL_DAILY) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_LOWER_PARCEL_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) end if player:getLevel() < level then return npcHandler:say("Sorry, you are not on the required minimum level [" .. level .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main) == -1 then + if player:getStorageValue(SPIKE_LOWER_PARCEL_MAIN) == -1 then npcHandler:say("We need someone to bring four parcels to some of our far away outposts in the caverns. If you are interested, I can give you some more {information} about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "delivery" else @@ -167,7 +167,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "delivery" then if MsgContains(message, "yes") then player:addItem(19219, 4) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main, 0) + player:setStorageValue(SPIKE_LOWER_PARCEL_MAIN, 0) npcHandler:say({ "Gnometastic! Here are the parcels. Regrettably, the labels got lost during transport; but I guess those lonely gnomes won't mind as long as they get ANY parcel at all.", "If you lose the parcels, you'll have to get new ones. Gnomux sells all the equipment that is required for our missions." }, npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -180,15 +180,15 @@ local function creatureSayCallback(npc, creature, type, message) ////UNDERCOVER//// ////////////////]] if MsgContains(message, "undercover") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(SPIKE_LOWER_UNDERCOVER_DAILY) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_LOWER_UNDERCOVER_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) end if player:getLevel() < level then return npcHandler:say("Sorry, you are not on the required minimum level [" .. level .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main) == -1 then + if player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) == -1 then npcHandler:say("Someone is needed to get three reports from our undercover agents posing as monsters in the caves around us. If you are interested, I can give you some more {information} about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "undercover" else @@ -198,7 +198,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "undercover" then if MsgContains(message, "yes") then - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Undercover_Main, 0) + player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, 0) npcHandler:say("Gnometastic! Get three reports from our agents. You can find them anywhere in the caves around us. Just keep looking for monsters that behave strangely and give you a wink.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -211,15 +211,15 @@ local function creatureSayCallback(npc, creature, type, message) ////TEMPERATURE///// //////////////////]] if MsgContains(message, "temperature") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(SPIKE_LOWER_LAVA_DAILY) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_LOWER_LAVA_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) end if player:getLevel() < level then return npcHandler:say("Sorry, you are not on the required minimum level [" .. level .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Main) == -1 then + if player:getStorageValue(SPIKE_LOWER_LAVA_MAIN) == -1 then npcHandler:say("Your task would be to use a gnomish temperature measurement device - short GTMD - to locate the hottest spot at the lava pools in the caves. If you are interested, I can give you some more information about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "temperature" else @@ -230,7 +230,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "temperature" then if MsgContains(message, "yes") then player:addItem(19206, 1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Main, 0) + player:setStorageValue(SPIKE_LOWER_LAVA_MAIN, 0) npcHandler:say("Gnometastic! Find the hottest spot of the lava pools in the caves. If you lose the GTMD before you find the hot spot, you'll have to get yourself a new one. Gnomux sells all the equipment that is required for our missions.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -243,15 +243,15 @@ local function creatureSayCallback(npc, creature, type, message) ////KILL///// ///////////]] if MsgContains(message, "kill") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(SPIKE_LOWER_KILL_DAILY) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_LOWER_KILL_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) end if player:getLevel() < level then return npcHandler:say("Sorry, you are not on the required minimum level [" .. level .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main) == -1 then + if player:getStorageValue(SPIKE_LOWER_KILL_MAIN) == -1 then npcHandler:say("This mission will require you to kill some drillworms for us. If you are interested, I can give you some more {information} about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "kill" else @@ -261,7 +261,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "kill" then if MsgContains(message, "yes") then - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main, 0) + player:setStorageValue(SPIKE_LOWER_KILL_MAIN, 0) npcHandler:say("Gnometastic! You should have no trouble finding enough drillworms.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -272,7 +272,6 @@ local function creatureSayCallback(npc, creature, type, message) return true end -npcHandler:setMessage(MESSAGE_GREET, "Hi!") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/gnombold.lua b/data-otservbr-global/npc/gnombold.lua index 5786bd0e2d0..9bc16b2d293 100644 --- a/data-otservbr-global/npc/gnombold.lua +++ b/data-otservbr-global/npc/gnombold.lua @@ -88,50 +88,50 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "report" then if MsgContains(message, "charges") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main) == -1 then + if player:getStorageValue(SPIKE_MIDDLE_CHARGE_MAIN) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main) == 3 then + elseif player:getStorageValue(SPIKE_MIDDLE_CHARGE_MAIN) == 2 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(2000, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Daily, os.time() + 72000) + player:setStorageValue(SPIKE_MIDDLE_CHARGE_MAIN, -1) + player:setStorageValue(SPIKE_MIDDLE_CHARGE_DAILY, 86400) else npcHandler:say("Gnowful! Charge this magnet at three monoliths in the cave system. With three charges, the magnet will disintegrate and charge you with its gathered energies. Step on the magnetic extractor here to deliver the charge to us, then report to me.", npc, creature) end elseif MsgContains(message, "fertilisation") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main) == -1 then + if player:getStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main) == 4 then + elseif player:getStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN) == 4 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(2000, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Daily, os.time() + 72000) + player:setStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN, -1) + player:setStorageValue(SPIKE_MIDDLE_MUSHROOM_DAILY, 86400) else npcHandler:say("Gnowful! Use the fertiliser on four gardener mushroom in the caves.", npc, creature) end elseif MsgContains(message, "nests") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main) == -1 then + if player:getStorageValue(SPIKE_MIDDLE_NEST_MAIN) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main) == 5 then + elseif player:getStorageValue(SPIKE_MIDDLE_NEST_MAIN) == 8 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(2000, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Daily, os.time() + 72000) + player:setStorageValue(SPIKE_MIDDLE_NEST_MAIN, -1) + player:setStorageValue(SPIKE_MIDDLE_NEST_DAILY, 86400) else npcHandler:say("Gnowful! Step into the transformer and destroy eight monster nests.", npc, creature) end elseif MsgContains(message, "killing") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main) == -1 then + if player:getStorageValue(SPIKE_MIDDLE_KILL_MAIN) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main) == 7 then + elseif player:getStorageValue(SPIKE_MIDDLE_KILL_MAIN) == 7 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(2000, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Daily, os.time() + 72000) + player:setStorageValue(SPIKE_MIDDLE_KILL_MAIN, -1) + player:setStorageValue(SPIKE_MIDDLE_KILL_DAILY, 86400) else npcHandler:say("Gnowful! Just go out to the caves and kill at least seven crystalcrushers.", npc, creature) end @@ -142,16 +142,19 @@ local function creatureSayCallback(npc, creature, type, message) return end + --[[///////////////////// + ////GEOMANTIC CHARGES//// + ///////////////////////]] if MsgContains(message, "charges") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(SPIKE_MIDDLE_CHARGE_DAILY) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_MIDDLE_CHARGE_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main) == -1 then + if player:getStorageValue(SPIKE_MIDDLE_CHARGE_MAIN) == -1 then npcHandler:say({ "Our mission for you is to use a magnet on three different monoliths in the cave system here. After the magnet evaporates on the last charge, enter the magnetic extractor here to deliver your charge.", "If you are interested, I can give you some more {information} about it. Are you willing to accept this mission?" }, npc, creature) talkState[playerId] = "charges" else @@ -162,7 +165,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "charges" then if MsgContains(message, "yes") then player:addItem(19207, 1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main, 0) + player:setStorageValue(SPIKE_MIDDLE_CHARGE_MAIN, 0) npcHandler:say( { "Gnometastic! Charge this magnet at three monoliths in the cave system. With three charges, the magnet will disintegrate and charge you with its gathered energies. Step on the magnetic extractor here to deliver the charge to us, then report to me.", "If you lose the magnet you'll have to bring your own. Gnomux sells all the equipment that is required for our missions." }, npc, @@ -179,15 +182,15 @@ local function creatureSayCallback(npc, creature, type, message) ////FERTILISE//// ///////////////]] if MsgContains(message, "fertilise") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(SPIKE_MIDDLE_MUSHROOM_DAILY) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_MIDDLE_MUSHROOM_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main) == -1 then + if player:getStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN) == -1 then npcHandler:say("Your mission would be to seek out gardener mushrooms in the caves and use some fertiliser on them. If you are interested, I can give you some more information about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "fertilise" else @@ -198,7 +201,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "fertilise" then if MsgContains(message, "yes") then player:addItem(19214) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main, 0) + player:setStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN, 0) npcHandler:say("Gnometastic! And here is your fertiliser - use it on four gardener mushroom in the caves. If you lose the fertiliser you'll have to bring your own. Gnomux sells all the equipment that is required for our missions.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -211,15 +214,15 @@ local function creatureSayCallback(npc, creature, type, message) ////DESTROY NESTS///// ////////////////////]] if MsgContains(message, "nests") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(SPIKE_MIDDLE_NEST_DAILY) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_MIDDLE_NEST_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main) == -1 then + if player:getStorageValue(SPIKE_MIDDLE_NEST_MAIN) == -1 then npcHandler:say("Our mission for you is to step into the gnomish transformer and then destroy eight monster nests in the caves. If you are interested, I can give you some more information about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "nests" else @@ -229,7 +232,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "nests" then if MsgContains(message, "yes") then - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main, 0) + player:setStorageValue(SPIKE_MIDDLE_NEST_MAIN, 0) npcHandler:say("Gnometastic! Don't forget to step into the transformer before you go out and destroy five monster nests. If your transformation runs out, return to the transformer to get another illusion.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -242,15 +245,15 @@ local function creatureSayCallback(npc, creature, type, message) ////KILL///// ///////////]] if MsgContains(message, "kill") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(SPIKE_MIDDLE_KILL_DAILY) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_MIDDLE_KILL_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main) == -1 then + if player:getStorageValue(SPIKE_MIDDLE_KILL_MAIN) == -1 then npcHandler:say("This mission will require you to kill some crystal crushers for us. If you are interested, I can give you some more information about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "kill" else @@ -260,7 +263,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "kill" then if MsgContains(message, "yes") then - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main, 0) + player:setStorageValue(SPIKE_MIDDLE_KILL_MAIN, 0) npcHandler:say("Gnometastic! You should have no trouble to find enough crystal crushers. Killing seven of them should be enough.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -271,7 +274,6 @@ local function creatureSayCallback(npc, creature, type, message) return true end -npcHandler:setMessage(MESSAGE_GREET, "Hi!") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/gnome_trooper.lua b/data-otservbr-global/npc/gnome_trooper.lua index f1322b312ff..198557c2e40 100644 --- a/data-otservbr-global/npc/gnome_trooper.lua +++ b/data-otservbr-global/npc/gnome_trooper.lua @@ -26,6 +26,16 @@ npcConfig.flags = { local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) +local response = { + [0] = "It's a pipe! What can be more relaxing for a gnome than to smoke his pipe after a day of duty at the front. At least it's a chance to do something really dangerous after all!", + [1] = "Ah, a letter from home! Oh - I had no idea she felt that way! This is most interesting!", + [2] = "It's a model of the gnomebase Alpha! For self-assembly! With toothpicks...! Yeeaah...! I guess.", + [3] = "A medal of honour! At last they saw my true worth!", +} + +if not DELIVERED_PARCELS then + DELIVERED_PARCELS = {} +end npcType.onAppear = function(npc, creature) npcHandler:onAppear(npc, creature) end @@ -46,48 +56,29 @@ npcType.onThink = function(npc, interval) npcHandler:onThink(npc, interval) end -if not DELIVERED_PARCELS then - DELIVERED_PARCELS = {} -end - -local response = { - [0] = "It's a pipe! What can be more relaxing for a gnome than to smoke his pipe after a day of duty at the front. At least it's a chance to do something really dangerous after all!", - [1] = "Ah, a letter from home! Oh - I had no idea she felt that way! This is most interesting!", - [2] = "It's a model of the gnomebase Alpha! For self-assembly! With toothpicks...! Yeeaah...! I guess.", - [3] = "A medal of honour! At last they saw my true worth!", -} - -local function initializeParcelDelivery(player) - local playerGuid = player:getGuid() - if not DELIVERED_PARCELS[playerGuid] then - DELIVERED_PARCELS[playerGuid] = {} - end - - return DELIVERED_PARCELS[playerGuid] -end - local function greetCallback(npc, creature) local player = Player(creature) - local playerGuid = player:getGuid() - local deliveredParcels = initializeParcelDelivery(player) - local parcelStatus = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main) + local playerId = player:getId() - if table.contains({ -1, 4 }, parcelStatus) or table.contains(deliveredParcels, npc:getId()) then + if table.contains({ -1, 4 }, player:getStorageValue(SPIKE_LOWER_PARCEL_MAIN)) then + return false + end + if table.contains(DELIVERED_PARCELS[player:getGuid()], npc:getId()) then return false end - - npcHandler:setMessage(MESSAGE_GREET, "Do you have something to deliver?") return true end local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) - local playerGuid = player:getGuid() - local deliveredParcels = initializeParcelDelivery(player) - local parcelStatus = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main) + local status = player:getStorageValue(SPIKE_LOWER_PARCEL_MAIN) + + if not DELIVERED_PARCELS[player:getGuid()] then + DELIVERED_PARCELS[player:getGuid()] = {} + end - if MsgContains(message, "something") and not table.contains({ -1, 4 }, parcelStatus) then - if table.contains(deliveredParcels, npc:getId()) then + if MsgContains(message, "something") and not table.contains({ -1, 4 }, status) then + if table.contains(DELIVERED_PARCELS[player:getGuid()], npc:getId()) then return true end @@ -96,9 +87,9 @@ local function creatureSayCallback(npc, creature, type, message) return npcHandler:removeInteraction(npc, creature) end - npcHandler:say(response[parcelStatus], npc, creature) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Parcel_Main, parcelStatus + 1) - table.insert(deliveredParcels, npc:getId()) + npcHandler:say(response[player:getStorageValue(SPIKE_LOWER_PARCEL_MAIN)], npc, creature) + player:setStorageValue(SPIKE_LOWER_PARCEL_MAIN, status + 1) + table.insert(DELIVERED_PARCELS[player:getGuid()], npc:getId()) npcHandler:removeInteraction(npc, creature) end return true diff --git a/data-otservbr-global/npc/gnomilly.lua b/data-otservbr-global/npc/gnomilly.lua index 5c0d217b0fb..62244c6f635 100644 --- a/data-otservbr-global/npc/gnomilly.lua +++ b/data-otservbr-global/npc/gnomilly.lua @@ -87,50 +87,50 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "report" then if MsgContains(message, "pacifiers") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main) == -1 then + if player:getStorageValue(SPIKE_UPPER_PACIFIER_MAIN) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main) == 7 then + elseif player:getStorageValue(SPIKE_UPPER_PACIFIER_MAIN) == 7 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(1000, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Daily, os.time() + 72000) + player:setStorageValue(SPIKE_UPPER_PACIFIER_MAIN, -1) + player:setStorageValue(SPIKE_UPPER_PACIFIER_DAILY, 86400) else npcHandler:say("Gnowful! Take the resonance charger and use it on seven of the pacifiers in the cave.", npc, creature) end elseif MsgContains(message, "release") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main) == -1 then + if player:getStorageValue(SPIKE_UPPER_MOUND_MAIN) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main) == 1 then + elseif player:getStorageValue(SPIKE_UPPER_MOUND_MAIN) == 4 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(1000, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Daily, os.time() + 72000) + player:setStorageValue(SPIKE_UPPER_MOUND_MAIN, -1) + player:setStorageValue(SPIKE_UPPER_MOUND_DAILY, 86400) else npcHandler:say("Gnowful! Take the spirit shovel use it on four graves in the cave system.", npc, creature) end elseif MsgContains(message, "tracking") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Main) == -1 then + if player:getStorageValue(SPIKE_UPPER_TRACK_MAIN) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Main) == 3 then + elseif player:getStorageValue(SPIKE_UPPER_TRACK_MAIN) == 3 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(1000, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Daily, os.time() + 72000) + player:setStorageValue(SPIKE_UPPER_TRACK_MAIN, -1) + player:setStorageValue(SPIKE_UPPER_TRACK_DAILY, 86400) else npcHandler:say("Gnowful! Take the tracking device in the caves and locate the residual spirit energy.", npc, creature) end elseif MsgContains(message, "killing") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main) == -1 then + if player:getStorageValue(SPIKE_UPPER_KILL_MAIN) == -1 then npcHandler:say("You have not started that mission.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main) == 7 then + elseif player:getStorageValue(SPIKE_UPPER_KILL_MAIN) == 7 then npcHandler:say("You have done well. Here, take your reward.", npc, creature) player:addFamePoint() player:addExperience(1000, true) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main, -1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Daily, os.time() + 72000) + player:setStorageValue(SPIKE_UPPER_KILL_MAIN, -1) + player:setStorageValue(SPIKE_UPPER_KILL_DAILY, 86400) else npcHandler:say("Gnowful! Just go out to the caves and kill at least seven demon skeletons.", npc, creature) end @@ -145,15 +145,15 @@ local function creatureSayCallback(npc, creature, type, message) ////GHOST PACIFIERS//// /////////////////////]] if MsgContains(message, "pacifiers") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(SPIKE_UPPER_PACIFIER_DAILY) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_UPPER_PACIFIER_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main) == -1 then + if player:getStorageValue(SPIKE_UPPER_PACIFIER_MAIN) == -1 then npcHandler:say({ "We need you to recharge our ghost pacifiers. They are placed at several strategic points in the caves around us and should be easy to find. Your mission would be to charge seven of them.", "If you are interested, I can give you some more {information} about it. Are you willing to accept this mission?" }, npc, creature) talkState[playerId] = "pacifiers" else @@ -164,7 +164,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "pacifiers" then if MsgContains(message, "yes") then player:addItem(19204, 1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main, 0) + player:setStorageValue(SPIKE_UPPER_PACIFIER_MAIN, 0) npcHandler:say("Gnometastic! Take this resonance charger and use it on seven of the pacifiers in the cave. If you lose the charger, you'll have to bring your own. Gnomux sells all the equipment that is required for our missions.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -177,15 +177,15 @@ local function creatureSayCallback(npc, creature, type, message) ////SPIRIT RELEASE///// /////////////////////]] if MsgContains(message, "release") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(SPIKE_UPPER_MOUND_DAILY) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_UPPER_MOUND_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main) == -1 then + if player:getStorageValue(SPIKE_UPPER_MOUND_MAIN) == -1 then npcHandler:say("Your task would be to use a spirit shovel to release some spirit's anger from graves that can be found all around here. If you are interested, I can give you some more information about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "release" else @@ -196,7 +196,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "release" then if MsgContains(message, "yes") then player:addItem(19203, 1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main, 0) + player:setStorageValue(SPIKE_UPPER_MOUND_MAIN, 0) npcHandler:say("Gnometastic! Take this spirit shovel and use it on four graves in the cave system. If you lose the shovel you'll have to bring your own. Gnomux sells all the equipment that is required for our missions.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -209,15 +209,15 @@ local function creatureSayCallback(npc, creature, type, message) ////TRACK GHOSTS///// ///////////////////]] if MsgContains(message, "track") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(SPIKE_UPPER_TRACK_DAILY) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_UPPER_TRACK_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Main) == -1 then + if player:getStorageValue(SPIKE_UPPER_TRACK_MAIN) == -1 then npcHandler:say( { "You'd be given the highly important task to track down an enormously malevolent spiritual presence in the cave system. Use your tracking device to find out how close you are to the presence.", "Use that information to find the residual energy and use the tracker there. If you are interested, I can give you some more information about it. Are you willing to accept this mission?" }, npc, @@ -233,7 +233,7 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "yes") then GHOST_DETECTOR_MAP[player:getGuid()] = Position.getFreeSand() player:addItem(19205, 1) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Main, 0) + player:setStorageValue(SPIKE_UPPER_TRACK_MAIN, 0) npcHandler:say("Gnometastic! Use this tracking device in the caves and locate the residual spirit energy. If you lose the tracking device, you'll have to bring your own. Gnomux sells all the equipment that is required for our missions.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -246,15 +246,15 @@ local function creatureSayCallback(npc, creature, type, message) ////KILL///// ///////////]] if MsgContains(message, "kill") then - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Daily) >= os.time() then - return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Daily) - os.time()) .. " before this task gets available again.", npc, creature) + if player:getStorageValue(SPIKE_UPPER_KILL_DAILY) >= os.time() then + return npcHandler:say("Sorry, you have to wait " .. string.diff(player:getStorageValue(SPIKE_UPPER_KILL_DAILY) - os.time()) .. " before this task gets available again.", npc, creature) end if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then return npcHandler:say("Sorry, you are not on the required range of levels [" .. levels[1] .. "-" .. levels[2] .. "].", npc, creature) end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main) == -1 then + if player:getStorageValue(SPIKE_UPPER_KILL_MAIN) == -1 then npcHandler:say("We need someone to reduce the steadily growing number of demon skeletons in the caves. If you are interested, I can give you some more information about it. Are you willing to accept this mission?", npc, creature) talkState[playerId] = "kill" else @@ -264,7 +264,7 @@ local function creatureSayCallback(npc, creature, type, message) if talkState[playerId] == "kill" then if MsgContains(message, "yes") then - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main, 0) + player:setStorageValue(SPIKE_UPPER_KILL_MAIN, 0) npcHandler:say("Gnometastic! Just go out and kill them. You should find more of them than you like.", npc, creature) talkState[playerId] = nil elseif MsgContains(message, "no") then @@ -275,7 +275,6 @@ local function creatureSayCallback(npc, creature, type, message) return true end -npcHandler:setMessage(MESSAGE_GREET, "Hi!") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/gnommander.lua b/data-otservbr-global/npc/gnommander.lua index 0a53f221baa..cdcfe7127c0 100644 --- a/data-otservbr-global/npc/gnommander.lua +++ b/data-otservbr-global/npc/gnommander.lua @@ -171,7 +171,6 @@ local function creatureSayCallback(npc, creature, type, message) return true end -npcHandler:setMessage(MESSAGE_GREET, "Hi there! Welcome to the spike.") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/hairycles.lua b/data-otservbr-global/npc/hairycles.lua index 0fbe8ead713..1c407cdc383 100644 --- a/data-otservbr-global/npc/hairycles.lua +++ b/data-otservbr-global/npc/hairycles.lua @@ -83,7 +83,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("These are dire times for our people. Problems plenty are in this times. But me people not grant trust easy. Are you willing to prove you friend of ape people?", npc, creature) npcHandler:setTopic(playerId, 1) elseif questProgress == 1 then - if player:getStorageValue(Storage.Quest.U7_6.WhisperMoss) == 1 then + if player:getStorageValue(Storage.QuestChests.WhisperMoss) == 1 then npcHandler:say("Oh, you brought me whisper moss? Good hairless ape you are! Can me take it?", npc, creature) npcHandler:setTopic(playerId, 3) else @@ -195,7 +195,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("No more missions await you right now, friend. Perhaps you want to check me offers for special friends... or shamanic powers.", npc, creature) end elseif MsgContains(message, "background") then - if questProgress == 1 and player:getStorageValue(Storage.Quest.U7_6.WhisperMoss) ~= 1 then + if questProgress == 1 and player:getStorageValue(Storage.QuestChests.WhisperMoss) ~= 1 then npcHandler:say({ "So listen, little ape was struck by plague. Hairycles not does know what plague it is. That is strange. Hairycles should know. But Hairycles learnt lots and lots ...", "Me sure to make cure so strong to drive away all plague. But to create great cure me need powerful components ...", @@ -268,7 +268,7 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "yes") then if not player:removeItem(4827, 1) then npcHandler:say("Stupid, you no have the moss me need. Go get it. It's somewhere in dworc lair. If you lost it, they might restocked it meanwhile. If you need to hear background of all again, ask Hairycles for {background}.", npc, creature) - player:setStorageValue(Storage.Quest.U7_6.WhisperMoss, -1) + player:setStorageValue(Storage.QuestChests.WhisperMoss, -1) return true end @@ -321,7 +321,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif npcHandler:getTopic(playerId) == 7 then if MsgContains(message, "yes") then if not player:removeItem(4831, 1) then - if player:getStorageValue(Storage.Quest.U7_6.OldParchment) == 1 then + if player:getStorageValue(Storage.QuestChests.OldParchment) == 1 then npcHandler:say("That's bad news. If you lost it, only way to get other is to kill holy serpents. But you can't go there so you must ask adventurers who can.", npc, creature) else npcHandler:say("No! That not scroll me looking for. Silly hairless ape you are. Go to village of lizards and get it there on your own!", npc, creature) diff --git a/data-otservbr-global/npc/hugo.lua b/data-otservbr-global/npc/hugo.lua index ba7b657f92b..16f5f468897 100644 --- a/data-otservbr-global/npc/hugo.lua +++ b/data-otservbr-global/npc/hugo.lua @@ -115,17 +115,17 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "uniforms") then - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 1 then + if player:getStorageValue(Storage.Postman.Mission06) == 1 then npcHandler:say("A new uniform for the post officers? I am sorry but my dog ate the last dress pattern we used. You need to supply us with a new dress pattern.", npc, creature) npcHandler:setTopic(playerId, 1) end elseif MsgContains(message, "dress pattern") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("It was ... wonderous beyond wildest imaginations! I have no clue where Kevin Postner got it from. Better ask him.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 2) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 11 then + player:setStorageValue(Storage.Postman.Mission06, 2) + elseif player:getStorageValue(Storage.Postman.Mission06) == 11 then npcHandler:say("By the gods of fashion! Didn't it do that I fed the last dress pattern to my poor dog? Will this mocking of all which is taste and fashion never stop?? Ok, ok, you will get those ugly, stinking uniforms and now get lost, fashion terrorist.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 12) + player:setStorageValue(Storage.Postman.Mission06, 12) end npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "outfit") then diff --git a/data-otservbr-global/npc/iptar-sin.lua b/data-otservbr-global/npc/iptar-sin.lua index 3b81dafb140..e206cac3f87 100644 --- a/data-otservbr-global/npc/iptar-sin.lua +++ b/data-otservbr-global/npc/iptar-sin.lua @@ -105,11 +105,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Quentin) ~= 1 + return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Quentin) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Quentin, 1) + player:setStorageValue(Storage.AdventurersGuild.FreeStone.Quentin, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/isimov.lua b/data-otservbr-global/npc/isimov.lua index 2b82718c586..7e7d57061c7 100644 --- a/data-otservbr-global/npc/isimov.lua +++ b/data-otservbr-global/npc/isimov.lua @@ -68,11 +68,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Isimov) ~= 1 + return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Isimov) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Isimov, 1) + player:setStorageValue(Storage.AdventurersGuild.FreeStone.Isimov, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/jack.lua b/data-otservbr-global/npc/jack.lua index 2dbc1833d5f..c92bdf9491c 100644 --- a/data-otservbr-global/npc/jack.lua +++ b/data-otservbr-global/npc/jack.lua @@ -63,15 +63,15 @@ local function greetCallback(npc, creature, message) local player = Player(creature) local playerId = player:getId() - if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 7 then + if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 7 then npcHandler:setMessage(MESSAGE_GREET, "You!! What have you told my family? They are mad at me and I don't even know why! They think I lied to them about working in Edron in secrecy! Why should I even do that!") - elseif player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 8 then + elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 8 then npcHandler:setMessage(MESSAGE_GREET, { "What did you do to my SCULPTURE? You simply DESTROYED it? Why? You... you ruined everything... my house, my hobby, my life. My family even refuses to talk to me anymore. ...", "Alright, alright you win. I am done for. You... you must be right, yes. Yes, I was working as an intern... in the academy in Edron... yes... Just... tell this Spectulus guy I want to see him. I have nothing left. I am ready.", }) - player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 9) - elseif player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 10 then + player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 9) + elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 10 then npcHandler:setMessage(MESSAGE_GREET, "So, you've returned to Spectulus? What did he say, is anything wrong? You have this strange expression on your face - is there anything wrong? You DID tell me the truth here, didn't you?") else npcHandler:setMessage(MESSAGE_GREET, "Yes? What can I do for you? I hope this won't take long, though.") @@ -89,25 +89,25 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "spectulus") then - if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 1 then + if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 1 then npcHandler:say("Gesundheit! Are you alright? Did you... want to tell me something by that?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 3 then + elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 3 then if npcHandler:getTopic(playerId) == 3 then npcHandler:say({ "So it's that name again. You are really determined, aren't you. ...", "So if he thinks I'm someone he knew who is now 'lost' and needs to come back or whatever - tell him he is WRONG. I always lived here with my mother and sister, I'm happy here and I certainly don't want to go to that academy of yours.", }, npc, creature, 1000) - player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 4) + player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 4) end end elseif MsgContains(message, "furniture") then - if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 3 then + if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 3 then npcHandler:say("What have you done? What are all these pieces of furniture doing here? Those are ugly at best and - hey! Stop! Leave the wallpaper alone! Alright, alright! Just tell me, why are you doing this? Who's behind all this?", npc, creature) npcHandler:setTopic(playerId, 3) end elseif MsgContains(message, "no") then - if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 10 then + if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 10 then if npcHandler:getTopic(playerId) == 0 then npcHandler:say("WHAT?? No way, I ask you again - you DID tell me the TRUTH here... right?", npc, creature) npcHandler:setTopic(playerId, 5) @@ -117,8 +117,8 @@ local function creatureSayCallback(npc, creature, type, message) "I... I... Well, at least you told me the truth. I don't know if I can accept this as an excuse but it's a start. Now let me return to my work, I need to fix this statue and then the rest of this... mess.", }, npc, creature) player:addAchievement("Truth Be Told") - player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 11) - player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.LastMissionState, 1) + player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 11) + player:setStorageValue(Storage.TibiaTales.JackFutureQuest.LastMissionState, 1) npcHandler:setTopic(playerId, 0) end end @@ -135,33 +135,33 @@ local function creatureSayCallback(npc, creature, type, message) "What? 'Dimensional fold?' Well, thanks for the information and please close the door behind you when you leave my house. Now.", }, npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 2) + player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 2) end - if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 10 then + if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 10 then if npcHandler:getTopic(playerId) == 0 then npcHandler:say("So that's it? Really?", npc, creature) npcHandler:setTopic(playerId, 6) elseif npcHandler:getTopic(playerId) == 6 then npcHandler:say("Yeah, yeah... so what are you still doing here? I guess I... will have to seek out this Spectulus now, see what he has to say. There is nothing left for me in this place.", npc, creature) player:addAchievement("You Don't Know Jack") - player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 11) - player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.LastMissionState, 2) + player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 11) + player:setStorageValue(Storage.TibiaTales.JackFutureQuest.LastMissionState, 2) npcHandler:setTopic(playerId, 0) end end elseif MsgContains(message, "hobbies") or MsgContains(message, "hobby") then - if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 7 then - if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.Statue) < 0 then + if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 7 then + if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Statue) < 0 then npcHandler:say({ "Ah, also a keen lover of arts I assume? You might have already caught a glimpse of that humble masterpiece over there in the corner - I sculpt sulky sculptures! ...", "Sculpting sculptures was my passion since childhood... ...and it was there at my first sandcastle when... ...and it formed... ...and it developed into... ...years of enduring sculpting... ...carved of something like... ...sulky... ...", "And that's what I like to do to this very day - hey, hey will you wake up? Were you even listening to me?", }, npc, creature) - player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.Statue, 1) + player:setStorageValue(Storage.TibiaTales.JackFutureQuest.Statue, 1) npcHandler:setTopic(playerId, 0) end - elseif player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 8 then + elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 8 then npcHandler:say("I... was... sculpting sulky sculptures. For all my life. Until you came in here and DESTROYED MY MASTERPIECE. Go away. I don't like you.", npc, creature) npcHandler:setTopic(playerId, 0) end diff --git a/data-otservbr-global/npc/jacob.lua b/data-otservbr-global/npc/jacob.lua index 6b420783e7d..e649a6773c0 100644 --- a/data-otservbr-global/npc/jacob.lua +++ b/data-otservbr-global/npc/jacob.lua @@ -54,84 +54,64 @@ local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() + -- Mission 3 start if MsgContains(message, "abandoned sewers") then - if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission05) == 1 then + if player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) < 21 then + npcHandler:say("You want to enter the abandoned sewers? That's rather dangerous and not a good idea, man. That part of the sewers was not sealed off for nothing, you know? ...", npc, creature) + npcHandler:say("But hey, it's your life, bro. So here's the deal. I'll let you into the abandoned sewers if you help me with our {mission}.", npc, creature) + -- Mission 3 end + elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 21 then + npcHandler:say("Wow, you already did it, that's fast. I'm used to a more laid-back attitude from most people. It's a shame to risk losing you to some collapsing tunnels, but a deal is a deal. ...", npc, creature) + npcHandler:say("I hereby grant you the permission to enter the abandoned part of the sewers. Take care, man! ...", npc, creature) + npcHandler:say("If you find something interesting, come back to talk about the {abandoned sewers}.", npc, creature) + npcHandler:setTopic(playerId, 7) + player:setStorageValue(Storage.DarkTrails.Mission04, 1) + player:setStorageValue(Storage.Oramond.DoorAbandonedSewer, 1) + elseif player:getStorageValue(Storage.DarkTrails.Mission05) == 1 then npcHandler:say("I'm glad to see you back alive and healthy. Did you find anything interesting that you want to {report}?", npc, creature) npcHandler:setTopic(playerId, 7) - elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission) < 22 then - npcHandler:say({ - "You want to enter the abandoned sewers? That's rather dangerous and not a good idea, man. That part of the sewers was not sealed off for nothing, you know? ...", - "But hey, it's your life, bro. So here's the deal. I'll let you into the abandoned sewers if you help me with our {mission}.", - }, npc, creature) - npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission) == 22 then - npcHandler:say({ - "Wow, you already did it, that's fast. I'm used to a more laid-back attitude from most people. It's a shame to risk losing you to some collapsing tunnels, but a deal is a deal. ...", - "I hereby grant you the permission to enter the abandoned part of the sewers. Take care, man! ...", - "If you find something interesting, come back to talk about the {abandoned sewers}.", - }, npc, creature) - if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission04) < 1 then - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission04, 1) - end - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission, -1) - npcHandler:setTopic(playerId, 0) end + -- Mission 3 start elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission) < 1 then + if npcHandler:getTopic(playerId) == 0 then npcHandler:say("The sewers need repair. You in?", npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission) < 22 then + -- Mission 3 end + elseif player:getStorageValue(Storage.DarkTrails.Mission03) == 1 then npcHandler:say("Elliott's keeps calling it that. It's just another job! You fixed some broken pipes and stuff? Let me check, {ok}?", npc, creature) npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission) == 22 then - npcHandler:say("If you want to redo this task just say {abandoned sewers} to repeat it.", npc, creature) - npcHandler:setTopic(playerId, 0) end + -- Mission 3 start - sewer access elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 2 then npcHandler:say("Good. Broken pipe and generator pieces, there's smoke evading. That's how you recognise them. See how you can fix them using your hands. Need about, oh, twenty of them at least repaired. Report to me or Jacob", npc, creature) - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission, 1) - if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Door) < 1 then - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Door, 1) - end - if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine) < 1 then - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine, 1) - end npcHandler:setTopic(playerId, 0) + player:setStorageValue(Storage.Oramond.AbandonedSewer, 1) + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 0) end + -- Task: The Ancient Sewers elseif MsgContains(message, "ok") then if npcHandler:getTopic(playerId) == 3 then npcHandler:say("Good. Thanks, man. That's one vote you got for helping us with this.", npc, creature) - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission, 22) - local currentVotingPoints = player:getStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints) - if currentVotingPoints == -1 then - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints, 1) - else - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints, currentVotingPoints + 1) - end npcHandler:setTopic(playerId, 0) + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 21) -- Mission 3 end end + -- Final mission 5 elseif MsgContains(message, "report") then - if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission05) == 1 then + if player:getStorageValue(Storage.DarkTrails.Mission05) == 1 then if npcHandler:getTopic(playerId) == 7 then - npcHandler:say({ - "A sacrificial site? Damn, sounds like some freakish cult or something. Just great. And this ancient structure you talked about that's not part of the sewers? You'd better see the local historian about that, man. ...", - "He can make more sense of what you found there. His name is Barazbaz. He should be in the magistrate building.", - }, npc, creature) - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission06, 1) -- Start mission 6 + npcHandler:say("A sacrificial site? Damn, sounds like some freakish cult or something. Just great. And this ancient structure you talked about that's not part of the sewers? You'd better see the local historian about that, man. ...", npc, creature) + npcHandler:say("He can make more sense of what you found there. His name is Barazbaz. He should be in the magistrate building.", npc, creature) + player:setStorageValue(Storage.DarkTrails.Mission06, 1) -- Start mission 6 npcHandler:setTopic(playerId, 0) else npcHandler:say("You already reported this mission, go to the next.", npc, creature) end end end - return true end -npcHandler:setMessage(MESSAGE_GREET, " Hi.") -npcHandler:setMessage(MESSAGE_FAREWELL, " See ya.") - npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/jondrin.lua b/data-otservbr-global/npc/jondrin.lua index 7533ac2b1c4..1e9a99c1070 100644 --- a/data-otservbr-global/npc/jondrin.lua +++ b/data-otservbr-global/npc/jondrin.lua @@ -54,26 +54,25 @@ local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() - if MsgContains(message, "necrometer") and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission09) == 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission10) < 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission09) == 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.OramondTaskProbing) == 1 then - npcHandler:say({ - "A necrometer? Have you any idea how rare and expensive a necrometer is? There is no way I could justify giving a necrometer to an inexperienced adventurer. Hm, although ... if you weren't inexperienced that would be a different matter. ...", - "Did you do any measuring task for Doubleday lately?", - }, npc, creature) + if MsgContains(message, "necrometer") then + --[[if player:getStorageValue(Storage.Oramond.TaskProbing == 1) then + --for this mission is needed script of the npc Doubleday]] + npcHandler:say("A necrometer? Have you any idea how rare and expensive a necrometer is? There is no way I could justify giving a necrometer to an inexperienced adventurer. Hm, although ... if you weren't inexperienced that would be a different matter. ...", npc, creature) + npcHandler:say("Did you do any measuring task for Doubleday lately?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission10) >= 1 then - npcHandler:say("You already got the Necrometer.", npc, creature) - npcHandler:setTopic(playerId, 0) - elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 then - npcHandler:say("Indeed I heard you did a good job out there. I guess that means I can hand you one of our necrometers. Handle it with care.", npc, creature) - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission10, 1) - player:addItem(21124, 1) - npcHandler:setTopic(playerId, 0) + --end + elseif MsgContains(message, "yes") then + if (npcHandler:getTopic(playerId) == 1) and player:getStorageValue(Storage.DarkTrails.Mission09) == 1 then + npcHandler:say("Indeed I heard you did a good job out there. I guess that means I can hand you one of our necrometers. Handle it with care", npc, creature) + npcHandler:setTopic(playerId, 0) + player:setStorageValue(Storage.DarkTrails.Mission10, 1) + player:addItem(21124, 1) + else + npcHandler:say("You already got the Necrometer.", npc, creature) + end end - return true end - -npcHandler:setMessage(MESSAGE_GREET, "Hi!") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/jorge.lua b/data-otservbr-global/npc/jorge.lua index 94653f72374..1fa43c74c62 100644 --- a/data-otservbr-global/npc/jorge.lua +++ b/data-otservbr-global/npc/jorge.lua @@ -49,54 +49,45 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end -local function onAddFocus(npc, creature) - local playerId = creature:getId() -end - -local function onReleaseFocus(npc, creature) - local playerId = creature:getId() -end - local items = { [1] = { name = "Abacus", id = 19151 }, [2] = { name = "Assassin Doll", id = 28897 }, - [3] = { name = "Bag of Oriental Spices", id = 23682 }, - [4] = { name = "Bookworm Doll", id = 28895 }, - [5] = { name = "Citizen Doll", id = 43511 }, - [6] = { name = "Crimson Doll", id = 25981 }, - [7] = { name = "Doll of Durin the Almighty", id = 23679 }, - [8] = { name = "Dragon Eye", id = 22027 }, - [9] = { name = "Dragon Goblet", id = 31265 }, - [10] = { name = "Draken Doll", id = 25979 }, - [11] = { name = "Emblem", id = 25980 }, - [12] = { name = "Encyclopedia", id = 23678 }, - [13] = { name = "Friendship Amulet", id = 19153 }, - [14] = { name = "Frozen Heart", id = 19156 }, - [15] = { name = "Golden Falcon", id = 28896 }, - [16] = { name = "Golden Newspaper", id = 23681 }, - [17] = { name = "Goromaphone", id = 34210 }, - [18] = { name = "Hand Puppets", id = 23676 }, - [19] = { name = "Imortus", id = 23683 }, - [20] = { name = "Jade Amulet", id = 31268 }, - [21] = { name = "Key of Numerous Locks", id = 19152 }, - [22] = { name = "Little Adventurer Doll", id = 37058 }, - [23] = { name = "Loremaster Doll", id = 31267 }, - [24] = { name = "Lucky Clover Amulet", id = 37059 }, - [25] = { name = "Mathmaster Shield", id = 25982 }, - [26] = { name = "Medusa Skull", id = 23680 }, - [27] = { name = "Music Box", id = 23677 }, - [28] = { name = "Noble Sword", id = 22028 }, - [29] = { name = "Norseman Doll", id = 19150 }, - [30] = { name = "Old Radio", id = 28894 }, - [31] = { name = "Orc's Jaw Shredder", id = 19155 }, - [32] = { name = "Phoenix Statue", id = 22026 }, - [33] = { name = "Pigeon Trophy", id = 31266 }, - [34] = { name = "Shield of Destiny", id = 43517 }, - [35] = { name = "Shield of Endless Search", id = 37060 }, - [36] = { name = "The Mexcalibur", id = 19154 }, - [37] = { name = "Tibiora's Box", id = 43510 }, + [3] = { name = "Bag of Oriental Spices", id = 10817 }, + [4] = { name = "Bookworm Doll", id = 18343 }, + [5] = { name = "Cateroides Doll", id = 22151 }, + [6] = { name = "Doll of Durin the Almighty", id = 14764 }, + [7] = { name = "Dragon Eye", id = 22027 }, + [8] = { name = "Dragon Goblet", id = 31265 }, + [9] = { name = "Draken Doll", id = 12043 }, + [10] = { name = "Encyclopedia", id = 8149 }, + [11] = { name = "Friendship Amulet", id = 19153 }, + [12] = { name = "Frozen Heart", id = 19156 }, + [13] = { name = "Golden Falcon", id = 28896 }, + [14] = { name = "Golden Newspaper", id = 8153 }, + [15] = { name = "Hand Puppets", id = 9189 }, + [16] = { name = "Imortus", id = 12811 }, + [17] = { name = "Jade Amulet", id = 31268 }, + [18] = { name = "Key of Numerous Locks", id = 19152 }, + [19] = { name = "Loremaster Doll", id = 31267 }, + [20] = { name = "Mathmaster Shield", id = 14760 }, + [21] = { name = "Medusa Skull", id = 14762 }, + [22] = { name = "Music Box", id = 12045 }, + [23] = { name = "Noble Sword", id = 16276 }, + [24] = { name = "Norsemal Doll", id = 19150 }, + [25] = { name = "Old Radio", id = 12813 }, + [26] = { name = "Orcs Jaw Shredder", id = 19155 }, + [27] = { name = "Pigeon Trophy", id = 31266 }, + [28] = { name = "Phoenix Statue", id = 22026 }, + [29] = { name = "The Mexcalibur", id = 19154 }, + [30] = { name = "TibiaHispano Emblem", id = 25980 }, + [31] = { name = "Goromaphone", id = 34210 }, } +local function greetCallback(npc, creature) + local playerId = creature:getId() + return true +end + local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() @@ -105,42 +96,34 @@ local function creatureSayCallback(npc, creature, type, message) return false end - -- Implementing the "souvenir" message interaction - if MsgContains(message, "souvenir") then - npcHandler:say({ - "In this category I can offer you a Norseman doll, an abacus, a key of numerous locks, a friendship amulet, a mexcalibur sword, an orc shredder, a frozen heart, a phoenix statue, a dragon eye and a noble sword. Or: ...", - "A hand puppet, a music box, an encyclopedia, a Durin doll, a medusa skull, a newspaper, a bag of spices or an Exhiti imortus. ...", - "A mathmaster shield, a draken doll, an emblem, a crimson doll, an old radio, a bookworm doll, a golden falcon and an assassin doll. ...", - "A dragon goblet, a pigeon trophy, a loremaster doll and a jade amulet. ...", - "All listed souvenirs are at 20 silver raid tokens each. Which one of them do you want?", - }, npc, creature) - npcHandler:setTopic(playerId, 1) - return true - end - - -- Checking if the player responded with an item name after "souvenir" - if npcHandler:getTopic(playerId) == 1 then + if message then for i = 1, #items do if MsgContains(message, items[i].name) then if getPlayerItemCount(creature, 19083) >= 20 then doPlayerRemoveItem(creature, 19083, 20) doPlayerAddItem(creature, items[i].id, 1) - npcHandler:say("You just swapped 20 silver raid tokens for 1 " .. items[i].name .. ".", npc, creature) + selfSay("You just swapped 20 silver raid tokens for 1 " .. getItemName(items[i].name) .. ".", npc, creature) else - npcHandler:say("I'm sorry, I need at least 20 silver tokens for that. Please come back when you have them.", npc, creature) + selfSay("You need 20 silver raid tokens.", npc, creature) end - npcHandler:setTopic(playerId, 0) -- Reset topic after processing - return true end end end - return true end +local function onAddFocus(npc, creature) + local playerId = creature:getId() +end + +local function onReleaseFocus(npc, creature) + local playerId = creature:getId() +end + npcHandler:setCallback(CALLBACK_SET_INTERACTION, onAddFocus) npcHandler:setCallback(CALLBACK_REMOVE_INTERACTION, onReleaseFocus) +npcHandler:setCallback(CALLBACK_GREET, greetCallback) npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/kasmir.lua b/data-otservbr-global/npc/kasmir.lua index d8caa64f2e5..b08d52c09a9 100644 --- a/data-otservbr-global/npc/kasmir.lua +++ b/data-otservbr-global/npc/kasmir.lua @@ -69,11 +69,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Kasmir) ~= 1 + return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Kasmir) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Kasmir, 1) + player:setStorageValue(Storage.AdventurersGuild.FreeStone.Kasmir, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/kazzan.lua b/data-otservbr-global/npc/kazzan.lua index 78a93d4f979..797bf28fe67 100644 --- a/data-otservbr-global/npc/kazzan.lua +++ b/data-otservbr-global/npc/kazzan.lua @@ -81,7 +81,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "mission") and player:getStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest) < 1 then + if MsgContains(message, "mission") and player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) < 1 then if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.MaridDoor) < 1 and player:getStorageValue(Storage.Quest.U7_4.DjinnWar.Faction.EfreetDoor) < 1 then npcHandler:say("Do you know the location of the djinn fortresses in the mountains south of here?", npc, creature) npcHandler:setTopic(playerId, 1) @@ -97,14 +97,14 @@ local function creatureSayCallback(npc, creature, type, message) "Very good. I hope you are able to convince one of the fractions to stand on our side. If you haven't done yet, you should first go and look for old Melchior in Ankrahmun. ...", "He knows many things about the djinn race and he may have some hints for you.", }, npc, creature) - if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart) <= 0 then - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) + if player:getStorageValue(Storage.TibiaTales.DefaultStart) <= 0 then + player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) end - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest, 1) + player:setStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest, 1) -- Entregando - elseif player:getStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest) == 3 then + elseif player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) == 3 then npcHandler:say("Well, I don't blame you for that. I am sure you did your best. Now we can just hope that peace remains. Here, take this small gratification for your effort to help and Daraman may bless you!", npc, creature) - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest, player:getStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest) + 1) + player:setStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest, player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) + 1) player:addItem(3035, 20) end diff --git a/data-otservbr-global/npc/kevin.lua b/data-otservbr-global/npc/kevin.lua index aadf4e8f56f..41686524673 100644 --- a/data-otservbr-global/npc/kevin.lua +++ b/data-otservbr-global/npc/kevin.lua @@ -69,114 +69,114 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01) < 1 then + if player:getStorageValue(Storage.Postman.Mission01) < 1 then npcHandler:say("You are not a member of our guild yet! We have high standards for our members. To rise in our guild is a difficult but rewarding task. Are you interested in joining?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01) == 5 then + elseif player:getStorageValue(Storage.Postman.Mission01) == 5 then npcHandler:say("So you have finally made it! I did not think that you would have it in you ... However: are you ready for another assignment?", npc, creature) npcHandler:setTopic(playerId, 8) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission02) == 2 then + elseif player:getStorageValue(Storage.Postman.Mission02) == 2 then npcHandler:say("Excellent, you got it fixed! This will teach this mailbox a lesson indeed! Are you interested in another assignment?", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission02, 3) + player:setStorageValue(Storage.Postman.Mission02, 3) npcHandler:setTopic(playerId, 9) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission03) == 2 then + elseif player:getStorageValue(Storage.Postman.Mission03) == 2 then npcHandler:say("You truly got him? Quite impressive. You are a very promising candidate! I think I have another mission for you. Are you interested?", npc, creature) npcHandler:setTopic(playerId, 11) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission04) == 1 then + elseif player:getStorageValue(Storage.Postman.Mission04) == 1 then npcHandler:say("Do you bring all bones for our officers' safety fund at once?", npc, creature) npcHandler:setTopic(playerId, 13) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission05) == 3 then + elseif player:getStorageValue(Storage.Postman.Mission05) == 3 then npcHandler:say("Splendid, I knew we could trust you. I would like to ask for your help in another matter. Are you interested?", npc, creature) npcHandler:setTopic(playerId, 16) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) == 8 then + elseif player:getStorageValue(Storage.Postman.Mission07) == 8 then npcHandler:say("Once more you have impressed me! Are you willing to do another job?", npc, creature) npcHandler:setTopic(playerId, 21) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) < 10 then + elseif player:getStorageValue(Storage.Postman.Mission06) >= 1 and player:getStorageValue(Storage.Postman.Mission06) < 10 then npcHandler:say("First you need to complete your current mission.", npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 12 then + elseif player:getStorageValue(Storage.Postman.Mission06) == 12 then npcHandler:say("Excellent! Another job well done! Would you accept another mission?", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 13) + player:setStorageValue(Storage.Postman.Mission06, 13) npcHandler:setTopic(playerId, 28) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 10 then + elseif player:getStorageValue(Storage.Postman.Mission06) == 10 then npcHandler:say("Fine, fine. I think that should do it. Tell Hugo that we order those uniforms. The completed dress pattern will soon arrive in Venore. Report to me when you have talked to him.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 11) + player:setStorageValue(Storage.Postman.Mission06, 11) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08) == 2 then + elseif player:getStorageValue(Storage.Postman.Mission08) == 2 then npcHandler:say("So Waldo is dead? This is grave news indeed. Did you recover his posthorn?", npc, creature) npcHandler:setTopic(playerId, 23) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission09) == 3 then + elseif player:getStorageValue(Storage.Postman.Mission09) == 3 then npcHandler:say("You did it? I hope you did not catch a flu in the cold! Anyway, there's another mission for you. Are you interested?", npc, creature) npcHandler:setTopic(playerId, 26) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10) == 2 then + elseif player:getStorageValue(Storage.Postman.Mission10) == 2 then npcHandler:say("You have delivered that letter? You are a true postofficer. All over the land bards shallpraise your name. There are no missions for you left right now.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10, 3) + player:setStorageValue(Storage.Postman.Mission10, 3) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 5 then + elseif player:getStorageValue(Storage.Postman.Mission10) == 3 and player:getStorageValue(Storage.Postman.Rank) == 5 then npcHandler:say("There are no missions for you left right now. You already have the title of Archpostman.", npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 4 then + elseif player:getStorageValue(Storage.Postman.Mission10) == 3 and player:getStorageValue(Storage.Postman.Rank) == 4 then npcHandler:say("There are no missions for you left right now. But you are worthy indeed. Do you want to advance in our guild?", npc, creature) npcHandler:setTopic(playerId, 27) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 3 then + elseif player:getStorageValue(Storage.Postman.Mission08) == 3 and player:getStorageValue(Storage.Postman.Rank) == 3 then npcHandler:say("So are you ready for another mission?", npc, creature) npcHandler:setTopic(playerId, 28) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 4 then + elseif player:getStorageValue(Storage.Postman.Mission08) == 3 and player:getStorageValue(Storage.Postman.Rank) == 4 then npcHandler:say("So are you ready for another mission?", npc, creature) npcHandler:setTopic(playerId, 25) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 4 or player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission09) == 0 then + elseif player:getStorageValue(Storage.Postman.Rank) == 4 or player:getStorageValue(Storage.Postman.Rank) == 3 and player:getStorageValue(Storage.Postman.Mission09) == 0 then npcHandler:say("So are you ready for another mission?", npc, creature) npcHandler:setTopic(playerId, 25) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) < 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 13 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 3 then + elseif player:getStorageValue(Storage.Postman.Mission07) < 1 and player:getStorageValue(Storage.Postman.Mission06) == 13 and player:getStorageValue(Storage.Postman.Rank) == 3 then npcHandler:say("Excellent! Another job well done! Would you accept another mission?", npc, creature) npcHandler:setTopic(playerId, 19) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 13 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 2 then + elseif player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.Mission06) == 13 and player:getStorageValue(Storage.Postman.Rank) == 2 then npcHandler:say("Excellent! Another job well done! Would you accept another mission?", npc, creature) npcHandler:setTopic(playerId, 28) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission04) == 2 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 2 then + elseif player:getStorageValue(Storage.Postman.Mission04) == 2 and player:getStorageValue(Storage.Postman.Rank) == 2 then npcHandler:say("You have made it! We have enough bones for the fund! You remind me of myself when I was young! Interested in another mission?", npc, creature) npcHandler:setTopic(playerId, 15) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission04) == 2 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 1 then + elseif player:getStorageValue(Storage.Postman.Mission04) == 2 and player:getStorageValue(Storage.Postman.Rank) == 1 then npcHandler:say("You have made it! We have enough bones for the fund! You remind me of myself when I was young! Interested in another mission?", npc, creature) npcHandler:setTopic(playerId, 28) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission03) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission04) == 0 then + elseif player:getStorageValue(Storage.Postman.Mission03) == 3 and player:getStorageValue(Storage.Postman.Mission04) == 0 then npcHandler:say("You truly got him? Quite impressive. You are a very promising candidate! I think I have another mission for you. Are you interested?", npc, creature) npcHandler:setTopic(playerId, 11) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission03) == 3 then + elseif player:getStorageValue(Storage.Postman.Rank) == 1 and player:getStorageValue(Storage.Postman.Mission03) == 3 then npcHandler:say("So are you ready for another mission?", npc, creature) npcHandler:setTopic(playerId, 11) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission02) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 1 then + elseif player:getStorageValue(Storage.Postman.Mission02) == 3 and player:getStorageValue(Storage.Postman.Rank) == 1 then npcHandler:say("So are you ready for another mission?", npc, creature) npcHandler:setTopic(playerId, 10) end elseif MsgContains(message, "dress pattern") then - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 2 then + if player:getStorageValue(Storage.Postman.Mission06) == 2 then npcHandler:say("Oh yes, where did we get that from ...? Let's see, first ask the great technomancer in Kazordoon for the technical details. Return here afterwards.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 3) + player:setStorageValue(Storage.Postman.Mission06, 3) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 4 then + elseif player:getStorageValue(Storage.Postman.Mission06) == 4 then npcHandler:say("The mail with Talphion's instructions just arived. I remember we asked Queen Eloise of Carlin for the perfect colours. Go there, ask her about the UNIFORMS and report back here.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 5) + player:setStorageValue(Storage.Postman.Mission06, 5) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 6 then + elseif player:getStorageValue(Storage.Postman.Mission06) == 6 then npcHandler:say("The queen has sent me the samples we needed. The next part is tricky. We need theuniforms to emanate some odor that dogs hate.The dog with the best 'taste' in that field is Noodles,the dog of King Tibianus. Do you understand so far?", npc, creature) npcHandler:setTopic(playerId, 18) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 10 then + elseif player:getStorageValue(Storage.Postman.Mission06) == 10 then npcHandler:say("Fine, fine. I think that should do it. Tell Hugo that we order those uniforms. The completed dress pattern will soon arrive in Venore. Report to me when you have talked to him.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 11) + player:setStorageValue(Storage.Postman.Mission06, 11) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "advancement") then - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission04) == 2 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 1 then + if player:getStorageValue(Storage.Postman.Mission04) == 2 and player:getStorageValue(Storage.Postman.Rank) == 1 then npcHandler:say("You are worthy indeed. Do you want to advance in our guild?", npc, creature) npcHandler:setTopic(playerId, 14) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 13 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 2 then + elseif player:getStorageValue(Storage.Postman.Mission06) == 13 and player:getStorageValue(Storage.Postman.Rank) == 2 then npcHandler:say("You are worthy indeed. Do you want to advance in our guild?", npc, creature) npcHandler:setTopic(playerId, 20) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 3 then + elseif player:getStorageValue(Storage.Postman.Mission08) == 3 and player:getStorageValue(Storage.Postman.Rank) == 3 then npcHandler:say("You are worthy indeed. Do you want to advance in our guild?", npc, creature) npcHandler:setTopic(playerId, 24) - elseif player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10) == 3 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank) == 4 then + elseif player:getStorageValue(Storage.Postman.Mission10) == 3 and player:getStorageValue(Storage.Postman.Rank) == 4 then npcHandler:say("You are worthy indeed. Do you want to advance in our guild?", npc, creature) npcHandler:setTopic(playerId, 27) end @@ -201,32 +201,32 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 7) elseif npcHandler:getTopic(playerId) == 7 then npcHandler:say("Ok, remember: the Tibian mail service puts trust in you! Don't fail and report back soon. Just tell me about your {mission}.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01, 1) + player:setStorageValue(Storage.Postman.Mission01, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 8 then npcHandler:say("I am glad to hear that. One of our mailboxes was reported to be jammed. It is located on the so called 'mountain' on theisle Folda. Get a crowbar and fix the mailbox. Report about your mission when you have done so.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01, 6) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission02, 1) + player:setStorageValue(Storage.Postman.Mission01, 6) + player:setStorageValue(Storage.Postman.Mission02, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 9 then npcHandler:say("For your noble deeds I grant you the title Assistant Postofficer. All Postofficers will charge you less money from now on. After every second mission ask me for an ADVANCEMENT. Your next task will be a bit more challenging. Do you feel ready for it?", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank, 1) + player:setStorageValue(Storage.Postman.Rank, 1) npcHandler:setTopic(playerId, 10) elseif npcHandler:getTopic(playerId) == 10 then npcHandler:say("I need you to deliver a bill to the stage magician David Brassacres. He's hiding from his creditors somewhere in Venore. It's likely you will have to trick him somehow to reveal his identity. Report back when you delivered this bill.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission03, 1) + player:setStorageValue(Storage.Postman.Mission03, 1) player:addItem(3216, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 11 then npcHandler:say("Ok, listen: we have some serious trouble with agressive dogs lately. We have accumulated some bones as a sort of pacifier but we need more. Collect 20 bones like the one in my room to the left and report here.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission03, 3) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission04, 1) + player:setStorageValue(Storage.Postman.Mission03, 3) + player:setStorageValue(Storage.Postman.Mission04, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 13 then if getPlayerBones(creature) >= 20 then doPlayerRemoveBones(creature) npcHandler:say("You have collected all the 20 bones needed. Excellent! Now let's talk about further missions if you are interested.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission04, 2) + player:setStorageValue(Storage.Postman.Mission04, 2) npcHandler:setTopic(playerId, 0) else npcHandler:setTopic(playerId, 0) @@ -234,64 +234,64 @@ local function creatureSayCallback(npc, creature, type, message) end elseif npcHandler:getTopic(playerId) == 14 then npcHandler:say("I grant you the title of postman. You are now a full member of our guild. Here have your own officers hat and wear it with pride.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank, 2) + player:setStorageValue(Storage.Postman.Rank, 2) player:addItem(3576, 1) npcHandler:setTopic(playerId, 15) elseif npcHandler:getTopic(playerId) == 15 then npcHandler:say("Since I am convinced I can trust you, this time you must deliver a valuable present to Dermot on Fibula. Do NOT open it!!! You will find the present behind the door here on the lower right side of this room.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission05, 1) + player:setStorageValue(Storage.Postman.Mission05, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 16 then npcHandler:say("Ok. We need a new set of uniforms, and only the best will do for us. Please travel to Venore and negotiate with Hugo Chief acontract for new uniforms.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission05, 4) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 1) + player:setStorageValue(Storage.Postman.Mission05, 4) + player:setStorageValue(Storage.Postman.Mission06, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 18 then npcHandler:say("Good. Go there and find out what taste he dislikes most: mouldy cheese, a piece of fur or abananaskin. Tell him to SNIFF, then the object. Show him the object and ask 'Do you like that?'.DONT let the guards know what you are doing.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 7) + player:setStorageValue(Storage.Postman.Mission06, 7) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 19 then npcHandler:say("Good, so listen. Hugo Chief informed me that he needs the measurements of our postofficers. Go and bring me the measurements of Ben, Lokur, Dove, Liane, Chrystal and Olrik.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, 1) + player:setStorageValue(Storage.Postman.Mission07, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 20 then npcHandler:say("From now on it shall be known that you are a grand postman. You are now a privilegedmember until the end of days. Most captains around the world have an agreement with our guild to transport our privileged members, like you, for less gold.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank, 3) + player:setStorageValue(Storage.Postman.Rank, 3) npcHandler:setTopic(playerId, 19) elseif npcHandler:getTopic(playerId) == 21 then npcHandler:say("Ok but your next assignment might be dangerous. Our Courier Waldo has been missing for a while. I must assume he is dead. Can you follow me so far?", npc, creature) npcHandler:setTopic(playerId, 22) elseif npcHandler:getTopic(playerId) == 22 then npcHandler:say("Find out about his whereabouts and retrieve him or at least his posthorn. He was looking for a new underground passage that is rumoured to be found underneath the troll-infested Mountain east of Thais.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, 9) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08, 1) + player:setStorageValue(Storage.Postman.Mission07, 9) + player:setStorageValue(Storage.Postman.Mission08, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 23 then if player:removeItem(3219, 1) then npcHandler:say("Thank you. We will honour this. Your next mission will be a very special one. Good thing you are a special person as well. Are you ready?", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08, 3) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission09, 0) + player:setStorageValue(Storage.Postman.Mission08, 3) + player:setStorageValue(Storage.Postman.Mission09, 0) npcHandler:setTopic(playerId, 28) end elseif npcHandler:getTopic(playerId) == 24 then npcHandler:say("From now on you are a grand postman for special operations. You are an honoured member of our guild and earned the privilege of your own post horn. Here, take it.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank, 4) + player:setStorageValue(Storage.Postman.Rank, 4) player:addItem(3252, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 25 then npcHandler:say("So listen well. Behind the lower left door you will find a bag. The letters in the bag are for none other than Santa Claus! Deliver them to his house on the isle of Vega, {use} thebag on his mailbox and report back here.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission09, 1) + player:setStorageValue(Storage.Postman.Mission09, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 26 then npcHandler:say("Excellent. Here is a letter for you to deliver. Well, to be honest, no one else volunteered. It's a letter from the mother of Markwin, the king of Mintwallin. Deliver that letter to him, but note that you will not be welcome there.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission09, 4) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10, 1) + player:setStorageValue(Storage.Postman.Mission09, 4) + player:setStorageValue(Storage.Postman.Mission10, 1) player:addItem(3220, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 27 then npcHandler:say("I grant you the title of Archpostman. You are a legend in our guild. As privilege of your newly aquired status you are allowed to make use of certain mailboxes in dangerous areas. Just look out for them and you'll see.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Rank, 5) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Door, 1) + player:setStorageValue(Storage.Postman.Rank, 5) + player:setStorageValue(Storage.Postman.Door, 1) player:addAchievement("Archpostman") npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 28 then diff --git a/data-otservbr-global/npc/kjesse.lua b/data-otservbr-global/npc/kjesse.lua index 84a5f6378a5..609cf542d9d 100644 --- a/data-otservbr-global/npc/kjesse.lua +++ b/data-otservbr-global/npc/kjesse.lua @@ -69,11 +69,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Kjesse) ~= 1 + return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Kjesse) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Kjesse, 1) + player:setStorageValue(Storage.AdventurersGuild.FreeStone.Kjesse, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/kroox.lua b/data-otservbr-global/npc/kroox.lua index ac0acc773de..c8adea58c72 100644 --- a/data-otservbr-global/npc/kroox.lua +++ b/data-otservbr-global/npc/kroox.lua @@ -67,10 +67,10 @@ local function creatureSayCallback(npc, creature, type, message) player:setStorageValue(Storage.Quest.U7_5.SamsOldBackpack.SamsOldBackpackDoor, 1) end elseif message == "lokurs measurements" then - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 7 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsKroox) ~= 1 then + if player:getStorageValue(Storage.Postman.Mission07) >= 7 and player:getStorageValue(Storage.Postman.MeasurementsKroox) ~= 1 then npcHandler:say("Hm, well I guess its ok to tell you ... ", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsKroox, 1) + player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) + player:setStorageValue(Storage.Postman.MeasurementsKroox, 1) else npcHandler:say("...", npc, creature) npcHandler:setTopic(playerId, 0) diff --git a/data-otservbr-global/npc/liane.lua b/data-otservbr-global/npc/liane.lua index 330b9a8615d..b483de917ae 100644 --- a/data-otservbr-global/npc/liane.lua +++ b/data-otservbr-global/npc/liane.lua @@ -68,7 +68,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "measurements") then - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsLiane) ~= 1 then + if player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.MeasurementsLiane) ~= 1 then npcHandler:say("I have more urgent problem to attend then that. Those hawks are hunting my carrier pigeons. Bring me 12 arrows and I'll see if I have the time for this nonsense. Do you have 12 arrows with you? ", npc, creature) npcHandler:setTopic(playerId, 1) else @@ -79,8 +79,8 @@ local function creatureSayCallback(npc, creature, type, message) if npcHandler:getTopic(playerId) == 1 then if player:removeItem(3447, 12) then npcHandler:say("Great! Now I'll teach them a lesson ... For those measurements ... ", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsLiane, 1) + player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) + player:setStorageValue(Storage.Postman.MeasurementsLiane, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("Oh, you don't have it.", npc, creature) diff --git a/data-otservbr-global/npc/lokur.lua b/data-otservbr-global/npc/lokur.lua index 88e710aa066..59fc7ed0f7c 100644 --- a/data-otservbr-global/npc/lokur.lua +++ b/data-otservbr-global/npc/lokur.lua @@ -95,9 +95,9 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("No then.", npc, creature) npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "measurements") then - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 6 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsKroox) ~= 1 then + if player:getStorageValue(Storage.Postman.Mission07) >= 6 and player:getStorageValue(Storage.Postman.MeasurementsKroox) ~= 1 then npcHandler:say("Come on, I have no clue what they are. Better ask my armorer Kroox for such nonsense.Go and ask him for good ol' Lokurs measurements, he'll know.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) + player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) else npcHandler:say("...", npc, creature) npcHandler:setTopic(playerId, 0) diff --git a/data-otservbr-global/npc/lorietta.lua b/data-otservbr-global/npc/lorietta.lua index afd1393dd59..aee99cca788 100644 --- a/data-otservbr-global/npc/lorietta.lua +++ b/data-otservbr-global/npc/lorietta.lua @@ -69,11 +69,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Lorietta) ~= 1 + return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Lorietta) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Lorietta, 1) + player:setStorageValue(Storage.AdventurersGuild.FreeStone.Lorietta, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/maealil.lua b/data-otservbr-global/npc/maealil.lua index 03974a9ce64..f53dfd767a8 100644 --- a/data-otservbr-global/npc/maealil.lua +++ b/data-otservbr-global/npc/maealil.lua @@ -64,11 +64,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Maealil) ~= 1 + return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Maealil) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Maealil, 1) + player:setStorageValue(Storage.AdventurersGuild.FreeStone.Maealil, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/maeryn.lua b/data-otservbr-global/npc/maeryn.lua index 009641f6e3b..93086feb347 100644 --- a/data-otservbr-global/npc/maeryn.lua +++ b/data-otservbr-global/npc/maeryn.lua @@ -151,7 +151,7 @@ local function creatureSayCallback(npc, creature, type, message) end if npcHandler:getTopic(playerId) == 2 then --if (Set storage if player can enchant helmet(need Grim Vale quest)) then - player:setStorageValue(Storage.Quest.U10_80.GrimvaleQuest.WereHelmetEnchant, vocations[helmet]) + player:setStorageValue(Storage.Grimvale.WereHelmetEnchant, vocations[helmet]) npcHandler:say("So this is your choice. If you want to change it, you will have to come to me again.", npc, creature) --else --npcHandler:say("Message when player do not have quest.", npc, creature) @@ -164,7 +164,7 @@ local function creatureSayCallback(npc, creature, type, message) return false else --if (Set storage if player can enchant helmet(need Grim Vale quest)) then - player:setStorageValue(Storage.Quest.U10_80.GrimvaleQuest.WereHelmetEnchant, vocations[knightChoice[playerId]][weapontype]) + player:setStorageValue(Storage.Grimvale.WereHelmetEnchant, vocations[knightChoice[playerId]][weapontype]) npcHandler:say("So this is your choice. If you want to change it, you will have to come to me again.", npc, creature) --else --npcHandler:say("Message when player do not have quest.", npc, creature) diff --git a/data-otservbr-global/npc/markwin.lua b/data-otservbr-global/npc/markwin.lua index 0a27b3ac6bc..c30dd0242f3 100644 --- a/data-otservbr-global/npc/markwin.lua +++ b/data-otservbr-global/npc/markwin.lua @@ -86,7 +86,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "letter") then - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10) == 1 then + if player:getStorageValue(Storage.Postman.Mission10) == 1 then if player:getItemCount(3220) > 0 then npcHandler:say("A letter from my Moohmy?? Do you have a letter from my Moohmy to me?", npc, creature) npcHandler:setTopic(playerId, 1) @@ -100,7 +100,7 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("Uhm, well thank you, hornless being.", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission10, 2) + player:setStorageValue(Storage.Postman.Mission10, 2) player:removeItem(3220, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then diff --git a/data-otservbr-global/npc/marvin.lua b/data-otservbr-global/npc/marvin.lua index 98d4a5cfdc4..f5cd7fe16c2 100644 --- a/data-otservbr-global/npc/marvin.lua +++ b/data-otservbr-global/npc/marvin.lua @@ -55,14 +55,14 @@ local function creatureSayCallback(npc, creature, type, message) local playerId = player:getId() if MsgContains(message, "funding") then - if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission07) == 1 and player:getStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints) >= 1 then + if player:setStorageValue(Storage.DarkTrails.Mission07) == 1 then npcHandler:say({ "So far you earned x votes. Each single vote can be spent on a different topic or you're also able to cast all your votes on one voting. ...", "Well in the topic b you have the possibility to vote for the funding of the {archives}, import of bug {milk} or street {repairs}.", }, npc, creature) npcHandler:setTopic(playerId, 1) else - npcHandler:say("You can't vote yet.", npc, creature) + npcHandler:say("You cant vote yet.", npc, creature) end elseif MsgContains(message, "archives") then if npcHandler:getTopic(playerId) == 1 then @@ -71,25 +71,18 @@ local function creatureSayCallback(npc, creature, type, message) end elseif MsgContains(message, "1") then if npcHandler:getTopic(playerId) == 2 then - npcHandler:say("Did I get that right: You want to cast 1 of your votes on funding the {archives}?", npc, creature) + npcHandler:say("Did I get that right: You want to cast 1 of your votes on funding the {archives?}", npc, creature) npcHandler:setTopic(playerId, 3) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 3 then - local currentVotes = player:getStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints) - if currentVotes > 0 then - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints, currentVotes - 1) - end - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission08, 1) + player:setStorageValue(Storage.DarkTrails.Mission08, 1) npcHandler:say("Thanks, you successfully cast your vote. Feel free to continue gathering votes by helping the city! Farewell.", npc, creature) npcHandler:setTopic(playerId, 0) end end - return true end - -npcHandler:setMessage(MESSAGE_GREET, "Ah, you come just in time for the special voting about the most recent {funding} project. I guess you want to participate in it.") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/mazarius.lua b/data-otservbr-global/npc/mazarius.lua index 2fee7b05b14..a44e01e893f 100644 --- a/data-otservbr-global/npc/mazarius.lua +++ b/data-otservbr-global/npc/mazarius.lua @@ -61,35 +61,28 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "brings") then npcHandler:say("Ah, you have heard about my search for experienced help. And indeed your reputation for solving certain {problems} has preceded you.", npc, creature) - npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "problems") then - npcHandler:say("My problems are, so to say, dire news for the whole world. I don't want to confuse you with overly complicated and lengthy stories, so do you want to hear the {long} version or the {short}?", npc, creature) - npcHandler:setTopic(playerId, 0) + npcHandler:say(" My problems are, so to say, dire news for the whole world. I don't want to confuse you with overly complicated and lengthy stories, so do you want to hear the {long} version or the {short}?", npc, creature) elseif MsgContains(message, "long") then - npcHandler:say({ - "He obviously had taken an interest to the topic of ascension, and I came into possession of some of his early writings. ...You have to know I'm a scholar of some renown. In the course of my latest studies about ascension, I stumbled upon disturbing facts about the person of the all too well known Ferumbras, the fiendish. ...", - "This, combined with investigation and divination, bit by bit led to the conclusion that all that Ferumbras has done in the past may be part of a cunning plan. ...", - "Considering his writings and the books he based them upon, it became clear that Ferumbras is planning his ascension to godlike status. ...", - "All of his attacks and defeats only served one purpose: to become an integral part of the people's knowledge, fears and beliefs. ...", - "He actually used this as an energy source, and combined it with some sources of power which might not all be of our own world. ...", - "He uses this energy to increasingly empower himself and will eventually be prepared to take the final step to transform himself into a godlike being. ...", - "With the knowledge what to look for, I acquired expensive but powerful artefacts to scry the world for the expected power signature - and indeed I made contact. ...", - "To my horror I had to recognise that Ferumbras had already made significant progress, and his final bid for ascension is imminent! ...", - "His power levels are already too high for there to be any hope of stopping him with conventional means. ...", - "But not all is lost yet. During my studies about godhood, I learned that the dark Zathroth himself had created a weapon so powerful that it could actually slay a god. ...", - "Yet even he deemed this so-called '{godbreaker}' too dangerous, and split it into seven parts. These were at some point entrusted to his powerful minions, known as the Ruthless Seven. ...", - "Ancient, forbidden texts hinted at a hellish place where the seven built deadly dungeons, and placed some of their most fearsome and terrible minions as guards, before they sealed the place off. ...", - "I'm confident that I can prepare a matching ritual that will breach their protection and allow someone to enter their realm; but I'm in no way suited to handle the horrors to be encountered there. ...", - "Therefore I have to ask you, if you are willing to retrieve the parts of the godbreaker, and face the threat of the ascending Ferumbras?", - }, npc, creature) - npcHandler:setTopic(playerId, 0) + npcHandler:say("He obviously had taken an interest to the topic of ascension, and I came into possession of some of his early writings. ...You have to know I'm a scholar of some renown. In the course of my latest studies about ascension, I stumbled upon disturbing facts about the person of the all to well known Ferumbras, the fiendish. ...", npc, creature) + npcHandler:say("This, combined with investigation and divination, bit by bit led to the conclusion that all that Ferumbras has done in the past may be part of a cunning plan. ...", npc, creature) + npcHandler:say("Considering his writings and the books he based them upon, it became clear that Ferumbras is planning his ascension to godlike status. ...", npc, creature) + npcHandler:say("All of his attacks and defeats only served one purpose: to become an integral part of the people's knowledge, fears and beliefs. ...", npc, creature) + npcHandler:say("He actually used this as an energy source, and combined it with some sources of power which might not all be of our own world. ...", npc, creature) + npcHandler:say("He uses this energy to increasingly empower himself and will eventually be prepared to take the final step to transform himself into a godlike being. ...", npc, creature) + npcHandler:say("With the knowledge what to look for, I acquired expensive but powerful artefacts to scry the world for the expected power signature - and indeed I made contact. ...", npc, creature) + npcHandler:say("To my horror I had to recognise that Ferumbras had already made significant progress, and his final bid for ascension is imminent! ...", npc, creature) + npcHandler:say("His power levels are already too high for there to be any hope of stopping him with conventional means. ...", npc, creature) + npcHandler:say("But not all is lost yet. During my studies about godhood, I learned that the dark Zathroth himself had created a weapon so powerful that it could actually slay a god. ...", npc, creature) + npcHandler:say("Yet even he deemed this so-called '{godbreaker}' too dangerous, and split it into seven parts. These were at some point entrusted to his powerful minions, known as the Ruthless Seven. ...", npc, creature) + npcHandler:say("Ancient, forbidden texts hinted at a hellish place where the seven built deadly dungeons, and placed some of their most fearsome and terrible minions as guards, before they sealed the place off. ...", npc, creature) + npcHandler:say("I'm confident that I can prepare a matching ritual that will breach their protection and allow someone to enter their realm; but I'm in no way suited to handle the horrors to be encountered there. ...", npc, creature) + npcHandler:say("Therefore I have to ask you, if you are willing to retrieve the parts of the godbreaker, and face the threat of the ascending Ferumbras?", npc, creature) elseif MsgContains(message, "short") then - npcHandler:say({ - "My studies indicate that without all doubt Ferumbras the fiendish is in the process of accumulating nearly godlike powers. We have to stop him.", - "Therefore I need you to enter a hellish dimension and acquire the parts of a weapon, the {godbreaker}, powerful enough to stop him once and for all. Are you willing to help me in this dire mission?", - }, npc, creature) + npcHandler:say("My studies indicate that without all doubt Ferumbras the fiendish is in the process of accumulating nearly godlike powers. We have to stop him. ...", npc, creature) + npcHandler:say("Therefore I need you to enter a hellish dimension and acquire the parts of a weapon, the {godbreaker}, powerful enough to stop him once and for all. Are you willing to help me in this dire mission?", npc, creature) npcHandler:setTopic(playerId, 2) - elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 2 and player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Access) < 1 then + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 2 and player:getStorageValue(Storage.FerumbrasAscension.Access) < 1 then npcHandler:say("Good!, but I need 30 {demonic essences} to exchange with the demonic messenger for a ticket for you to enter the Abodes of Torments.", npc, creature) elseif MsgContains(message, "demonic essence") or MsgContains(message, "essence") then npcHandler:say("Do you have 30 demonic essences to offer to the demonic messenger?", npc, creature) @@ -98,92 +91,59 @@ local function creatureSayCallback(npc, creature, type, message) if player:removeItem(6499, 30) then npcHandler:say("Excellent! This will empower possibilty to create a breach is enough to let you pass into that hellish hiding place. ...", npc, creature) player:addItem(22182, 1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Access, 1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FirstDoor, 1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.MonsterDoor, 1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TarbazDoor, 1) - npcHandler:setTopic(playerId, 0) + player:setStorageValue(Storage.FerumbrasAscension.Access, 1) else npcHandler:say("You don't have the demonic essences, back here when you get it.", npc, creature) - npcHandler:setTopic(playerId, 0) + npcHandler:removeInteraction(npc, creature) end elseif MsgContains(message, "godbreaker") then - npcHandler:say({ - "For a long time, I thought the godbreaker to be some apocryphal myth. But apparently others had learned about the godbreaker in the aeons past and lusted for its power. ...", - "They had gathered hint after hint - until, ultimately, they were squashed by the Seven or their minions; which only made the leads that hinted at them all the more probable. ...", - "What Zathroth hoped to accomplish with the creation of such a weapon can only be subject to speculation. Assumedly he already had slain Tibiasula, so the godbreaker might have been even more powerful, more absolute. ...", - "However, it has to be assumed that in the end the sheer power of his creation scared Zathroth, who had to fear the weapon could one day be used against him. So he disassembled it. ...", - "He kept the parts hidden and guarded, and if the resources can be trusted and my interpretation is right, moved them again and again, never satisfied with a hiding place. In the end he entrusted the parts to the {Ruthless Seven}. ...", - "Knowing that they would never, ever allow one of their own to come in possession of all parts. Since then, the parts have been hidden in a {demi-plane} shared by the Seven.", - "Well, I need 30 {demonic essences} to exchange for a passage so you can access.", - }, npc, creature) - npcHandler:setTopic(playerId, 0) + npcHandler:say("For a long time, I thought the godbreaker to be some apocryphal myth. But apparently others had learned about the godbreaker in the aeons past and lusted for its power. ...", npc, creature) + npcHandler:say("They had gathered hint after hint - until, ultimately, they were squashed by the Seven or their minions; which only made the leads that hinted at them all the more probable. ...", npc, creature) + npcHandler:say("What Zathroth hoped to accomplish with the creation of such a weapon can only be subject to speculation. Assumedly he already had slain Tibiasula, so the godbreaker might have been even more powerful, more absolute. ...", npc, creature) + npcHandler:say("However, it has to be assumed that in the end the sheer power of his creation scared Zathroth, who had to fear the weapon could one day be used against him. So he disassembled it. ...", npc, creature) + npcHandler:say("He kept the parts hidden and guarded, and if the resources can be trusted and my interpretation is right, moved them again and again, never satisfied with a hiding place. In the end he entrusted the parts to the {Ruthless Seven}. ...", npc, creature) + npcHandler:say("Knowing that they would never, ever allow one of their own to come in possession of all parts. Since then, the parts have been hidden in a {demi-plane} shared by the Seven.", npc, creature) + npcHandler:say("Well, I need 30 {demonic essences} to change for a passage to you can access", npc, creature) elseif MsgContains(message, "Ruthless Seven") or MsgContains(message, "ruthless seven") then npcHandler:say("Given the internal power plays amongst the Seven, they are the ideal keepers for individual parts of an powerful artefact. Not one of them would allow his compatriots to hold such a power, and neither would trust the other.", npc, creature) - npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "demi-plane") then - npcHandler:say({ - "It is a place, so to say, not completely of this world. It is separate of, yet strongly connected to, our own world. I would imagine it is quite limited in size and its laws of physics and magic should be roughly the same as ours. ...", - "Being home to a host of demons for a while, I expect it to be a hostile and dangerous environment.", - }, npc, creature) - npcHandler:setTopic(playerId, 0) + npcHandler:say("It is a place, so to say, not completely of this world. It is separate of, yet strongly connected to, our own world. I would imagine it is quite limited in size and its laws of physics and magic should be roughly the same as ours. ...", npc, creature) + npcHandler:say("Being home to a host of demons for a while, I expect it to be an hostile and dangerous environment.", npc, creature) elseif MsgContains(message, "ascension") then - npcHandler:say({ - "Ascension is a fascinating topic that dates back to efforts and philosophies of some of the most ancient, and mostly extinct, races which fought in the godwars. ...", - "Probably born out of desperation, they extensively researched ways to acquire godhood themselves. ...", - "Some of them at least even met with moderate success. But the process is complicated at best, and may vary from race to race or even from one individual to another. ...", - "The theories differ vastly and waxed and waned in popularity over the centuries if not aeons. Even today and in human society there are a number of obscure ascension cults. ...", - "Some of them claim that humans are most suitable for ascension because they already own a bit of divinity through Banor's godly spark.", - }, npc, creature) - npcHandler:setTopic(playerId, 0) + npcHandler:say("Ascension is a fascinating topic that dates back to efforts and philosophies of some of the most ancient, and mostly extinct, races which fought in the godwars. ...", npc, creature) + npcHandler:say("Probably born out of desperation, they extensively researched ways to acquire godhood themselves. ...", npc, creature) + npcHandler:say("Some of them at least even met with moderate success. But the process is complicated at best, and may vary from race to race or even from one individual to another. ...", npc, creature) + npcHandler:say("The theories differ vastly and waxed and waned in popularity over the centuries if not aeons. Even today and in human society there are a number of obscure ascension cults. ...", npc, creature) + npcHandler:say("Some of them claim that humans are most suitable for ascension because they already own a bit of divinity through Banor's godly spark.", npc, creature) elseif MsgContains(message, "ferumbras") then - npcHandler:say({ - "Although already powerful in his own right, it is obvious that his ultimate goal seems to be the ascension to godly powers. ...", - "His whole existence seems to be centred on becoming a name that strikes fear into the heart of men and to become a persistent figure in the minds of humanity. ...", - "This gives him a hold in reality and a kind of mould to fill with his power and conscience. It's also obvious that this kind of belief of the people alone won't be enough to empower him sufficiently. ...", - "Therefore he has to tap into other, probably even more sinister power sources. I can't tell what these sources are, but my scrying revealed that he has reached massive amounts of power. He has probably been infusing himself since years. ...", - "By now he is apparently reaching the end circle of his ascension and could make his final move any day.", - }, npc, creature) - npcHandler:setTopic(playerId, 0) + npcHandler:say("Although already powerful in his own right, it is obvious that his ultimate goal seems to be the ascension to godly powers. ...", npc, creature) + npcHandler:say("His whole existence seems to be centred on becoming a name that strikes fear into the heart of men and to become a persistent figure in the minds of humanity. ...", npc, creature) + npcHandler:say("This gives him a hold in reality and a kind of mould to fill with his power and conscience. It's also obvious that this kind of belief of the people alone won't be enough to empower him sufficiently. ...", npc, creature) + npcHandler:say("Therefore he has to tap into other, probably even more sinister power sources. I can't tell what these sources are, but my scrying revealed that he has reached massive amounts of power. He has probably been infusing himself since years. ...", npc, creature) + npcHandler:say("By now he is apparently reaching the end circle of his ascension and could make his final move any day.", npc, creature) elseif MsgContains(message, "bozarn") then npcHandler:say("Ah, a good man and a competent aid.", npc, creature) - npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "darashia") then npcHandler:say("I like the quietness and the climate. And admittedly it helped my studies not to be constantly disturbed by petitioners.", npc, creature) - npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "thais") then npcHandler:say("Thais has become a melting pot of some source. Yet whatever you melt, if the ingredients are corrupted, the outcome is always flawed.", npc, creature) - npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "carlin") then npcHandler:say("Instead of banding together and starting to change something, they and Thais keep wasting resources in hostilities.", npc, creature) - npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "kazordoon") then - npcHandler:say({ - "The dwarves are leftovers from a time long gone by. They have outlived their usefulness to the gods and seem to have come to terms with that. ...", - "They are as unchanging as rock and no greatness awaits them any more. They missed their chance, if they ever had any.", - }, npc, creature) - npcHandler:setTopic(playerId, 0) + npcHandler:say("The dwarves are leftovers from a time long gone by. They have outlived their usefulness to the gods and seem to have come to terms with that. ...", npc, creature) + npcHandler:say("They are as unchanging as rock and no greatness awaits them any more. They missed their chance, if they ever had any.", npc, creature) elseif MsgContains(message, "ab'dendriel") then - npcHandler:say({ - "The elves are like lost children. Their potential might be great, but they lack focus and dedication to truly improve. If their myths are true, some of the more early elves might have accomplished ascension. ...", - "Yet even if hints strongly suggest those stories are true, the sheer inaction of those assumedly ascended beings is disturbing. Perhaps what those legendary elves achieved was something completely different.", - }, npc, creature) - npcHandler:setTopic(playerId, 0) + npcHandler:say("The elves are like lost children. Their potential might be great, but they lack focus and dedication to truly improve. If their myths are true, some of the more early elves might have accomplished ascension. ...", npc, creature) + npcHandler:say("Yet even if hints strongly suggest those stories are true, the sheer inaction of those assumedly ascended beings is disturbing. Perhaps what those legendary elves achieved was something completely different.", npc, creature) elseif MsgContains(message, "edron") then npcHandler:say("Edron has become as stagnant as the teachings in its academy. No new idea has been thought there for decades. The whole Edron is an example for what happens when humanity has become fat and lazy.", npc, creature) - npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "demons") then - npcHandler:say({ - "With all their powers and vast magic knowledge they are still more pawns than anything else. Given their resources, ascension might seem within reach. ...", - "The absence of any ascendant demon might prove that they are no true beings at all and literally damned to be stuck in their accursed forms.", - }, npc, creature) - npcHandler:setTopic(playerId, 0) + npcHandler:say("With all their powers and vast magic knowledge they are still more pawns than anything else. Given their resources, ascension might seem within reach. ...", npc, creature) + npcHandler:say("The absence of any ascendant demon might prove that they are no true beings at all and literally damned to be stuck in their accursed forms.", npc, creature) elseif MsgContains(message, "venore") then npcHandler:say("An almost laughable greed is persistent in that city. At least this makes knowledge and materials conveniently available to those who can match their prizes.", npc, creature) - npcHandler:setTopic(playerId, 0) else npcHandler:say("What?!", npc, creature) - npcHandler:setTopic(playerId, 0) end end npcHandler:setMessage(MESSAGE_GREET, "Greetings, dear visitor. Please tell me what {brings} you here, to my humble adobe.") diff --git a/data-otservbr-global/npc/mother_of_jack.lua b/data-otservbr-global/npc/mother_of_jack.lua index cc428dee566..3f7d693cb56 100644 --- a/data-otservbr-global/npc/mother_of_jack.lua +++ b/data-otservbr-global/npc/mother_of_jack.lua @@ -68,8 +68,8 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "jack") then - if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 5 then - if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.Mother) < 1 then + if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 5 then + if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Mother) < 1 then npcHandler:say("What about him? He's downstairs as he always has been. He never went away from home any further than into the forest nearby. He rarely ever took a walk to Edron, did he?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -90,7 +90,7 @@ local function creatureSayCallback(npc, creature, type, message) "JAAAAACK!", }, npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.Mother, 1) + player:setStorageValue(Storage.TibiaTales.JackFutureQuest.Mother, 1) end end return true diff --git a/data-otservbr-global/npc/muhad.lua b/data-otservbr-global/npc/muhad.lua index c4ec365f14a..f55754cbc94 100644 --- a/data-otservbr-global/npc/muhad.lua +++ b/data-otservbr-global/npc/muhad.lua @@ -68,7 +68,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local AritosTask = player:getStorageValue(Storage.Quest.U8_1.TibiaTales.AritosTask) + local AritosTask = player:getStorageValue(Storage.TibiaTales.AritosTask) -- Check if the message contains "arito" if MsgContains(message, "arito") then @@ -96,8 +96,8 @@ local function creatureSayCallback(npc, creature, type, message) "Try to sneak in undetectedly and bring back our treasure as soon as you obtain it. May Daraman hold his protective hand over you on your mission. I wish you good luck. ...", "One last thing before you leave. Take the path behind me and you will get out of our hideout unharmed.", }, npc, creature) - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.AritosTask, 2) - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.AritosTaskDoor, 1) + player:setStorageValue(Storage.TibiaTales.AritosTask, 2) + player:setStorageValue(Storage.TibiaTales.AritosTaskDoor, 1) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/muriel.lua b/data-otservbr-global/npc/muriel.lua index 8017528a681..df5d4770ebb 100644 --- a/data-otservbr-global/npc/muriel.lua +++ b/data-otservbr-global/npc/muriel.lua @@ -64,20 +64,20 @@ local function creatureSayCallback(npc, creature, type, message) return true end - if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit) == -1 then + if player:getStorageValue(Storage.TibiaTales.IntoTheBonePit) == -1 then npcHandler:say({ "Indeed, there is something you can do for me. You must know I am researching for a new spell against the undead. ...", "To achieve that I need a desecrated bone. There is a cursed bone pit somewhere in the dungeons north of Thais where the dead never rest. ...", "Find that pit, dig for a well-preserved human skeleton and conserve a sample in a special container which you receive from me. Are you going to help me?", }, npc, creature) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit) == 1 then + elseif player:getStorageValue(Storage.TibiaTales.IntoTheBonePit) == 1 then npcHandler:say({ "The rotworms dug deep into the soil north of Thais. Rumours say that you can access a place of endless moaning from there. ...", "No one knows how old that common grave is but the people who died there are cursed and never come to rest. A bone from that pit would be perfect for my studies.", }, npc, creature) - elseif player:getStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit) == 2 then - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit, 3) + elseif player:getStorageValue(Storage.TibiaTales.IntoTheBonePit) == 2 then + player:setStorageValue(Storage.TibiaTales.IntoTheBonePit, 3) if player:removeItem(131, 1) then player:addItem(6299, 1) npcHandler:say("Excellent! Now I can try to put my theoretical thoughts into practice and find a cure for the symptoms of undead. Here, take this for your efforts.", npc, creature) @@ -97,7 +97,7 @@ local function creatureSayCallback(npc, creature, type, message) "If you lose it, you can buy a new one from the explorer's society in North Port or Port Hope. Ask me about the mission when you come back.", }, npc, creature) player:addItem(4852, 1) - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit, 1) + player:setStorageValue(Storage.TibiaTales.IntoTheBonePit, 1) end elseif MsgContains(message, "no") then if npcHandler:getTopic(playerId) == 1 then diff --git a/data-otservbr-global/npc/ninev.lua b/data-otservbr-global/npc/ninev.lua index f20f3d5b0de..b888f005330 100644 --- a/data-otservbr-global/npc/ninev.lua +++ b/data-otservbr-global/npc/ninev.lua @@ -105,11 +105,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Quentin) ~= 1 + return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Quentin) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Quentin, 1) + player:setStorageValue(Storage.AdventurersGuild.FreeStone.Quentin, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/ninos.lua b/data-otservbr-global/npc/ninos.lua index f659681e466..d55c55939d8 100644 --- a/data-otservbr-global/npc/ninos.lua +++ b/data-otservbr-global/npc/ninos.lua @@ -68,10 +68,10 @@ local function creatureSayCallback(npc, creature, type, message) if MsgContains(message, "measurements") then local player = Player(creature) - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsBenjamin) ~= 1 then + if player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.MeasurementsBenjamin) ~= 1 then npcHandler:say("Oh they don't change that much since in the old days as... ", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsBenjamin, 1) + player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) + player:setStorageValue(Storage.Postman.MeasurementsBenjamin, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("...", npc, creature) diff --git a/data-otservbr-global/npc/noodles.lua b/data-otservbr-global/npc/noodles.lua index 56fc3c545a0..64c8ab591b7 100644 --- a/data-otservbr-global/npc/noodles.lua +++ b/data-otservbr-global/npc/noodles.lua @@ -64,21 +64,21 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "banana skin") then - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 7 then + if player:getStorageValue(Storage.Postman.Mission06) == 7 then if player:getItemCount(3104) > 0 then npcHandler:say("", npc, creature) npcHandler:setTopic(playerId, 1) end end elseif MsgContains(message, "dirty fur") then - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 8 then + if player:getStorageValue(Storage.Postman.Mission06) == 8 then if player:getItemCount(3105) > 0 then npcHandler:say("", npc, creature) npcHandler:setTopic(playerId, 2) end end elseif MsgContains(message, "mouldy cheese") then - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 9 then + if player:getStorageValue(Storage.Postman.Mission06) == 9 then if player:getItemCount(3120) > 0 then npcHandler:say("", npc, creature) npcHandler:setTopic(playerId, 3) @@ -87,15 +87,15 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "like") then if npcHandler:getTopic(playerId) == 1 then npcHandler:say("Woof!", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 8) + player:setStorageValue(Storage.Postman.Mission06, 8) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then npcHandler:say("Woof!", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 9) + player:setStorageValue(Storage.Postman.Mission06, 9) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 3 then npcHandler:say("Meeep! Grrrrr! ", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 10) + player:setStorageValue(Storage.Postman.Mission06, 10) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/oblivion.lua b/data-otservbr-global/npc/oblivion.lua index 20ea208173c..56794dbd97a 100644 --- a/data-otservbr-global/npc/oblivion.lua +++ b/data-otservbr-global/npc/oblivion.lua @@ -62,44 +62,44 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission44) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission45) < 1 then + if (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.GravediggerOfDrefia.Mission44) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission45) < 1 then npcHandler:say("Lost. Hidden. The keys are shadow names. Find them, they will talk to me and reveal what is hidden. Will you go on that quest?", npc, creature) npcHandler:setTopic(playerId, 1) - elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission44) == 1 then + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission44) == 1 then npcHandler:say({ "Then into the vampire crypts, deep down, you must go. ...", "There... three graves where the shadows swirl, unseen. The first one: name the colour of the silent gong. Then ...", "The second: the name that is silent now in the halls of Darkstone ...", "The third: the lost beauty of Dunesea. It must be remembered, the shadows command it. Go now.", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission45, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission45, 1) npcHandler:setTopic(playerId, 0) - elseif (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission48) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission49) < 1 then + elseif (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.GravediggerOfDrefia.Mission48) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission49) < 1 then npcHandler:say("Yes. Have you gone there and found what you sought?", npc, creature) npcHandler:setTopic(playerId, 2) - elseif (MsgContains(message, "yes")) and npcHandler:getTopic(playerId) == 2 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission48) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission49) < 1 then + elseif (MsgContains(message, "yes")) and npcHandler:getTopic(playerId) == 2 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission48) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission49) < 1 then npcHandler:say("Tell me. Begin with the colour.", npc, creature) npcHandler:setTopic(playerId, 3) - elseif (MsgContains(message, "bronze")) and npcHandler:getTopic(playerId) == 3 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission48) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission49) < 1 then + elseif (MsgContains(message, "bronze")) and npcHandler:getTopic(playerId) == 3 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission48) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission49) < 1 then npcHandler:say("Yes. The shadows say this is true. The beauty of House Dunesea, name it.", npc, creature) npcHandler:setTopic(playerId, 4) - elseif (MsgContains(message, "floating")) and npcHandler:getTopic(playerId) == 4 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission48) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission49) < 1 then + elseif (MsgContains(message, "floating")) and npcHandler:getTopic(playerId) == 4 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission48) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission49) < 1 then npcHandler:say("The floating gardens. Too beautiful to lie asleep in the memory of men. Yes. The name that is no more in Darkstone?", npc, creature) npcHandler:setTopic(playerId, 5) - elseif (MsgContains(message, "Takesha Antishu")) and npcHandler:getTopic(playerId) == 5 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission48) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission49) < 1 then + elseif (MsgContains(message, "Takesha Antishu")) and npcHandler:getTopic(playerId) == 5 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission48) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission49) < 1 then npcHandler:say({ "Ah, the Lady of Darkstone. You have done well to remember her name. ...", "Now, the shadows say the thing you seek lies next to Akab, the Quarrelsome. ...", "No coal is burned in his honour. Find his resting place and dig near it. Now go.", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission49, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission49, 1) npcHandler:setTopic(playerId, 0) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) -npcHandler:setMessage(MESSAGE_GREET, "A shadow preceded you. You wish?") +npcHandler:setMessage(MESSAGE_GREET, "Be greeted.") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- npcType registering the npcConfig table diff --git a/data-otservbr-global/npc/olrik.lua b/data-otservbr-global/npc/olrik.lua index d900e7841f2..42886e71318 100644 --- a/data-otservbr-global/npc/olrik.lua +++ b/data-otservbr-global/npc/olrik.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "measurements") then - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) >= 1 and player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsOlrik) ~= 1 then + if player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.MeasurementsOlrik) ~= 1 then npcHandler:say("My measurements? Listen, lets make that a bit more exciting ... No, no, not what you think! I mean let's gamble. I will roll a dice. If I roll a 6 you win and I'll tell you what you need to know, else I win and get 5 gold. Deal? ", npc, creature) npcHandler:setTopic(playerId, 1) else @@ -74,8 +74,8 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Ok, here we go ... " .. number .. "! You lose! Try again.", npc, creature) else npcHandler:say("Ok, here we go ... " .. number .. "! You have won! How lucky you are! So listen ... ", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07, player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission07) + 1) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.MeasurementsOlrik, 1) + player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1) + player:setStorageValue(Storage.Postman.MeasurementsOlrik, 1) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/omrabas.lua b/data-otservbr-global/npc/omrabas.lua index ffb093cd4c1..378b0dc2793 100644 --- a/data-otservbr-global/npc/omrabas.lua +++ b/data-otservbr-global/npc/omrabas.lua @@ -63,52 +63,52 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.QuestStart) < 1 then + if player:getStorageValue(Storage.GravediggerOfDrefia.QuestStart) < 1 then npcHandler:say("Hmm. You could be of assistance, I presume. I need several body parts. I will reward you adequately. Interested?", npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.QuestStart, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.QuestStart, 1) npcHandler:setTopic(playerId, 1) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission01) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission02) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission01) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission02) < 1 then npcHandler:say("Ah hello, young friend! Did you bring me two ghoul snacks as requested?", npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission02) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission03) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission02) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission03) < 1 then npcHandler:say("Ah, young friend, I found a solution! Find me two {demonic skeletal hands}. That should do it. Now run along! Ask me for {mission} when you're done.", npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission03, 1) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission03) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission04) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission03, 1) + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission03) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission04) < 1 then npcHandler:say("Ah hello again! You look as if you could, er, lend me a hand or two? Yes?", npc, creature) npcHandler:setTopic(playerId, 3) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission04) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission05) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission05, 1) + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission04) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission05) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission05, 1) npcHandler:say({ "I need my heart back. I know where they have hidden it. Too afraid to destroy my beating heart, hah! ...", "It is in a dusty amphora in a sealed mass grave in the downmost cellar of my ancient home. The ruins lie to the north at the beach. ...", "Crash the amphoras to find my heart, and bring it to me.", }, npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission06) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission07) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission06) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission07) < 1 then npcHandler:say({ "Yes? You have it? You what? Not in the amphoras? You picked it off someone else?!? ...", "Well, the important thing is that you have it. Let's see if it's still in good shape. {Give} it to me.", }, npc, creature) npcHandler:setTopic(playerId, 4) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission07) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission08) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission08, 1) + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission07) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission08) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission08, 1) npcHandler:say({ "I will need brains - don't laugh! Ahem. I will need a stimulated brain, to be precise. ...", "Use two half-eaten brains with the Brain Heater Machine in the Necromancer halls and bring me the fused, stimulated brain. Now go!", }, npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission09) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission10) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission09) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission10) < 1 then npcHandler:say("Yes, yes, hello. Tell me if you lost something. If not, do you have that stimulated brain with you?", npc, creature) npcHandler:setTopic(playerId, 5) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission10) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission11) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission11, 1) + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission10) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission11) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission11, 1) player:addItem(19085, 1) npcHandler:say({ "Now that you have shown you've got the brains, I need you to show initiative. ...", "I will need something that can be adequately used as intestines. Something alive. Stuff it into this storage flask and return it to me!", }, npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission12) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission13) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission12) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission13) < 1 then npcHandler:say("Hello, hello. Let's come to the point - did you find me some intestines?", npc, creature) npcHandler:setTopic(playerId, 6) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission13) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission14) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission13) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission14) < 1 then npcHandler:say({ "Good. As you may have gathered, the body parts you brought need to be assembled to form a whole body. ...", "This will happen through a necromantic ritual that we - or rather, you - now have to prepare. ...", @@ -117,93 +117,93 @@ local function creatureSayCallback(npc, creature, type, message) "But first things first. Are you ready to {undertake} the hallowing of the five altars?", }, npc, creature) npcHandler:setTopic(playerId, 7) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission15) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission16) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission15) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission16) < 1 then npcHandler:say("Ah hello! Well done there, I felt the old powers settling down. Now, {ready} to hallow the next altar?", npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission16, 1) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission16) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission17) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission16, 1) + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission16) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission17) < 1 then npcHandler:say({ "I expected no less. Next is the Bonemarrow Altar, where the Dark Lord feasts upon the hallowed bones of...err. ...", "Ahem. Just take a yellowed bone or big bone, and hallow it - you don't know how? ...", "Huh. To HALLOW a yellowed bone, use it with one of the hallowed bonepiles in the Gardens Of Night. There are always bones around there - or were, in my days. ...", "Then, place the hallowed bone on the firebasin of the Bonemarrow Altar so the Dark Lord can consume it and grants us his power. Return to me after that.", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission17, 1) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission17) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission18) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission17, 1) + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission17) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission18) < 1 then npcHandler:say({ "Are you still here? Come on, let's not laze about, go to the Gardens of Night - where? ...", "East of the Necromancer Halls, you can't miss it, just look for a lot of dark and white sand, dried trees, and priestesses! ...", "Or got a {problem} with finding bones? Hah!", }, npc, creature) npcHandler:setTopic(playerId, 8) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission20) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission21) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission20) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission21) < 1 then npcHandler:say({ "Ah, welcome, welcome! I felt that one! The Dark Lord is pleased with the gift you brought, so now we can proceed with everything as planned. ...", "If it had gone wrong though, he would have had your guts for gart... er... well, here you are, so - ready to get some {blood} flowing?", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission21, 1) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission21) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission22) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission21, 1) + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission21) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission22) < 1 then npcHandler:say({ "Yes, I said blood. Important ingredient in necromantic rituals, usually. ...", "You need to spill some vials of blood tincture for this task. Probably means killing blood priests to get those vials. Ready to do this?", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission22, 1) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission25) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission26) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission26, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission22, 1) + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission25) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission26) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission26, 1) npcHandler:say({ "Ah, it is invigorating to fell the dark flows, rushing through Drefia, once again! Capital. This has earned you a reward. ...", "Now, the next mission awaits, {yes}?", }, npc, creature) npcHandler:setTopic(playerId, 9) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission29) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission30) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission29) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission30) < 1 then npcHandler:say({ "Ah, finally. Exceptional! Don't you feel the earth awakening to our call? No? Oh. ...", "Anyway, you succeeded in hallowing the Fireglass Altar! Only one altar remains to be hallowed! Shall we {proceed}?", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission30, 1) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission33) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission34) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission34, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission30, 1) + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission33) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission34) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission34, 1) npcHandler:say({ "Yes! YES! I have felt that! The altars are alive again! Well done! ...", "We are close now. Only one important thing remains: the incantation itself. We need the {scroll} for that.", }, npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission42) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission43) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission42) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission43) < 1 then npcHandler:say("Yes? Do you have the {scroll} piece? ", npc, creature) npcHandler:setTopic(playerId, 11) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission43) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission44) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission43) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission44) < 1 then npcHandler:say({ "Hah, developed a taste for it, have you? I believe the next scroll piece was hidden somewhere, my old friend being of a somewhat distrustful nature. ...", "The scent may not be lost, though - ask a shadow pupil if he can help - but be careful. ...", "Those shadow pupils are - strange. Try to find one who will answer and not kill you!", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission44, 1) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission50) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission51) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission44, 1) + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission50) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission51) < 1 then npcHandler:say("Ah, hello! I take it you have the next scroll piece for me, {yes}?", npc, creature) npcHandler:setTopic(playerId, 12) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission51) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission52) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission51) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission52) < 1 then npcHandler:say({ "Good! As you can imagine, I had a scroll piece, too. I hid it in my old quarters, northwest of the library. ...", "The door is magically sealed. Use this copper key with it to get inside. ...", "Beneath one of the chests is a secret stash, under a loose stone tile. The scroll piece should be inside. Off you go.", }, npc, creature) player:addItem(19173, 1) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission52, 1) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission57) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission58) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission52, 1) + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission57) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission58) < 1 then npcHandler:say("Hello - what? You have the {scroll} piece, you say?", npc, creature) npcHandler:setTopic(playerId, 13) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission58) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission59) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission58) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission59) < 1 then player:addItem(19148, 1) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission59, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission59, 1) npcHandler:say({ "Hahah, eager for it, I like that! ...", "One piece stayed in the hands of a beautiful priestess. ...", "As they never throw anything away that looks like an incantation - you get my drift. Find out where they still keep it! ...", "Oh, one more thing! They only talk to you when you look like a fellow summoner. It's dangerous to go without a cape. Use this.", }, npc, creature) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission64) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission65) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission64) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission65) < 1 then npcHandler:say("Hello, young apprentice. Do you have that {scroll} piece from the priestess?", npc, creature) player:addItem(19148, 1) npcHandler:setTopic(playerId, 14) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission65) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission66) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission65) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission66) < 1 then npcHandler:say({ "That's the spirit! Speaking of which, you will have to look for a White Shade ...", "That's a ghost, in case you don't know. Goes by name of... Zarifan, if I recall correctly. ...", @@ -213,68 +213,71 @@ local function creatureSayCallback(npc, creature, type, message) "Anyway, say those three words - don't make me repeat them - and the old softie will tell you where the scroll is. Pathetic.", }, npc, creature) player:addItem(19148, 1) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission66, 1) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission72) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission73) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission66, 1) + --elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission68) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission69) < 1 then + --npcHandler:say("Welcome, welcome! Finally! The last scroll piece.... you do have it, haven't you?", npc, creature) + --npcHandler:setTopic(playerId, 15) + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission70) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission71) < 1 then npcHandler:say("Don't keep me waiting. The last scroll piece - were you able to {restore} it?", npc, creature) npcHandler:setTopic(playerId, 16) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission75) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission76) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission73) == 1 then --and player:getStorageValue(Storage.GravediggerOfDrefia.Mission74) < 1 then npcHandler:say({ "It failed! IT FAILED! WHY? What have you done! This must be your fault! ...", "You... did... that was a recipe for chicken soup! No wonder the scroll failed! Now... all is lost ...", " I never want to see you again! You and your dirty gravedigger hands! Take this, you ungrateful, useless, imbecile... human! ...", "Now... get out! And never, ever, dare come back! You ruined EVERYTHING!", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission76, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission73, 2) player:addItem(19136, 1) end elseif MsgContains(message, "yes") then - if npcHandler:getTopic(playerId) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.QuestStart) == 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission01, 1) + if npcHandler:getTopic(playerId) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.QuestStart) == 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission01, 1) npcHandler:say({ "Very sensible of you. I will pay you handsomely for your help. ...", "All you have to do is fetch diverse fresh body parts and then prepare the resurrection ritual. Nothing out of the ordinary. ...", "First, I need two arms. Ghouls usually carry some as a snack. Two ghoul snacks should not be hard to get! Return when you have them.", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif npcHandler:getTopic(playerId) == 2 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission01) == 1 then + elseif npcHandler:getTopic(playerId) == 2 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission01) == 1 then if player:removeItem(11467, 2) then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission02, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission02, 1) npcHandler:say("Splendid! What? They're half gnawed! There are no hands! Hrmmm. Let me think of a solution. Ask me for a new {mission}.", npc, creature) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have two ghoul snacks.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif npcHandler:getTopic(playerId) == 3 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission03) == 1 then + elseif npcHandler:getTopic(playerId) == 3 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission03) == 1 then if player:removeItem(9647, 2) then npcHandler:say("Yes. Those will be adequate. Talk to me again if you want to continue with your next {mission}.", npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission04, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission04, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have two demonic skeletal hands.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif npcHandler:getTopic(playerId) == 4 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission06) == 1 then + elseif npcHandler:getTopic(playerId) == 4 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission06) == 1 then if player:removeItem(19077, 1) then npcHandler:say("Ah... Very good. Just say the word when you are ready for the next {mission}.", npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission07, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission07, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have my heart.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif npcHandler:getTopic(playerId) == 5 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission09) == 1 then + elseif npcHandler:getTopic(playerId) == 5 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission09) == 1 then if player:removeItem(19078, 1) then npcHandler:say("Ah... Very good. Just say the word when you are ready for the next {mission}.", npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission10, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission10, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have the brain.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif npcHandler:getTopic(playerId) == 6 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission12) == 1 then + elseif npcHandler:getTopic(playerId) == 6 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission12) == 1 then if player:removeItem(19086, 1) then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission13, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission13, 1) npcHandler:say({ "Ah... interesting. A snake? Not bad, not bad at all. ...", "Right. Now, we need to waken the old powers through ritual. Let me know when you are ready for this {mission}.", @@ -284,67 +287,67 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("You don't have my intestine.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission22) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission23) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission22) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission23) < 1 then npcHandler:say({ "Ah, I knew you were a sturdy fellow! Necromancer material if ever I saw one! ...", "Well then, the next task is to anoint the Bloodgong Altar. This will animate the dark flows we need for the ritual. ...", "You need to spill a vial of blood tincture on each of the four sacrifical stones of the altar in order to anoint them. ...", "Then, toll the Bloodgong north of the sacrificial stones to set the dark flows going. Return to me after that.", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission23, 1) - elseif npcHandler:getTopic(playerId) == 9 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission26) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission27) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission23, 1) + elseif npcHandler:getTopic(playerId) == 9 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission26) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission27) < 1 then npcHandler:say({ "Excellent. To bind the earthly powers, we, I mean you, must worship at the Fireglass Altar. ...", "This means scattering sacred ashes from the Ember Chamber on the sacrificial stones of the Fireglass Altar. ...", "To gather the sacred ashes, you have to use magic chalk with the Shadow Fire in the Ember Chamber. ...", "Gather the resulting ashes from the Shadow Hearth, and scatter them on the Fireglass Altar's sacrificial stones. Then return here.", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission27, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission27, 1) npcHandler:setTopic(playerId, 0) - elseif npcHandler:getTopic(playerId) == 10 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission34) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission35) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission35, 1) + elseif npcHandler:getTopic(playerId) == 10 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission34) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission35) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission35, 1) npcHandler:say({ "Superb! You won't regret this. I will reward you beyond your wildest dreams! ...", "I know that one of my former friends joined the blood priests later on. He made it quite high before he was ritually killed. ...", "Go find a blood priest you can talk to. Ask him, but subtly. And never tell anyone what the scroll does!", }, npc, creature) npcHandler:setTopic(playerId, 0) - elseif npcHandler:getTopic(playerId) == 11 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission42) == 1 then + elseif npcHandler:getTopic(playerId) == 11 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission42) == 1 then if player:removeItem(18933, 1) then npcHandler:say("This is it! This is it! Well done, well done! And now, on to the {next} scroll piece, {yes}?", npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission43, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission43, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have my scroll.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission43) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission44) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission43) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission44) < 1 then npcHandler:say({ "Hah, developed a taste for it, have you? I believe the next scroll piece was hidden somewhere, my old friend being of a somewhat distrustful nature. ...", "The scent may not be lost, though - ask a shadow pupil if he can help - but be careful. ...", "Those shadow pupils are - strange. Try to find one who will answer and not kill you!", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission44, 1) - elseif npcHandler:getTopic(playerId) == 12 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission50) == 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission44, 1) + elseif npcHandler:getTopic(playerId) == 12 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission50) == 1 then if player:removeItem(18933, 1) then npcHandler:say("Indeed it is! The second scroll piece! Splendid! Here you go - for your trouble. And now, on to the {next} scroll piece, {yes}? ", npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission51, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission51, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have my scroll.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission51) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission52) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission51) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission52) < 1 then npcHandler:say({ "Good! As you can imagine, I had a scroll piece, too. I hid it in my old quarters, northwest of the library. ...", "The door is magically sealed. Use this copper key with it to get inside. ...", "Beneath one of the chests is a secret stash, under a loose stone tile. The scroll piece should be inside. Off you go.", }, npc, creature) player:addItem(19173, 1) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission52, 1) - elseif npcHandler:getTopic(playerId) == 13 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission57) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission58) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission52, 1) + elseif npcHandler:getTopic(playerId) == 13 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission57) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission58) < 1 then if player:removeItem(18933, 1) then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission58, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission58, 1) npcHandler:say({ "Oh, praise the Dark Lord! It is my scroll piece! Give it here! You can have this instead. ...", "Ahh, that feels GOOD. Now, only two pieces left to hunt down! On to the {next} scroll piece, yes?", @@ -354,28 +357,27 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("You don't have my scroll.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission58) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission59) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission58) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission59) < 1 then player:addItem(19148, 1) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission59, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission59, 1) npcHandler:say({ "Hahah, eager for it, I like that! ...", "One piece stayed in the hands of a beautiful priestess. ...", "As they never throw anything away that looks like an incantation - you get my drift. Find out where they still keep it! ...", "Oh, one more thing! They only talk to you when you look like a fellow summoner. It's dangerous to go without a cape. Use this.", }, npc, creature) - elseif npcHandler:getTopic(playerId) == 15 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission68) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission69) < 1 then + elseif npcHandler:getTopic(playerId) == 15 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission68) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission69) < 1 then if player:removeItem(18933, 1) then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission69, 1) npcHandler:say({ "Ahhh, capital, capital. Good girl for keeping it for me. I'll take back my cape now, thank you. ...", "Now - the final part of the scroll! Ready to go retrieve it?", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission69, 1) - npcHandler:setTopic(playerId, 17) else npcHandler:say("You don't have my scroll.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif npcHandler:getTopic(playerId) == 17 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission69) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission70) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission70) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission71) < 1 then npcHandler:say({ "That's the spirit! Speaking of which, you will have to look for a White Shade ...", "That's a ghost, in case you don't know. Goes by name of... Zarifan, if I recall correctly. ...", @@ -384,10 +386,12 @@ local function creatureSayCallback(npc, creature, type, message) "'Friendship lives forever.' Silly, really. Untrue, as well. ...", "Anyway, say those three words - don't make me repeat them - and the old softie will tell you where the scroll is. Pathetic.", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission70, 1) - elseif npcHandler:getTopic(playerId) == 18 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission71) == 2 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission72) < 1 then + player:addItem(19148, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission71, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission69, 1) + elseif npcHandler:getTopic(playerId) == 15 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission69) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission72) < 1 then if player:removeItem(18933, 1) then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission72, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission72, 1) npcHandler:say({ "I am so excited! Finally, we - wait. What is this? That... is not the complete scroll piece. ...", "I don't care what you say! This is a disaster! We need a complete scr - wait. I have an idea. ...", @@ -398,58 +402,59 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("You don't have my scroll.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif npcHandler:getTopic(playerId) == 19 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission73) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission74) < 1 then + elseif npcHandler:getTopic(playerId) == 17 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission73) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission74) < 1 then npcHandler:say({ "Then let's go. Take my skull and the incantation scroll to the working station in the fiveserrated room ...", "Where the lava flows and the southern legs of the room meet. Place the Skull on the sacrificial stone and use the scroll ...", "AND I shall be made whole, and YOU shall be RICH!", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission74, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission74, 1) player:addItem(18934, 1) player:addItem(19160, 1) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "demonic skeletal hands") or MsgContains(message, "demonic skeletal hand") then npcHandler:say("What? Hack some off from a demon skeleton, of course! Now get moving.", npc, creature) - elseif MsgContains(message, "give") and npcHandler:getTopic(playerId) == 4 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission06) == 1 then + elseif MsgContains(message, "give") and npcHandler:getTopic(playerId) == 4 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission06) == 1 then if player:removeItem(19077, 1) then npcHandler:say("Ah... Very good. Just say the word when you are ready for the next {mission}.", npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission07, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission07, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("You don't have my heart.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif MsgContains(message, "undertake") and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission13) == 1 and npcHandler:getTopic(playerId) == 7 then + elseif MsgContains(message, "undertake") and player:getStorageValue(Storage.GravediggerOfDrefia.Mission13) == 1 and npcHandler:getTopic(playerId) == 7 then npcHandler:say({ "Good! Let's not waste time. The first altar you must hallow is the Dragonsoul Altar, at the eastern side of the room. ...", "To hallow it, dig out three dragon tears and place them on the altar to appease the dark powers. ...", "What? Oh, you'll find some dragon tears near dragon skulls... where? ...", "In the Dragonbone Cemetery, OBVIOUSLY! Must I explain EVERYTHING to you? Now go!", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission14, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission14, 1) + player:addItem(19084, 3) npcHandler:setTopic(playerId, 0) - elseif MsgContains(message, "ready") and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission16) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission17) < 1 then + elseif MsgContains(message, "ready") and player:getStorageValue(Storage.GravediggerOfDrefia.Mission16) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission17) < 1 then npcHandler:say({ "I expected no less. Next is the Bonemarrow Altar, where the Dark Lord feasts upon the hallowed bones of...err. ...", "Ahem. Just take a yellowed bone or big bone, and hallow it - you don't know how? ...", "Huh. To HALLOW a yellowed bone, use it with one of the hallowed bonepiles in the Gardens Of Night. There are always bones around there - or were, in my days. ...", "Then, place the hallowed bone on the firebasin of the Bonemarrow Altar so the Dark Lord can consume it and grants us his power. Return to me after that.", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission17, 1) - elseif MsgContains(message, "problem") and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission17) == 1 and npcHandler:getTopic(playerId) == 8 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission17, 1) + elseif MsgContains(message, "problem") and player:getStorageValue(Storage.GravediggerOfDrefia.Mission17) == 1 and npcHandler:getTopic(playerId) == 8 then npcHandler:say("What? No bones around you say? Hrmmm. Wait. Check the skull heap here - that's right - hah! There! Now get to work!", npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission18, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission18, 1) player:addItem(19090, 3) npcHandler:setTopic(playerId, 0) - elseif MsgContains(message, "blood") and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission21) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission22) < 1 then + elseif MsgContains(message, "blood") and player:getStorageValue(Storage.GravediggerOfDrefia.Mission21) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission22) < 1 then npcHandler:say({ "Yes, I said blood. Important ingredient in necromantic rituals, usually. ...", "You need to spill some vials of blood tincture for this task. Probably means killing blood priests to get those vials. Ready to do this?", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission22, 1) - elseif MsgContains(message, "proceed") and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission30) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission31) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission31, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission22, 1) + elseif MsgContains(message, "proceed") and player:getStorageValue(Storage.GravediggerOfDrefia.Mission30) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission31) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission31, 1) player:addItem(19132, 1) player:addItem(19166, 1) npcHandler:say({ @@ -460,7 +465,7 @@ local function creatureSayCallback(npc, creature, type, message) "And take this parchment. Identify the right candles with it, take three with you and place one in front of the three shadowthrone statues, starting counterclockwise. Now go!", }, npc, creature) elseif MsgContains(message, "scroll") then - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission34) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission35) < 1 then + if player:getStorageValue(Storage.GravediggerOfDrefia.Mission34) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission35) < 1 then npcHandler:say({ "Well, it is a rather long story. The short version: I had friends - no need to snigger. ...", "We were five highly brilliant dark summoners. We joined our forces to find the scroll of Youth and Life Eternal. ...", @@ -469,15 +474,15 @@ local function creatureSayCallback(npc, creature, type, message) "But I think I have a clue where we can find the first piece of the scroll. Would you go looking?", }, npc, creature) npcHandler:setTopic(playerId, 10) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission42) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission43) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission42) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission43) < 1 then npcHandler:say("Yes? Do you have the {scroll} piece?", npc, creature) npcHandler:setTopic(playerId, 11) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission50) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission51) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission50) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission51) < 1 then npcHandler:say("Ah, hello! I take it you have the next {scroll} piece for me, {yes}?", npc, creature) npcHandler:setTopic(playerId, 12) - elseif npcHandler:getTopic(playerId) == 13 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission57) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission58) < 1 then + elseif npcHandler:getTopic(playerId) == 13 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission57) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission58) < 1 then if player:removeItem(18933, 1) then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission58, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission58, 1) npcHandler:say({ "Oh, praise the Dark Lord! It is my scroll piece! Give it here! You can have this instead. ...", "Ahh, that feels GOOD. Now, only two pieces left to hunt down! On to the {next} scroll piece, yes?", @@ -487,35 +492,32 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("You don't have my scroll.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission64) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission65) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission64) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission65) < 1 then npcHandler:say("Hello, young apprentice. Do you have that {scroll} piece from the priestess?", npc, creature) player:addItem(19148, 1) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission68) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission69) < 1 then - npcHandler:say("Hello, young apprentice. Do you have that scroll piece from the priestess?", npc, creature) - npcHandler:setTopic(playerId, 15) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission71) == 2 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission72) < 1 then + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission68) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission69) < 1 then npcHandler:say("Welcome, welcome! Finally! The last {scroll} piece.... you do have it, haven't you?", npc, creature) - npcHandler:setTopic(playerId, 18) + npcHandler:setTopic(playerId, 15) end elseif MsgContains(message, "next") then - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission43) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission44) < 1 then + if player:getStorageValue(Storage.GravediggerOfDrefia.Mission43) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission44) < 1 then npcHandler:say({ "Hah, developed a taste for it, have you? I believe the next scroll piece was hidden somewhere, my old friend being of a somewhat distrustful nature. ...", "The scent may not be lost, though - ask a shadow pupil if he can help - but be careful. ...", "Those shadow pupils are - strange. Try to find one who will answer and not kill you!", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission44, 1) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission51) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission52) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission44, 1) + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission51) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission52) < 1 then npcHandler:say({ "Good! As you can imagine, I had a scroll piece, too. I hid it in my old quarters, northwest of the library. ...", "The door is magically sealed. Use this copper key with it to get inside. ...", "Beneath one of the chests is a secret stash, under a loose stone tile. The scroll piece should be inside. Off you go.", }, npc, creature) player:addItem(19173, 1) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission52, 1) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission58) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission59) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission52, 1) + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission58) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission59) < 1 then player:addItem(19148, 1) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission59, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission59, 1) npcHandler:say({ "Hahah, eager for it, I like that! ...", "One piece stayed in the hands of a beautiful priestess. ...", @@ -523,15 +525,16 @@ local function creatureSayCallback(npc, creature, type, message) "Oh, one more thing! They only talk to you when you look like a fellow summoner. It's dangerous to go without a cape. Use this.", }, npc, creature) end - elseif npcHandler:getTopic(playerId) == 16 and MsgContains(message, "restore") and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission72) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission73) < 1 then + elseif MsgContains(message, "restore") and player:getStorageValue(Storage.GravediggerOfDrefia.Mission69) <= 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission73) < 1 then --and npcHandler:getTopic(playerId) == 15 then if player:removeItem(19158, 1) then npcHandler:say({ "I knew it! I knew I had made a copy! Oh, I am so clever! ...", "Now, watch this. THERE. THE COMPLETE INCANTATION SCROLL. ...", "You have done well. Only one thing remains, and you shall be rich beyond your dreams. Ready for the really final task?", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission73, 1) - npcHandler:setTopic(playerId, 19) + --player:setStorageValue(Storage.GravediggerOfDrefia.Mission72, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission73, 1) + npcHandler:setTopic(playerId, 17) else npcHandler:say("You don't have my scroll.", npc, creature) npcHandler:setTopic(playerId, 0) @@ -543,7 +546,7 @@ local function creatureSayCallback(npc, creature, type, message) end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) -npcHandler:setMessage(MESSAGE_GREET, "At last, a visitor! Welcome to my... humble abode. {Scroll} or {mission}?") +npcHandler:setMessage(MESSAGE_GREET, "At last, a visitor! Welcome to my... humble abode.") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -- npcType registering the npcConfig table diff --git a/data-otservbr-global/npc/one_eyed_joe.lua b/data-otservbr-global/npc/one_eyed_joe.lua index b1970ffded3..f8c36cead58 100644 --- a/data-otservbr-global/npc/one_eyed_joe.lua +++ b/data-otservbr-global/npc/one_eyed_joe.lua @@ -56,117 +56,88 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end -local function greetCallback(npc, creature) - local player = creature:getPlayer() - if not player then - return false - end - +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) local playerId = player:getId() - local currentTime = os.time() - if player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) == 3 and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline) == 3 then + if player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) == 3 then + if player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Questline) == 3 then + player:setStorageValue(Storage.TibiaTales.TheCursedCrystal.Questline, 4) + end player:addAchievement("Wail of the Banshee") - player:addItem(16119, 1) - player:addItem(16120, 1) - player:addItem(16121, 1) + player:setStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe, 4) + doPlayerAddItem(creature, 16119, 1) + doPlayerAddItem(creature, 16120, 1) + doPlayerAddItem(creature, 16121, 1) + math.randomseed(os.time()) local chanceToPirate = math.random(1, 4) - local pirateItems = { [1] = 5926, [2] = 6098, [3] = 6097, [4] = 6126 } - player:addItem(pirateItems[chanceToPirate], 1) - - player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe, 4) - player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline, 4) - player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Time, currentTime + 20 * 60 * 60) - npcHandler:setMessage(MESSAGE_GREET, "Well done! But know this: The cursed crystal seems to regenerate over time. It could be necessary to come back and repeat whatever you have done down there.") - else - npcHandler:setMessage(MESSAGE_GREET, "Hello there. I'm sorry, I hardly noticed you. I'm a bit nervous. The spooky {sounds} down there, you know") - end - - return true -end - -local function creatureSayCallback(npc, creature, type, message) - local player = creature:getPlayer() - if not player then - return false - end - - local playerId = player:getId() - local currentTime = os.time() - local questTime = player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Time) - - if questTime > 0 and currentTime >= questTime then - player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe, -1) - player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline, -1) - player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.MedusaOil, -1) - player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.SheetOfPaper, -1) - player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.SmallCrystalBell, -1) - end - - if MsgContains(message, "mission") and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) < 0 and npcHandler:getTopic(playerId) < 1 then + if chanceToPirate == 1 then + doPlayerAddItem(creature, 5926, 1) + elseif chanceToPirate == 2 then + doPlayerAddItem(creature, 6098, 1) + elseif chanceToPirate == 3 then + doPlayerAddItem(creature, 6097, 1) + elseif chanceToPirate == 4 then + doPlayerAddItem(creature, 6126, 1) + end + elseif (player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) >= 0) and (player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) < 3) then + npcHandler:say("Ah, the brave adventurer who sought to destroy the evil crystal down there. Have you been succesful?", npc, creature) + elseif MsgContains(message, "mission") and (player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) < 0) and npcHandler:getTopic(playerId) < 1 then + npcHandler:setTopic(playerId, 1) npcHandler:say({ "As for myself I haven't been down there. But I heard some disturbing rumours. In these caves are wonderful crystal formations. Some more poetically inclined fellows call them the crystal gardens. ...", "At first glance it seems to be a beautiful - and precious - surrounding. But in truth, deep down in these caverns exists an old evil. Want to hear more?", }, npc, creature) - npcHandler:setTopic(playerId, 1) - elseif MsgContains(message, "yes") and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) > 0 and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) < 3 then - npcHandler:say("Hmm. No, I don't think so. I still feel this strange prickling in my toes.", npc, creature) - npcHandler:setTopic(playerId, 0) - elseif MsgContains(message, "no") and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) > 0 and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) < 3 then - npcHandler:say("Too bad.", npc, creature) - npcHandler:setTopic(playerId, 0) + elseif MsgContains(message, "yes") and (player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) > 0) and (player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) < 3) then + npcHandler:say({ "Hmm. No, i don't think so. I still feel this strange prickling in my toes." }, npc, creature) + elseif MsgContains(message, "no") and (player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) > 0) and (player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) < 3) then + npcHandler:say({ "Too bad." }, npc, creature) elseif MsgContains(message, "protect ears") then - npcHandler:say("Protect your ears? Hmm ... Wasn't there some fabulous seafarer who used wax or something to plug his ears? There was a story about horrible bird-women or something ...? No, sounds like hogwash, doesn't it.", npc, creature) - npcHandler:setTopic(playerId, 0) + npcHandler:say({ "Protect your ears? Hmm ... Wasn't there some fabulous seafarer who used wax or something to plug his ears? There was a story about horrible bird-women or something ...? No, sounds like hogwash, doesn't it." }, npc, creature) elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 then + npcHandler:setTopic(playerId, 2) npcHandler:say({ "The evil I mentioned is a strange crystal, imbued with some kind of unholy energy. It is very hard to destroy, no weapon is able to shatter the thing. Maybe a jarring, very loud sound could destroy it. ...", "I heard of creatures, that are able to utter ear-splitting sounds. Don't remember the name, though. Would you go down there and try to destroy the crystal?", }, npc, creature) - npcHandler:setTopic(playerId, 2) elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 2 then - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) - if player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline) < 0 then - player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline, 0) + npcHandler:setTopic(playerId, 3) + player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) + if player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Questline) < 0 then + player:setStorageValue(Storage.TibiaTales.TheCursedCrystal.Questline, 0) end - player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe, 0) - npcHandler:say("Great! Good luck and be careful down there!", npc, creature) - npcHandler:setTopic(playerId, 0) + player:setStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe, 0) + npcHandler:say({ "Great! Good luck and be careful down there!" }, npc, creature) elseif MsgContains(message, "crystals") then npcHandler:say({ "In my humble opinion a pirate should win a fortune by boarding ships not by crawling through caves and tunnels. But who am I to bring into question the captain's decision. All I know is that they sell the crystals at a high price. ...", "A certain amount of the crystals is ground to crystal dust with a special kind of mill. Don't ask me why. Some kind of magical component perhaps that they sell to mages and sorcerers.", }, npc, creature) - npcHandler:setTopic(playerId, 0) - elseif MsgContains(message, "cursed") and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) < 0 and npcHandler:getTopic(playerId) < 1 then + elseif MsgContains(message, "cursed") and (player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) < 0) and npcHandler:getTopic(playerId) < 1 then + npcHandler:setTopic(playerId, 1) npcHandler:say({ "As for myself I haven't been down there. But I heard some disturbing rumours. In these caves are wonderful crystal formations. Some more poetically inclined fellows call them the crystal gardens. ...", "At first glance it seems to be a beautiful - and precious - surrounding. But in truth, deep down in these caverns exists an old evil. Want to hear more?", }, npc, creature) - npcHandler:setTopic(playerId, 1) elseif MsgContains(message, "sounds") then npcHandler:say({ "These caves are incredibly beautiful, {crystals} in vibrant colours grow there like exotic flowers. There are more than a few captains who send down their men in order to quarry the precious crystals. ...", "But there are few volunteers. Often the crystal gatherers disappear and are never seen again. Other poor fellows then meet their former shipmates in the form of ghosts or skeletons. It's a {cursed} area, something evil is down there!", }, npc, creature) - npcHandler:setTopic(playerId, 0) elseif MsgContains(message, "job") then - npcHandler:say("I'm a pirate. Normally I'm sailing the seas, boarding other ships and gathering treasures. But at the moment my captain graciously assigned me to watch this {cursed} entrance.", npc, creature) + npcHandler:say({ "I'm a pirate. Normally I'm sailing the seas, boarding other ships and gathering treasures. But at the moment my captain graciously assigned me to watch this {cursed} entrance." }, npc, creature) elseif MsgContains(message, "name") then - npcHandler:say("I'm One-Eyed Joe. From Josephina, got that? And I regard this eye patch as a personal feature of beauty!", npc, creature) + npcHandler:say({ "I'm One-Eyed Joe. From Josephina, got that? And I regard this eye patch as a personal feature of beauty!" }, npc, creature) elseif MsgContains(message, "bye") then npcHandler:say("Good bye adventurer. It was nice to talk with you.", npc, creature) - npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) >= 0 and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) < 3 then - npcHandler:say("Ah, the brave adventurer who sought to destroy the evil crystal down there. Have you been successful?", npc, creature) - npcHandler:setTopic(playerId, 0) + npcHandler:removeInteraction(npc, creature) end - return true end -npcHandler:setCallback(CALLBACK_GREET, greetCallback) +npcHandler:setMessage(MESSAGE_GREET, "Hello there. I'm sorry, I hardly noticed you. I'm a bit nervous. The spooky {sounds} down there, you know") + npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/padreia.lua b/data-otservbr-global/npc/padreia.lua index 0b9d961248a..f6bd6803ccb 100644 --- a/data-otservbr-global/npc/padreia.lua +++ b/data-otservbr-global/npc/padreia.lua @@ -63,20 +63,20 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("Do you want to buy a bottle of cough syrup for 50 gold?", npc, creature) npcHandler:setTopic(playerId, 1) elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.TheExterminator) == -1 then + if player:getStorageValue(Storage.TibiaTales.TheExterminator) == -1 then npcHandler:say({ "Oh " .. player:getName() .. ", thank god you came to me. Last night, I had a vision about an upcoming plague here in Carlin. ...", "It will originate from slimes that will swarm out of the sewers and infect every citizen with a deadly disease. Are you willing to help me save Carlin?", }, npc, creature) npcHandler:setTopic(playerId, 2) - elseif player:getStorageValue(Storage.Quest.U8_1.TibiaTales.TheExterminator) == 1 then + elseif player:getStorageValue(Storage.TibiaTales.TheExterminator) == 1 then npcHandler:say("You MUST find that slime pool immediately or life here in Carlin will not be the same anymore.", npc, creature) - elseif player:getStorageValue(Storage.Quest.U8_1.TibiaTales.TheExterminator) == 2 then + elseif player:getStorageValue(Storage.TibiaTales.TheExterminator) == 2 then local itemId = { 3033, 3032, 3030, 3029 } for i = 1, #itemId do player:addItem(itemId[i], 1) end - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.TheExterminator, 3) + player:setStorageValue(Storage.TibiaTales.TheExterminator, 3) npcHandler:say("You did it! Even if only few of the Carliners will ever know about that, you saved all of their lives. Here, take this as a reward. Farewell!", npc, creature) else npcHandler:say("Maybe the guards have something to do for you or know someone who could need some help.", npc, creature) @@ -92,7 +92,7 @@ local function creatureSayCallback(npc, creature, type, message) player:addItem(4828, 1) elseif npcHandler:getTopic(playerId) == 2 then player:addItem(135, 1) - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.TheExterminator, 1) + player:setStorageValue(Storage.TibiaTales.TheExterminator, 1) npcHandler:say({ "I knew I could count on you. Take this highly intensified vermin poison. In my vision, I saw some kind of 'pool' where these slimes came from. ...", "Pour the poison in the water to stop the demise of Carlin. Tell me about your mission after you fulfilled your task.", diff --git a/data-otservbr-global/npc/prezil.lua b/data-otservbr-global/npc/prezil.lua index 37142dea55c..07813991e8e 100644 --- a/data-otservbr-global/npc/prezil.lua +++ b/data-otservbr-global/npc/prezil.lua @@ -64,11 +64,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia) ~= 1 + return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Alia) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia, 1) + player:setStorageValue(Storage.AdventurersGuild.FreeStone.Alia, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/quandons_ghost.lua b/data-otservbr-global/npc/quandons_ghost.lua index 183fb554690..257424177cb 100644 --- a/data-otservbr-global/npc/quandons_ghost.lua +++ b/data-otservbr-global/npc/quandons_ghost.lua @@ -50,29 +50,12 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end -local function greetCallback(npc, creature) - local player = Player(creature) - local playerId = player:getId() - - if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission15) == 3 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission16) < 1 then - npcHandler:setMessage(MESSAGE_GREET, { - "He murdered me. I shouldn't have trusted him! The money! All that money blinded me! To the east I brought his stuff. In night and darkness, covered by some kind of magic of his. The minotaurs did not bother us, like he promised. ...", - "His ... his true name is Shargon and he is a priest of some kind. He belongs to a powerful secret society and is looking for something on their behalves. ...", - "We brought his stuff to a hideout, I'll mark it on your map! The things that I've seen there! Horrible, horrible things! I fled, but he found me, killed me. He murdered me!", - }) - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission16, 1) - else - npcHandler:setMessage(MESSAGE_GREET, "Hi!") - end +npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) - return true +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) end -local function creatureSayCallback(npc, creature, type, message) end - -npcHandler:setCallback(CALLBACK_GREET, greetCallback) -npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) -npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) +-- Missing script for complete the mission 15 of dark trails --- npcType registering the npcConfig table npcType:register(npcConfig) diff --git a/data-otservbr-global/npc/queen_eloise.lua b/data-otservbr-global/npc/queen_eloise.lua index e4fd566e422..0467bb6e74a 100644 --- a/data-otservbr-global/npc/queen_eloise.lua +++ b/data-otservbr-global/npc/queen_eloise.lua @@ -173,9 +173,9 @@ node1:addChildKeyword({ "yes" }, StdModule.promotePlayer, { npcHandler = npcHand node1:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, onlyFocus = true, text = "Alright then, come back when you are ready.", reset = true }) -- Postman keywordHandler:addKeyword({ "uniforms" }, StdModule.say, { npcHandler = npcHandler, text = "I remember about those uniforms, they had a camouflage inlay so they could be worn the inside out too. I will send some color samples via mail to Mr. Postner." }, function(player) - return player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 5 + return player:getStorageValue(Storage.Postman.Mission06) == 5 end, function(player) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 6) + player:setStorageValue(Storage.Postman.Mission06, 6) end) -- Greeting diff --git a/data-otservbr-global/npc/quentin.lua b/data-otservbr-global/npc/quentin.lua index 1fad4b555fa..5a60aded8e0 100644 --- a/data-otservbr-global/npc/quentin.lua +++ b/data-otservbr-global/npc/quentin.lua @@ -100,11 +100,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Quentin) ~= 1 + return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Quentin) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Quentin, 1) + player:setStorageValue(Storage.AdventurersGuild.FreeStone.Quentin, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/rabaz.lua b/data-otservbr-global/npc/rabaz.lua index 0de19876209..a8676301081 100644 --- a/data-otservbr-global/npc/rabaz.lua +++ b/data-otservbr-global/npc/rabaz.lua @@ -142,7 +142,7 @@ local function creatureSayCallback(npc, creature, type, message) local categoryTable = itemsTable[message:lower()] if MsgContains(message, "mission") then - if player:getStorageValue(Storage.Quest.U8_6.AnInterestInBotany.Questline) < 1 then + if player:getStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline) < 1 then npcHandler:setTopic(playerId, 1) npcHandler:say({ "Why yes, there is indeed some minor issue I could need your help with. I was always a friend of nature and it was not recently I discovered the joys of plants, growths, of all the flora around us. ...", @@ -155,15 +155,15 @@ local function creatureSayCallback(npc, creature, type, message) "Once you find what I need, best use a knife to carefully cut and gather a leaf or a scrap of their integument and press it directly under their appropriate entry into my botanical almanach. ...", "Simply return to me after you have done that and we will discuss your reward. What do you say, are you in?", }, npc, creature) - elseif player:getStorageValue(Storage.Quest.U8_6.AnInterestInBotany.Questline) == 3 then + elseif player:getStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline) == 3 then npcHandler:setTopic(playerId, 2) npcHandler:say("Well fantastic work, you gathered both samples! Now I can continue my work on the almanach, thank you very much for your help indeed. Can I take a look at my book please?", npc, creature) end elseif MsgContains(message, "yes") then if npcHandler:getTopic(playerId) == 1 then - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) - player:setStorageValue(Storage.Quest.U8_6.AnInterestInBotany.Questline, 1) - player:setStorageValue(Storage.Quest.U8_6.AnInterestInBotany.ChestDoor, 0) + player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline, 1) + player:setStorageValue(Storage.TibiaTales.AnInterestInBotany.ChestDoor, 0) npcHandler:say("Yes? Yes! That's the enthusiasm I need! Remember to bring a sharp knife to gather the samples, plants - even mutated deformed plants - are very sensitive you know. Off you go and be careful out there, Zao is no place for the feint hearted mind you.", npc, creature) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 2 then @@ -171,7 +171,7 @@ local function creatureSayCallback(npc, creature, type, message) player:addItem(11700, 1) player:addItem(3035, 10) player:addExperience(3000, true) - player:setStorageValue(Storage.Quest.U8_6.AnInterestInBotany.Questline, 4) + player:setStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline, 4) npcHandler:say({ "Ah, thank you. Now look at that texture and fine colour, simply marvellous. ...", "I hope the sun in the steppe did not exhaust you too much? Shellshock. A dangerous foe in the world of field science and exploration. ...", diff --git a/data-otservbr-global/npc/rahkem.lua b/data-otservbr-global/npc/rahkem.lua index 6730ab0b8f5..a50f7c2aa7c 100644 --- a/data-otservbr-global/npc/rahkem.lua +++ b/data-otservbr-global/npc/rahkem.lua @@ -75,11 +75,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Rahkem) ~= 1 + return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Rahkem) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Rahkem, 1) + player:setStorageValue(Storage.AdventurersGuild.FreeStone.Rahkem, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/rock_with_a_soft_spot.lua b/data-otservbr-global/npc/rock_with_a_soft_spot.lua index cac1a3af1eb..2709608d394 100644 --- a/data-otservbr-global/npc/rock_with_a_soft_spot.lua +++ b/data-otservbr-global/npc/rock_with_a_soft_spot.lua @@ -64,11 +64,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.RockWithASoftSpot) ~= 1 + return player:getStorageValue(Storage.AdventurersGuild.FreeStone.RockWithASoftSpot) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.RockWithASoftSpot, 1) + player:setStorageValue(Storage.AdventurersGuild.FreeStone.RockWithASoftSpot, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/roswitha.lua b/data-otservbr-global/npc/roswitha.lua index 4999259c5d8..f13d91e7fe4 100644 --- a/data-otservbr-global/npc/roswitha.lua +++ b/data-otservbr-global/npc/roswitha.lua @@ -55,18 +55,16 @@ local function creatureSayCallback(npc, creature, type, message) local playerId = player:getId() if MsgContains(message, "Harsin") then - if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission13) == 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission14) < 1 then + if player:getStorageValue(Storage.DarkTrails.Mission13) == 1 then npcHandler:say("I'm sorry, but Harsin no longer lives here. He ordered a local named Quandon to transport all his stuff somewhere. I don't know where he moved, but Quandon should be able to help you with this information.", npc, creature) - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission14, 1) - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.DoorQuandon, 1) + player:setStorageValue(Storage.DarkTrails.Mission14, 1) + player:setStorageValue(Storage.DarkTrails.DoorQuandon, 1) npcHandler:setTopic(playerId, 0) end end - return true end -npcHandler:setMessage(MESSAGE_GREET, "Hello, my lad. Sit down, have a drink, why don't you?") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/sandomo.lua b/data-otservbr-global/npc/sandomo.lua index 5086a6750df..75d1015233b 100644 --- a/data-otservbr-global/npc/sandomo.lua +++ b/data-otservbr-global/npc/sandomo.lua @@ -52,9 +52,9 @@ end function Player.getInquisitionGold(self) local v = { - math.max(0, self:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Mortar_Thrown)) * 100, - math.max(0, self:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Killed_Frazzlemaws)), - math.max(0, self:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Killed_Silencers)), + math.max(0, self:getStorageValue(ROSHAMUUL_MORTAR_THROWN)) * 100, + math.max(0, self:getStorageValue(ROSHAMUUL_KILLED_FRAZZLEMAWS)), + math.max(0, self:getStorageValue(ROSHAMUUL_KILLED_SILENCERS)), } return v[1] + v[2] + v[3] end @@ -102,9 +102,9 @@ local function creatureSayCallback(npc, creature, type, message) if player:getInquisitionGold() > 0 then npcHandler:setTopic(playerId, 4) npcHandler:say({ - "Alright, so you mixed and delivered " .. math.max(0, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Mortar_Thrown)) .. " mortar and ...", - "You killed " .. math.max(0, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Killed_Frazzlemaws)) .. " frazzlemaws and ...", - "You also hunted " .. math.max(0, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Killed_Silencers)) .. " silencers. That would equal " .. player:getInquisitionGold() .. " of inquisition gold - BUT we are currently short of this valuable metal so... do you want me to add this amount to my {books} for now or {trade} it for something else.", + "Alright, so you mixed and delivered " .. math.max(0, player:getStorageValue(ROSHAMUUL_MORTAR_THROWN)) .. " mortar and ...", + "You killed " .. math.max(0, player:getStorageValue(ROSHAMUUL_KILLED_FRAZZLEMAWS)) .. " frazzlemaws and ...", + "You also hunted " .. math.max(0, player:getStorageValue(ROSHAMUUL_KILLED_SILENCERS)) .. " silencers. That would equal " .. player:getInquisitionGold() .. " of inquisition gold - BUT we are currently short of this valuable metal so... do you want me to add this amount to my {books} for now or {trade} it for something else.", }, npc, creature) else npcHandler:setTopic(playerId, nil) @@ -112,7 +112,7 @@ local function creatureSayCallback(npc, creature, type, message) end end elseif npcHandler:getTopic(playerId) == 4 then - local v = math.max(0, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record)) + local v = math.max(0, player:getStorageValue(ROSHAMUUL_GOLD_RECORD)) if MsgContains(message, "book") or MsgContains(message, "books") then npcHandler:setTopic(playerId, 5) npcHandler:say({ @@ -126,21 +126,21 @@ local function creatureSayCallback(npc, creature, type, message) "Good. Registered as... " .. player:getName() .. "... with... about " .. player:getInquisitionGold() .. " of righteously earned inquisition gold added. There. Thanks for your help! ..", "Good. Ask me any time in case you want to know your current {record}. If you have time, Remember you can also {trade} your earnings into some of these... probably far more valuable, ahem... cluster... things, yes.", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record, player:getInquisitionGold()) - player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Mortar_Thrown, 0) - player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Killed_Frazzlemaws, 0) - player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Killed_Silencers, 0) + player:setStorageValue(ROSHAMUUL_GOLD_RECORD, player:getInquisitionGold()) + player:setStorageValue(ROSHAMUUL_MORTAR_THROWN, 0) + player:setStorageValue(ROSHAMUUL_KILLED_FRAZZLEMAWS, 0) + player:setStorageValue(ROSHAMUUL_KILLED_SILENCERS, 0) npcHandler:setTopic(playerId, nil) end elseif MsgContains(message, "record") then - local v = player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record) + local v = player:getStorageValue(ROSHAMUUL_GOLD_RECORD) if v > 0 then npcHandler:say("You have " .. v .. " inquisition gold registered in my book.", npc, creature) else npcHandler:say("I do not see inquisition gold registered in my book from you.", npc, creature) end elseif MsgContains(message, "trade") then - local v = player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record) + local v = player:getStorageValue(ROSHAMUUL_GOLD_RECORD) if v >= 100 then npcHandler:setTopic(playerId, 6) npcHandler:say("Ah yes, you currently have " .. v .. " of righteously earned inquisition gold in my book. 100 inquisition gold equals one cluster. How many clusters do you want in exchange?", npc, creature) @@ -154,15 +154,15 @@ local function creatureSayCallback(npc, creature, type, message) return npcHandler:say("You should tell me a real number.", npc, creature) end - local max = math.floor(player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record) / 100) + local max = math.floor(player:getStorageValue(ROSHAMUUL_GOLD_RECORD) / 100) if v > max then return npcHandler:say("You do not have enough inquisition gold for that, so far you can ask for up to " .. max .. " clusters.", npc, creature) end player:addItem(20062, v) npcHandler:setTopic(playerId, nil) - player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record) - (v * 100)) - npcHandler:say("There you are. Now I register " .. player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Gold_Record) .. " inquisition gold of yours in my book.", npc, creature) + player:setStorageValue(ROSHAMUUL_GOLD_RECORD, player:getStorageValue(ROSHAMUUL_GOLD_RECORD) - (v * 100)) + npcHandler:say("There you are. Now I register " .. player:getStorageValue(ROSHAMUUL_GOLD_RECORD) .. " inquisition gold of yours in my book.", npc, creature) end if MsgContains(message, "bucket") or MsgContains(message, "supplies") then diff --git a/data-otservbr-global/npc/sholley.lua b/data-otservbr-global/npc/sholley.lua index a7d42d419a0..b1f41912793 100644 --- a/data-otservbr-global/npc/sholley.lua +++ b/data-otservbr-global/npc/sholley.lua @@ -55,32 +55,26 @@ local function creatureSayCallback(npc, creature, type, message) local playerId = player:getId() if MsgContains(message, "friend") then - if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission12) == 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission13) < 1 and player:getStorageValue(Storage.Quest.U10_50.OramondQuest.VotingPoints) >= 50 then - npcHandler:say({ - "So you have proven yourself a true friend of our city. It's hard to believe but I think your words only give substance to suspicions my heart had harboured since quite a while. ...", - "So Harsin is probably not the person he appeared to be. Actually I haven't heard from him for quite a while. He was resident in the local bed and breakfast hotel. You should be able to find him there or at least to learn about his whereabouts.", - }, npc, creature) - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission13, 1) + if player:getStorageValue(Storage.DarkTrails.Mission12) == 1 then + npcHandler:say("So you have proven yourself a true friend of our city. It's hard to believe but I think your words only give substance to suspicions my heart had harboured since quite a while. ...", npc, creature) + npcHandler:say("So Harsin is probably not the person he appeared to be. Actually I haven't heard from him for quite a while. He was resident in the local bed and breakfast hotel. You should be able to find him there or at least to learn about his whereabouts.", npc, creature) + player:setStorageValue(Storage.DarkTrails.Mission13, 1) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "quandon") then - if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission14) == 2 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission15) < 1 then - npcHandler:say({ - "A transporter dead? This is more then alarming. It seems Harsin is up to something and whatever it is, it's nothing good at all. But not all is lost. A local medium, Barnabas, has truly the gift to speak to the dead. ...", - "I'll mark his home on your map. He should be able to get the information you need to locate Harsin.", - }, npc, creature) - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission15, 1) + if player:setStorageValue(Storage.DarkTrails.Mission14) == 2 then + npcHandler:say("A transporter dead? This is more then alarming. It seems Harsin is up to something and whatever it is, it's nothing good at all. But not all is lost. A local medium, Barnabas, has truly the gift to speak to the dead. ...", npc, creature) + npcHandler:say("I'll mark his home on your map. He should be able to get the information you need to locate Harsin.", npc, creature) + player:setStorageValue(Storage.DarkTrails.Mission15, 1) npcHandler:setTopic(playerId, 0) else npcHandler:say("Already clicked the body on the house Roswitha ?", npc, creature) npcHandler:setTopic(playerId, 0) end end - return true end -npcHandler:setMessage(MESSAGE_GREET, "Hi!") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/sister_of_jack.lua b/data-otservbr-global/npc/sister_of_jack.lua index e73b91f0b67..a93950dcf28 100644 --- a/data-otservbr-global/npc/sister_of_jack.lua +++ b/data-otservbr-global/npc/sister_of_jack.lua @@ -68,8 +68,8 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "jack") then - if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 5 then - if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.Mother == 1) and (player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.Sister)) < 1 then + if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 5 then + if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Mother == 1) and (player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Sister)) < 1 then npcHandler:say("Why are you asking, he didn't get himself into something again did he?", npc, creature) npcHandler:setTopic(playerId, 1) end @@ -95,8 +95,8 @@ local function creatureSayCallback(npc, creature, type, message) "Wait till mother hears that! Oh he will be in for a surprise, I can tell you that. Ma!! Maaaaa!!", }, npc, creature) npcHandler:setTopic(playerId, 0) - player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.Sister, 1) - player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 6) + player:setStorageValue(Storage.TibiaTales.JackFutureQuest.Sister, 1) + player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 6) end end return true diff --git a/data-otservbr-global/npc/spectulus.lua b/data-otservbr-global/npc/spectulus.lua index 9856bce82c0..20257671367 100644 --- a/data-otservbr-global/npc/spectulus.lua +++ b/data-otservbr-global/npc/spectulus.lua @@ -81,7 +81,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "research") and player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 11 then + if MsgContains(message, "research") and player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 11 then local qStorage = player:getStorageValue(Storage.Quest.U8_7.SpiritHunters.Mission01) local tombsStorage = player:getStorageValue(Storage.Quest.U8_7.SpiritHunters.TombUse) if qStorage == -1 then @@ -164,22 +164,22 @@ local function creatureSayCallback(npc, creature, type, message) end npcHandler:say("Do you have the mirror crystal? Unbelievable! Alright I will extract the crystal from the device myself, would you please give me the device with the crystal and step back?", npc, creature) npcHandler:setTopic(playerId, 7) - elseif (player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) == 10) and (player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) < 1) then + elseif (player:getStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline) == 10) and (player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) < 1) then npcHandler:say("After the debacle with the crystal, I started focussing on other things. There are also some {tasks} that still need to be done. If you can spare the time to continue helping me, it shall not be to your disadvantage. So are you in for another mission?", npc, creature) npcHandler:setTopic(playerId, 27) - elseif player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 2 then + elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 2 then npcHandler:say("So you found him? Have you talked to {Jack} yet?", npc, creature) npcHandler:setTopic(playerId, 30) - elseif player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 4 then + elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 4 then npcHandler:say("You're back from {Jack}! Mh, by the looks of your face I doubt our little redecoration project yielded any success. But I had an even better idea while you were gone - ready to give it another try?", npc, creature) npcHandler:setTopic(playerId, 32) - elseif player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 6 then + elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 6 then npcHandler:say("So, did you talk to his family? Were you able to convince them?", npc, creature) npcHandler:setTopic(playerId, 33) - elseif player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 8 then + elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 8 then npcHandler:say("Did you find out what hobby {Jack} has? Did you separate him from this activity? Only if he has a free mind, he can truly get back to his former self! Now all you need to do is talk to him again!", npc, creature) npcHandler:setTopic(playerId, 0) - elseif player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 9 then + elseif player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 9 then npcHandler:say({ "Oh you are back already. Hm... I doubt it worked, did it? It DID? Oh well... good job. Really! Now... the thing is - the actual {Jack} wrote. No, no wait. Calm down first. ...", "You remember me explaining the fold in time, causing a tiny disturbance in infinity? Well, as I already told you, {Jack} was indeed not transported to the future... but to the past. ...", @@ -191,7 +191,7 @@ local function creatureSayCallback(npc, creature, type, message) "Anyway you did a great job and I thank you for... putting your hands into my fire Player... once again.", }, npc, creature) player:addExperience(6000, true) - player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 10) + player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 10) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "yes") then @@ -308,8 +308,8 @@ local function creatureSayCallback(npc, creature, type, message) "I will mark his current location on your map, just ask him about me and see what happens - good luck.", }, npc, creature) player:setStorageValue(Storage.Quest.U8_54.SeaOfLight.Questline, 11) - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) - player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 1) + player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 1) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 30 then npcHandler:say("Yes? And he didn't remember anything? Not even me? That's not good. Then we will have to do everything ourselves. Are you ready to continue?", npc, creature) @@ -320,7 +320,7 @@ local function creatureSayCallback(npc, creature, type, message) "I know that he used to have a very comfy red cushioned chair and an old globe which sat near the middle of the room. He also used a smaller telescope and he had that extremely large amphora in a corner. And... there was one other thing. ...", "A rocking horse. He just loved it! Find these items, buy them if you need to and place them where {Jack} lives. Ask him about the furniture and don't forget to tell me about his reaction!", }, npc, creature) - player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 3) + player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 3) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 32 then npcHandler:say({ @@ -329,7 +329,7 @@ local function creatureSayCallback(npc, creature, type, message) "Hm... that's strange, I don't even recall his family. Never knew he had a mother and a sister. Tell them the truth about him - maybe they will understand and even help him getting this over with. ...", "But be careful, the {dimensional} shift could mean that they will not even know what you're talking about since they are more closely linked to him than anyone else.", }, npc, creature) - player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 5) + player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 5) npcHandler:setTopic(playerId, 0) elseif npcHandler:getTopic(playerId) == 33 then npcHandler:say({ @@ -337,11 +337,11 @@ local function creatureSayCallback(npc, creature, type, message) "A hobby or something! Yes, ask him about his hobbies! Convince him somehow that anything he is doing there does not match his true self - he didn't have any hobbies except a healthy interest in science - you MUST convince him, no matter what! ...", "Or everything we achieved would be in vain. We can still save Jack! Now go and do what you must do.", }, npc, creature) - player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, 7) + player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, 7) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "jack") then - if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 10 then + if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 10 then npcHandler:say({ "Well you know Jack - after all you talked to him in person. He will get over it. As for the real Jack, my former intern... I am glad that nothing serious happened to him. ...", "According to his letter, he did just fine so many years ago. He somehow managed to make a name of himself when he cast some magic we enhanced through our research - of course no one back then had ever seen such spells. ...", diff --git a/data-otservbr-global/npc/talphion.lua b/data-otservbr-global/npc/talphion.lua index e48a26129b9..362dea22509 100644 --- a/data-otservbr-global/npc/talphion.lua +++ b/data-otservbr-global/npc/talphion.lua @@ -58,7 +58,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "dress pattern") then - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06) == 3 then + if player:getStorageValue(Storage.Postman.Mission06) == 3 then if npcHandler:getTopic(playerId) < 1 then npcHandler:say("DRESS FLATTEN? WHO WANTS ME TO FLATTEN A DRESS?", npc, creature) npcHandler:setTopic(playerId, 1) @@ -73,7 +73,7 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 4) elseif npcHandler:getTopic(playerId) == 4 then npcHandler:say("AH YES! I WORKED ON THE DRESS PATTERN FOR THOSE UNIFORMS. STAINLESS TROUSERES, STEAM DRIVEN BOOTS! ANOTHERMARVEL TO BEHOLD! I'LL SENT A COPY TO KEVIN IMEDIATELY!", npc, creature) - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission06, 4) + player:setStorageValue(Storage.Postman.Mission06, 4) npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/tarun.lua b/data-otservbr-global/npc/tarun.lua index 65b9882f90e..9f0b8be5883 100644 --- a/data-otservbr-global/npc/tarun.lua +++ b/data-otservbr-global/npc/tarun.lua @@ -62,7 +62,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - local theLostBrotherStorage = player:getStorageValue(Storage.Quest.U10_80.TheLostBrotherQuest) + local theLostBrotherStorage = player:getStorageValue(Storage.AdventurersGuild.TheLostBrother) if MsgContains(message, "mission") then if theLostBrotherStorage < 1 then npcHandler:say({ @@ -80,16 +80,16 @@ local function creatureSayCallback(npc, creature, type, message) }, npc, creature) player:addItem(3039, 1) player:addExperience(3000, true) - player:setStorageValue(Storage.Quest.U10_80.TheLostBrotherQuest, 3) + player:setStorageValue(Storage.AdventurersGuild.TheLostBrother, 3) npcHandler:setTopic(playerId, 0) end elseif npcHandler:getTopic(playerId) == 1 then if MsgContains(message, "yes") then npcHandler:say("I thank you! This is more than I could hope!", npc, creature) if theLostBrotherStorage < 1 then - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.QuestLine, 1) + player:setStorageValue(Storage.AdventurersGuild.QuestLine, 1) end - player:setStorageValue(Storage.Quest.U10_80.TheLostBrotherQuest, 1) + player:setStorageValue(Storage.AdventurersGuild.TheLostBrother, 1) elseif MsgContains(message, "no") then npcHandler:say("As you wish.", npc, creature) end @@ -106,7 +106,7 @@ local function onTradeRequest(npc, creature) end local playerId = player:getId() - if player:getStorageValue(Storage.Quest.U10_80.TheLostBrotherQuest) ~= 3 then + if player:getStorageValue(Storage.AdventurersGuild.TheLostBrother) ~= 3 then return false end diff --git a/data-otservbr-global/npc/tereban_functions.lua b/data-otservbr-global/npc/tereban_functions.lua index 9ffb25713bc..40ba653228d 100644 --- a/data-otservbr-global/npc/tereban_functions.lua +++ b/data-otservbr-global/npc/tereban_functions.lua @@ -1,19 +1,19 @@ local topic = {} local storages = { - Storage.Quest.U8_6.AFathersBurden.Sinew, - Storage.Quest.U8_6.AFathersBurden.Wood, - Storage.Quest.U8_6.AFathersBurden.Cloth, - Storage.Quest.U8_6.AFathersBurden.Silk, - Storage.Quest.U8_6.AFathersBurden.Crystal, - Storage.Quest.U8_6.AFathersBurden.Root, - Storage.Quest.U8_6.AFathersBurden.Iron, - Storage.Quest.U8_6.AFathersBurden.Scale, + Storage.FathersBurden.Sinew, + Storage.FathersBurden.Wood, + Storage.FathersBurden.Cloth, + Storage.FathersBurden.Silk, + Storage.FathersBurden.Crystal, + Storage.FathersBurden.Root, + Storage.FathersBurden.Iron, + Storage.FathersBurden.Scale, } TerebanConfig = { ["strong sinew"] = { - storage = Storage.Quest.U8_6.AFathersBurden.Sinew, + storage = Storage.FathersBurden.Sinew, messages = { deliever = "Do you have the required sinew?", success = "Ah, not only did you bring some sinew to me, you also made the world a safer place by killing Heoni.", @@ -24,7 +24,7 @@ TerebanConfig = { itemId = 10592, -- Strong sinew }, ["exquisite wood"] = { - storage = Storage.Quest.U8_6.AFathersBurden.Wood, + storage = Storage.FathersBurden.Wood, messages = { deliever = "Could you find the wood we were talking about?", success = "Thank you. I feel somewhat embarrassed to put you into such a danger for some birthday present but I am sure you can handle it.", @@ -35,7 +35,7 @@ TerebanConfig = { itemId = 10591, -- Exquisite wood }, ["spectral cloth"] = { - storage = Storage.Quest.U8_6.AFathersBurden.Cloth, + storage = Storage.FathersBurden.Cloth, messages = { deliever = "Could you find the cloth I am looking for?", success = "It looks a bit scary but I guess sorcerers might even find that appealing. Thank you very much.", @@ -46,7 +46,7 @@ TerebanConfig = { itemId = 10590, -- Spectral cloth }, ["exquisite silk"] = { - storage = Storage.Quest.U8_6.AFathersBurden.Silk, + storage = Storage.FathersBurden.Silk, messages = { deliever = "So you've found the silk that I need?", success = "Great. I better don't think about how big a spider has to be to produce such strands of silk.", @@ -57,7 +57,7 @@ TerebanConfig = { itemId = 10589, -- Exquisite silk }, ["magic crystal"] = { - storage = Storage.Quest.U8_6.AFathersBurden.Crystal, + storage = Storage.FathersBurden.Crystal, messages = { deliever = "Did you find the required crystal?", success = "Oh look at the colours and sparkles. This crystal is truly remarkable, thank you.", @@ -68,7 +68,7 @@ TerebanConfig = { itemId = 10596, -- Magical crystal }, ["mystic root"] = { - storage = Storage.Quest.U8_6.AFathersBurden.Root, + storage = Storage.FathersBurden.Root, messages = { deliever = "Could you find the root which we are looking for?", success = "You are admirably determined in fulfilling your task. I will make sure that my sons appreciate what you did for their presents.", @@ -79,7 +79,7 @@ TerebanConfig = { itemId = 10595, -- Mystic root }, ["old iron"] = { - storage = Storage.Quest.U8_6.AFathersBurden.Iron, + storage = Storage.FathersBurden.Iron, messages = { deliever = "Have you found the iron that we need for the present?", success = "I wish there'd an easier way to get that iron but those dwarfs are so stubborn. However, now we got what we need.", @@ -90,7 +90,7 @@ TerebanConfig = { itemId = 10593, -- Old iron }, ["flexible dragon scale"] = { - storage = Storage.Quest.U8_6.AFathersBurden.Scale, + storage = Storage.FathersBurden.Scale, messages = { deliever = "Could you get Glitterscale's scales yet?", success = "These scales must have belonged to a fearsome beast. I envy you for your bravery.", @@ -131,20 +131,20 @@ function ParseTerebanSay(npc, creature, message, npcHandler) npcHandler:setTopic(playerId, 0) end elseif MsgContains(message, "mission") then - if player:getStorageValue(Storage.Quest.U8_6.AFathersBurden.Status) == 1 then - if player:getStorageValue(Storage.Quest.U8_6.AFathersBurden.Progress) ~= 8 then + if player:getStorageValue(Storage.FathersBurden.Status) == 1 then + if player:getStorageValue(Storage.FathersBurden.Progress) ~= 8 then npcHandler:say("Well, I need the parts of a sorcerer's robe, a paladin's bow, a knight's shield, and a druid's rod. If you cannot find one of them, ask me about it and I might provide you with some minor hints.", npc, creature) return true end - player:setStorageValue(Storage.Quest.U8_6.AFathersBurden.Status, 2) + player:setStorageValue(Storage.FathersBurden.Status, 2) player:addItem(oldCape, 1) player:addExperience(8000, true) npcHandler:say({ "I'm so glad I finally have all the parts for the presents. Your reward is my eternal gratitude. Well, that and some gold of course. ...", "Take this sachet over there, I wrapped the coins into this old cape I had still lying around here from a barter with a stranger, it is of no use for me anyway. Farewell and thank you once again.", }, npc, creature) - elseif player:getStorageValue(Storage.Quest.U8_6.AFathersBurden.Status) == 2 then + elseif player:getStorageValue(Storage.FathersBurden.Status) == 2 then npcHandler:say("Thank you for your help!", npc, creature) return true else @@ -173,9 +173,9 @@ function ParseTerebanSay(npc, creature, message, npcHandler) elseif npcHandler:getTopic(playerId) == 1 then if MsgContains(message, "yes") then npcHandler:say("I am relieved someone as capable as you will handle the task. Well, I need the parts of a sorcerer's robe, a paladin's bow, a knight's shield, and a druid's wand.", npc, creature) - player:setStorageValue(Storage.Quest.U8_6.AFathersBurden.QuestLog, 1) - player:setStorageValue(Storage.Quest.U8_6.AFathersBurden.Progress, 0) - player:setStorageValue(Storage.Quest.U8_6.AFathersBurden.Status, 1) + player:setStorageValue(Storage.FathersBurden.QuestLog, 1) + player:setStorageValue(Storage.FathersBurden.Progress, 0) + player:setStorageValue(Storage.FathersBurden.Status, 1) for i = 1, #storages do player:setStorageValue(storages[i], 1) end @@ -192,7 +192,7 @@ function ParseTerebanSay(npc, creature, message, npcHandler) end player:setStorageValue(targetMessage.storage, 2) - player:setStorageValue(Storage.Quest.U8_6.AFathersBurden.Progress, player:getStorageValue(Storage.Quest.U8_6.AFathersBurden.Progress) + 1) + player:setStorageValue(Storage.FathersBurden.Progress, player:getStorageValue(Storage.FathersBurden.Progress) + 1) player:addExperience(2500, true) npcHandler:say(targetMessage.messages.success, npc, creature) elseif MsgContains(message, "no") then diff --git a/data-otservbr-global/npc/terrence.lua b/data-otservbr-global/npc/terrence.lua index 722107baffa..fa1597f0fa2 100644 --- a/data-otservbr-global/npc/terrence.lua +++ b/data-otservbr-global/npc/terrence.lua @@ -54,25 +54,19 @@ local function creatureSayCallback(npc, creature, type, message) local player = Player(creature) local playerId = player:getId() - if MsgContains(message, "manway") then - if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission16) == 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission17) < 1 then - npcHandler:say("I'm not allowed to let just anyone pass. If you have proven your willingness and effort to participate in the fighting, I'm allowed to let you pass.", npc, creature) - npcHandler:setTopic(playerId, 1) - else - npcHandler:say("Ahhhhhhhh! ", npc, creature) - npcHandler:setTopic(playerId, 0) + -- Missing script for complete the mission 16 of dark trails + if MsgContains(message, "mission") then + if player:getStorageValue(Storage.DarkTrails.Mission16) == 1 then + npcHandler:say("Ahhhhhhhh! Find and investigate the hideout, the mission 17", npc, creature) + setPlayerStorageValue(creature, Storage.DarkTrails.Mission17, 1) + setPlayerStorageValue(creature, Storage.DarkTrails.DoorHideout, 1) end - elseif MsgContains(message, "effort") and npcHandler:getTopic(playerId) == 1 then - npcHandler:say("You fought hard enough against the minotaurs. Since you've shown so much effort in our war, I'll let you pass through the gate.", npc, creature) - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission17, 1) - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.DoorHideout, 1) - npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Ahhhhhhhh! ", npc, creature) end - return true end -npcHandler:setMessage(MESSAGE_GREET, " Hey there, you are surely interested in helping the Rathleton city guard, right? Right - especially now since the dreaded minotaurs gain more ground every day.") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/the_beggar_king.lua b/data-otservbr-global/npc/the_beggar_king.lua index 1fd246c2c40..4e1eb70f7ca 100644 --- a/data-otservbr-global/npc/the_beggar_king.lua +++ b/data-otservbr-global/npc/the_beggar_king.lua @@ -59,7 +59,7 @@ local function creatureSayCallback(npc, creature, type, message) end if MsgContains(message, "mission") then - if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission01) == 2 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission02) == 1 and player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Door) == 1 then + if player:getStorageValue(Storage.DarkTrails.Mission01) == 2 and player:getStorageValue(Storage.DarkTrails.Mission02) == 1 then npcHandler:say("So I guess you are the one that the magistrate is sending to look after us, eh? ", npc, creature) npcHandler:setTopic(playerId, 1) else @@ -93,7 +93,8 @@ local function creatureSayCallback(npc, creature, type, message) "But since you are investigating on their behalf, you might work out some agreement with them, if you're mad enough to enter the sewers at all. ... ", "However, you will have to talk to one of the Glooth Brothers who are responsible for the sewer system's maintenance. You'll find them somewhere down there.", }, npc, creature, 10) - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission02, 2) + player:setStorageValue(Storage.DarkTrails.Mission02, 2) -- Mission 2 end + player:setStorageValue(Storage.DarkTrails.Mission03, 1) -- Mission 3 start npcHandler:setTopic(playerId, 0) end end diff --git a/data-otservbr-global/npc/tomruk_the_ruddy.lua b/data-otservbr-global/npc/tomruk_the_ruddy.lua index a8efc75f927..9fe479e2d77 100644 --- a/data-otservbr-global/npc/tomruk_the_ruddy.lua +++ b/data-otservbr-global/npc/tomruk_the_ruddy.lua @@ -62,7 +62,7 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission35) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission36) < 1 then + if (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.GravediggerOfDrefia.Mission35) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission36) < 1 then npcHandler:say({ "So someone sent you after a scroll, eh? A stroll for a scroll! Sounds like an old-fashioned necromancer thing. ...", "Well, this piece here is a rather fascinating thing - see those strange blood stains? - ...", @@ -70,27 +70,27 @@ local function creatureSayCallback(npc, creature, type, message) "Ah, so you want it, too? Well, do me a favour: fetch two samples and assist in my experiment, in exchange for the scroll piece. Yes?", }, npc, creature) npcHandler:setTopic(playerId, 1) - elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission35) == 1 then + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission35) == 1 then npcHandler:say({ "Sanguine! I need two different blood samples - The first one from the necromancer's pure blood chamber. ... ", "I was barred from the premises. For my research! Shameful! I'm a martyr to the cause - oh, the second sample you said? ...", "The second sample you must retrieve from the sacrificial chamber in the ancient vampire crypts, first floor, far west. ...", "Take these two sterilised vials, one for each blood basin. Oh, I wish I could go myself! Come back when you have filled both vials.", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission36, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission36, 1) player:addItem(19100, 2) npcHandler:setTopic(playerId, 0) - elseif (MsgContains(message, "scroll") or MsgContains(message, "mission") or MsgContains(message, "blood")) and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission37) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38) < 1 then + elseif (MsgContains(message, "scroll") or MsgContains(message, "mission") or MsgContains(message, "blood")) and player:getStorageValue(Storage.GravediggerOfDrefia.Mission37) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission38) < 1 then npcHandler:say("Hello hello! Did you bring those blood samples?", npc, creature) npcHandler:setTopic(playerId, 2) - elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 2 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission37) == 1 then + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 2 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission37) == 1 then if player:getItemCount(19102) >= 1 and player:getItemCount(19101) >= 1 then npcHandler:say({ "Now, let me see... yes... yes... very good. Let me add THIS ..... swill it... there. Sanguine! ...", "We're not finished yet. Take this tainted blood vial ...", "Dab some drops from it on to the four blood pagodas in the inner circle here. Then pull the lightning lever over there.", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission38, 1) player:removeItem(19101, 1) player:removeItem(19102, 1) player:addItem(19133, 1) @@ -99,31 +99,30 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:say("You haven't got any blood.", npc, creature) npcHandler:setTopic(playerId, 0) end - elseif (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission40) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission41) < 1 then + elseif (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.GravediggerOfDrefia.Mission40) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission41) < 1 then npcHandler:say("Hello hello! Did Hello hello! Well now, painted all those blood pagodas properly?", npc, creature) npcHandler:setTopic(playerId, 3) - elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 3 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission40) == 1 then + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 3 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission40) == 1 then npcHandler:say({ "Sanguine! Did you see those sparks! We definitely had some energy transfer! Well done! Now, for your reward. ...", "Err... I would awfully like to know more about the scroll ...", "Would you settle for a heartfelt handshake instead - oh, you wouldn't? Well, er, okay ...", "Give me a minute or two to retrieve it. Ask me for the {scroll} or the {mission}", }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission41, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission41, 1) npcHandler:setTopic(playerId, 0) - elseif (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission41) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission42) < 1 then + elseif (MsgContains(message, "scroll") or MsgContains(message, "mission")) and player:getStorageValue(Storage.GravediggerOfDrefia.Mission41) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission42) < 1 then npcHandler:say("Hello hell- oh, you've come for the scroll, haven't you?", npc, creature) npcHandler:setTopic(playerId, 4) - elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 4 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission41) == 1 then + elseif MsgContains(message, "yes") and npcHandler:getTopic(playerId) == 4 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission41) == 1 then npcHandler:say("My heart bleeds to part from it. Here. Extend your hand - I'll just retrieve some blood from in exchange - HOLD STILL.", npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission42, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission42, 1) player:addItem(18933, 1) npcHandler:setTopic(playerId, 0) end return true end -npcHandler:setMessage(MESSAGE_GREET, "Hello hello! Always good to see fresh blood! What brings you here?") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/tyrias.lua b/data-otservbr-global/npc/tyrias.lua index 1a1e76770c8..6ea39bab9f2 100644 --- a/data-otservbr-global/npc/tyrias.lua +++ b/data-otservbr-global/npc/tyrias.lua @@ -69,11 +69,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Tyrias) ~= 1 + return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Tyrias) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Tyrias, 1) + player:setStorageValue(Storage.AdventurersGuild.FreeStone.Tyrias, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/ubaid.lua b/data-otservbr-global/npc/ubaid.lua index 32f36a35be7..6d46bb32d9c 100644 --- a/data-otservbr-global/npc/ubaid.lua +++ b/data-otservbr-global/npc/ubaid.lua @@ -99,7 +99,7 @@ local function creatureSayCallback(npc, creature, type, message) end -- To Appease the Mighty Quest - if MsgContains(message, "mission") and player:getStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest) == 2 then + if MsgContains(message, "mission") and player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) == 2 then npcHandler:say({ "You have the smell of the Marid on you. Tell me who sent you?", }, npc, creature) @@ -109,7 +109,7 @@ local function creatureSayCallback(npc, creature, type, message) "And he is sending a worm like you to us!?! The mighty Efreet!! Tell him that we won't be part in his 'great' plans and now LEAVE!! ...", "...or do you want to join us and fight those stinking Marid who claim themselves to be noble and righteous?!? Just let me know.", }, npc, creature) - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest, player:getStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest) + 1) + player:setStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest, player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) + 1) end if MsgContains(message, "passage") then diff --git a/data-otservbr-global/npc/umar.lua b/data-otservbr-global/npc/umar.lua index b6a72878425..4836c568958 100644 --- a/data-otservbr-global/npc/umar.lua +++ b/data-otservbr-global/npc/umar.lua @@ -103,7 +103,7 @@ local function creatureSayCallback(npc, creature, type, message) end -- To Appease the Mighty Quest - if MsgContains(message, "mission") and player:getStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest) == 1 then + if MsgContains(message, "mission") and player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) == 1 then npcHandler:say({ "I should go and tell Fa'hradin. ...", "I am impressed you know our address of welcome! I honour that. So tell me who sent you on a mission to our fortress?", @@ -114,7 +114,7 @@ local function creatureSayCallback(npc, creature, type, message) "How dare you lie to me?!? The caliph should choose his envoys more carefully. We will not accept his peace-offering ...", "...but we are always looking for support in our fight against the evil Efreets. Tell me if you would like to join our fight.", }, npc, creature) - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest, player:getStorageValue(Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest) + 1) + player:setStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest, player:getStorageValue(Storage.TibiaTales.ToAppeaseTheMightyQuest) + 1) end if MsgContains(message, "passage") then diff --git a/data-otservbr-global/npc/uzon.lua b/data-otservbr-global/npc/uzon.lua index b54b5d4d5d3..112dee20086 100644 --- a/data-otservbr-global/npc/uzon.lua +++ b/data-otservbr-global/npc/uzon.lua @@ -78,8 +78,8 @@ addTravelKeyword("zao", "Do you seek a ride to Farmine for |TRAVELCOST|?", 60, P return player:getStorageValue(TheNewFrontier.Mission10[1]) ~= 2 end) addTravelKeyword("edron", "Do you seek a ride to Edron for |TRAVELCOST|?", 60, Position(33193, 31783, 3), nil, function(player) - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01) == 2 then - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission01, 3) + if player:getStorageValue(Storage.Postman.Mission01) == 2 then + player:setStorageValue(Storage.Postman.Mission01, 3) end end) addTravelKeyword("darashia", "Do you seek a ride to Darashia on Darama for |TRAVELCOST|?", 60, Position(33270, 32441, 6)) diff --git a/data-otservbr-global/npc/yberius.lua b/data-otservbr-global/npc/yberius.lua index 4d561cc5ced..ab6a48d323b 100644 --- a/data-otservbr-global/npc/yberius.lua +++ b/data-otservbr-global/npc/yberius.lua @@ -68,11 +68,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Yberius) ~= 1 + return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Yberius) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Yberius, 1) + player:setStorageValue(Storage.AdventurersGuild.FreeStone.Yberius, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/npc/zarifan.lua b/data-otservbr-global/npc/zarifan.lua index 34abb38be0b..d7d250d56d9 100644 --- a/data-otservbr-global/npc/zarifan.lua +++ b/data-otservbr-global/npc/zarifan.lua @@ -62,31 +62,18 @@ local function creatureSayCallback(npc, creature, type, message) return false end - if MsgContains(message, "magic") and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission70) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission71) < 1 then + if MsgContains(message, "magic") and player:getStorageValue(12902) < 1 then npcHandler:say("...Tell me...the first... magic word.", npc, creature) - npcHandler:setTopic(playerId, 1) - elseif npcHandler:getTopic(playerId) == 1 and MsgContains(message, "friendship") then - npcHandler:say("Yes... YES... friendship... now... second word?", npc, creature) - npcHandler:setTopic(playerId, 2) - elseif npcHandler:getTopic(playerId) == 2 and MsgContains(message, "lives") then - npcHandler:say("Yes... YES... friendship... lives... now third word?", npc, creature) - npcHandler:setTopic(playerId, 3) - elseif npcHandler:getTopic(playerId) == 3 and MsgContains(message, "forever") then - npcHandler:say({ - "Yes... YES... friendship... lives... FOREVER. ...", - "What you seek.... is buried. Beneath the sand. No graves. ...", - "Between a triangle of big stones you must dig... in the eastern caves. ...", - "And say hello... to... my old friend... Omrabas.", - }, npc, creature) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission71, 1) + player:setStorageValue(12902, 1) else npcHandler:say("...continue with your mission...", npc, creature) end end - keywordHandler:addKeyword({ "mission" }, StdModule.say, { npcHandler = npcHandler, text = "..what about {magic}.." }) +keywordHandler:addKeyword({ "friendship" }, StdModule.say, { npcHandler = npcHandler, text = "Yes... YES... friendship... now... second word?" }) +keywordHandler:addKeyword({ "lives" }, StdModule.say, { npcHandler = npcHandler, text = "Yes... YES... friendship... lives... now third word?" }) +keywordHandler:addKeyword({ "forever" }, StdModule.say, { npcHandler = npcHandler, text = "Yes... YES... friendship... lives... FOREVER ... And say hello... to... my old friend... Omrabas. " }) -npcHandler:setMessage(MESSAGE_GREET, "... ... hello...magic... words?") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) diff --git a/data-otservbr-global/npc/zedrulon_the_fallen.lua b/data-otservbr-global/npc/zedrulon_the_fallen.lua index 96974f7bc67..c3708a2df3f 100644 --- a/data-otservbr-global/npc/zedrulon_the_fallen.lua +++ b/data-otservbr-global/npc/zedrulon_the_fallen.lua @@ -69,11 +69,11 @@ keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = end) local stoneKeyword = keywordHandler:addKeyword({ "adventurer stone" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, you want to replace your adventurer's stone for free?" }, function(player) - return player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia) ~= 1 + return player:getStorageValue(Storage.AdventurersGuild.FreeStone.Alia) ~= 1 end) stoneKeyword:addChildKeyword({ "yes" }, StdModule.say, { npcHandler = npcHandler, text = "Here you are. Take care.", reset = true }, nil, function(player) player:addItem(16277, 1) - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.FreeStone.Alia, 1) + player:setStorageValue(Storage.AdventurersGuild.FreeStone.Alia, 1) end) stoneKeyword:addChildKeyword({ "" }, StdModule.say, { npcHandler = npcHandler, text = "No problem.", reset = true }) diff --git a/data-otservbr-global/scripts/actions/adventurers_guild/adventurers_stone.lua b/data-otservbr-global/scripts/actions/adventurers_guild/adventurers_stone.lua index 548c08569c1..ad737b276d3 100644 --- a/data-otservbr-global/scripts/actions/adventurers_guild/adventurers_stone.lua +++ b/data-otservbr-global/scripts/actions/adventurers_guild/adventurers_stone.lua @@ -90,7 +90,7 @@ function adventurersStone.onUse(player, item, fromPosition, target, toPosition, return false end - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.Stone, townId) + player:setStorageValue(Storage.AdventurersGuild.Stone, townId) playerPos:sendMagicEffect(CONST_ME_TELEPORT) local destination = Position(32210, 32300, 6) diff --git a/data-otservbr-global/scripts/actions/adventurers_guild/magic_door.lua b/data-otservbr-global/scripts/actions/adventurers_guild/magic_door.lua index ff415fb9e26..49ee623762e 100644 --- a/data-otservbr-global/scripts/actions/adventurers_guild/magic_door.lua +++ b/data-otservbr-global/scripts/actions/adventurers_guild/magic_door.lua @@ -3,11 +3,11 @@ local magicDoor = Action() function magicDoor.onUse(player, item, fromPosition, target, toPosition, isHotkey) local playerPos, destination = player:getPosition() if item.itemid == 17318 then - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.MagicDoor, 1) + player:setStorageValue(Storage.AdventurersGuild.MagicDoor, 1) destination = Position(32292, 32293, 7) else - if player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.MagicDoor) == 1 then - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.MagicDoor, -1) + if player:getStorageValue(Storage.AdventurersGuild.MagicDoor) == 1 then + player:setStorageValue(Storage.AdventurersGuild.MagicDoor, -1) destination = Position(32199, 32309, 7) elseif playerPos.x == 32293 then destination = Position(32297, 32293, 7) diff --git a/data-otservbr-global/scripts/actions/bosses_levers/mazoran.lua b/data-otservbr-global/scripts/actions/bosses_levers/mazoran.lua new file mode 100644 index 00000000000..b43f674af30 --- /dev/null +++ b/data-otservbr-global/scripts/actions/bosses_levers/mazoran.lua @@ -0,0 +1,24 @@ +local config = { + boss = { + name = "Mazoran", + position = Position(33584, 32689, 14), + }, + + timeToDefeat = 30 * 60, + playerPositions = { + { pos = Position(33593, 32644, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33593, 32645, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33593, 32646, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33593, 32647, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33593, 32648, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, + }, + specPos = { + from = Position(33570, 32677, 14), + to = Position(33597, 32700, 14), + }, + exit = Position(33319, 32318, 13), +} + +local lever = BossLever(config) +lever:uid(1025) +lever:register() diff --git a/data-otservbr-global/scripts/actions/bosses_levers/plagirath.lua b/data-otservbr-global/scripts/actions/bosses_levers/plagirath.lua new file mode 100644 index 00000000000..65207dae0b4 --- /dev/null +++ b/data-otservbr-global/scripts/actions/bosses_levers/plagirath.lua @@ -0,0 +1,24 @@ +local config = { + boss = { + name = "Plagirath", + position = Position(33172, 31501, 13), + }, + + timeToDefeat = 30 * 60, + playerPositions = { + { pos = Position(33229, 31500, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33229, 31501, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33229, 31502, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33229, 31503, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33229, 31504, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, + }, + specPos = { + from = Position(33159, 31488, 13), + to = Position(33190, 31515, 13), + }, + exit = Position(33319, 32318, 13), +} + +local lever = BossLever(config) +lever:uid(1022) +lever:register() diff --git a/data-otservbr-global/scripts/actions/bosses_levers/ragiaz.lua b/data-otservbr-global/scripts/actions/bosses_levers/ragiaz.lua new file mode 100644 index 00000000000..4fc83e29aa0 --- /dev/null +++ b/data-otservbr-global/scripts/actions/bosses_levers/ragiaz.lua @@ -0,0 +1,30 @@ +local config = { + boss = { + name = "Ragiaz", + position = Position(33481, 32334, 13), + }, + + timeToDefeat = 30 * 60, + playerPositions = { + { pos = Position(33456, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33457, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33458, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33459, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33460, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, + }, + monsters = { + { name = "Death Dragon", pos = Position(33476, 32331, 13) }, + { name = "Death Dragon", pos = Position(33476, 32340, 13) }, + { name = "Death Dragon", pos = Position(33487, 32340, 13) }, + { name = "Death Dragon", pos = Position(33488, 32331, 13) }, + }, + specPos = { + from = Position(33468, 32319, 13), + to = Position(33495, 32347, 13), + }, + exit = Position(33319, 32318, 13), +} + +local lever = BossLever(config) +lever:uid(1023) +lever:register() diff --git a/data-otservbr-global/scripts/actions/bosses_levers/razzagorn.lua b/data-otservbr-global/scripts/actions/bosses_levers/razzagorn.lua new file mode 100644 index 00000000000..6e6f9348b87 --- /dev/null +++ b/data-otservbr-global/scripts/actions/bosses_levers/razzagorn.lua @@ -0,0 +1,24 @@ +local config = { + boss = { + name = "Razzagorn", + position = Position(33422, 32467, 14), + }, + + timeToDefeat = 30 * 60, + playerPositions = { + { pos = Position(33386, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33387, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33388, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33389, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(33390, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, + }, + specPos = { + from = Position(33407, 32453, 14), + to = Position(33439, 32481, 14), + }, + exit = Position(33319, 32318, 13), +} + +local lever = BossLever(config) +lever:uid(1024) +lever:register() diff --git a/data-otservbr-global/scripts/actions/bosses_levers/shulgrax.lua b/data-otservbr-global/scripts/actions/bosses_levers/shulgrax.lua new file mode 100644 index 00000000000..2a2305bfd52 --- /dev/null +++ b/data-otservbr-global/scripts/actions/bosses_levers/shulgrax.lua @@ -0,0 +1,24 @@ +local config = { + boss = { + name = "Shulgrax", + position = Position(33485, 32786, 13), + }, + + timeToDefeat = 30 * 60, + playerPositions = { + { pos = Position(33434, 32785, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33434, 32786, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33434, 32787, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33434, 32788, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, + { pos = Position(33434, 32789, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, + }, + specPos = { + from = Position(33474, 32775, 13), + to = Position(33496, 32798, 13), + }, + exit = Position(33319, 32318, 13), +} + +local lever = BossLever(config) +lever:uid(1028) +lever:register() diff --git a/data-otservbr-global/scripts/actions/bosses_levers/tarbaz.lua b/data-otservbr-global/scripts/actions/bosses_levers/tarbaz.lua new file mode 100644 index 00000000000..13cdb5766f8 --- /dev/null +++ b/data-otservbr-global/scripts/actions/bosses_levers/tarbaz.lua @@ -0,0 +1,24 @@ +local config = { + boss = { + name = "Tarbaz", + position = Position(33459, 32844, 11), + }, + + timeToDefeat = 30 * 60, + playerPositions = { + { pos = Position(33418, 32849, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, + { pos = Position(33418, 32850, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, + { pos = Position(33418, 32851, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, + { pos = Position(33418, 32852, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, + { pos = Position(33418, 32853, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, + }, + specPos = { + from = Position(33447, 32832, 11), + to = Position(33473, 32856, 11), + }, + exit = Position(33319, 32318, 13), +} + +local lever = BossLever(config) +lever:uid(1027) +lever:register() diff --git a/data-otservbr-global/scripts/actions/bosses_levers/zamulosh.lua b/data-otservbr-global/scripts/actions/bosses_levers/zamulosh.lua new file mode 100644 index 00000000000..94c7d59c0b2 --- /dev/null +++ b/data-otservbr-global/scripts/actions/bosses_levers/zamulosh.lua @@ -0,0 +1,33 @@ +local config = { + boss = { + name = "Zamulosh", + position = Position(33643, 32756, 11), + }, + + timeToDefeat = 30 * 60, + playerPositions = { + { pos = Position(33680, 32741, 11), teleport = Position(33644, 32760, 11), effect = CONST_ME_TELEPORT }, + { pos = Position(33680, 32742, 11), teleport = Position(33644, 32760, 11), effect = CONST_ME_TELEPORT }, + { pos = Position(33680, 32743, 11), teleport = Position(33644, 32760, 11), effect = CONST_ME_TELEPORT }, + { pos = Position(33680, 32744, 11), teleport = Position(33644, 32760, 11), effect = CONST_ME_TELEPORT }, + { pos = Position(33680, 32745, 11), teleport = Position(33644, 32760, 11), effect = CONST_ME_TELEPORT }, + }, + specPos = { + from = Position(33632, 32747, 11), + to = Position(33654, 32765, 11), + }, + exit = Position(33319, 32318, 13), +} + +local zamuloshSummons = { + Position(33642, 32756, 11), + Position(33642, 32756, 11), + Position(33642, 32756, 11), + Position(33644, 32756, 11), + Position(33644, 32756, 11), + Position(33644, 32756, 11), +} + +local lever = BossLever(config) +lever:uid(1026) +lever:register() diff --git a/data-otservbr-global/scripts/actions/object/moonlight_crystals.lua b/data-otservbr-global/scripts/actions/object/moonlight_crystals.lua index e045cd294f2..e8dbf007312 100644 --- a/data-otservbr-global/scripts/actions/object/moonlight_crystals.lua +++ b/data-otservbr-global/scripts/actions/object/moonlight_crystals.lua @@ -7,23 +7,23 @@ function moonlightCrystals.onUse(player, item, fromPosition, target, toPosition, item:remove(1) return true elseif target.itemid == 22062 then - if (player:getStorageValue(Storage.Quest.U10_80.GrimvaleQuest.WereHelmetEnchant) == 0) or (player:getStorageValue(Storage.Quest.U10_80.GrimvaleQuest.WereHelmetEnchant) == 1) then + if (player:getStorageValue(Storage.Grimvale.WereHelmetEnchant) == 0) or (player:getStorageValue(Storage.Grimvale.WereHelmetEnchant) == 1) then target:remove() -- Magic level helmet player:addItem(24783, 1) item:remove(1) - elseif player:getStorageValue(Storage.Quest.U10_80.GrimvaleQuest.WereHelmetEnchant) == 2 then + elseif player:getStorageValue(Storage.Grimvale.WereHelmetEnchant) == 2 then target:remove() -- Paladin helmet player:addItem(22132, 1) item:remove(1) - elseif player:getStorageValue(Storage.Quest.U10_80.GrimvaleQuest.WereHelmetEnchant) == 3 then + elseif player:getStorageValue(Storage.Grimvale.WereHelmetEnchant) == 3 then target:remove() -- Knight club player:addItem(22128, 1) item:remove(1) - elseif player:getStorageValue(Storage.Quest.U10_80.GrimvaleQuest.WereHelmetEnchant) == 4 then + elseif player:getStorageValue(Storage.Grimvale.WereHelmetEnchant) == 4 then target:remove() -- Knight axe player:addItem(22130, 1) item:remove(1) - elseif player:getStorageValue(Storage.Quest.U10_80.GrimvaleQuest.WereHelmetEnchant) == 5 then + elseif player:getStorageValue(Storage.Grimvale.WereHelmetEnchant) == 5 then target:remove() -- Knight sword player:addItem(22129, 1) item:remove(1) diff --git a/data-otservbr-global/scripts/actions/other/construction_kits.lua b/data-otservbr-global/scripts/actions/other/construction_kits.lua index 20571165f92..1af8967cf27 100644 --- a/data-otservbr-global/scripts/actions/other/construction_kits.lua +++ b/data-otservbr-global/scripts/actions/other/construction_kits.lua @@ -62,31 +62,31 @@ local jackToTheFuture_Kits = { itemId = 2374, kitMessage = "The red cushioned chair looks quite comfy in that corner.", jackSay = "Jack: Yeah uhm... impressive chair. Now would you please remove it? Thanks.", - storage = Storage.Quest.U8_7.JackFutureQuest.Furniture01, + storage = Storage.TibiaTales.JackFutureQuest.Furniture01, }, [2797] = { itemId = 2979, kitMessage = "A globe like this should be in every household.", jackSay = "Jack: What the... what do I need a 'globe' for? Take this away.", - storage = Storage.Quest.U8_7.JackFutureQuest.Furniture02, + storage = Storage.TibiaTales.JackFutureQuest.Furniture02, }, [2799] = { itemId = 3485, kitMessage = "The telescope just looks like it was the one thing missing from this room.", jackSay = "Jack: Nice, a... what is this actually?", - storage = Storage.Quest.U8_7.JackFutureQuest.Furniture03, + storage = Storage.TibiaTales.JackFutureQuest.Furniture03, }, [2800] = { itemId = 2998, kitMessage = "What a cute horse - and just the right thing to place into this cute room.", jackSay = "Jack: A rocking horse? What's wrong with you.", - storage = Storage.Quest.U8_7.JackFutureQuest.Furniture04, + storage = Storage.TibiaTales.JackFutureQuest.Furniture04, }, [2805] = { itemId = 2904, kitMessage = "There seems to be no better place for this amphora than right here.", jackSay = "Jack: Trying to get rid of your junk in my house? Do I look like I need such a... 'vase'?", - storage = Storage.Quest.U8_7.JackFutureQuest.Furniture05, + storage = Storage.TibiaTales.JackFutureQuest.Furniture05, }, } @@ -99,7 +99,7 @@ local constructionKit = Action() function constructionKit.onUse(player, item, fromPosition, target, toPosition, isHotkey) if player:getPosition():isInRange(jackToTheFuture_House.beginPos, jackToTheFuture_House.finalPos) then - if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) == 3 then + if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) == 3 then local setting = jackToTheFuture_Kits[item.itemid] if setting then if player:getStorageValue(setting.storage) < 1 then diff --git a/data-otservbr-global/scripts/actions/other/destroy.lua b/data-otservbr-global/scripts/actions/other/destroy.lua index 2767044644e..2898b400e0d 100644 --- a/data-otservbr-global/scripts/actions/other/destroy.lua +++ b/data-otservbr-global/scripts/actions/other/destroy.lua @@ -25,7 +25,7 @@ function destroy.onUse(player, item, fromPosition, target, toPosition, isHotkey) if toPosition == Position(scimitarPos.x, scimitarPos.y, scimitarPos.z) then local scimitarPlaced = Tile(scimitarPos):getItemById(placedSimitarItemId) if not scimitarPlaced then - if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.AritosTask) >= 0 then + if player:getStorageValue(Storage.TibiaTales.AritosTask) >= 0 then item:remove() Game.createItem(placedSimitarItemId, 1, scimitarPos) addEvent(removeEntrance, 1 * 60 * 1000) diff --git a/data-otservbr-global/scripts/actions/other/gems.lua b/data-otservbr-global/scripts/actions/other/gems.lua index e56ea30e896..19441552c2c 100644 --- a/data-otservbr-global/scripts/actions/other/gems.lua +++ b/data-otservbr-global/scripts/actions/other/gems.lua @@ -34,10 +34,10 @@ local shrine = { local lionsRock = { [25006] = { - itemId = 21441, + itemId = 21442, itemPos = { x = 33069, y = 32298, z = 9 }, - storage = Storage.Quest.U10_70.LionsRock.Questline, - value = 6, + storage = Storage.LionsRock.Questline, + value = 9, item = 3030, fieldId = 2123, message = "You place the ruby on the small socket. A red flame begins to burn.", @@ -46,8 +46,8 @@ local lionsRock = { [25007] = { itemId = 21442, itemPos = { x = 33069, y = 32302, z = 9 }, - storage = Storage.Quest.U10_70.LionsRock.Questline, - value = 7, + storage = Storage.LionsRock.Questline, + value = 9, item = 3029, fieldId = 21463, message = "You place the sapphire on the small socket. A blue flame begins to burn.", @@ -56,8 +56,8 @@ local lionsRock = { [25008] = { itemId = 21440, itemPos = { x = 33077, y = 32302, z = 9 }, - storage = Storage.Quest.U10_70.LionsRock.Questline, - value = 8, + storage = Storage.LionsRock.Questline, + value = 9, item = 3033, fieldId = 7465, message = "You place the amethyst on the small socket. A violet flame begins to burn.", @@ -66,7 +66,7 @@ local lionsRock = { [25009] = { itemId = 21437, itemPos = { x = 33077, y = 32298, z = 9 }, - storage = Storage.Quest.U10_70.LionsRock.Questline, + storage = Storage.LionsRock.Questline, value = 9, item = 9057, fieldId = 21465, @@ -76,13 +76,7 @@ local lionsRock = { } local gems = Action() - function gems.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local questStorage = player:getStorageValue(Storage.Quest.U10_70.LionsRock.Questline) - if questStorage == 10 or questStorage == 11 then - player:setStorageValue(Storage.Quest.U10_70.LionsRock.Questline, 6) - end - -- Small emerald for Kilmaresh quest -- see data\scripts\quests\kilmaresh\1-fafnars-wrath\7-four-masks.lua if item.itemid == 3032 and target.uid == 40032 and player:getStorageValue(Storage.Kilmaresh.Sixth.Favor) >= 1 and not testFlag(player:getStorageValue(Storage.Kilmaresh.Sixth.FourMasks), 4) then @@ -133,7 +127,7 @@ function gems.onUse(player, item, fromPosition, target, toPosition, isHotkey) local function lionsRockFieldReset() local gemSpot = Tile(setting.itemPos):getItemById(setting.fieldId) if gemSpot then - player:setStorageValue(Storage.Quest.U10_70.LionsRock.LionsRockFields, player:getStorageValue(Storage.Quest.U10_70.LionsRock.LionsRockFields) - 1) + Game.setStorageValue(GlobalStorage.LionsRockFields, Game.getStorageValue(GlobalStorage.LionsRockFields) - 1) gemSpot:remove() return true end @@ -141,7 +135,7 @@ function gems.onUse(player, item, fromPosition, target, toPosition, isHotkey) -- Check if all lion's fields are set local function checkLionsRockFields(storage) - if player:getStorageValue(Storage.Quest.U10_70.LionsRock.LionsRockFields) == 3 then + if Game.getStorageValue(GlobalStorage.LionsRockFields) == 3 then local stone = Tile(lionsRockSanctuaryPos):getItemById(lionsRockSanctuaryRockId) if stone then stone:transform(lionsRockSanctuaryFountainId) @@ -158,31 +152,31 @@ function gems.onUse(player, item, fromPosition, target, toPosition, isHotkey) local gemSpot = Tile(itemPos):getItemById(fieldId) if not gemSpot then Game.createItem(fieldId, 1, itemPos) - player:setStorageValue(Storage.Quest.U10_70.LionsRock.LionsRockFields, player:getStorageValue(Storage.Quest.U10_70.LionsRock.LionsRockFields) + 1) + Game.setStorageValue(GlobalStorage.LionsRockFields, Game.getStorageValue(GlobalStorage.LionsRockFields) + 1) checkLionsRockFields(storage) return true end end - if player:getStorageValue(setting.storage) == setting.value then + if player:getStorageValue(setting.storage) >= setting.value then if setting.item == item.itemid then local gemSpot = Tile(setting.itemPos):getItemById(setting.fieldId) if not gemSpot then toPosition:sendMagicEffect(setting.effect) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, setting.message) item:remove(1) - player:setStorageValue(setting.storage, setting.value + 1) addEvent(lionsRockCreateField, 2 * 1000, setting.itemPos, setting.fieldId, setting.storage) addEvent(lionsRockFieldReset, 60 * 1000) return true end end end - return false end for index, value in pairs(shrine) do gems:id(index) end + +gems:id(9057) gems:register() diff --git a/data-otservbr-global/scripts/actions/other/others/quest_system2.lua b/data-otservbr-global/scripts/actions/other/others/quest_system2.lua index a187810b3bc..1fc69647305 100644 --- a/data-otservbr-global/scripts/actions/other/others/quest_system2.lua +++ b/data-otservbr-global/scripts/actions/other/others/quest_system2.lua @@ -9,11 +9,17 @@ local config = { needItem = { itemId = 3231 }, effect = CONST_ME_MAGIC_BLUE, }, + [2286] = { + items = { + { itemId = 3205 }, + }, + storage = Storage.QuestChests.FamilyBrooch, + }, [3018] = { items = { { itemId = 3219 }, }, - storage = Storage.Quest.U7_24.ThePostmanMissions.Mission08, + storage = Storage.Postman.Mission08, formerValue = 1, newValue = 2, }, @@ -60,7 +66,7 @@ local config = { items = { { itemId = 3217 }, }, - storage = Storage.Quest.U7_24.ThePostmanMissions.Mission09, + storage = Storage.Postman.Mission09, formerValue = 1, newValue = 2, }, @@ -68,7 +74,7 @@ local config = { items = { { itemId = 3218 }, }, - storage = Storage.Quest.U7_24.ThePostmanMissions.Mission05, + storage = Storage.Postman.Mission05, formerValue = 1, newValue = 2, }, @@ -92,7 +98,7 @@ local config = { items = { { itemId = 2972, actionId = 3980 }, }, - storage = Storage.Quest.U5_0.DeeperFibulaKey, + storage = Storage.QuestChests.DeeperFibulaKey, }, [9226] = { items = { @@ -292,7 +298,7 @@ The map shows the original floor plan of this mine. You recognise your position (In the lower right corner someone scribbled a note how to use the hoist on the first mine floor.)]], }, }, - storage = Storage.Quest.U8_0.TheIceIslands.FormorgarMinesHoistSkeleton, + storage = Storage.QuestChests.FormorgarMinesHoistSkeleton, }, [14041] = { items = { @@ -351,7 +357,7 @@ the parchment is destroyed. It seems that is was torn by a big paw ...]], }, }, - storage = Storage.Quest.U10_70.LionsRock.OuterSanctum.Skeleton, + storage = Storage.LionsRock.OuterSanctum.Skeleton, }, -- 65203 reservado } diff --git a/data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/actions_ursagrodon.lua b/data-otservbr-global/scripts/actions/other/ursagrodon.lua similarity index 71% rename from data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/actions_ursagrodon.lua rename to data-otservbr-global/scripts/actions/other/ursagrodon.lua index ceebbe1c438..b329d7fb7ce 100644 --- a/data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/actions_ursagrodon.lua +++ b/data-otservbr-global/scripts/actions/other/ursagrodon.lua @@ -3,8 +3,7 @@ local config = { item2 = 20359, item3 = 20360, item4 = 20361, - percentage = 90, - storageKey = Storage.Quest.U10_37.TinderBoxQuestChyllfroest.Obedience, + porcentagem = 30, } local function revertIce(toPosition) @@ -21,23 +20,18 @@ local ursagrodon = Action() function ursagrodon.onUse(player, item, fromPosition, target, toPosition, isHotkey) local rand = math.random(1, 100) - local currentDate = os.date("*t") - - if currentDate.month < 4 or currentDate.month > 5 or (currentDate.month == 5 and currentDate.day > 1) then - return player:sendCancelMessage("This can only be used between 1st of April and 1st of May.") - end if target.itemid == config.item1 or target.itemid == config.item2 or target.itemid == config.item3 then - if player:getStorageValue(config.storageKey) > 0 then + if player:getStorageValue(config.item4) > 0 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You already have the obedience of ursagrodon.") return true end - if rand <= config.percentage then + if rand <= config.porcentagem then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The ice cracked and the frozen creature with it - be more careful next time!") item:remove(1) target:transform(config.item4) - addEvent(revertIce, 600 * 1000, toPosition) + addEvent(revertIce, 600000, toPosition) else if target.itemid == config.item1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You managed to melt about half of the ice blook. Quickly now, it's ice cold here and the ice block could freeze over again.") @@ -46,12 +40,12 @@ function ursagrodon.onUse(player, item, fromPosition, target, toPosition, isHotk player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You managed to melt almost the whole block, only the feet of the creature are still stuck in the ice. Finish the job!") target:transform(config.item3) elseif target.itemid == config.item3 then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The freed ursagrodon look at you with glowing, obedient eyes.") target:transform(config.item4) item:remove(1) player:addMount(38) - player:setStorageValue(config.storageKey, 1) + player:setStorageValue(config.item4, 1) addEvent(revertIce, 600 * 1000, toPosition) + return player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The freed ursagrodon look at you with glowing, obedient eyes.") end end end diff --git a/data-otservbr-global/scripts/actions/tools/skinning.lua b/data-otservbr-global/scripts/actions/tools/skinning.lua index a35929db054..2461dfb7e80 100644 --- a/data-otservbr-global/scripts/actions/tools/skinning.lua +++ b/data-otservbr-global/scripts/actions/tools/skinning.lua @@ -150,13 +150,13 @@ function skinning.onUse(player, item, fromPosition, target, toPosition, isHotkey player:say("You carve a solid bowl of the chunk of wood.", TALKTYPE_MONSTER_SAY) return true -- An Interest In Botany Quest - elseif target.itemid == 10735 and player:getItemCount(11699) > 0 and player:getStorageValue(Storage.Quest.U8_6.AnInterestInBotany.Questline) == 1 then + elseif target.itemid == 10735 and player:getItemCount(11699) > 0 and player:getStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline) == 1 then player:say("The plant feels cold but dry and very soft. You streak the plant gently with your knife and put a fragment in the almanach.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.Quest.U8_6.AnInterestInBotany.Questline, 2) + player:setStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline, 2) return true - elseif target.itemid == 10697 and player:getItemCount(11699) > 0 and player:getStorageValue(Storage.Quest.U8_6.AnInterestInBotany.Questline) == 2 then + elseif target.itemid == 10697 and player:getItemCount(11699) > 0 and player:getStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline) == 2 then player:say("You cut a leaf from a branch and put it in the almanach. It smells strangely sweet and awfully bitter at the same time.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.Quest.U8_6.AnInterestInBotany.Questline, 3) + player:setStorageValue(Storage.TibiaTales.AnInterestInBotany.Questline, 3) return true elseif target.itemid == 8181 and player:getStorageValue(789100) <= 1 then player:say("You got Neutral matter.", TALKTYPE_MONSTER_SAY) diff --git a/data-otservbr-global/scripts/actions/valuables/random_items.lua b/data-otservbr-global/scripts/actions/valuables/random_items.lua index 9e62086a972..f91dcf4f15a 100644 --- a/data-otservbr-global/scripts/actions/valuables/random_items.lua +++ b/data-otservbr-global/scripts/actions/valuables/random_items.lua @@ -103,24 +103,6 @@ local config = { }, effect = CONST_ME_BUBBLES, }, - [21333] = { -- Belongings of a Deceased (The Ravager) - Dark Trails Quest - chances = { - { from = 1, to = 2500, itemId = 3043 }, -- crystal coins - { from = 2501, to = 5000, itemId = 3041 }, -- blue gem - { from = 5001, to = 7500, itemId = 3038 }, -- green gem - { from = 7501, to = 10001, itemId = 3331 }, -- ravager's axe - }, - effect = CONST_ME_MAGIC_GREEN, - }, - [21334] = { -- Belongings of a Deceased (Death Priest Shargon) - Dark Trails Quest - chances = { - { from = 1, to = 2500, itemId = 3043 }, -- crystal coins - { from = 2501, to = 5000, itemId = 5741 }, -- skull helmet - { from = 5001, to = 7500, itemId = 3324 }, -- skull staff - { from = 7501, to = 10001, itemId = 9056 }, -- black skull - }, - effect = CONST_ME_MAGIC_GREEN, - }, [22763] = { -- shaggy ogre bag chances = { { from = 1, to = 1440, itemId = 22187, count = 5 }, diff --git a/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua b/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua index bf0e1430635..8b87cb8a336 100644 --- a/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua +++ b/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua @@ -238,8 +238,8 @@ local questTable = { { storage = Storage.Quest.U8_1.TheTravellingTrader.Mission06, storageValue = 2 }, { storage = Storage.Quest.U8_1.TheTravellingTrader.Mission07, storageValue = 1 }, { storage = Storage.Quest.U8_0.BarbarianArena.QuestLogGreenhorn, storageValue = 1 }, - { storage = Storage.Quest.U8_1.TibiaTales.DefaultStart, storageValue = 1 }, - { storage = Storage.Quest.U8_1.TibiaTales.ToAppeaseTheMightyQuest, storageValue = 1 }, + { storage = Storage.TibiaTales.DefaultStart, storageValue = 1 }, + { storage = Storage.TibiaTales.ToAppeaseTheMightyQuest, storageValue = 1 }, { storage = 12450, storageValue = 6 }, { storage = 12330, storageValue = 1 }, { storage = 12332, storageValue = 13 }, @@ -263,8 +263,8 @@ local questTable = { { storage = Storage.Quest.U7_6.TheApeCity.Started, storageValue = 1 }, { storage = Storage.Quest.U7_6.TheApeCity.Questline, storageValue = 18 }, { storage = Storage.BanutaSecretTunnel.DeeperBanutaShortcut, storageValue = 1 }, - { storage = Storage.Quest.U10_50.OramondQuest.QuestLine, storageValue = 1 }, - { storage = Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Mission, storageValue = 3000 }, + { storage = Storage.Oramond.QuestLine, storageValue = 1 }, + { storage = Storage.Oramond.MissionToTakeRoots, storageValue = 3000 }, { storage = Storage.DangerousDepths.Questline, storageValue = 1 }, { storage = Storage.DangerousDepths.Dwarves.Home, storageValue = 2 }, { storage = Storage.DangerousDepths.Dwarves.Subterranean, storageValue = 2 }, @@ -276,10 +276,10 @@ local questTable = { { storage = Storage.Quest.U11_40.ThreatenedDreams.QuestLine, storageValue = 1 }, { storage = Storage.Quest.U11_40.ThreatenedDreams.Mission01[1], storageValue = 16 }, { storage = Storage.Quest.U11_40.ThreatenedDreams.Mission02.KroazurAccess, storageValue = 1 }, - { storage = Storage.Quest.U9_80.AdventurersGuild.QuestLine, storageValue = 1 }, - { storage = Storage.Quest.U10_80.TheGreatDragonHunt.WarriorSkeleton, storageValue = 1 }, - { storage = Storage.Quest.U10_80.TheGreatDragonHunt.WarriorSkeleton, storageValue = 2 }, - { storage = Storage.Quest.U10_80.TheLostBrotherQuest, storageValue = 3 }, + { storage = Storage.AdventurersGuild.QuestLine, storageValue = 1 }, + { storage = Storage.AdventurersGuild.GreatDragonHunt.WarriorSkeleton, storageValue = 1 }, + { storage = Storage.AdventurersGuild.GreatDragonHunt.WarriorSkeleton, storageValue = 2 }, + { storage = Storage.AdventurersGuild.TheLostBrother, storageValue = 3 }, { storage = Storage.Quest.U10_55.Dawnport.Questline, storageValue = 1 }, { storage = Storage.Quest.U10_55.Dawnport.GoMain, storageValue = 1 }, { storage = Storage.ForgottenKnowledge.AccessDeath, storageValue = 1 }, @@ -288,8 +288,8 @@ local questTable = { { storage = Storage.ForgottenKnowledge.AccessFire, storageValue = 1 }, { storage = Storage.ForgottenKnowledge.AccessIce, storageValue = 1 }, { storage = Storage.ForgottenKnowledge.AccessGolden, storageValue = 1 }, - { storage = Storage.Quest.U10_80.GrimvaleQuest.AncientFeudDoors, storageValue = 1 }, - { storage = Storage.Quest.U10_80.GrimvaleQuest.AncientFeudShortcut, storageValue = 1 }, + { storage = Storage.Quest.U10_80.Grimvale.AncientFeudDoors, storageValue = 1 }, + { storage = Storage.Quest.U10_80.Grimvale.AncientFeudShortcut, storageValue = 1 }, { storage = Storage.Kilmaresh.AccessDoor, storageValue = 1 }, { storage = Storage.Kilmaresh.CatacombDoors, storageValue = 1 }, { storage = Storage.Quest.U12_00.TheDreamCourts.AccessDoors, storageValue = 1 }, @@ -310,12 +310,12 @@ local questTable = { { storage = Storage.CultsOfTibia.Misguided.AccessDoor, storageValue = 1 }, { storage = Storage.CultsOfTibia.FinalBoss.AccessDoor, storageValue = 1 }, - { storage = Storage.Quest.U10_90.FerumbrasAscension.FirstDoor, storageValue = 1 }, - { storage = Storage.Quest.U10_90.FerumbrasAscension.MonsterDoor, storageValue = 1 }, - { storage = Storage.Quest.U10_90.FerumbrasAscension.TarbazDoor, storageValue = 1 }, - { storage = Storage.Quest.U10_90.FerumbrasAscension.HabitatsAccess, storageValue = 1 }, - { storage = Storage.Quest.U10_90.FerumbrasAscension.TheLordOfTheLiceAccess, storageValue = 1 }, - { storage = Storage.Quest.U10_90.FerumbrasAscension.Statue, storageValue = 1 }, + { storage = Storage.FerumbrasAscension.FirstDoor, storageValue = 1 }, + { storage = Storage.FerumbrasAscension.MonsterDoor, storageValue = 1 }, + { storage = Storage.FerumbrasAscension.TarbazDoor, storageValue = 1 }, + { storage = Storage.FerumbrasAscension.HabitatsAccess, storageValue = 1 }, + { storage = Storage.FerumbrasAscension.TheLordOfTheLiceAccess, storageValue = 1 }, + { storage = Storage.FerumbrasAscension.Statue, storageValue = 1 }, { storage = Storage.Quest.U12_00.TheDreamCourts.AndrewDoor, storageValue = 1 }, @@ -361,7 +361,7 @@ local questTable = { -- Assassin Outfit quests { storage = Storage.Quest.U8_5.KillingInTheNameOf.BudrikMinos, storageValue = 0 }, - { storage = Storage.Quest.U8_1.ToOutfoxAFoxQuest.Questline, storageValue = 2 }, + { storage = Storage.TibiaTales.ToOutfoxAFoxQuest.Questline, storageValue = 2 }, -- Hunter Outfit quests { storage = Storage.Quest.U7_8.HunterOutfits.HunterMusicSheet01, storageValue = 1 }, @@ -383,10 +383,10 @@ local questTable = { { storage = Storage.Quest.U8_2.TheHuntForTheSeaSerpent.QuestLine, storageValue = 2 }, --The White Raven Monastery - { storage = Storage.Quest.U7_24.TheWhiteRavenMonastery.QuestLog, storageValue = 1 }, - { storage = Storage.Quest.U7_24.TheWhiteRavenMonastery.Passage, storageValue = 1 }, - { storage = Storage.Quest.U7_24.TheWhiteRavenMonastery.Diary, storageValue = 2 }, - { storage = Storage.Quest.U7_24.TheWhiteRavenMonastery.Door, storageValue = 1 }, + { storage = Storage.WhiteRavenMonastery.QuestLog, storageValue = 1 }, + { storage = Storage.WhiteRavenMonastery.Passage, storageValue = 1 }, + { storage = Storage.WhiteRavenMonastery.Diary, storageValue = 2 }, + { storage = Storage.WhiteRavenMonastery.Door, storageValue = 1 }, } -- from Position: (33201, 31762, 1) diff --git a/data-otservbr-global/scripts/quests/roshamuul_quest/creaturescripts_lower_roshamuul.lua b/data-otservbr-global/scripts/creaturescripts/monster/lower_roshamuul.lua similarity index 100% rename from data-otservbr-global/scripts/quests/roshamuul_quest/creaturescripts_lower_roshamuul.lua rename to data-otservbr-global/scripts/creaturescripts/monster/lower_roshamuul.lua diff --git a/data-otservbr-global/scripts/globalevents/others/map_attributes_loader.lua b/data-otservbr-global/scripts/globalevents/others/map_attributes_loader.lua index af5b0e80fd7..7000a36bc34 100644 --- a/data-otservbr-global/scripts/globalevents/others/map_attributes_loader.lua +++ b/data-otservbr-global/scripts/globalevents/others/map_attributes_loader.lua @@ -39,8 +39,8 @@ local function resetGlobalStorages() end local function resetFerumbrasAscendantQuestHabitats() - for i = 1, #Storage.Quest.U10_90.FerumbrasAscension.Habitats do - Game.setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats[i], 0) + for i = 1, #GlobalStorage.FerumbrasAscendant.Habitats do + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats[i], 0) end end diff --git a/data-otservbr-global/scripts/lib/register_actions.lua b/data-otservbr-global/scripts/lib/register_actions.lua index ebb77654882..6118f3b837a 100644 --- a/data-otservbr-global/scripts/lib/register_actions.lua +++ b/data-otservbr-global/scripts/lib/register_actions.lua @@ -215,13 +215,27 @@ local cutItems = { -- Ferumbras ascendant ring reward local function addFerumbrasAscendantReward(player, target, toPosition) + local stonePos = Position(32648, 32134, 10) + if toPosition == stonePos then + local tile = Tile(stonePos) + local stone = tile:getItemById(1772) + if stone then + stone:remove(1) + toPosition:sendMagicEffect(CONST_ME_POFF) + addEvent(function() + Game.createItem(1772, 1, stonePos) + end, 20000) + return true + end + end + if target.itemid == 22872 and target.actionid == 53803 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Ring) >= 1 then + if player:getStorageValue(Storage.FerumbrasAscension.Ring) >= 1 then return false end player:addItem(22170, 1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Ring, 1) + player:setStorageValue(Storage.FerumbrasAscension.Ring, 1) end end @@ -250,9 +264,9 @@ function onDestroyItem(player, item, fromPosition, target, toPosition, isHotkey) if math.random(1, 80) <= (watt and watt > 10 and watt or 10) then -- Against The Spider Cult (Spider Eggs) if target.itemid == 233 then - local eggStorage = player:getStorageValue(Storage.Quest.U8_1.TibiaTales.AgainstTheSpiderCult) + local eggStorage = player:getStorageValue(Storage.TibiaTales.AgainstTheSpiderCult) if eggStorage >= 1 and eggStorage < 5 then - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.AgainstTheSpiderCult, math.max(1, eggStorage) + 1) + player:setStorageValue(Storage.TibiaTales.AgainstTheSpiderCult, math.max(1, eggStorage) + 1) end Game.createMonster("Giant Spider", Position(33181, 31869, 12)) @@ -354,27 +368,6 @@ function onUseShovel(player, item, fromPosition, target, toPosition, isHotkey) return true end - local specificPositions = { - { pos = Position(33064, 32435, 10), storage = Storage.Quest.U10_10.TheGravediggerOfDrefia.SmallDragonTears1 }, - { pos = Position(33061, 32428, 10), storage = Storage.Quest.U10_10.TheGravediggerOfDrefia.SmallDragonTears2 }, - { pos = Position(33065, 32423, 10), storage = Storage.Quest.U10_10.TheGravediggerOfDrefia.SmallDragonTears3 }, - } - for i = 1, #specificPositions do - local data = specificPositions[i] - if toPosition == data.pos and player:getStorageValue(data.storage) < 1 then - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission14) == 1 then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You found a small dragon tear. You pocket it quickly.") - player:getPosition():sendMagicEffect(CONST_ME_POFF) - player:addItem(19084, 1) - player:setStorageValue(data.storage, 1) - return true - else - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You find nothing of interest.") - return true - end - end - end - if table.contains(holes, target.itemid) then target:transform(target.itemid + 1) target:decay() @@ -410,17 +403,17 @@ function onUseShovel(player, item, fromPosition, target, toPosition, isHotkey) Position(32070, 32266, 7):sendMagicEffect(CONST_ME_TUTORIALSQUARE) target:transform(594) addEvent(revertItem, 30 * 1000, toPosition, 594, 7749) - elseif target.actionid == 4654 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission49) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission50) < 1 then + elseif target.actionid == 4654 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission49) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission50) < 1 then -- Gravedigger Quest player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You found a piece of the scroll. You pocket it quickly.") player:getPosition():sendMagicEffect(CONST_ME_POFF) player:addItem(18933, 1) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission50, 1) - elseif target.actionid == 4668 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission71) == 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission50, 1) + elseif target.actionid == 4668 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission69) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission70) < 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "A torn scroll piece emerges. Probably gnawed off by rats.") player:getPosition():sendMagicEffect(CONST_ME_POFF) player:addItem(18933, 1) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission71, 2) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission70, 1) elseif target.actionid == 50118 then local wagonItem = Tile(Position(32717, 31492, 11)):getItemById(7131) if wagonItem then @@ -465,7 +458,7 @@ function onUseShovel(player, item, fromPosition, target, toPosition, isHotkey) end end elseif target.itemid == 103 and target.actionid == 4205 then - if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit) ~= 1 then + if player:getStorageValue(Storage.TibiaTales.IntoTheBonePit) ~= 1 then return false end @@ -588,7 +581,7 @@ function onUsePick(player, item, fromPosition, target, toPosition, isHotkey) end elseif target.itemid == 22075 then -- Grimvale quest - if player:getStorageValue(Storage.Quest.U10_80.GrimvaleQuest.SilverVein) < os.time() then + if player:getStorageValue(Storage.Grimvale.SilverVein) < os.time() then local chance = math.random(1, 10) if chance >= 5 then player:sendTextMessage( @@ -606,7 +599,7 @@ function onUsePick(player, item, fromPosition, target, toPosition, isHotkey) target:transform(4464) addEvent(revertItem, 10 * 60 * 1000, toPosition, 4464, 22075) end - player:setStorageValue(Storage.Quest.U10_80.GrimvaleQuest.SilverVein, os.time() + 2 * 60) + player:setStorageValue(Storage.Grimvale.SilverVein, os.time() + 2 * 60) else player:sendTextMessage( MESSAGE_EVENT_ADVANCE, @@ -708,7 +701,7 @@ function onUsePick(player, item, fromPosition, target, toPosition, isHotkey) end elseif target.actionid == 50127 then -- Pythius The Rotten (Firewalker Boots) - if player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.FirewalkerBoots) == 1 then + if player:getStorageValue(Storage.QuestChests.FirewalkerBoots) == 1 then return false end target:remove(1) @@ -745,35 +738,37 @@ function onUsePick(player, item, fromPosition, target, toPosition, isHotkey) target:decay() elseif target.itemid == 2071 then -- Jack to the Future Quest - if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.Statue) ~= 1 then + if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Statue) ~= 1 then return false end if toPosition == Position(33277, 31754, 7) then - if player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.Statue) == 1 then + if player:getStorageValue(Storage.TibiaTales.JackFutureQuest.Statue) == 1 then target:transform(2066) toPosition:sendMagicEffect(CONST_ME_POFF) player:addItem(10426, 1) - player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.Statue, 2) - player:setStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine, player:getStorageValue(Storage.Quest.U8_7.JackFutureQuest.QuestLine) + 1) + player:setStorageValue(Storage.TibiaTales.JackFutureQuest.Statue, 2) + player:setStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine, player:getStorageValue(Storage.TibiaTales.JackFutureQuest.QuestLine) + 1) addEvent(revertItem, 2 * 60 * 1000, { x = 33277, y = 31754, z = 7 }, 2066, 2071) end end - elseif target.itemid == 20135 then - local chance = math.random(100) - if chance > 50 then + else + return false + end + if (target ~= nil) and target:isItem() and (target:getId() == 20135) then + --Lower Roshamuul + if math.random(100) > 50 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Crushing the stone produces some fine gravel.") target:transform(20133) + target:decay() else Game.createMonster("Frazzlemaw", toPosition) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Crushing the stone yields nothing but slightly finer, yet still unusable rubber.") target:transform(20134) + target:decay() end - target:decay() - else - return false + return true end - return true end @@ -852,8 +847,8 @@ function onUseCrowbar(player, item, fromPosition, target, toPosition, isHotkey) elseif target.actionid == 100 then if target.itemid == 3501 then -- Postman quest - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission02) == 1 then - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission02, 2) + if player:getStorageValue(Storage.Postman.Mission02) == 1 then + player:setStorageValue(Storage.Postman.Mission02, 2) toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) end elseif target:getActionId() == 40041 and target.itemid == 4848 then diff --git a/data-otservbr-global/scripts/movements/teleport/adventurers_guild.lua b/data-otservbr-global/scripts/movements/teleport/adventurers_guild.lua index 46a657f6f15..95d408b82d3 100644 --- a/data-otservbr-global/scripts/movements/teleport/adventurers_guild.lua +++ b/data-otservbr-global/scripts/movements/teleport/adventurers_guild.lua @@ -6,10 +6,10 @@ function adventurersGuild.onStepIn(creature, item, position, fromPosition) return true end - local townId = player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.Stone) + local townId = player:getStorageValue(Storage.AdventurersGuild.Stone) local destination = townId ~= -1 and Town(townId):getTemplePosition() or player:getTown():getTemplePosition() - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.Stone, -1) + player:setStorageValue(Storage.AdventurersGuild.Stone, -1) player:teleportTo(destination) position:sendMagicEffect(CONST_ME_TELEPORT) destination:sendMagicEffect(CONST_ME_TELEPORT) diff --git a/data-otservbr-global/scripts/movements/teleport/lower_roshamuul.lua b/data-otservbr-global/scripts/movements/teleport/lower_roshamuul.lua new file mode 100644 index 00000000000..7d4535efbf1 --- /dev/null +++ b/data-otservbr-global/scripts/movements/teleport/lower_roshamuul.lua @@ -0,0 +1,28 @@ +local roshamuulCaves = { + Position(33560, 32523, 8), + Position(33554, 32543, 8), + Position(33573, 32545, 8), + Position(33543, 32560, 8), + Position(33579, 32565, 8), + Position(33527, 32597, 8), +} + +local lowerRoshamuul = MoveEvent() + +function lowerRoshamuul.onStepIn(creature, item, position, fromPosition) + if not creature:isPlayer() then + return false + end + + if item:getId() == 20122 then + creature:teleportTo(Position(33551, 32556, 7)) + else + creature:teleportTo(roshamuulCaves[math.random(#roshamuulCaves)]) + end + return true +end + +lowerRoshamuul:type("stepin") +lowerRoshamuul:id(20122) +lowerRoshamuul:aid(1500) +lowerRoshamuul:register() diff --git a/data-otservbr-global/scripts/quests/the_great_dragon_hunt_quest/actions_treasure.lua b/data-otservbr-global/scripts/quests/adventurers_guild/actions_treasure.lua similarity index 63% rename from data-otservbr-global/scripts/quests/the_great_dragon_hunt_quest/actions_treasure.lua rename to data-otservbr-global/scripts/quests/adventurers_guild/actions_treasure.lua index 4ca6498491a..ed866a5e893 100644 --- a/data-otservbr-global/scripts/quests/the_great_dragon_hunt_quest/actions_treasure.lua +++ b/data-otservbr-global/scripts/quests/adventurers_guild/actions_treasure.lua @@ -15,26 +15,30 @@ local items = { } local adventurersTreasure = Action() - function adventurersTreasure.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.Quest.U10_80.TheGreatDragonHunt.DragonCounter) >= 50 then + if player:getStorageValue(Storage.AdventurersGuild.GreatDragonHunt.DragonCounter) >= 50 then local treasure = items[math.random(#items)] - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "It is impossible to take along all of the treasures here. But you pick out " .. treasure.description) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "It is impossible to take along all of the treasures here. Buy you pick out " .. treasure.description) for _, item in ipairs(treasure.items) do player:addItem(item.id, item.count) end - player:setStorageValue(Storage.Quest.U10_80.TheGreatDragonHunt.DragonCounter, 0) + -- reset dragon counter + player:setStorageValue(Storage.AdventurersGuild.GreatDragonHunt.DragonCounter, 0) + + -- hoard of the dragon achievement + local achievement = getAchievementInfoByName("Hoard of the Dragon") + if not achievement or player:hasAchievement(achievement.id) then + return true + end - local times = player:getStorageValue(Storage.Quest.U10_80.TheGreatDragonHunt.Achievement) - if times < 0 then - times = 0 + local times = player:getStorageValue(achievement.actionStorage) + if times < 10 then + player:setStorageValue(achievement.actionStorage, times + 1) end - times = times + 1 - player:setStorageValue(Storage.Quest.U10_80.TheGreatDragonHunt.Achievement, times) - if times == 10 then - player:addAchievement("Hoard of the Dragon") + if times + 1 == 10 then + player:addAchievement(achievement.id) end else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You try to pick a treasure, but you hear further dragons approaching. You should kill some more before picking out something.") diff --git a/data-otservbr-global/scripts/quests/the_great_dragon_hunt_quest/actions_warrior_skeleton.lua b/data-otservbr-global/scripts/quests/adventurers_guild/actions_warrior_skeleton.lua similarity index 52% rename from data-otservbr-global/scripts/quests/the_great_dragon_hunt_quest/actions_warrior_skeleton.lua rename to data-otservbr-global/scripts/quests/adventurers_guild/actions_warrior_skeleton.lua index d4ed30749a5..73a5d3f8acb 100644 --- a/data-otservbr-global/scripts/quests/the_great_dragon_hunt_quest/actions_warrior_skeleton.lua +++ b/data-otservbr-global/scripts/quests/adventurers_guild/actions_warrior_skeleton.lua @@ -1,16 +1,15 @@ local adventurersWarriorSkeleton = Action() - function adventurersWarriorSkeleton.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.Quest.U10_80.TheGreatDragonHunt.WarriorSkeleton) < 1 then + if player:getStorageValue(Storage.AdventurersGuild.GreatDragonHunt.WarriorSkeleton) < 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have discovered a deceased warrior's skeleton. It seems he tried to hunt the dragons around here - and failed.") - player:addItem(5882, 1) + player:addItem(5882, 1) -- red dragon scale - if player:getStorageValue(Storage.Quest.U9_80.AdventurersGuild.QuestLine) < 1 then - player:setStorageValue(Storage.Quest.U9_80.AdventurersGuild.QuestLine, 1) + if player:getStorageValue(Storage.AdventurersGuild.QuestLine) < 1 then + player:setStorageValue(Storage.AdventurersGuild.QuestLine, 1) end - player:setStorageValue(Storage.Quest.U10_80.TheGreatDragonHunt.WarriorSkeleton, 1) - player:setStorageValue(Storage.Quest.U10_80.TheGreatDragonHunt.DragonCounter, 0) + player:setStorageValue(Storage.AdventurersGuild.GreatDragonHunt.WarriorSkeleton, 1) + player:setStorageValue(Storage.AdventurersGuild.GreatDragonHunt.DragonCounter, 0) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The dead explorer is empty.") end diff --git a/data-otservbr-global/scripts/quests/the_great_dragon_hunt_quest/creaturescripts_the_great_dragon_hunt.lua b/data-otservbr-global/scripts/quests/adventurers_guild/creaturescripts_the_great_dragon_hunt.lua similarity index 84% rename from data-otservbr-global/scripts/quests/the_great_dragon_hunt_quest/creaturescripts_the_great_dragon_hunt.lua rename to data-otservbr-global/scripts/quests/adventurers_guild/creaturescripts_the_great_dragon_hunt.lua index 31d88658b3f..75cd6f92366 100644 --- a/data-otservbr-global/scripts/quests/the_great_dragon_hunt_quest/creaturescripts_the_great_dragon_hunt.lua +++ b/data-otservbr-global/scripts/quests/adventurers_guild/creaturescripts_the_great_dragon_hunt.lua @@ -21,7 +21,7 @@ function adventurersGuildHunt.onDeath(creature, _corpse, _lastHitKiller, mostDam return true end onDeathForParty(creature, mostDamageKiller, function(creature, player) - player:setStorageValue(Storage.Quest.U10_80.TheGreatDragonHunt.DragonCounter, math.max(0, player:getStorageValue(Storage.Quest.U10_80.TheGreatDragonHunt.DragonCounter)) + 1) + player:setStorageValue(Storage.AdventurersGuild.GreatDragonHunt.DragonCounter, math.max(0, player:getStorageValue(Storage.AdventurersGuild.GreatDragonHunt.DragonCounter)) + 1) end) return true end diff --git a/data-otservbr-global/scripts/quests/dark_trails/actions_corpse.lua b/data-otservbr-global/scripts/quests/dark_trails/actions_corpse.lua index 89c8028a3db..0e320c18445 100644 --- a/data-otservbr-global/scripts/quests/dark_trails/actions_corpse.lua +++ b/data-otservbr-global/scripts/quests/dark_trails/actions_corpse.lua @@ -1,10 +1,10 @@ local darkCorpse = Action() function darkCorpse.onUse(player) - if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission14) == 1 then + if player:getStorageValue(Storage.DarkTrails.Mission14) == 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Quandon has been murdered! You should report to Sholley about it!.") - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission14, 2) - elseif player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission14) == 2 then + player:setStorageValue(Storage.DarkTrails.Mission14, 2) + elseif player:getStorageValue(Storage.DarkTrails.Mission14) == 2 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "This is empty!") end return true diff --git a/data-otservbr-global/scripts/quests/dark_trails/actions_lever_death_priest_shargon.lua b/data-otservbr-global/scripts/quests/dark_trails/actions_lever_death_priest_shargon.lua index 8114701729e..b107ae2e449 100644 --- a/data-otservbr-global/scripts/quests/dark_trails/actions_lever_death_priest_shargon.lua +++ b/data-otservbr-global/scripts/quests/dark_trails/actions_lever_death_priest_shargon.lua @@ -1,75 +1,63 @@ local setting = { - centerRoom = Position(33487, 32111, 9), + centerRoom = { x = 33487, y = 32111, z = 9 }, range = 10, playerPositions = { - Position(33583, 31844, 10), - Position(33584, 31844, 10), - Position(33585, 31844, 10), - Position(33586, 31844, 10), - Position(33587, 31844, 10), + { x = 33583, y = 31844, z = 10 }, + { x = 33584, y = 31844, z = 10 }, + { x = 33585, y = 31844, z = 10 }, + { x = 33586, y = 31844, z = 10 }, + { x = 33587, y = 31844, z = 10 }, }, newPositions = { - Position(33486, 32120, 9), - Position(33486, 32120, 9), - Position(33486, 32120, 9), - Position(33486, 32120, 9), - Position(33486, 32120, 9), + { x = 33486, y = 32120, z = 9 }, + { x = 33486, y = 32120, z = 9 }, + { x = 33486, y = 32120, z = 9 }, + { x = 33486, y = 32120, z = 9 }, + { x = 33486, y = 32120, z = 9 }, }, minionPositions = { - Position(33482, 32105, 9), - Position(33484, 32105, 9), - Position(33484, 32107, 9), - Position(33481, 32109, 9), - Position(33482, 32111, 9), - Position(33488, 32106, 9), - Position(33490, 32106, 9), - Position(33492, 32109, 9), - Position(33492, 32112, 9), - Position(33490, 32112, 9), + { x = 33482, y = 32105, z = 9 }, + { x = 33484, y = 32105, z = 9 }, + { x = 33484, y = 32107, z = 9 }, + { x = 33481, y = 32109, z = 9 }, + { x = 33482, y = 32111, z = 9 }, + { x = 33488, y = 32106, z = 9 }, + { x = 33490, y = 32106, z = 9 }, + { x = 33492, y = 32109, z = 9 }, + { x = 33492, y = 32112, z = 9 }, + { x = 33490, y = 32112, z = 9 }, }, } local leverDeathPriestShargon = Action() - function leverDeathPriestShargon.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 2772 then if roomIsOccupied(setting.centerRoom, false, setting.range, setting.range) then - player:say("Someone is fighting against the boss! You need to wait awhile.", TALKTYPE_MONSTER_SAY) + player:say("Someone is fighting against the boss! You need wait awhile.", TALKTYPE_MONSTER_SAY) return true end - local storePlayers = {} + local storePlayers, playerTile = {} for i = 1, #setting.playerPositions do - local tile = Tile(setting.playerPositions[i]) - local creature = tile and tile:getTopCreature() + local creature = Tile(setting.playerPositions[i]):getTopCreature() if not creature or not creature:isPlayer() then - player:sendCancelMessage("You need 5 players to fight with Death Priest Shargon.") + player:sendCancelMessage("You need 5 of players to fight with Death Priest Shargon.") return true end - storePlayers[#storePlayers + 1] = creature - end - - if #storePlayers < 5 then - player:sendCancelMessage("You need exactly 5 players to fight with Death Priest Shargon.") - return true + storePlayers[#storePlayers + 1] = playerTile end - for i = 1, #setting.minionPositions do - Game.createMonster("greater death minion", setting.minionPositions[i]) + for i = 1, #config.minionPositions do + Game.createMonster("greater death minion", config.minionPositions[i]) end - Game.createMonster("death priest shargon", Position(33487, 32108, 9)) + Game.createMonster("death priest shargon", { x = 33487, y = 32108, z = 9 }) + local players for i = 1, #storePlayers do - local playerToTeleport = storePlayers[i] - local oldPosition = setting.playerPositions[i] - local newPosition = setting.newPositions[i] - if Tile(oldPosition) then - oldPosition:sendMagicEffect(CONST_ME_POFF) - end - if newPosition then - playerToTeleport:teleportTo(newPosition) - newPosition:sendMagicEffect(CONST_ME_ENERGYAREA) - end + players = storePlayers[i] + config.playerPositions[i]:sendMagicEffect(CONST_ME_POFF) + players:teleportTo(config.newPositions[i]) + config.newPositions[i]:sendMagicEffect(CONST_ME_ENERGYAREA) end item:transform(2773) elseif item.itemid == 2773 then diff --git a/data-otservbr-global/scripts/quests/dark_trails/actions_lever_the_ravager.lua b/data-otservbr-global/scripts/quests/dark_trails/actions_lever_the_ravager.lua index 1f26e32afc5..1e76aef4112 100644 --- a/data-otservbr-global/scripts/quests/dark_trails/actions_lever_the_ravager.lua +++ b/data-otservbr-global/scripts/quests/dark_trails/actions_lever_the_ravager.lua @@ -8,10 +8,10 @@ local setting = { Position(33420, 32102, 10), }, newPositions = { - Position(33487, 32087, 8), - Position(33487, 32087, 8), - Position(33487, 32087, 8), - Position(33487, 32087, 8), + Position(33487, 32088, 8), + Position(33487, 32088, 8), + Position(33487, 32088, 8), + Position(33487, 32088, 8), }, canopicJarPositions = { Position(33486, 32081, 8), @@ -22,33 +22,33 @@ local setting = { } local leverTheRavager = Action() - function leverTheRavager.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 2772 then if roomIsOccupied(setting.centerRoom, false, setting.range, setting.range) then - player:say("Someone is fighting against the boss! You need to wait awhile.", TALKTYPE_MONSTER_SAY) + player:say("Someone is fighting against the boss! You need wait awhile.", TALKTYPE_MONSTER_SAY) return true end - local storePlayers = {} + local storePlayers, playerTile = {} for i = 1, #setting.playerPositions do local creature = Tile(setting.playerPositions[i]):getTopCreature() if not creature or not creature:isPlayer() then - player:sendCancelMessage("You need 4 players to fight with The Ravager.") + player:sendCancelMessage("You need 4 of players to fight with The Ravager.") return true end - storePlayers[#storePlayers + 1] = creature + storePlayers[#storePlayers + 1] = playerTile end for i = 1, #setting.canopicJarPositions do Game.createMonster("greater canopic jar", setting.canopicJarPositions[i]) end - Game.createMonster("the ravager", { x = 33487, y = 32079, z = 8 }) + Game.createMonster("the ravager", { x = 33487, y = 32108, z = 9 }) + local players for i = 1, #storePlayers do - local playerToTeleport = storePlayers[i] + players = storePlayers[i] setting.playerPositions[i]:sendMagicEffect(CONST_ME_POFF) - playerToTeleport:teleportTo(setting.newPositions[i]) + players:teleportTo(setting.newPositions[i]) setting.newPositions[i]:sendMagicEffect(CONST_ME_ENERGYAREA) end item:transform(2773) diff --git a/data-otservbr-global/scripts/quests/dark_trails/creaturescripts_kill_death_priest_shargon.lua b/data-otservbr-global/scripts/quests/dark_trails/creaturescripts_kill_death_priest_shargon.lua index 445e6299f37..1cd88f5243c 100644 --- a/data-otservbr-global/scripts/quests/dark_trails/creaturescripts_kill_death_priest_shargon.lua +++ b/data-otservbr-global/scripts/quests/dark_trails/creaturescripts_kill_death_priest_shargon.lua @@ -1,10 +1,10 @@ local config = { teleportId = 1949, - teleportPosition = Position(33487, 32101, 9), + teleportPosition = { x = 33487, y = 32101, z = 9 }, destinationPosition = Position(33489, 32088, 9), - storageKey = Storage.Quest.U10_50.DarkTrails.Mission18, + storageKey = Storage.DarkTrails.Mission18, getStorageValue = 1, - setStorageValue = 1, + setStorageValue = 2, } local function removeTeleport(position) @@ -15,8 +15,7 @@ local function removeTeleport(position) end end -local deathPriestShargon = CreatureEvent("DeathPriestShargonDeath") - +local deathPriestShargon = CreatureEvent("ShargonDeath") function deathPriestShargon.onDeath(creature, _corpse, _lastHitKiller, mostDamageKiller) local position = creature:getPosition() position:sendMagicEffect(CONST_ME_TELEPORT) @@ -24,7 +23,6 @@ function deathPriestShargon.onDeath(creature, _corpse, _lastHitKiller, mostDamag if item:isTeleport() then item:setDestination(config.destinationPosition) end - onDeathForParty(creature, mostDamageKiller, function(creature, player) if config.storageKey ~= nil then if player:getStorageValue(config.storageKey) < config.getStorageValue then @@ -32,7 +30,6 @@ function deathPriestShargon.onDeath(creature, _corpse, _lastHitKiller, mostDamag end end end) - addEvent(removeTeleport, 5 * 60 * 1000, position) return true end diff --git a/data-otservbr-global/scripts/quests/dark_trails/creaturescripts_kill_the_ravager.lua b/data-otservbr-global/scripts/quests/dark_trails/creaturescripts_kill_the_ravager.lua index 9a88a6673dc..f11bfa41efe 100644 --- a/data-otservbr-global/scripts/quests/dark_trails/creaturescripts_kill_the_ravager.lua +++ b/data-otservbr-global/scripts/quests/dark_trails/creaturescripts_kill_the_ravager.lua @@ -15,8 +15,8 @@ function theRavager.onDeath(creature) item:setDestination(Position(33459, 32083, 8)) end onDeathForDamagingPlayers(creature, function(creature, player) - if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission11) < 1 then - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission11, 1) + if player:getStorageValue(Storage.DarkTrails.Mission11) < 1 then + player:setStorageValue(Storage.DarkTrails.Mission11, 1) end end) addEvent(removeTeleport, 5 * 60 * 1000, position) diff --git a/data-otservbr-global/scripts/quests/dark_trails/movements_necrometer_tile_access.lua b/data-otservbr-global/scripts/quests/dark_trails/movements_necrometer_tile_access.lua index c057adb33f4..f8868485128 100644 --- a/data-otservbr-global/scripts/quests/dark_trails/movements_necrometer_tile_access.lua +++ b/data-otservbr-global/scripts/quests/dark_trails/movements_necrometer_tile_access.lua @@ -6,14 +6,13 @@ function necrometerTileAccess.onStepIn(creature, item, position, fromPosition) return false end - if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission04) == 1 and player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission05) < 1 then + if player:getStorageValue(Storage.DarkTrails.Mission04) == 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "A strange ritual has taken place here. Report about it to the Gloot Brothers.") - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission05, 1) -- Start mission 5 - elseif player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission10) >= 1 and player:getItemCount(21124) > 0 then + player:setStorageValue(Storage.DarkTrails.Mission05, 1) -- Start mission 5 + elseif player:getStorageValue(Storage.DarkTrails.Mission10) >= 1 and player:getItemCount(21124) > 0 then player:teleportTo({ x = 33419, y = 32106, z = 10 }) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The necrometer reveals a hidden passage!") end - return true end diff --git a/data-otservbr-global/scripts/quests/fathers_burden/actions_corpse.lua b/data-otservbr-global/scripts/quests/fathers_burden/actions_corpse.lua index 7ba64c68470..9178cc1e376 100644 --- a/data-otservbr-global/scripts/quests/fathers_burden/actions_corpse.lua +++ b/data-otservbr-global/scripts/quests/fathers_burden/actions_corpse.lua @@ -1,6 +1,6 @@ local config = { - [11589] = { itemId = 11550, storage = Storage.Quest.U8_6.AFathersBurden.Corpse.Scale, text = "Glitterscale's scale." }, - [11590] = { itemId = 11548, storage = Storage.Quest.U8_6.AFathersBurden.Corpse.Sinew, text = "Heoni's sinew" }, + [11589] = { itemId = 11550, storage = Storage.FathersBurden.Corpse.Scale, text = "Glitterscale's scale." }, + [11590] = { itemId = 11548, storage = Storage.FathersBurden.Corpse.Sinew, text = "Heoni's sinew" }, } local fatherCorpse = Action() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_bone_flute.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_bone_flute.lua similarity index 86% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_bone_flute.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_bone_flute.lua index 33b9604a7d2..def47cc49ca 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_bone_flute.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_bone_flute.lua @@ -3,7 +3,7 @@ function ferumbrasAscendantBoneFlute.onUse(player, item, fromPosition, target, t if target:isItem() then return false end - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BoneFlute) >= 1 then + if player:getStorageValue(Storage.FerumbrasAscension.BoneFlute) >= 1 then return false end if not target:getPosition():isInRange(Position(33477, 32775, 11), Position(33493, 32781, 11)) then @@ -13,7 +13,7 @@ function ferumbrasAscendantBoneFlute.onUse(player, item, fromPosition, target, t local rand = math.random(100) if rand <= 5 then player:say("Finally this one reveal your spirit animal.", TALKTYPE_MONSTER_SAY) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BoneFlute, 1) + player:setStorageValue(Storage.FerumbrasAscension.BoneFlute, 1) item:remove() return true elseif rand > 5 and rand <= 50 then diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_bone_flute_wall.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_bone_flute_wall.lua similarity index 70% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_bone_flute_wall.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_bone_flute_wall.lua index f69efcb46a7..53350db1f4f 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_bone_flute_wall.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_bone_flute_wall.lua @@ -1,8 +1,8 @@ local ferumbrasAscendantBoneWall = Action() function ferumbrasAscendantBoneWall.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BoneFluteWall) < 1 then + if player:getStorageValue(Storage.FerumbrasAscension.BoneFluteWall) < 1 then player:addItem(22254) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BoneFluteWall, 1) + player:setStorageValue(Storage.FerumbrasAscension.BoneFluteWall, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a bone flute.") toPosition:sendMagicEffect(CONST_ME_THUNDER) else diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_boots_of_homecoming.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_boots_of_homecoming.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_boots_of_homecoming.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_boots_of_homecoming.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_color_levers.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_color_levers.lua similarity index 57% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_color_levers.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_color_levers.lua index 6ef051008a9..8607f99b4cb 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_color_levers.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_color_levers.lua @@ -1,37 +1,37 @@ local ferumbrasAscendantColorLevers = Action() function ferumbrasAscendantColorLevers.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FirstDoor) >= 1 then + if player:getStorageValue(Storage.FerumbrasAscension.FirstDoor) >= 1 then item:transform(item.itemid == 9125 and 9126 or 9125) return true end if item.actionid == 54381 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ColorLever) < 1 then + if player:getStorageValue(Storage.FerumbrasAscension.ColorLever) < 1 then local rand = math.random(4) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ColorLever, rand) + player:setStorageValue(Storage.FerumbrasAscension.ColorLever, rand) player:getPosition():sendMagicEffect(166 + rand) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You choose the colour of decay.") end elseif item.actionid == 54382 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ColorLever) == 1 then - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FirstDoor, 1) + if player:getStorageValue(Storage.FerumbrasAscension.ColorLever) == 1 then + player:setStorageValue(Storage.FerumbrasAscension.FirstDoor, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You select the correct colour.") toPosition:sendMagicEffect(CONST_ME_POFF) end elseif item.actionid == 54383 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ColorLever) == 3 then - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FirstDoor, 1) + if player:getStorageValue(Storage.FerumbrasAscension.ColorLever) == 3 then + player:setStorageValue(Storage.FerumbrasAscension.FirstDoor, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You select the correct colour.") toPosition:sendMagicEffect(CONST_ME_POFF) end elseif item.actionid == 54384 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ColorLever) == 4 then - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FirstDoor, 1) + if player:getStorageValue(Storage.FerumbrasAscension.ColorLever) == 4 then + player:setStorageValue(Storage.FerumbrasAscension.FirstDoor, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You select the correct colour.") toPosition:sendMagicEffect(CONST_ME_POFF) end elseif item.actionid == 54385 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ColorLever) == 2 then - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FirstDoor, 1) + if player:getStorageValue(Storage.FerumbrasAscension.ColorLever) == 2 then + player:setStorageValue(Storage.FerumbrasAscension.FirstDoor, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You select the correct colour.") toPosition:sendMagicEffect(CONST_ME_POFF) end diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ferumbras_amulet.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_ferumbras_amulet.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ferumbras_amulet.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_ferumbras_amulet.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_ferumbras_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_ferumbras_lever.lua new file mode 100644 index 00000000000..c259b308c0b --- /dev/null +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_ferumbras_lever.lua @@ -0,0 +1,86 @@ +local config = AscendingFerumbrasConfig + +local function clearFerumbrasRoom() + local spectators = Game.getSpectators(config.bossPos, false, false, 20, 20, 20, 20) + for i = 1, #spectators do + local spectator = spectators[i] + if spectator:isPlayer() then + spectator:teleportTo(config.exitPosition) + spectator:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + spectator:say("Time out! You were teleported out by strange forces.", TALKTYPE_MONSTER_SAY) + elseif spectator:isMonster() then + spectator:remove() + end + end +end + +local ferumbrasAscendantLever = Action() +function ferumbrasAscendantLever.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if item.itemid == 8911 then + if player:getPosition() ~= config.leverPos then + return true + end + + for x = 33269, 33271 do + for y = 31477, 31481 do + local playerTile = Tile(Position(x, y, 14)):getTopCreature() + if playerTile and playerTile:isPlayer() then + if not playerTile:canFightBoss("Ferumbras Mortal Shell") then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format("You or a member in your team have to wait %d days to face Ferumbras again!", config.days)) + item:transform(8912) + return true + end + end + end + end + + local specs, spec = Game.getSpectators(config.centerRoom, false, false, 15, 15, 15, 15) + for i = 1, #specs do + spec = specs[i] + if spec:isPlayer() then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "There's someone fighting with Ferumbras.") + return true + end + end + + local spectators = Game.getSpectators(config.bossPos, false, false, 15, 15, 15, 15) + for i = 1, #spectators do + local spectator = spectators[i] + if spectator:isMonster() then + spectator:remove() + end + end + + for x = 33269, 33271 do + for y = 31477, 31481 do + local playerTile = Tile(Position(x, y, 14)):getTopCreature() + if playerTile and playerTile:isPlayer() then + playerTile:getPosition():sendMagicEffect(CONST_ME_POFF) + playerTile:teleportTo(config.newPos) + playerTile:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + playerTile:setBossCooldown("Ferumbras Mortal Shell", os.time() + config.days * 24 * 3600) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format("You have %d minutes to kill and loot this boss. Otherwise you will lose that chance and will be kicked out.", config.time)) + addEvent(clearFerumbrasRoom, config.time * 60 * 1000, player:getId(), config.centerRoom, config.range, config.range, config.exitPosition) + + for b = 1, config.maxSummon do + local xrand = math.random(-10, 10) + local yrand = math.random(-10, 10) + local position = Position(33392 + xrand, 31473 + yrand, 14) + if not Game.createMonster(config.summonName, position) then + logger.error("[ferumbrasAscendantLever.onUse] can't create monster {}, on position {}", config.summonName, position:toString()) + end + end + + Game.createMonster(config.bossName, config.bossPos, true, true) + item:transform(8912) + end + end + end + elseif item.itemid == 8912 then + item:transform(8911) + return true + end +end + +ferumbrasAscendantLever:uid(1021) +ferumbrasAscendantLever:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ferumbras_mana_keg.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_ferumbras_mana_keg.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ferumbras_mana_keg.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_ferumbras_mana_keg.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_flower_puzzle_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_flower_puzzle_lever.lua similarity index 88% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_flower_puzzle_lever.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_flower_puzzle_lever.lua index d09178c1504..6cc91c9d45a 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_flower_puzzle_lever.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_flower_puzzle_lever.lua @@ -25,7 +25,6 @@ local function revertItem(position, itemId, transformId) end local ferumbrasAscendantFlowerPuzzle = Action() - function ferumbrasAscendantFlowerPuzzle.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9110 then for a = 1, #flowerPositions do @@ -35,13 +34,11 @@ function ferumbrasAscendantFlowerPuzzle.onUse(player, item, fromPosition, target return true end end - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FlowerPuzzleTimer) >= 1 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.FlowerPuzzleTimer) >= 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The portal still activated.") else - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FlowerPuzzleTimer, 1) - addEvent(function() - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FlowerPuzzleTimer, 0) - end, 30 * 1000) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.FlowerPuzzleTimer, 1) + addEvent(Game.setStorageValue, 30 * 1000, GlobalStorage.FerumbrasAscendant.FlowerPuzzleTimer, 0) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "A portal forms as two beams of a strange construction dividing this room move towards each other.") for x = 33475, 33479 do local pos = Position(x, 32698, 14) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_grave_flower.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_grave_flower.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_grave_flower.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_grave_flower.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_corrupted.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_corrupted.lua similarity index 94% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_corrupted.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_corrupted.lua index 1977a0e8826..74a93dbf5a9 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_corrupted.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_corrupted.lua @@ -340,7 +340,6 @@ local corrupted = { { itemid = 417, position = Position(33614, 32721, 12) }, { itemid = 417, position = Position(33611, 32712, 12) }, } - local function transformArea() for x = 33611, 33625 do for y = 32712, 32727 do @@ -375,23 +374,10 @@ local function transformArea() return true end -local function resetFerumbrasAscendantHabitats(player) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Roshamuul, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Grass, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Mushroom, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Desert, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Venom, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Ice, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Corrupted, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Dimension, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, 0) -end - local ferumbrasAscendantHabitatCorrupted = Action() - function ferumbrasAscendantHabitatCorrupted.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Corrupted) >= 1 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Corrupted) >= 1 then player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end @@ -403,12 +389,12 @@ function ferumbrasAscendantHabitatCorrupted.onUse(player, item, fromPosition, ta basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) basin:transform(22196) end - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Corrupted, 1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) + 1) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Corrupted, 1) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats, Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The room transforms into a completely different landscape.") - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) >= 7 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) >= 8 then addEvent(function() - resetFerumbrasAscendantHabitats(player) + resetFerumbrasAscendantHabitats() local basin = Tile(Position(33628, 32721, 12)):getItemById(22196) if basin then basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_desert.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_desert.lua similarity index 93% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_desert.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_desert.lua index d6ebadee7fe..e5b8e22f150 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_desert.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_desert.lua @@ -354,23 +354,10 @@ local function transformArea() return true end -local function resetFerumbrasAscendantHabitats(player) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Roshamuul, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Grass, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Mushroom, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Desert, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Venom, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Ice, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Corrupted, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Dimension, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, 0) -end - local ferumbrasAscendantHabitatDesert = Action() - function ferumbrasAscendantHabitatDesert.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Desert) >= 1 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Desert) >= 1 then player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end @@ -382,12 +369,12 @@ function ferumbrasAscendantHabitatDesert.onUse(player, item, fromPosition, targe basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) basin:transform(22196) end - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Desert, 1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) + 1) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Desert, 1) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats, Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The room transforms into a completely different landscape.") - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) >= 7 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) >= 8 then addEvent(function() - resetFerumbrasAscendantHabitats(player) + resetFerumbrasAscendantHabitats() local basin = Tile(Position(33631, 32685, 12)):getItemById(22196) if basin then basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_dimension.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_dimension.lua similarity index 94% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_dimension.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_dimension.lua index 94884e25a70..1fc14c6646f 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_dimension.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_dimension.lua @@ -390,23 +390,10 @@ local function transformArea() return true end -local function resetFerumbrasAscendantHabitats(player) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Roshamuul, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Grass, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Mushroom, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Desert, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Venom, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Ice, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Corrupted, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Dimension, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, 0) -end - local ferumbrasAscendantHabitatDimension = Action() - function ferumbrasAscendantHabitatDimension.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Dimension) >= 1 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Dimension) >= 1 then player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end @@ -418,12 +405,12 @@ function ferumbrasAscendantHabitatDimension.onUse(player, item, fromPosition, ta basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) basin:transform(22196) end - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Dimension, 1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) + 1) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Dimension, 1) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats, Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The room transforms into a completely different landscape.") - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) >= 7 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) >= 8 then addEvent(function() - resetFerumbrasAscendantHabitats(player) + resetFerumbrasAscendantHabitats() local basin = Tile(Position(33631, 32721, 12)):getItemById(22196) if basin then basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_grass.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_grass.lua similarity index 94% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_grass.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_grass.lua index ce7f6d329ae..293e65844cc 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_grass.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_grass.lua @@ -422,23 +422,10 @@ local function transformArea() return true end -local function resetFerumbrasAscendantHabitats(player) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Roshamuul, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Grass, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Mushroom, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Desert, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Venom, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Ice, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Corrupted, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Dimension, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, 0) -end - local ferumbrasAscendantHabitatGlass = Action() - function ferumbrasAscendantHabitatGlass.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Grass) >= 1 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Grass) >= 1 then player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end @@ -450,12 +437,12 @@ function ferumbrasAscendantHabitatGlass.onUse(player, item, fromPosition, target basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) basin:transform(22196) end - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Grass, 1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) + 1) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Grass, 1) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats, Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The room transforms into a completely different landscape.") - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) >= 7 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) >= 8 then addEvent(function() - resetFerumbrasAscendantHabitats(player) + resetFerumbrasAscendantHabitats() local basin = Tile(Position(33631, 32667, 12)):getItemById(22196) if basin then basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_ice.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_ice.lua similarity index 95% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_ice.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_ice.lua index 21560098721..b46a984a00e 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_ice.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_ice.lua @@ -437,23 +437,10 @@ local function transformArea() return true end -local function resetFerumbrasAscendantHabitats(player) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Roshamuul, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Grass, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Mushroom, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Desert, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Venom, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Ice, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Corrupted, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Dimension, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, 0) -end - local ferumbrasAscendantHabitatIce = Action() - function ferumbrasAscendantHabitatIce.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Ice) >= 1 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Ice) >= 1 then player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end @@ -465,12 +452,12 @@ function ferumbrasAscendantHabitatIce.onUse(player, item, fromPosition, target, basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) basin:transform(22196) end - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Ice, 1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) + 1) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Ice, 1) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats, Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The room transforms into a completely different landscape.") - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) >= 7 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) >= 8 then addEvent(function() - resetFerumbrasAscendantHabitats(player) + resetFerumbrasAscendantHabitats() local basin = Tile(Position(33631, 32703, 12)):getItemById(22196) if basin then basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_lever.lua similarity index 68% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_lever.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_lever.lua index 653deb4683d..f44bc549603 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_lever.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_lever.lua @@ -1,11 +1,11 @@ local ferumbrasAscendantHabitatLever = Action() function ferumbrasAscendantHabitatLever.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.HabitatsAccess) >= 1 then + if player:getStorageValue(Storage.FerumbrasAscension.HabitatsAccess) >= 1 then return false end if item.itemid == 9125 then - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.HabitatsAccess, 1) + player:setStorageValue(Storage.FerumbrasAscension.HabitatsAccess, 1) item:transform(9126) elseif item.itemid == 9126 then item:transform(9125) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_mushroom.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_mushroom.lua similarity index 94% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_mushroom.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_mushroom.lua index cbcc87dccb5..52b0c9b7ac7 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_mushroom.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_mushroom.lua @@ -390,23 +390,10 @@ local function transformArea() return true end -local function resetFerumbrasAscendantHabitats(player) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Roshamuul, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Grass, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Mushroom, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Desert, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Venom, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Ice, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Corrupted, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Dimension, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, 0) -end - local ferumbrasAscendantHabitatMushroom = Action() - function ferumbrasAscendantHabitatMushroom.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Mushroom) >= 1 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Mushroom) >= 1 then player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end @@ -418,12 +405,12 @@ function ferumbrasAscendantHabitatMushroom.onUse(player, item, fromPosition, tar basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) basin:transform(22196) end - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Mushroom, 1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) + 1) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Mushroom, 1) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats, Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The room transforms into a completely different landscape.") - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) >= 7 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) >= 8 then addEvent(function() - resetFerumbrasAscendantHabitats(player) + resetFerumbrasAscendantHabitats() local basin = Tile(Position(33628, 32685, 12)):getItemById(22196) if basin then basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_roshamuul.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_roshamuul.lua similarity index 95% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_roshamuul.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_roshamuul.lua index a234295469d..42da59f0e93 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_roshamuul.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_roshamuul.lua @@ -463,23 +463,10 @@ local function transformArea() return true end -local function resetFerumbrasAscendantHabitats(player) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Roshamuul, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Grass, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Mushroom, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Desert, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Venom, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Ice, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Corrupted, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Dimension, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, 0) -end - local ferumbrasAscendantHabitatRoshamuul = Action() - function ferumbrasAscendantHabitatRoshamuul.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Roshamuul) >= 1 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Roshamuul) >= 1 then player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end @@ -491,12 +478,12 @@ function ferumbrasAscendantHabitatRoshamuul.onUse(player, item, fromPosition, ta basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) basin:transform(22196) end - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Roshamuul, 1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) + 1) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Roshamuul, 1) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats, Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The room transforms into a completely different landscape.") - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) >= 7 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) >= 8 then addEvent(function() - resetFerumbrasAscendantHabitats(player) + resetFerumbrasAscendantHabitats() local basin = Tile(Position(33628, 32667, 12)):getItemById(22196) if basin then basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_venom.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_venom.lua similarity index 95% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_venom.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_venom.lua index 0b0f6783f96..2649da5694e 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_habitat_venom.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_habitat_venom.lua @@ -413,7 +413,6 @@ local venom = { { itemid = 1059, position = Position(33625, 32709, 12) }, { itemid = 417, position = Position(33625, 32709, 12) }, } - local function transformArea() for x = 33611, 33625 do for y = 32694, 32709 do @@ -446,23 +445,10 @@ local function transformArea() return true end -local function resetFerumbrasAscendantHabitats(player) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Roshamuul, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Grass, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Mushroom, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Desert, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Venom, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Ice, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Corrupted, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Dimension, -1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, 0) -end - local ferumbrasAscendantHabitatVenom = Action() - function ferumbrasAscendantHabitatVenom.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9125 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Venom) >= 1 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Venom) >= 1 then player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY) return true end @@ -474,14 +460,14 @@ function ferumbrasAscendantHabitatVenom.onUse(player, item, fromPosition, target basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) basin:transform(22196) end - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.Venom, 1) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) + 1) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Venom, 1) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats, Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The room transforms into a completely different landscape.") - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) >= 7 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) >= 8 then addEvent(function() local basin = Tile(Position(33628, 32703, 12)):getItemById(22196) if basin then - resetFerumbrasAscendantHabitats(player) + resetFerumbrasAscendantHabitats() basin:getPosition():sendMagicEffect(CONST_ME_ENERGYAREA) basin:transform(11114) end diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_first.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_first.lua similarity index 64% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_first.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_first.lua index bfda089df67..000dfdf9f6d 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_first.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_first.lua @@ -1,11 +1,11 @@ local ferumbrasAscendantLeverFirst = Action() function ferumbrasAscendantLeverFirst.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active) < 1 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active) < 1 then return false end if item.itemid == 9110 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done) >= 1 then - local spectators = player:getSpectators(item:getPosition(), false, false, 9, 9, 6, 6) + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done) >= 1 then + local spectators = Game.getSpectators(item:getPosition(), false, false, 9, 9, 6, 6) for i = 1, #spectators do if spectators[i]:isPlayer() then local spec = spectators[i] @@ -17,8 +17,8 @@ function ferumbrasAscendantLeverFirst.onUse(player, item, fromPosition, target, revertStorages() return true end - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done) < 1 then - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done, 2) + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done) < 1 then + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done, 2) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Something clicked.") end item:transform(9111) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_four.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_four.lua similarity index 58% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_four.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_four.lua index f267c9cd1e7..637384e90b5 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_four.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_four.lua @@ -1,11 +1,11 @@ local ferumbrasAscendantLevelFour = Action() function ferumbrasAscendantLevelFour.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active) < 1 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active) < 1 then return false end if item.itemid == 9110 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done) < 4 then - local spectators = player:getSpectators(item:getPosition(), false, false, 9, 9, 6, 6) + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done) < 4 then + local spectators = Game.getSpectators(item:getPosition(), false, false, 9, 9, 6, 6) for i = 1, #spectators do if spectators[i]:isPlayer() then local spec = spectators[i] @@ -16,8 +16,8 @@ function ferumbrasAscendantLevelFour.onUse(player, item, fromPosition, target, t revertStorages() return true end - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done) >= 4 then - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done, 4) + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done) >= 4 then + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done, 4) end item:transform(9111) elseif item.itemid == 9111 then diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_second.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_second.lua similarity index 65% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_second.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_second.lua index af68fb44b42..d1c93f33aeb 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_second.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_second.lua @@ -1,11 +1,11 @@ local ferumbrasAscendantLeverSecond = Action() function ferumbrasAscendantLeverSecond.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active) < 1 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active) < 1 then return false end if item.itemid == 9110 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done) < 2 then - local spectators = player:getSpectators(item:getPosition(), false, false, 9, 9, 6, 6) + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done) < 2 then + local spectators = Game.getSpectators(item:getPosition(), false, false, 9, 9, 6, 6) for i = 1, #spectators do if spectators[i]:isPlayer() then local spec = spectators[i] @@ -17,8 +17,8 @@ function ferumbrasAscendantLeverSecond.onUse(player, item, fromPosition, target, revertStorages() return true end - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done) >= 2 then - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done, 3) + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done) >= 2 then + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done, 3) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Something clicked.") end item:transform(9111) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_third.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_third.lua similarity index 62% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_third.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_third.lua index 2626112bd8e..589abecd5a1 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_lever_third.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_lever_third.lua @@ -1,11 +1,11 @@ local ferumbrasAscendantLeverThird = Action() function ferumbrasAscendantLeverThird.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active) < 1 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active) < 1 then return false end if item.itemid == 9110 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done) < 3 then - local spectators = player:getSpectators(item:getPosition(), false, false, 9, 9, 6, 6) + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done) < 3 then + local spectators = Game.getSpectators(item:getPosition(), false, false, 9, 9, 6, 6) for i = 1, #spectators do if spectators[i]:isPlayer() then local spec = spectators[i] @@ -17,17 +17,17 @@ function ferumbrasAscendantLeverThird.onUse(player, item, fromPosition, target, revertStorages() return true end - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Four) == 4 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Four) == 4 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "A booming sound almost deafens you. From somewhere deep within you hear a whisper: 'Blood...'") end - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Four) == 5 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Four) == 5 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "A booming sound almost deafens you. From somewhere deep within you hear a whisper: 'Grass...'") end - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Four) == 6 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Four) == 6 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "A booming sound almost deafens you. From somewhere deep within you hear a whisper: 'Ice...'") end - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done) >= 3 then - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done, 4) + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done) >= 3 then + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done, 4) end item:transform(9111) elseif item.itemid == 9111 then diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_mysterious_scroll.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_mysterious_scroll.lua similarity index 72% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_mysterious_scroll.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_mysterious_scroll.lua index bcef5b7b69c..88bf697f907 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_mysterious_scroll.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_mysterious_scroll.lua @@ -1,12 +1,12 @@ local ferumbrasAscendantMysterious = Action() function ferumbrasAscendantMysterious.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.RiftRunner) >= 1 or player:getStorageValue(24850) < 1 then + if player:getStorageValue(Storage.FerumbrasAscension.RiftRunner) >= 1 or player:getStorageValue(24850) < 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "No matter how often you try, you cannot decipher anything.") return true else player:addMount(87) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You decipher something! You get a rift runner to accompany you on your journey.") - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.RiftRunner, 1) + player:setStorageValue(Storage.FerumbrasAscension.RiftRunner, 1) end return true end diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_purified_soul.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_purified_soul.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_purified_soul.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_purified_soul.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_rat_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_rat_lever.lua new file mode 100644 index 00000000000..6c9a1b7db9c --- /dev/null +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_rat_lever.lua @@ -0,0 +1,49 @@ +local config = { + centerRoom = Position(33215, 31456, 12), + BossPosition = Position(33220, 31460, 12), + playerPositions = { + Position(33197, 31475, 11), + Position(33198, 31475, 11), + Position(33199, 31475, 11), + Position(33200, 31475, 11), + Position(33201, 31475, 11), + }, + newPosition = Position(33215, 31470, 12), +} + +local ferumbrasAscendantRatLever = Action() +function ferumbrasAscendantRatLever.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if item.itemid == 8911 then + if player:getPosition() ~= Position(33201, 31475, 11) then + item:transform(8912) + return true + end + end + if item.itemid == 8911 then + local specs, spec = Game.getSpectators(config.centerRoom, false, false, 30, 30, 30, 30) + for i = 1, #specs do + spec = specs[i] + if spec:isPlayer() then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Someone is fighting with The Lord of The Lice.") + return true + end + end + Game.createMonster("the lord of the lice", config.BossPosition, true, true) + for x = 33197, 33201 do + local playerTile = Tile(Position(x, 31475, 11)):getTopCreature() + if playerTile and playerTile:isPlayer() then + playerTile:getPosition():sendMagicEffect(CONST_ME_POFF) + playerTile:teleportTo(config.newPosition) + playerTile:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + end + end + addEvent(clearForgotten, 30 * 60 * 1000, Position(33187, 31429, 12), Position(33242, 31487, 12), Position(33319, 32318, 13)) + item:transform(8912) + elseif item.itemid == 8912 then + item:transform(8911) + end + return true +end + +ferumbrasAscendantRatLever:uid(1030) +ferumbrasAscendantRatLever:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_reward.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_reward.lua similarity index 88% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_reward.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_reward.lua index c353a4cc089..4c751de9af0 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_reward.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_reward.lua @@ -14,7 +14,7 @@ function ferumbrasAscendantReward.onUse(player, item, fromPosition, target, toPo if item.itemid ~= 4073 then return false end - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Reward) >= 1 then + if player:getStorageValue(Storage.FerumbrasAscension.Reward) >= 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The treasure chest is empty.") return true end @@ -34,7 +34,7 @@ function ferumbrasAscendantReward.onUse(player, item, fromPosition, target, toPo end return true end - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Reward, 1) + player:setStorageValue(Storage.FerumbrasAscension.Reward, 1) return true end diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_sacrifice.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_sacrifice.lua similarity index 60% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_sacrifice.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_sacrifice.lua index 16f7cae78b9..cf69d4dc968 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_sacrifice.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_sacrifice.lua @@ -7,35 +7,35 @@ local fount = { local ferumbrasAscendantSacrifice = Action() function ferumbrasAscendantSacrifice.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if not target.actionid == 53805 or Tile(Position(33415, 32379, 12)):getItemById(22163) or player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Fount) >= 4 then + if not target.actionid == 53805 or Tile(Position(33415, 32379, 12)):getItemById(22163) or player:getStorageValue(Storage.FerumbrasAscension.Fount) >= 4 then return false end if item.itemid == 22158 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Bone) >= 1 then + if player:getStorageValue(Storage.FerumbrasAscension.Bone) >= 1 then player:say("You already put the bones on the blood well.", TALKTYPE_MONSTER_SAY) return true end - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Bone, 1) + player:setStorageValue(Storage.FerumbrasAscension.Bone, 1) elseif item.itemid == 22170 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Ring2) >= 1 then + if player:getStorageValue(Storage.FerumbrasAscension.Ring2) >= 1 then player:say("You already put the signet ring on the blood well.", TALKTYPE_MONSTER_SAY) return true end - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Ring2, 1) + player:setStorageValue(Storage.FerumbrasAscension.Ring2, 1) elseif item.itemid == 9685 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Vampire) >= 1 then + if player:getStorageValue(Storage.FerumbrasAscension.Vampire) >= 1 then player:say("You already put the vampire teeth on the blood well.", TALKTYPE_MONSTER_SAY) return true end - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Vampire, 1) + player:setStorageValue(Storage.FerumbrasAscension.Vampire, 1) elseif item.itemid == 3661 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Flower) >= 1 then + if player:getStorageValue(Storage.FerumbrasAscension.Flower) >= 1 then player:say("You already put the grave flower on the blood well.", TALKTYPE_MONSTER_SAY) return true end - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Flower, 1) + player:setStorageValue(Storage.FerumbrasAscension.Flower, 1) end - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Fount) == 3 then + if player:getStorageValue(Storage.FerumbrasAscension.Fount) == 3 then for i = 1, #fount do local fount = fount[i] local founts = Tile(fount.pos):getItemById(fount.revert) @@ -47,10 +47,10 @@ function ferumbrasAscendantSacrifice.onUse(player, item, fromPosition, target, t statue:transform(22161) end end - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Fount) < 0 then - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Fount, 0) + if player:getStorageValue(Storage.FerumbrasAscension.Fount) < 0 then + player:setStorageValue(Storage.FerumbrasAscension.Fount, 0) end - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Fount, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Fount) + 1) + player:setStorageValue(Storage.FerumbrasAscension.Fount, player:getStorageValue(Storage.FerumbrasAscension.Fount) + 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You put the " .. item:getName() .. " into the dried well.") toPosition:sendMagicEffect(CONST_ME_DRAWBLOOD) item:remove(1) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_statue.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_statue.lua similarity index 80% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_statue.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_statue.lua index b7181eaa171..65040b79df9 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_statue.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_statue.lua @@ -7,7 +7,7 @@ local fount = { local ferumbrasAscendantStatue = Action() function ferumbrasAscendantStatue.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if Tile(Position(33415, 32379, 12)):getItemById(22163) or player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Fount) < 4 or player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Statue) >= 1 then + if Tile(Position(33415, 32379, 12)):getItemById(22163) or player:getStorageValue(Storage.FerumbrasAscension.Fount) < 4 or player:getStorageValue(Storage.FerumbrasAscension.Statue) >= 1 then return false end for i = 1, #fount do @@ -17,7 +17,7 @@ function ferumbrasAscendantStatue.onUse(player, item, fromPosition, target, toPo founts:setActionId(53805) end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You douse the sacred statue's flame. The room darkens.") - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Statue, 1) + player:setStorageValue(Storage.FerumbrasAscension.Statue, 1) item:transform(22163) return true end diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_tarbaz_notes.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_tarbaz_notes.lua similarity index 61% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_tarbaz_notes.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_tarbaz_notes.lua index 60a1bf2fc2e..4dea9d21e2c 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_tarbaz_notes.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_tarbaz_notes.lua @@ -1,17 +1,17 @@ local ferumbrasAscendantTarbazNotes = Action() function ferumbrasAscendantTarbazNotes.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.actionid == 54388 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BasinCounter) ~= 8 then + if player:getStorageValue(Storage.FerumbrasAscension.BasinCounter) ~= 8 then return false end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Suddenly, you see the big picture. It all makes sense now. And then you despair.") - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TarbazNotes, 1) + player:setStorageValue(Storage.FerumbrasAscension.TarbazNotes, 1) elseif item.actionid == 54389 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BasinCounter) ~= 8 and player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TarbazNotes) < 1 then + if player:getStorageValue(Storage.FerumbrasAscension.BasinCounter) ~= 8 and player:getStorageValue(Storage.FerumbrasAscension.TarbazNotes) < 1 then return false end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Suddenly, you see the latter A. It all makes sense now. And then you now the secret.") - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TarbazNotes, 2) + player:setStorageValue(Storage.FerumbrasAscension.TarbazNotes, 2) end toPosition:sendMagicEffect(CONST_ME_THUNDER) return true diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_teleportation_rod.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_teleportation_rod.lua similarity index 59% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_teleportation_rod.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_teleportation_rod.lua index 1f1f2f32e40..062233e7eb7 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_teleportation_rod.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_teleportation_rod.lua @@ -1,15 +1,14 @@ local config = { - [22174] = { storageKey = Storage.Quest.U10_90.FerumbrasAscension.Razzagorn }, - [22175] = { storageKey = Storage.Quest.U10_90.FerumbrasAscension.Ragiaz }, - [22176] = { storageKey = Storage.Quest.U10_90.FerumbrasAscension.Zamulosh }, - [22177] = { storageKey = Storage.Quest.U10_90.FerumbrasAscension.Mazoran }, - [22178] = { storageKey = Storage.Quest.U10_90.FerumbrasAscension.Tarbaz }, - [22179] = { storageKey = Storage.Quest.U10_90.FerumbrasAscension.Shulgrax }, - [22180] = { storageKey = Storage.Quest.U10_90.FerumbrasAscension.Plagirath }, + [22174] = { storageKey = Storage.FerumbrasAscension.Razzagorn }, + [22175] = { storageKey = Storage.FerumbrasAscension.Ragiaz }, + [22176] = { storageKey = Storage.FerumbrasAscension.Zamulosh }, + [22177] = { storageKey = Storage.FerumbrasAscension.Mazoran }, + [22178] = { storageKey = Storage.FerumbrasAscension.Tarbaz }, + [22179] = { storageKey = Storage.FerumbrasAscension.Shulgrax }, + [22180] = { storageKey = Storage.FerumbrasAscension.Plagirath }, } local ferumbrasAscendantTeleportation = Action() - function ferumbrasAscendantTeleportation.onUse(player, item, fromPosition, target, toPosition, isHotkey) local targetItem = config[target.itemid] if not targetItem then diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_the_shatterer_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_the_shatterer_lever.lua new file mode 100644 index 00000000000..5ee308349da --- /dev/null +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_the_shatterer_lever.lua @@ -0,0 +1,51 @@ +local config = { + centerRoom = Position(33406, 32418, 14), + BossPosition = Position(33406, 32418, 14), + playerPositions = { + Position(33403, 32465, 13), + Position(33404, 32465, 13), + Position(33405, 32465, 13), + Position(33406, 32465, 13), + Position(33407, 32465, 13), + }, + newPosition = Position(33398, 32414, 14), +} + +local ferumbrasAscendantTheShattererLever = Action() +function ferumbrasAscendantTheShattererLever.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if item.itemid == 8911 then + if player:getPosition() ~= Position(33403, 32465, 13) then + item:transform(8912) + return true + end + end + if item.itemid == 8911 then + local specs, spec = Game.getSpectators(config.centerRoom, false, false, 30, 30, 30, 30) + for i = 1, #specs do + spec = specs[i] + if spec:isPlayer() then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Someone is fighting with The Shatterer.") + return true + end + end + Game.createMonster("The Shatterer", config.BossPosition, true, true) + for x = 33403, 33407 do + local playerTile = Tile(Position(x, 32465, 13)):getTopCreature() + if playerTile and playerTile:isPlayer() then + playerTile:getPosition():sendMagicEffect(CONST_ME_POFF) + playerTile:teleportTo(config.newPosition) + playerTile:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + end + end + Game.setStorageValue(Storage.FerumbrasAscension.TheShattererLever, 0) + Game.setStorageValue(Storage.FerumbrasAscension.TheShattererTimer, 1) + addEvent(clearForgotten, 30 * 60 * 1000, Position(33377, 32390, 14), Position(33446, 32447, 14), Position(33319, 32318, 13), Storage.FerumbrasAscension.TheShattererTimer) + item:transform(8912) + elseif item.itemid == 8912 then + item:transform(8911) + end + return true +end + +ferumbrasAscendantTheShattererLever:uid(1029) +ferumbrasAscendantTheShattererLever:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_the_shatterer_levers.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_the_shatterer_levers.lua similarity index 80% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/actions_the_shatterer_levers.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_the_shatterer_levers.lua index b7e7916ebdf..d97d8c4bccc 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_the_shatterer_levers.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/actions_the_shatterer_levers.lua @@ -40,7 +40,7 @@ local chains = { local ferumbrasAscendantTheShattererLevers = Action() function ferumbrasAscendantTheShattererLevers.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShatterer) >= 1 then + if player:getStorageValue(Storage.FerumbrasAscension.TheShatterer) >= 1 then player:sendCancelMessage("You cannot use this lever again.") return true end @@ -55,8 +55,8 @@ function ferumbrasAscendantTheShattererLevers.onUse(player, item, fromPosition, Game.createMonster("Fury", { x = player:getPosition().x + math.random(-3, 3), y = player:getPosition().y + math.random(-3, 3), z = player:getPosition().z }) end end - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever, math.max(player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever), 0) + 1) - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever) >= 4 then + Game.setStorageValue(Storage.FerumbrasAscension.TheShattererLever, math.max(Game.getStorageValue(Storage.FerumbrasAscension.TheShattererLever), 0) + 1) + if Game.getStorageValue(Storage.FerumbrasAscension.TheShattererLever) >= 4 then local boss = Tile(Position(33406, 32418, 14)):getTopCreature() if boss and boss:getName():lower() == "the shatterer" then boss:teleportTo(Position(33400, 32415, 14)) @@ -73,8 +73,8 @@ function ferumbrasAscendantTheShattererLevers.onUse(player, item, fromPosition, Game.createMonster("Destroyer", { x = player:getPosition().x + math.random(-3, 3), y = player:getPosition().y + math.random(-3, 3), z = player:getPosition().z }) end end - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever, math.max(player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever), 0) + 1) - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever) >= 4 then + Game.setStorageValue(Storage.FerumbrasAscension.TheShattererLever, math.max(Game.getStorageValue(Storage.FerumbrasAscension.TheShattererLever), 0) + 1) + if Game.getStorageValue(Storage.FerumbrasAscension.TheShattererLever) >= 4 then local boss = Tile(Position(33406, 32418, 14)):getTopCreature() if boss and boss:getName():lower() == "the shatterer" then boss:teleportTo(Position(33400, 32415, 14)) @@ -90,8 +90,8 @@ function ferumbrasAscendantTheShattererLevers.onUse(player, item, fromPosition, bla:remove() end end - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever, math.max(player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever), 0) + 1) - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever) >= 4 then + Game.setStorageValue(Storage.FerumbrasAscension.TheShattererLever, math.max(Game.getStorageValue(Storage.FerumbrasAscension.TheShattererLever), 0) + 1) + if Game.getStorageValue(Storage.FerumbrasAscension.TheShattererLever) >= 4 then local boss = Tile(Position(33406, 32418, 14)):getTopCreature() if boss and boss:getName():lower() == "the shatterer" then boss:teleportTo(Position(33400, 32415, 14)) @@ -107,8 +107,8 @@ function ferumbrasAscendantTheShattererLevers.onUse(player, item, fromPosition, bla:remove() end end - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever, math.max(player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever), 0) + 1) - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever) >= 4 then + Game.setStorageValue(Storage.FerumbrasAscension.TheShattererLever, math.max(Game.getStorageValue(Storage.FerumbrasAscension.TheShattererLever), 0) + 1) + if Game.getStorageValue(Storage.FerumbrasAscension.TheShattererLever) >= 4 then local boss = Tile(Position(33406, 32418, 14)):getTopCreature() if boss and boss:getName():lower() == "the shatterer" then boss:teleportTo(Position(33400, 32415, 14)) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_bone_capsule.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_bone_capsule.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_bone_capsule.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_bone_capsule.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_bosses_kill.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_bosses_kill.lua new file mode 100644 index 00000000000..8993c4b9063 --- /dev/null +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_bosses_kill.lua @@ -0,0 +1,76 @@ +local bosses = { + ["the lord of the lice"] = { teleportPos = Position(33226, 31478, 12), godbreakerPos = Position(33237, 31477, 13) }, + ["tarbaz"] = { teleportPos = Position(33460, 32853, 11), godbreakerPos = Position(33427, 32852, 13) }, + ["ragiaz"] = { teleportPos = Position(33482, 32345, 13), godbreakerPos = Position(33466, 32392, 13) }, + ["plagirath"] = { teleportPos = Position(33174, 31511, 13), godbreakerPos = Position(33204, 31510, 13) }, + ["razzagorn"] = { teleportPos = Position(33357, 32434, 12), godbreakerPos = Position(33357, 32440, 13) }, + ["zamulosh"] = { teleportPos = Position(33644, 32764, 11), godbreakerPos = Position(33678, 32758, 13) }, + ["mazoran"] = { teleportPos = Position(33585, 32699, 14), godbreakerPos = Position(33614, 32679, 15) }, + ["shulgrax"] = { teleportPos = Position(33486, 32796, 13), godbreakerPos = Position(33459, 32820, 14) }, + ["ferumbras mortal shell"] = { teleportPos = Position(33392, 31485, 14), godbreakerPos = Position(33388, 31414, 14) }, +} + +local crystals = { + [1] = { crystalPosition = Position(33390, 31468, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal1 }, + [2] = { crystalPosition = Position(33394, 31468, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal2 }, + [3] = { crystalPosition = Position(33397, 31471, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal3 }, + [4] = { crystalPosition = Position(33397, 31475, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal4 }, + [5] = { crystalPosition = Position(33394, 31478, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal5 }, + [6] = { crystalPosition = Position(33390, 31478, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal6 }, + [7] = { crystalPosition = Position(33387, 31475, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal7 }, + [8] = { crystalPosition = Position(33387, 31471, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal8 }, +} +local function transformCrystal() + for c = 1, #crystals do + local crystal = crystals[c] + Game.getStorageValue(crystal.globalStorage, 0) + Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Crystals.AllCrystals, 0) + local item = Tile(crystal.crystalPosition):getItemById(14961) + if item then + item:transform(14955) + end + end +end + +local function revertTeleport(position, itemId, transformId, destination) + local item = Tile(position):getItemById(itemId) + if item then + item:transform(transformId) + item:setDestination(destination) + end +end + +local ascendantBossesKill = CreatureEvent("AscendantBossesDeath") +function ascendantBossesKill.onDeath(creature) + local bossConfig = bosses[creature:getName():lower()] + if not bossConfig then + return true + end + + onDeathForDamagingPlayers(creature, function(creature, player) + if creature:getName():lower() == "ferumbras mortal shell" then + player:setBossCooldown(creature:getName(), os.time() + AscendingFerumbrasConfig.days * 24 * 3600) + elseif creature:getName():lower() == "the lord of the lice" then + player:setStorageValue(Storage.FerumbrasAscension.TheLordOfTheLiceAccess, 1) + end + end) + + local teleport = Tile(bossConfig.teleportPos):getItemById(1949) + if not teleport then + return true + end + + if teleport then + teleport:transform(22761) + creature:getPosition():sendMagicEffect(CONST_ME_THUNDER) + teleport:setDestination(bossConfig.godbreakerPos) + addEvent(revertTeleport, 2 * 60 * 1000, bossConfig.teleportPos, 22761, 1949, Position(33319, 32318, 13)) + end + + if creature:getName():lower() == "ferumbras mortal shell" then + addEvent(transformCrystal, 2 * 60 * 1000) + end + return true +end + +ascendantBossesKill:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_death_dragon.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_death_dragon.lua similarity index 87% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_death_dragon.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_death_dragon.lua index bc9fe4c5197..2f952dd81d8 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_death_dragon.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_death_dragon.lua @@ -9,7 +9,7 @@ function deathDragon.onDeath(creature, corpse, lasthitkiller, mostdamagekiller, return true end - local spectators = player:getSpectators(creature:getPosition(), false, false, 10, 10, 10, 10) + local spectators = Game.getSpectators(creature:getPosition(), false, false, 10, 10, 10, 10) for i = 1, #spectators do local spectator = spectators[i] if spectator:isMonster() and spectator:getName():lower() == "ragiaz" then diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_disgusting_ooze_death.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_disgusting_ooze_death.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_disgusting_ooze_death.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_disgusting_ooze_death.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_ferumbras_mortal_shell_death.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_ferumbras_mortal_shell_death.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_ferumbras_mortal_shell_death.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_ferumbras_mortal_shell_death.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_ferumbras_soul_splinter.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_ferumbras_soul_splinter.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_ferumbras_soul_splinter.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_ferumbras_soul_splinter.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_rift_invader_death.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_rift_invader_death.lua similarity index 72% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_rift_invader_death.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_rift_invader_death.lua index ecd56ef0467..3db8456d1d1 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_rift_invader_death.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_rift_invader_death.lua @@ -1,12 +1,12 @@ local crystals = { - [1] = { fromPosition = Position(33389, 31467, 14), toPosition = Position(33391, 31469, 14), crystalPosition = Position(33390, 31468, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal1 }, - [2] = { fromPosition = Position(33393, 31467, 14), toPosition = Position(33395, 31469, 14), crystalPosition = Position(33394, 31468, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal2 }, - [3] = { fromPosition = Position(33396, 31470, 14), toPosition = Position(33398, 31472, 14), crystalPosition = Position(33397, 31471, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal3 }, - [4] = { fromPosition = Position(33396, 31474, 14), toPosition = Position(33398, 31476, 14), crystalPosition = Position(33397, 31475, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal4 }, - [5] = { fromPosition = Position(33393, 31477, 14), toPosition = Position(33395, 31479, 14), crystalPosition = Position(33394, 31478, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal5 }, - [6] = { fromPosition = Position(33389, 31477, 14), toPosition = Position(33391, 31479, 14), crystalPosition = Position(33390, 31478, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal6 }, - [7] = { fromPosition = Position(33386, 31474, 14), toPosition = Position(33388, 31476, 14), crystalPosition = Position(33387, 31475, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal7 }, - [8] = { fromPosition = Position(33386, 31470, 14), toPosition = Position(33388, 31472, 14), crystalPosition = Position(33387, 31471, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal8 }, + [1] = { fromPosition = Position(33389, 31467, 14), toPosition = Position(33391, 31469, 14), crystalPosition = Position(33390, 31468, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal1 }, + [2] = { fromPosition = Position(33393, 31467, 14), toPosition = Position(33395, 31469, 14), crystalPosition = Position(33394, 31468, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal2 }, + [3] = { fromPosition = Position(33396, 31470, 14), toPosition = Position(33398, 31472, 14), crystalPosition = Position(33397, 31471, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal3 }, + [4] = { fromPosition = Position(33396, 31474, 14), toPosition = Position(33398, 31476, 14), crystalPosition = Position(33397, 31475, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal4 }, + [5] = { fromPosition = Position(33393, 31477, 14), toPosition = Position(33395, 31479, 14), crystalPosition = Position(33394, 31478, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal5 }, + [6] = { fromPosition = Position(33389, 31477, 14), toPosition = Position(33391, 31479, 14), crystalPosition = Position(33390, 31478, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal6 }, + [7] = { fromPosition = Position(33386, 31474, 14), toPosition = Position(33388, 31476, 14), crystalPosition = Position(33387, 31475, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal7 }, + [8] = { fromPosition = Position(33386, 31470, 14), toPosition = Position(33388, 31472, 14), crystalPosition = Position(33387, 31471, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal8 }, } local config = AscendingFerumbrasConfig @@ -23,15 +23,15 @@ function riftInvaderDeath.onDeath(creature, corpse, lasthitkiller, mostdamagekil for i = 1, #crystals do local crystal = crystals[i] if creature:getPosition():isInRange(crystal.fromPosition, crystal.toPosition) then - if player:getStorageValue(crystal.globalStorage) > 8 then + if Game.getStorageValue(crystal.globalStorage) > 8 then local item = Tile(crystal.crystalPosition):getItemById(14955) if not item then return true end item:transform(14961) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Crystals.AllCrystals, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Crystals.AllCrystals) + 1) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Crystals.AllCrystals, Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Crystals.AllCrystals) + 1) end - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Crystals.AllCrystals) == 8 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Crystals.AllCrystals) == 8 then local creature = Tile(config.bossPos):getTopCreature() creature:say("NOOOOOOOOOOO!", TALKTYPE_MONSTER_YELL) creature:say("FERUMBRAS BURSTS INTO SOUL SPLINTERS!", TALKTYPE_MONSTER_YELL, nil, nil, Position(33392, 31475, 14)) @@ -42,7 +42,7 @@ function riftInvaderDeath.onDeath(creature, corpse, lasthitkiller, mostdamagekil Game.createMonster("Ferumbras Soul Splinter", Position(33392, 31473, 14), false, true) end end - player:setStorageValue(crystal.globalStorage, player:getStorageValue(crystal.globalStorage) + 1) + Game.setStorageValue(crystal.globalStorage, Game.getStorageValue(crystal.globalStorage) + 1) lasthitkiller:say("The negative energy of the rift creature is absorbed by the crystal!", TALKTYPE_MONSTER_SAY, nil, nil, crystal.crystalPosition) lasthitkiller:say("ARGH!", TALKTYPE_MONSTER_SAY, nil, nil, Position(33392, 31473, 14)) end diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_the_shatterer_kill.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_the_shatterer_kill.lua similarity index 93% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_the_shatterer_kill.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_the_shatterer_kill.lua index 85f1494cd2e..493db2c089e 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_the_shatterer_kill.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_the_shatterer_kill.lua @@ -85,7 +85,7 @@ local newPos = Position(33436, 32443, 15) local theShattererKill = CreatureEvent("TheShattererDeath") function theShattererKill.onDeath(creature) onDeathForDamagingPlayers(creature, function(creature, player) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShatterer, 1) + player:setStorageValue(Storage.FerumbrasAscension.TheShatterer, 1) end) local teleport = Tile(Position(33393, 32438, 14)):getItemById(1949) @@ -100,8 +100,8 @@ function theShattererKill.onDeath(creature) addEvent(revertTeleport, 2 * 60 * 1000, teleportPos, 22761, 1949, oldPos) revert() end - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever, 0) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShattererTimer, 0) + Game.setStorageValue(Storage.FerumbrasAscension.TheShattererLever, 0) + Game.setStorageValue(Storage.FerumbrasAscension.TheShattererTimer, 0) return true end diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_zamulosh_clone.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_zamulosh_clone.lua similarity index 84% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_zamulosh_clone.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_zamulosh_clone.lua index 6a24fea1c9f..6b6a2b4494c 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_zamulosh_clone.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/creaturescripts_zamulosh_clone.lua @@ -8,7 +8,7 @@ end local zamuloshClone = CreatureEvent("ZamuloshClone") function zamuloshClone.onThink(creature) - local spectators = player:getSpectators(Position(33644, 32757, 11), false, false, 10, 10, 10, 10) + local spectators = Game.getSpectators(Position(33644, 32757, 11), false, false, 10, 10, 10, 10) for i = 1, #spectators do local master = spectators[i] if master:getMaxHealth() == 300000 and not master:getMaster() then diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/globalevents_ferumbras_ascendant_effect_1.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/globalevents_ferumbras_ascendant_effect_1.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/globalevents_ferumbras_ascendant_effect_1.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/globalevents_ferumbras_ascendant_effect_1.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/globalevents_ferumbras_ascendant_effect_2.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/globalevents_ferumbras_ascendant_effect_2.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/globalevents_ferumbras_ascendant_effect_2.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/globalevents_ferumbras_ascendant_effect_2.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_blue_gem.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_blue_gem.lua similarity index 73% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/movements_blue_gem.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_blue_gem.lua index da8a8e442d2..60083434a04 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_blue_gem.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_blue_gem.lua @@ -33,19 +33,19 @@ local function revertBasin(position) end function revertStorages() - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active, 0) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.First, 0) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Second, 0) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Third, 0) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Four, 0) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done, 0) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active, 0) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.First, 0) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Second, 0) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Third, 0) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Four, 0) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done, 0) end local blueGem = MoveEvent() function blueGem.onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() - if not player or player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active) >= 1 then + if not player or Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active) >= 1 then position:sendMagicEffect(CONST_ME_TELEPORT) return true end @@ -54,10 +54,10 @@ function blueGem.onStepIn(creature, item, position, fromPosition) local leverSecond = Tile(Position(33613, 32691, 13)):getItemById(9110) or Tile(Position(33613, 32691, 13)):getItemById(9111) -- lever green local leverThird = Tile(Position(33651, 32661, 13)):getItemById(9110) or Tile(Position(33651, 32661, 13)):getItemById(9111) -- lever red local leverFour = Tile(Position(33672, 32688, 13)):getItemById(9110) or Tile(Position(33672, 32688, 13)):getItemById(9111) -- lever green - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.First, 3) -- blue - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Second, 2) -- green - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Third, 1) -- red - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Four, 5) -- grass + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.First, 3) -- blue + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Second, 2) -- green + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Third, 1) -- red + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Four, 5) -- grass player:sendTextMessage( MESSAGE_EVENT_ADVANCE, "You hear a whisper: \z @@ -71,7 +71,7 @@ function blueGem.onStepIn(creature, item, position, fromPosition) leverThird:setActionId(53823) leverFour:setActionId(53824) end - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active, 1) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active, 1) item:transform(8648) addEvent(activeBasin, 1 * 1000, position) addEvent(revertBasin, 60 * 60 * 1000, position) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_boss_teleport.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_boss_teleport.lua new file mode 100644 index 00000000000..812cfff1421 --- /dev/null +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_boss_teleport.lua @@ -0,0 +1,36 @@ +local config = { + [24830] = { storage = Storage.FerumbrasAscension.Razzagorn }, + [24831] = { storage = Storage.FerumbrasAscension.Ragiaz }, + [24832] = { storage = Storage.FerumbrasAscension.Zamulosh }, + [24833] = { storage = Storage.FerumbrasAscension.Mazoran }, + [24834] = { storage = Storage.FerumbrasAscension.Tarbaz }, + [24835] = { storage = Storage.FerumbrasAscension.Shulgrax }, + [24836] = { storage = Storage.FerumbrasAscension.Plagirath }, +} + +local bossTeleport = MoveEvent() + +function bossTeleport.onStepIn(creature, item, position, fromPosition) + local teleport = config[item.actionid] + if not teleport then + return false + end + local player = creature:getPlayer() + if not player then + return true + end + if player:getStorageValue(teleport.storage) == 1 then + local position = player:getPosition() + position.z = position.z - 1 + player:teleportTo(position) + end + return true +end + +bossTeleport:type("stepin") + +for index, value in pairs(config) do + bossTeleport:aid(index) +end + +bossTeleport:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_desperate_soul.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_desperate_soul.lua new file mode 100644 index 00000000000..63c79aa5d44 --- /dev/null +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_desperate_soul.lua @@ -0,0 +1,18 @@ +local desperateSoul = MoveEvent() + +function desperateSoul.onStepIn(creature, item, position, fromPosition) + local monster = creature:getMonster() + if not monster or monster:getName():lower() ~= "desperate soul" then + return true + end + + monster:remove() + position:sendMagicEffect(CONST_ME_POFF) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.FerumbrasEssence, 1) + addEvent(Game.setStorageValue, 2 * 60 * 1000, GlobalStorage.FerumbrasAscendant.FerumbrasEssence, 0) + return true +end + +desperateSoul:type("stepin") +desperateSoul:aid(54390) +desperateSoul:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_entrance.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_entrance.lua similarity index 57% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/movements_entrance.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_entrance.lua index b6e2aa6e4a5..356434282bb 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_entrance.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_entrance.lua @@ -1,11 +1,11 @@ local config = { - [1] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Razzagorn }, - [2] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Ragiaz }, - [3] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Zamulosh }, - [4] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Mazoran }, - [5] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Tarbaz }, - [6] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Shulgrax }, - [7] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Plagirath }, + [1] = { storage = Storage.FerumbrasAscension.Razzagorn }, + [2] = { storage = Storage.FerumbrasAscension.Ragiaz }, + [3] = { storage = Storage.FerumbrasAscension.Zamulosh }, + [4] = { storage = Storage.FerumbrasAscension.Mazoran }, + [5] = { storage = Storage.FerumbrasAscension.Tarbaz }, + [6] = { storage = Storage.FerumbrasAscension.Shulgrax }, + [7] = { storage = Storage.FerumbrasAscension.Plagirath }, } local entrance = MoveEvent() @@ -15,23 +15,15 @@ function entrance.onStepIn(creature, item, position, fromPosition) if not player then return true end - - if player:getLevel() < 150 then - player:teleportTo(fromPosition) - player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need to be at least level 150 to enter.") - return true - end - - local complete = true + local complete = false for i = 1, #config do local storage = config[i].storage if player:getStorageValue(storage) ~= 1 then complete = false - break + else + complete = true end end - if item:getActionId() == 24837 then if complete then player:teleportTo(Position(33275, 32390, 9)) @@ -43,7 +35,7 @@ function entrance.onStepIn(creature, item, position, fromPosition) return true end elseif item:getActionId() == 24838 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Access) < 1 then + if player:getStorageValue(Storage.FerumbrasAscension.Access) < 1 then player:teleportTo(Position(33275, 32390, 8)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "This portal is not yet strong enough to breach the destination dimension.") diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_flower_puzzle.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_flower_puzzle.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/movements_flower_puzzle.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_flower_puzzle.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_gate_of_deathstruction.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_gate_of_deathstruction.lua similarity index 90% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/movements_gate_of_deathstruction.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_gate_of_deathstruction.lua index 09369882785..0b74b80d86e 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_gate_of_deathstruction.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_gate_of_deathstruction.lua @@ -6,7 +6,7 @@ function gateOfDeathstruction.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Statue) < 1 then + if player:getStorageValue(Storage.FerumbrasAscension.Statue) < 1 then position:sendMagicEffect(CONST_ME_TELEPORT) position.y = position.y + 2 player:teleportTo(position) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_green_gem.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_green_gem.lua similarity index 73% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/movements_green_gem.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_green_gem.lua index aaa8ffd9e6f..885d2a2e0ff 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_green_gem.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_green_gem.lua @@ -34,19 +34,19 @@ local function revertBasin(position) end function revertStorages() - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active, 0) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.First, 0) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Second, 0) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Third, 0) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Four, 0) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done, 0) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active, 0) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.First, 0) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Second, 0) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Third, 0) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Four, 0) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done, 0) end local greenGem = MoveEvent() function greenGem.onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() - if not player or player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active) >= 1 then + if not player or Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active) >= 1 then position:sendMagicEffect(CONST_ME_TELEPORT) return true end @@ -55,10 +55,10 @@ function greenGem.onStepIn(creature, item, position, fromPosition) local leverSecond = Tile(Position(33671, 32638, 13)):getItemById(9110) or Tile(Position(33671, 32638, 13)):getItemById(9111) -- lever blue local leverThird = Tile(Position(33651, 32661, 13)):getItemById(9110) or Tile(Position(33651, 32661, 13)):getItemById(9111) -- lever red local leverFour = Tile(Position(33673, 32688, 13)):getItemById(9110) or Tile(Position(33673, 32688, 13)):getItemById(9111) -- lever green - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.First, 2) -- green - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Second, 3) -- blue - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Third, 1) -- red - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Four, 6) -- ice + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.First, 2) -- green + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Second, 3) -- blue + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Third, 1) -- red + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Four, 6) -- ice player:sendTextMessage( MESSAGE_EVENT_ADVANCE, "You hear a whisper: \z @@ -72,7 +72,7 @@ function greenGem.onStepIn(creature, item, position, fromPosition) leverThird:setActionId(53823) leverFour:setActionId(53824) end - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active, 1) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active, 1) item:transform(8648) addEvent(activeBasin, 1 * 1000, position) addEvent(revertBasin, 60 * 60 * 1000, position) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_habitats_access.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_habitats_access.lua similarity index 88% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/movements_habitats_access.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_habitats_access.lua index 984782bac2f..748ba3d574f 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_habitats_access.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_habitats_access.lua @@ -2,7 +2,7 @@ local config = { [34323] = { toPosition = Position(33630, 32651, 12), backPosition = Position(33630, 32651, 12), - timer = Storage.Quest.U10_90.FerumbrasAscension.HabitatsTimer, + timer = Storage.FerumbrasAscension.HabitatsTimer, }, } @@ -20,7 +20,7 @@ function habitatsAccess.onStepIn(creature, item, position, fromPosition) end if item.actionid == 34323 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.HabitatsAccess) >= 1 then + if player:getStorageValue(Storage.FerumbrasAscension.HabitatsAccess) >= 1 then if player:getStorageValue(setting.timer) < os.time() then player:teleportTo(setting.toPosition) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_lovely_monsters.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_lovely_monsters.lua similarity index 69% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/movements_lovely_monsters.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_lovely_monsters.lua index 1a008755b63..f9808413ca6 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_lovely_monsters.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_lovely_monsters.lua @@ -12,8 +12,8 @@ local config = { local lovelyMonsters = MoveEvent() function lovelyMonsters.onStepIn(creature, item, position, fromPosition) - local monsterConfig = config[item.actionid] - if not monsterConfig then + local config = config[item.actionid] + if not config then return true end @@ -22,19 +22,18 @@ function lovelyMonsters.onStepIn(creature, item, position, fromPosition) end local monster = creature:getMonster() - if monster:getName():lower() == monsterConfig.name then + if monster:getName():lower() == config.name then monster:say("That seemed correct!", TALKTYPE_MONSTER_SAY) monster:getPosition():sendMagicEffect(CONST_ME_THUNDER) monster:remove() - - local spectators = Game.getSpectators(monsterConfig.centerPos, false, true, 9, 9, 9, 9) + local spectators = Game.getSpectators(config.centerPos, false, true, 9, 9, 9, 9) for _, spectator in pairs(spectators) do if spectator:isPlayer() then local player = spectator - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ZamuloshTeleports) < 0 then - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ZamuloshTeleports, 0) + if player:getStorageValue(Storage.FerumbrasAscension.ZamuloshTeleports) < 0 then + player:setStorageValue(Storage.FerumbrasAscension.ZamuloshTeleports, 0) end - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ZamuloshTeleports, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ZamuloshTeleports) + 1) + player:setStorageValue(Storage.FerumbrasAscension.ZamuloshTeleports, player:getStorageValue(Storage.FerumbrasAscension.ZamuloshTeleports) + 1) end end return true diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_mazoran_fire.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_mazoran_fire.lua similarity index 100% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/movements_mazoran_fire.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_mazoran_fire.lua diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_plagirath_access.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_plagirath_access.lua similarity index 86% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/movements_plagirath_access.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_plagirath_access.lua index 554e351e533..b949b797b90 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_plagirath_access.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_plagirath_access.lua @@ -6,7 +6,7 @@ function plagirathAccess.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheLordOfTheLiceAccess) < 1 then + if player:getStorageValue(Storage.FerumbrasAscension.TheLordOfTheLiceAccess) < 1 then local pos = player:getPosition() pos.x = pos.x - 2 player:teleportTo(pos) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_razzagorn_access.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_razzagorn_access.lua similarity index 87% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/movements_razzagorn_access.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_razzagorn_access.lua index fe196bbf6e5..c83b7be6f48 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_razzagorn_access.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_razzagorn_access.lua @@ -6,7 +6,7 @@ function razzagornAccess.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.TheShatterer) >= 1 then + if player:getStorageValue(Storage.FerumbrasAscension.TheShatterer) >= 1 then player:teleportTo(Position(33437, 32443, 15)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) else diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_red_gem.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_red_gem.lua similarity index 67% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/movements_red_gem.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_red_gem.lua index a98438661e5..a4acd970006 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_red_gem.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_red_gem.lua @@ -34,19 +34,19 @@ local function revertBasin(position) end function revertStorages() - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active, 0) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.First, 0) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Second, 0) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Third, 0) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Four, 0) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done, 0) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active, 0) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.First, 0) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Second, 0) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Third, 0) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Four, 0) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done, 0) end local redGem = MoveEvent() function redGem.onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() - if not player or player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active) >= 1 then + if not player or Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active) >= 1 then position:sendMagicEffect(CONST_ME_TELEPORT) return true end @@ -55,10 +55,10 @@ function redGem.onStepIn(creature, item, position, fromPosition) local leverSecond = Tile(Position(33671, 32638, 13)):getItemById(9110) or Tile(Position(33671, 32638, 13)):getItemById(9111) -- lever blue local leverThird = Tile(Position(33613, 32691, 13)):getItemById(9110) or Tile(Position(33613, 32691, 13)):getItemById(9111) -- lever green local leverFour = Tile(Position(33671, 32688, 13)):getItemById(9110) or Tile(Position(33671, 32688, 13)):getItemById(9111) -- lever green - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.First, 1) -- red - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Second, 3) -- blue - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Third, 2) -- green - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Four, 4) -- blood + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.First, 1) -- red + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Second, 3) -- blue + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Third, 2) -- green + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Four, 4) -- blood player:sendTextMessage( MESSAGE_EVENT_ADVANCE, "You hear a whisper: \z @@ -67,12 +67,12 @@ function redGem.onStepIn(creature, item, position, fromPosition) if not leverFirst or not leverSecond or not leverThird or not leverFour then return false end - leverFirst:setActionId(53820 + player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.First)) - leverSecond:setActionId(53820 + player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Second)) - leverThird:setActionId(53820 + player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Third)) + leverFirst:setActionId(53820 + Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.First)) + leverSecond:setActionId(53820 + Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Second)) + leverThird:setActionId(53820 + Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Third)) leverFour:setActionId(53824) end - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Active, 1) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Active, 1) item:transform(8648) addEvent(activeBasin, 1 * 1000, position) addEvent(revertBasin, 60 * 60 * 1000, position) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_seal.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_seal.lua similarity index 63% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/movements_seal.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_seal.lua index 67b7b8986f2..f8727da061e 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_seal.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_seal.lua @@ -3,49 +3,41 @@ local config = { toPosition = Position(33419, 32841, 11), backPosition = Position(33484, 32775, 12), boss = "Tarbaz", - cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.TarbazTime, }, [24840] = { toPosition = Position(33452, 32356, 13), backPosition = Position(33432, 32330, 14), boss = "Ragiaz", - cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.RagiazTime, }, [24841] = { toPosition = Position(33230, 31493, 13), backPosition = Position(33197, 31438, 13), boss = "Plagirath", - cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.PlagirathTime, }, [24842] = { toPosition = Position(33380, 32454, 14), backPosition = Position(33399, 32402, 15), boss = "Razzagorn", - cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.RazzagornTime, }, [24843] = { toPosition = Position(33680, 32736, 11), backPosition = Position(33664, 32682, 10), boss = "Zamulosh", - cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.ZamuloshTime, }, [24844] = { toPosition = Position(33593, 32658, 14), backPosition = Position(33675, 32690, 13), boss = "Mazoran", - cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.MazoranTime, }, [24845] = { toPosition = Position(33436, 32800, 13), backPosition = Position(33477, 32701, 14), boss = "Shulgrax", - cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.ShulgraxTime, }, [24846] = { toPosition = Position(33270, 31474, 14), backPosition = Position(33324, 31374, 14), boss = "Ferumbras Mortal Shell", - cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.FerumbrasMortalShellTime, }, } @@ -62,20 +54,8 @@ function seal.onStepIn(creature, item, position, fromPosition) return true end - local cooldownTime = player:getStorageValue(setting.cooldownStorage) - if cooldownTime > os.time() then - local remainingTime = cooldownTime - os.time() - local days = math.floor(remainingTime / (24 * 3600)) - local hours = math.floor((remainingTime % (24 * 3600)) / 3600) - local minutes = math.floor((remainingTime % 3600) / 60) - player:teleportTo(setting.backPosition) - player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need to wait for time to pass for this boss again.") - return true - end - - if item.actionid == 24844 then -- Mazoran - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Elements.Done) >= 4 then + if item.actionid == 24844 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Elements.Done) >= 4 then if player:canFightBoss(setting.boss) then player:teleportTo(setting.toPosition) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) @@ -93,8 +73,9 @@ function seal.onStepIn(creature, item, position, fromPosition) item:getPosition():sendMagicEffect(CONST_ME_TELEPORT) return true end - elseif item.actionid == 24845 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FlowerPuzzleTimer) >= 1 then + end + if item.actionid == 24845 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.FlowerPuzzleTimer) >= 1 then if player:canFightBoss(setting.boss) then player:teleportTo(setting.toPosition) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) @@ -112,12 +93,18 @@ function seal.onStepIn(creature, item, position, fromPosition) item:getPosition():sendMagicEffect(CONST_ME_TELEPORT) return true end - elseif item.actionid == 24846 then -- Ferumbras Mortal Shell - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The portal leads you to the final challenge.") end - - player:teleportTo(setting.toPosition) - player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + if player:canFightBoss(setting.boss) then + player:teleportTo(setting.toPosition) + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + elseif item.actionid == 24846 then + local days = AscendingFerumbrasConfig.days + player:say("You cannot enter, you must wait " .. days .. " days after preventing the ascension of Ferumbras.", TALKTYPE_MONSTER_SAY) + else + player:teleportTo(setting.backPosition) + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + player:say("You have to wait to challenge this enemy again!", TALKTYPE_MONSTER_SAY) + end return true end diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_shulgrax_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_shulgrax_lever.lua similarity index 86% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/movements_shulgrax_lever.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_shulgrax_lever.lua index d6052ee0861..f0a74a7a058 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_shulgrax_lever.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_shulgrax_lever.lua @@ -6,7 +6,7 @@ function shulgraxLever.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FlowerPuzzleTimer) >= 1 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.FlowerPuzzleTimer) >= 1 then player:teleportTo(Position(33436, 32800, 13)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) else diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_stair.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_stair.lua similarity index 60% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/movements_stair.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_stair.lua index f7f9366ecd8..3ab9d7b1a30 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_stair.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_stair.lua @@ -1,11 +1,11 @@ local config = { - [1] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Razzagorn }, - [2] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Ragiaz }, - [3] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Zamulosh }, - [4] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Mazoran }, - [5] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Tarbaz }, - [6] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Shulgrax }, - [7] = { storage = Storage.Quest.U10_90.FerumbrasAscension.Plagirath }, + [1] = { storage = Storage.FerumbrasAscension.Razzagorn }, + [2] = { storage = Storage.FerumbrasAscension.Ragiaz }, + [3] = { storage = Storage.FerumbrasAscension.Zamulosh }, + [4] = { storage = Storage.FerumbrasAscension.Mazoran }, + [5] = { storage = Storage.FerumbrasAscension.Tarbaz }, + [6] = { storage = Storage.FerumbrasAscension.Shulgrax }, + [7] = { storage = Storage.FerumbrasAscension.Plagirath }, } local stair = MoveEvent() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_vortex.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_vortex.lua similarity index 71% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/movements_vortex.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_vortex.lua index 6a001370f7c..eaa838cd8e1 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_vortex.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_vortex.lua @@ -10,8 +10,8 @@ function vortex.onStepIn(creature, item, position, fromPosition) monster:remove() position:sendMagicEffect(CONST_ME_POFF) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FerumbrasEssence, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FerumbrasEssence) + 1) - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FerumbrasEssence) >= 8 then + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.FerumbrasEssence, Game.getStorageValue(GlobalStorage.FerumbrasAscendant.FerumbrasEssence) + 1) + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.FerumbrasEssence) >= 8 then Game.createMonster("Destabilized Ferumbras", config.bossPos, true, true) for i = 1, config.maxSummon do Game.createMonster("Rift Fragment", Position(math.random(33381, 33403), math.random(31462, 31483), 14), true, true) diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_zamulosh_teleport.lua b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_zamulosh_teleport.lua similarity index 79% rename from data-otservbr-global/scripts/quests/ferumbras_ascension/movements_zamulosh_teleport.lua rename to data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_zamulosh_teleport.lua index fcb6ecf332b..11f98b10861 100644 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_zamulosh_teleport.lua +++ b/data-otservbr-global/scripts/quests/ferumbras_ascendant/movements_zamulosh_teleport.lua @@ -7,7 +7,7 @@ function zamuloshTeleport.onStepIn(creature, item, position, fromPosition) end if item.actionid == 34313 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ZamuloshTeleports) >= 9 then + if player:getStorageValue(Storage.FerumbrasAscension.ZamuloshTeleports) >= 9 then player:teleportTo(Position(33618, 32620, 10)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "What was wrong is not necessarily right now. Nevertheless you nade it further.") @@ -21,11 +21,11 @@ function zamuloshTeleport.onStepIn(creature, item, position, fromPosition) return true end elseif item.actionid == 34314 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ZamuloshTeleports) >= 4 and player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Habitats.AllHabitats) >= 7 then + if player:getStorageValue(Storage.FerumbrasAscension.ZamuloshTeleports) >= 4 and Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.AllHabitats) >= 8 then player:teleportTo(Position(33618, 32620, 10)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "What was wrong is not necessarily right now. Nevertheless you nade it further.") - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.ZamuloshTeleports, 9) + player:setStorageValue(Storage.FerumbrasAscension.ZamuloshTeleports, 9) return true else local pos = player:getPosition() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ferumbras_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ferumbras_lever.lua deleted file mode 100644 index 161aaafb3e7..00000000000 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ferumbras_lever.lua +++ /dev/null @@ -1,104 +0,0 @@ -local config = { - boss = { - name = "Ferumbras Mortal Shell", - position = Position(33392, 31473, 14), - }, - playerPositions = { - { pos = Position(33269, 31477, 14), teleport = Position(33390, 31483, 14), effect = CONST_ME_TELEPORT }, - }, - specPos = { - from = Position(33374, 31458, 14), - to = Position(33414, 31498, 14), - }, - exit = Position(33319, 32318, 13), - centerRoom = Position(33392, 31473, 14), - summonName = "Rift Fragment", - maxSummon = 3, -} - -local leverFerumbras = Action() - -function leverFerumbras.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local spectators = Game.getSpectators(config.specPos.from, false, false, 0, 0, 0, 0, config.specPos.to) - for _, spec in pairs(spectators) do - if spec:isPlayer() then - player:say("Someone is already inside the room.", TALKTYPE_MONSTER_SAY) - return true - end - end - - if isBossInRoom(config.specPos.from, config.specPos.to, config.boss.name) then - player:say("The room is being cleared. Please wait a moment.", TALKTYPE_MONSTER_SAY) - return true - end - - local players = {} - for i = 1, #config.playerPositions do - local pos = config.playerPositions[i].pos - local creature = Tile(pos):getTopCreature() - if not creature or not creature:isPlayer() then - player:sendCancelMessage("You need " .. #config.playerPositions .. " players to challenge " .. config.boss.name .. ".") - return true - end - table.insert(players, creature) - end - - for i = 1, #players do - local playerToTeleport = players[i] - local teleportPos = config.playerPositions[i].teleport - local effect = config.playerPositions[i].effect - playerToTeleport:teleportTo(teleportPos) - teleportPos:sendMagicEffect(effect) - end - - Game.createMonster(config.boss.name, config.boss.position, true, true) - for b = 1, config.maxSummon do - local xrand = math.random(-5, 5) - local yrand = math.random(-5, 5) - local position = Position(config.boss.position.x + xrand, config.boss.position.y + yrand, config.boss.position.z) - Game.createMonster(config.summonName, position) - end - - if item.itemid == 8911 then - item:transform(8912) - else - item:transform(8911) - end - - return true -end - -function clearBossRoom(fromPos, toPos, exitPos) - local spectators = Game.getSpectators(fromPos, false, false, 0, 0, 0, 0, toPos) - for _, spec in pairs(spectators) do - if spec:isPlayer() then - spec:teleportTo(exitPos) - exitPos:sendMagicEffect(CONST_ME_TELEPORT) - spec:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You took too long, the battle has ended.") - else - spec:remove() - end - end -end - -function isBossInRoom(fromPos, toPos, bossName) - local monstersRemoved = false - for x = fromPos.x, toPos.x do - for y = fromPos.y, toPos.y do - for z = fromPos.z, toPos.z do - local tile = Tile(Position(x, y, z)) - if tile then - local creature = tile:getTopCreature() - if creature and creature:isMonster() then - creature:remove() - monstersRemoved = true - end - end - end - end - end - return monstersRemoved -end - -leverFerumbras:uid(1021) -leverFerumbras:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_mazoran.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_mazoran.lua deleted file mode 100644 index 56cda9fb65b..00000000000 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_mazoran.lua +++ /dev/null @@ -1,105 +0,0 @@ -local config = { - boss = { - name = "Mazoran", - position = Position(33584, 32689, 14), - }, - timeToDefeat = 17 * 60, -- 17 minutes in seconds - playerPositions = { - { pos = Position(33593, 32644, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, - { pos = Position(33593, 32645, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, - { pos = Position(33593, 32646, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, - { pos = Position(33593, 32647, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, - { pos = Position(33593, 32648, 14), teleport = Position(33585, 32693, 14), effect = CONST_ME_TELEPORT }, - }, - specPos = { - from = Position(33570, 32677, 14), - to = Position(33597, 32700, 14), - }, - exit = Position(33319, 32318, 13), -} - -local leverMazoran = Action() - -function leverMazoran.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local spectators = Game.getSpectators(config.specPos.from, false, false, 0, 0, 0, 0, config.specPos.to) - for _, spec in pairs(spectators) do - if spec:isPlayer() then - player:say("Someone is already inside the room.", TALKTYPE_MONSTER_SAY) - return true - end - end - - if isBossInRoom(config.specPos.from, config.specPos.to, config.boss.name) then - player:say("The room is being cleared. Please wait a moment.", TALKTYPE_MONSTER_SAY) - return true - end - - local players = {} - for i = 1, #config.playerPositions do - local pos = config.playerPositions[i].pos - local creature = Tile(pos):getTopCreature() - if not creature or not creature:isPlayer() then - player:sendCancelMessage("You need " .. #config.playerPositions .. " players to challenge " .. config.boss.name .. ".") - return true - end - table.insert(players, creature) - end - - for i = 1, #players do - local playerToTeleport = players[i] - local teleportPos = config.playerPositions[i].teleport - local effect = config.playerPositions[i].effect - playerToTeleport:teleportTo(teleportPos) - teleportPos:sendMagicEffect(effect) - end - - local boss = Game.createMonster(config.boss.name, config.boss.position) - if boss then - boss:setReward(true) - end - - addEvent(clearBossRoom, config.timeToDefeat * 1000, config.specPos.from, config.specPos.to, config.exit) - - if item.itemid == 8911 then - item:transform(8912) - else - item:transform(8911) - end - - return true -end - -function clearBossRoom(fromPos, toPos, exitPos) - local spectators = Game.getSpectators(fromPos, false, false, 0, 0, 0, 0, toPos) - for _, spec in pairs(spectators) do - if spec:isPlayer() then - spec:teleportTo(exitPos) - exitPos:sendMagicEffect(CONST_ME_TELEPORT) - spec:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You took too long, the battle has ended.") - else - spec:remove() - end - end -end - -function isBossInRoom(fromPos, toPos, bossName) - local monstersRemoved = false - for x = fromPos.x, toPos.x do - for y = fromPos.y, toPos.y do - for z = fromPos.z, toPos.z do - local tile = Tile(Position(x, y, z)) - if tile then - local creature = tile:getTopCreature() - if creature and creature:isMonster() then - creature:remove() - monstersRemoved = true - end - end - end - end - end - return monstersRemoved -end - -leverMazoran:uid(1025) -leverMazoran:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_plagirath.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_plagirath.lua deleted file mode 100644 index b49a0d58db8..00000000000 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_plagirath.lua +++ /dev/null @@ -1,102 +0,0 @@ -local config = { - boss = { - name = "Plagirath", - position = Position(33172, 31501, 13), - }, - timeToDefeat = 17 * 60, -- 17 minutes in seconds - playerPositions = { - { pos = Position(33229, 31500, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33229, 31501, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33229, 31502, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33229, 31503, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33229, 31504, 13), teleport = Position(33173, 31504, 13), effect = CONST_ME_TELEPORT }, - }, - specPos = { - from = Position(33159, 31488, 13), - to = Position(33190, 31515, 13), - }, - exit = Position(33319, 32318, 13), -} - -local leverPlagirath = Action() - -function leverPlagirath.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local spectators = Game.getSpectators(config.specPos.from, false, false, 0, 0, 0, 0, config.specPos.to) - for _, spec in pairs(spectators) do - if spec:isPlayer() then - player:say("Someone is already inside the room.", TALKTYPE_MONSTER_SAY) - return true - end - end - - if isBossInRoom(config.specPos.from, config.specPos.to, config.boss.name) then - player:say("The room is being cleared. Please wait a moment.", TALKTYPE_MONSTER_SAY) - return true - end - - local players = {} - for i = 1, #config.playerPositions do - local pos = config.playerPositions[i].pos - local creature = Tile(pos):getTopCreature() - if not creature or not creature:isPlayer() then - player:sendCancelMessage("You need " .. #config.playerPositions .. " players to challenge " .. config.boss.name .. ".") - return true - end - table.insert(players, creature) - end - - for i = 1, #players do - local playerToTeleport = players[i] - local teleportPos = config.playerPositions[i].teleport - local effect = config.playerPositions[i].effect - playerToTeleport:teleportTo(teleportPos) - teleportPos:sendMagicEffect(effect) - end - - Game.createMonster(config.boss.name, config.boss.position) - - addEvent(clearBossRoom, config.timeToDefeat * 1000, config.specPos.from, config.specPos.to, config.exit) - - if item.itemid == 8911 then - item:transform(8912) - else - item:transform(8911) - end - - return true -end - -function clearBossRoom(fromPos, toPos, exitPos) - local spectators = Game.getSpectators(fromPos, false, false, 0, 0, 0, 0, toPos) - for _, spec in pairs(spectators) do - if spec:isPlayer() then - spec:teleportTo(exitPos) - exitPos:sendMagicEffect(CONST_ME_TELEPORT) - spec:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You took too long, the battle has ended.") - else - spec:remove() - end - end -end - -function isBossInRoom(fromPos, toPos, bossName) - local monstersRemoved = false - for x = fromPos.x, toPos.x do - for y = fromPos.y, toPos.y do - for z = fromPos.z, toPos.z do - local tile = Tile(Position(x, y, z)) - if tile then - local creature = tile:getTopCreature() - if creature and creature:isMonster() then - creature:remove() - monstersRemoved = true - end - end - end - end - end - return monstersRemoved -end - -leverPlagirath:uid(1022) -leverPlagirath:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ragiaz.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ragiaz.lua deleted file mode 100644 index cbe9d13ba35..00000000000 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_ragiaz.lua +++ /dev/null @@ -1,114 +0,0 @@ -local config = { - boss = { - name = "Ragiaz", - position = Position(33481, 32334, 13), - }, - - timeToDefeat = 17 * 60, -- 17 minutes in seconds - playerPositions = { - { pos = Position(33456, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33457, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33458, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33459, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33460, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, - }, - monsters = { - { name = "Death Dragon", pos = Position(33476, 32331, 13) }, - { name = "Death Dragon", pos = Position(33476, 32340, 13) }, - { name = "Death Dragon", pos = Position(33487, 32340, 13) }, - { name = "Death Dragon", pos = Position(33488, 32331, 13) }, - }, - specPos = { - from = Position(33468, 32319, 13), - to = Position(33495, 32347, 13), - }, - exit = Position(33319, 32318, 13), -} - -local leverRagiaz = Action() - -function leverRagiaz.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local spectators = Game.getSpectators(config.specPos.from, false, false, 0, 0, 0, 0, config.specPos.to) - for _, spec in pairs(spectators) do - if spec:isPlayer() then - player:say("Someone is already inside the room.", TALKTYPE_MONSTER_SAY) - return true - end - end - - if isBossInRoom(config.specPos.from, config.specPos.to, config.boss.name) then - player:say("The room is being cleared. Please wait a moment.", TALKTYPE_MONSTER_SAY) - return true - end - - local players = {} - for i = 1, #config.playerPositions do - local pos = config.playerPositions[i].pos - local creature = Tile(pos):getTopCreature() - if not creature or not creature:isPlayer() then - player:sendCancelMessage("You need " .. #config.playerPositions .. " players to challenge " .. config.boss.name .. ".") - return true - end - table.insert(players, creature) - end - - for i = 1, #players do - local playerToTeleport = players[i] - local teleportPos = config.playerPositions[i].teleport - local effect = config.playerPositions[i].effect - playerToTeleport:teleportTo(teleportPos) - teleportPos:sendMagicEffect(effect) - end - - Game.createMonster(config.boss.name, config.boss.position) - - for i = 1, #config.monsters do - local monsterConfig = config.monsters[i] - Game.createMonster(monsterConfig.name, monsterConfig.pos, true, true) - end - - addEvent(clearBossRoom, config.timeToDefeat * 1000, config.specPos.from, config.specPos.to, config.exit) - - if item.itemid == 8911 then - item:transform(8912) - else - item:transform(8911) - end - - return true -end - -function clearBossRoom(fromPos, toPos, exitPos) - local spectators = Game.getSpectators(fromPos, false, false, 0, 0, 0, 0, toPos) - for _, spec in pairs(spectators) do - if spec:isPlayer() then - spec:teleportTo(exitPos) - exitPos:sendMagicEffect(CONST_ME_TELEPORT) - spec:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You took too long, the battle has ended.") - else - spec:remove() - end - end -end - -function isBossInRoom(fromPos, toPos, bossName) - local monstersRemoved = false - for x = fromPos.x, toPos.x do - for y = fromPos.y, toPos.y do - for z = fromPos.z, toPos.z do - local tile = Tile(Position(x, y, z)) - if tile then - local creature = tile:getTopCreature() - if creature and creature:isMonster() then - creature:remove() - monstersRemoved = true - end - end - end - end - end - return monstersRemoved -end - -leverRagiaz:uid(1023) -leverRagiaz:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_rat_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_rat_lever.lua deleted file mode 100644 index 13ef7bb84e2..00000000000 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_rat_lever.lua +++ /dev/null @@ -1,102 +0,0 @@ -local config = { - boss = { - name = "The Lord of The Lice", - position = Position(33220, 31460, 12), - }, - timeToDefeat = 17 * 60, -- 17 minutes in seconds - playerPositions = { - { pos = Position(33197, 31475, 11), teleport = Position(33215, 31470, 12), effect = CONST_ME_TELEPORT }, - { pos = Position(33198, 31475, 11), teleport = Position(33215, 31470, 12), effect = CONST_ME_TELEPORT }, - { pos = Position(33199, 31475, 11), teleport = Position(33215, 31470, 12), effect = CONST_ME_TELEPORT }, - { pos = Position(33200, 31475, 11), teleport = Position(33215, 31470, 12), effect = CONST_ME_TELEPORT }, - { pos = Position(33201, 31475, 11), teleport = Position(33215, 31470, 12), effect = CONST_ME_TELEPORT }, - }, - specPos = { - from = Position(33187, 31429, 12), - to = Position(33242, 31487, 12), - }, - exit = Position(33319, 32318, 13), -} - -local ferumbrasAscendantRatLever = Action() - -function ferumbrasAscendantRatLever.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local spectators = Game.getSpectators(config.specPos.from, false, false, 0, 0, 0, 0, config.specPos.to) - for _, spec in pairs(spectators) do - if spec:isPlayer() then - player:say("Someone is already inside the room.", TALKTYPE_MONSTER_SAY) - return true - end - end - - if isBossInRoom(config.specPos.from, config.specPos.to, config.boss.name) then - player:say("The room is being cleared. Please wait a moment.", TALKTYPE_MONSTER_SAY) - return true - end - - local players = {} - for i = 1, #config.playerPositions do - local pos = config.playerPositions[i].pos - local creature = Tile(pos):getTopCreature() - if not creature or not creature:isPlayer() then - player:sendCancelMessage("You need " .. #config.playerPositions .. " players to challenge " .. config.boss.name .. ".") - return true - end - table.insert(players, creature) - end - - for i = 1, #players do - local playerToTeleport = players[i] - local teleportPos = config.playerPositions[i].teleport - local effect = config.playerPositions[i].effect - playerToTeleport:teleportTo(teleportPos) - teleportPos:sendMagicEffect(effect) - end - - Game.createMonster(config.boss.name, config.boss.position) - - addEvent(clearBossRoom, config.timeToDefeat * 1000, config.specPos.from, config.specPos.to, config.exit) - - if item.itemid == 8911 then - item:transform(8912) - else - item:transform(8911) - end - - return true -end - -function clearBossRoom(fromPos, toPos, exitPos) - local spectators = Game.getSpectators(fromPos, false, false, 0, 0, 0, 0, toPos) - for _, spec in pairs(spectators) do - if spec:isPlayer() then - spec:teleportTo(exitPos) - exitPos:sendMagicEffect(CONST_ME_TELEPORT) - spec:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You took too long, the battle has ended.") - else - spec:remove() - end - end -end - -function isBossInRoom(fromPos, toPos, bossName) - local bossRemoved = false - for x = fromPos.x, toPos.x do - for y = fromPos.y, toPos.y do - for z = fromPos.z, toPos.z do - local tile = Tile(Position(x, y, z)) - if tile then - local creature = tile:getTopCreature() - if creature and creature:isMonster() and creature:getName() == bossName then - creature:remove() - bossRemoved = true - end - end - end - end - end - return bossRemoved -end - -ferumbrasAscendantRatLever:uid(1030) -ferumbrasAscendantRatLever:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_razzagorn.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_razzagorn.lua deleted file mode 100644 index c24ec5d2e37..00000000000 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_razzagorn.lua +++ /dev/null @@ -1,102 +0,0 @@ -local config = { - boss = { - name = "Razzagorn", - position = Position(33422, 32467, 14), - }, - timeToDefeat = 17 * 60, -- 17 minutes in seconds - playerPositions = { - { pos = Position(33386, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, - { pos = Position(33387, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, - { pos = Position(33388, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, - { pos = Position(33389, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, - { pos = Position(33390, 32455, 14), teleport = Position(33419, 32467, 14), effect = CONST_ME_TELEPORT }, - }, - specPos = { - from = Position(33407, 32453, 14), - to = Position(33439, 32481, 14), - }, - exit = Position(33319, 32318, 13), -} - -local leverRazzagorn = Action() - -function leverRazzagorn.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local spectators = Game.getSpectators(config.specPos.from, false, false, 0, 0, 0, 0, config.specPos.to) - for _, spec in pairs(spectators) do - if spec:isPlayer() then - player:say("Someone is already inside the room.", TALKTYPE_MONSTER_SAY) - return true - end - end - - if isBossInRoom(config.specPos.from, config.specPos.to, config.boss.name) then - player:say("The room is being cleared. Please wait a moment.", TALKTYPE_MONSTER_SAY) - return true - end - - local players = {} - for i = 1, #config.playerPositions do - local pos = config.playerPositions[i].pos - local creature = Tile(pos):getTopCreature() - if not creature or not creature:isPlayer() then - player:sendCancelMessage("You need " .. #config.playerPositions .. " players to challenge " .. config.boss.name .. ".") - return true - end - table.insert(players, creature) - end - - for i = 1, #players do - local playerToTeleport = players[i] - local teleportPos = config.playerPositions[i].teleport - local effect = config.playerPositions[i].effect - playerToTeleport:teleportTo(teleportPos) - teleportPos:sendMagicEffect(effect) - end - - Game.createMonster(config.boss.name, config.boss.position) - - addEvent(clearBossRoom, config.timeToDefeat * 1000, config.specPos.from, config.specPos.to, config.exit) - - if item.itemid == 8911 then - item:transform(8912) - else - item:transform(8911) - end - - return true -end - -function clearBossRoom(fromPos, toPos, exitPos) - local spectators = Game.getSpectators(fromPos, false, false, 0, 0, 0, 0, toPos) - for _, spec in pairs(spectators) do - if spec:isPlayer() then - spec:teleportTo(exitPos) - exitPos:sendMagicEffect(CONST_ME_TELEPORT) - spec:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You took too long, the battle has ended.") - else - spec:remove() - end - end -end - -function isBossInRoom(fromPos, toPos, bossName) - local monstersRemoved = false - for x = fromPos.x, toPos.x do - for y = fromPos.y, toPos.y do - for z = fromPos.z, toPos.z do - local tile = Tile(Position(x, y, z)) - if tile then - local creature = tile:getTopCreature() - if creature and creature:isMonster() then - creature:remove() - monstersRemoved = true - end - end - end - end - end - return monstersRemoved -end - -leverRazzagorn:uid(1024) -leverRazzagorn:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_shulgrax.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_shulgrax.lua deleted file mode 100644 index 43f5029a6ac..00000000000 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_shulgrax.lua +++ /dev/null @@ -1,102 +0,0 @@ -local config = { - boss = { - name = "Shulgrax", - position = Position(33485, 32786, 13), - }, - timeToDefeat = 17 * 60, -- 17 minutes in seconds - playerPositions = { - { pos = Position(33434, 32785, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33434, 32786, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33434, 32787, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33434, 32788, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, - { pos = Position(33434, 32789, 13), teleport = Position(33485, 32790, 13), effect = CONST_ME_TELEPORT }, - }, - specPos = { - from = Position(33474, 32775, 13), - to = Position(33496, 32798, 13), - }, - exit = Position(33319, 32318, 13), -} - -local leverShulgrax = Action() - -function leverShulgrax.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local spectators = Game.getSpectators(config.specPos.from, false, false, 0, 0, 0, 0, config.specPos.to) - for _, spec in pairs(spectators) do - if spec:isPlayer() then - player:say("Someone is already inside the room.", TALKTYPE_MONSTER_SAY) - return true - end - end - - if isBossInRoom(config.specPos.from, config.specPos.to, config.boss.name) then - player:say("The room is being cleared. Please wait a moment.", TALKTYPE_MONSTER_SAY) - return true - end - - local players = {} - for i = 1, #config.playerPositions do - local pos = config.playerPositions[i].pos - local creature = Tile(pos):getTopCreature() - if not creature or not creature:isPlayer() then - player:sendCancelMessage("You need " .. #config.playerPositions .. " players to challenge " .. config.boss.name .. ".") - return true - end - table.insert(players, creature) - end - - for i = 1, #players do - local playerToTeleport = players[i] - local teleportPos = config.playerPositions[i].teleport - local effect = config.playerPositions[i].effect - playerToTeleport:teleportTo(teleportPos) - teleportPos:sendMagicEffect(effect) - end - - Game.createMonster(config.boss.name, config.boss.position) - - addEvent(clearBossRoom, config.timeToDefeat * 1000, config.specPos.from, config.specPos.to, config.exit) - - if item.itemid == 8911 then - item:transform(8912) - else - item:transform(8911) - end - - return true -end - -function clearBossRoom(fromPos, toPos, exitPos) - local spectators = Game.getSpectators(fromPos, false, false, 0, 0, 0, 0, toPos) - for _, spec in pairs(spectators) do - if spec:isPlayer() then - spec:teleportTo(exitPos) - exitPos:sendMagicEffect(CONST_ME_TELEPORT) - spec:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You took too long, the battle has ended.") - else - spec:remove() - end - end -end - -function isBossInRoom(fromPos, toPos, bossName) - local monstersRemoved = false - for x = fromPos.x, toPos.x do - for y = fromPos.y, toPos.y do - for z = fromPos.z, toPos.z do - local tile = Tile(Position(x, y, z)) - if tile then - local creature = tile:getTopCreature() - if creature and creature:isMonster() then - creature:remove() - monstersRemoved = true - end - end - end - end - end - return monstersRemoved -end - -leverShulgrax:uid(1028) -leverShulgrax:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_tarbaz.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_tarbaz.lua deleted file mode 100644 index dfda8c76e8d..00000000000 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_tarbaz.lua +++ /dev/null @@ -1,102 +0,0 @@ -local config = { - boss = { - name = "Tarbaz", - position = Position(33459, 32844, 11), - }, - timeToDefeat = 17 * 60, -- 17 minutes in seconds - playerPositions = { - { pos = Position(33418, 32849, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, - { pos = Position(33418, 32850, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, - { pos = Position(33418, 32851, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, - { pos = Position(33418, 32852, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, - { pos = Position(33418, 32853, 11), teleport = Position(33459, 32848, 11), effect = CONST_ME_TELEPORT }, - }, - specPos = { - from = Position(33447, 32832, 11), - to = Position(33473, 32856, 11), - }, - exit = Position(33319, 32318, 13), -} - -local leverTarbaz = Action() - -function leverTarbaz.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local spectators = Game.getSpectators(config.specPos.from, false, false, 0, 0, 0, 0, config.specPos.to) - for _, spec in pairs(spectators) do - if spec:isPlayer() then - player:say("Someone is already inside the room.", TALKTYPE_MONSTER_SAY) - return true - end - end - - if isBossInRoom(config.specPos.from, config.specPos.to, config.boss.name) then - player:say("The room is being cleared. Please wait a moment.", TALKTYPE_MONSTER_SAY) - return true - end - - local players = {} - for i = 1, #config.playerPositions do - local pos = config.playerPositions[i].pos - local creature = Tile(pos):getTopCreature() - if not creature or not creature:isPlayer() then - player:sendCancelMessage("You need " .. #config.playerPositions .. " players to challenge " .. config.boss.name .. ".") - return true - end - table.insert(players, creature) - end - - for i = 1, #players do - local playerToTeleport = players[i] - local teleportPos = config.playerPositions[i].teleport - local effect = config.playerPositions[i].effect - playerToTeleport:teleportTo(teleportPos) - teleportPos:sendMagicEffect(effect) - end - - Game.createMonster(config.boss.name, config.boss.position) - - addEvent(clearBossRoom, config.timeToDefeat * 1000, config.specPos.from, config.specPos.to, config.exit) - - if item.itemid == 8911 then - item:transform(8912) - else - item:transform(8911) - end - - return true -end - -function clearBossRoom(fromPos, toPos, exitPos) - local spectators = Game.getSpectators(fromPos, false, false, 0, 0, 0, 0, toPos) - for _, spec in pairs(spectators) do - if spec:isPlayer() then - spec:teleportTo(exitPos) - exitPos:sendMagicEffect(CONST_ME_TELEPORT) - spec:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You took too long, the battle has ended.") - else - spec:remove() - end - end -end - -function isBossInRoom(fromPos, toPos, bossName) - local monstersRemoved = false - for x = fromPos.x, toPos.x do - for y = fromPos.y, toPos.y do - for z = fromPos.z, toPos.z do - local tile = Tile(Position(x, y, z)) - if tile then - local creature = tile:getTopCreature() - if creature and creature:isMonster() then - creature:remove() - monstersRemoved = true - end - end - end - end - end - return monstersRemoved -end - -leverTarbaz:uid(1027) -leverTarbaz:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_the_shatterer_lever.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_the_shatterer_lever.lua deleted file mode 100644 index 221a4bdc850..00000000000 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_the_shatterer_lever.lua +++ /dev/null @@ -1,112 +0,0 @@ -local config = { - boss = { - name = "The Shatterer", - position = Position(33406, 32418, 14), - }, - timeToDefeat = 17 * 60, -- 17 minutes in seconds - playerPositions = { - { pos = Position(33403, 32465, 13), teleport = Position(33398, 32414, 14), effect = CONST_ME_TELEPORT }, - { pos = Position(33404, 32465, 13), teleport = Position(33398, 32414, 14), effect = CONST_ME_TELEPORT }, - { pos = Position(33405, 32465, 13), teleport = Position(33398, 32414, 14), effect = CONST_ME_TELEPORT }, - { pos = Position(33406, 32465, 13), teleport = Position(33398, 32414, 14), effect = CONST_ME_TELEPORT }, - { pos = Position(33407, 32465, 13), teleport = Position(33398, 32414, 14), effect = CONST_ME_TELEPORT }, - }, - specPos = { - from = Position(33377, 32390, 14), - to = Position(33446, 32447, 14), - }, - exit = Position(33319, 32318, 13), - centerRoom = Position(33406, 32418, 14), - storage = { - lever = Storage.Quest.U10_90.FerumbrasAscension.TheShattererLever, - timer = Storage.Quest.U10_90.FerumbrasAscension.TheShattererTimer, - }, -} - -local ferumbrasAscendantTheShattererLever = Action() - -function ferumbrasAscendantTheShattererLever.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local spectators = Game.getSpectators(config.centerRoom, false, false, 30, 30, 30, 30) - for _, spec in pairs(spectators) do - if spec:isPlayer() then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Someone is fighting with The Shatterer.") - return true - end - end - - if isBossInRoom(config.specPos.from, config.specPos.to, config.boss.name) then - player:say("The room is being cleared. Please wait a moment.", TALKTYPE_MONSTER_SAY) - return true - end - - local players = {} - for i = 1, #config.playerPositions do - local pos = config.playerPositions[i].pos - local creature = Tile(pos):getTopCreature() - if not creature or not creature:isPlayer() then - player:sendCancelMessage("You need " .. #config.playerPositions .. " players to challenge " .. config.boss.name .. ".") - return true - end - table.insert(players, creature) - end - - for i = 1, #players do - local playerToTeleport = players[i] - local teleportPos = config.playerPositions[i].teleport - local effect = config.playerPositions[i].effect - playerToTeleport:teleportTo(teleportPos) - teleportPos:sendMagicEffect(effect) - end - - Game.createMonster(config.boss.name, config.boss.position, true, true) - - for _, participant in pairs(players) do - participant:setStorageValue(config.storage.lever, 0) - participant:setStorageValue(config.storage.timer, 1) - end - - addEvent(clearBossRoom, config.timeToDefeat * 1000, config.specPos.from, config.specPos.to, config.exit, config.storage.timer) - - if item.itemid == 8911 then - item:transform(8912) - else - item:transform(8911) - end - - return true -end - -function clearBossRoom(fromPos, toPos, exitPos) - local spectators = Game.getSpectators(fromPos, false, false, 0, 0, 0, 0, toPos) - for _, spec in pairs(spectators) do - if spec:isPlayer() then - spec:teleportTo(exitPos) - exitPos:sendMagicEffect(CONST_ME_TELEPORT) - spec:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You took too long, the battle has ended.") - else - spec:remove() - end - end -end - -function isBossInRoom(fromPos, toPos, bossName) - local bossRemoved = false - for x = fromPos.x, toPos.x do - for y = fromPos.y, toPos.y do - for z = fromPos.z, toPos.z do - local tile = Tile(Position(x, y, z)) - if tile then - local creature = tile:getTopCreature() - if creature and creature:isMonster() and creature:getName() == bossName then - creature:remove() - bossRemoved = true - end - end - end - end - end - return bossRemoved -end - -ferumbrasAscendantTheShattererLever:uid(1029) -ferumbrasAscendantTheShattererLever:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_zamulosh.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_zamulosh.lua deleted file mode 100644 index 74e7740bc9f..00000000000 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/actions_zamulosh.lua +++ /dev/null @@ -1,116 +0,0 @@ -local config = { - boss = { - name = "Zamulosh", - position = Position(33643, 32756, 11), - }, - timeToDefeat = 17 * 60, -- 17 minutes in seconds - playerPositions = { - { pos = Position(33680, 32741, 11), teleport = Position(33644, 32760, 11), effect = CONST_ME_TELEPORT }, - }, - specPos = { - from = Position(33632, 32747, 11), - to = Position(33654, 32765, 11), - }, - exit = Position(33319, 32318, 13), - summons = { - Position(33642, 32756, 11), - Position(33642, 32756, 11), - Position(33642, 32756, 11), - Position(33644, 32756, 11), - Position(33644, 32756, 11), - Position(33644, 32756, 11), - }, -} - -local leverZamulosh = Action() - -function leverZamulosh.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local spectators = Game.getSpectators(config.specPos.from, false, false, 0, 0, 0, 0, config.specPos.to) - for _, spec in pairs(spectators) do - if spec:isPlayer() then - player:say("Someone is already inside the room.", TALKTYPE_MONSTER_SAY) - return true - end - end - - if isBossInRoom(config.specPos.from, config.specPos.to, config.boss.name) then - player:say("The room is being cleared. Please wait a moment.", TALKTYPE_MONSTER_SAY) - return true - end - - local players = {} - for i = 1, #config.playerPositions do - local pos = config.playerPositions[i].pos - local creature = Tile(pos):getTopCreature() - if not creature or not creature:isPlayer() then - player:sendCancelMessage("You need " .. #config.playerPositions .. " players to challenge " .. config.boss.name .. ".") - return true - end - table.insert(players, creature) - end - - for i = 1, #players do - local playerToTeleport = players[i] - local teleportPos = config.playerPositions[i].teleport - local effect = config.playerPositions[i].effect - playerToTeleport:teleportTo(teleportPos) - teleportPos:sendMagicEffect(effect) - end - - Game.createMonster(config.boss.name, config.boss.position) - - local zamuloshIndex = math.random(#config.summons) - - for i, summonPos in ipairs(config.summons) do - if i == zamuloshIndex then - Game.createMonster(config.boss.name, summonPos) - else - Game.createMonster("Zamulosh3", summonPos) - end - end - - addEvent(clearBossRoom, config.timeToDefeat * 1000, config.specPos.from, config.specPos.to, config.exit) - - if item.itemid == 8911 then - item:transform(8912) - else - item:transform(8911) - end - - return true -end - -function clearBossRoom(fromPos, toPos, exitPos) - local spectators = Game.getSpectators(fromPos, false, false, 0, 0, 0, 0, toPos) - for _, spec in pairs(spectators) do - if spec:isPlayer() then - spec:teleportTo(exitPos) - exitPos:sendMagicEffect(CONST_ME_TELEPORT) - spec:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You took too long, the battle has ended.") - else - spec:remove() - end - end -end - -function isBossInRoom(fromPos, toPos, bossName) - local monstersRemoved = false - for x = fromPos.x, toPos.x do - for y = fromPos.y, toPos.y do - for z = fromPos.z, toPos.z do - local tile = Tile(Position(x, y, z)) - if tile then - local creature = tile:getTopCreature() - if creature and creature:isMonster() then - creature:remove() - monstersRemoved = true - end - end - end - end - end - return monstersRemoved -end - -leverZamulosh:uid(1026) -leverZamulosh:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_bosses_kill.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_bosses_kill.lua deleted file mode 100644 index e01e22f1534..00000000000 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/creaturescripts_bosses_kill.lua +++ /dev/null @@ -1,135 +0,0 @@ -local bosses = { - ["the lord of the lice"] = { - teleportPos = Position(33226, 31478, 12), - godbreakerPos = Position(33237, 31477, 13), - cooldown = 44, -- hours - storage = Storage.Quest.U10_90.FerumbrasAscension.TheLordOfTheLiceTime, - }, - ["tarbaz"] = { - teleportPos = Position(33460, 32853, 11), - godbreakerPos = Position(33427, 32852, 13), - cooldown = 44, -- hours - storage = Storage.Quest.U10_90.FerumbrasAscension.TarbazTime, - }, - ["ragiaz"] = { - teleportPos = Position(33482, 32345, 13), - godbreakerPos = Position(33466, 32392, 13), - cooldown = 44, -- hours - storage = Storage.Quest.U10_90.FerumbrasAscension.RagiazTime, - }, - ["plagirath"] = { - teleportPos = Position(33174, 31511, 13), - godbreakerPos = Position(33204, 31510, 13), - cooldown = 44, -- hours - storage = Storage.Quest.U10_90.FerumbrasAscension.PlagirathTime, - }, - ["razzagorn"] = { - teleportPos = Position(33357, 32434, 12), - godbreakerPos = Position(33357, 32440, 13), - cooldown = 44, -- hours - storage = Storage.Quest.U10_90.FerumbrasAscension.RazzagornTime, - }, - ["zamulosh"] = { - teleportPos = Position(33644, 32764, 11), - godbreakerPos = Position(33678, 32758, 13), - cooldown = 44, -- hours - storage = Storage.Quest.U10_90.FerumbrasAscension.ZamuloshTime, - }, - ["mazoran"] = { - teleportPos = Position(33585, 32699, 14), - godbreakerPos = Position(33614, 32679, 15), - cooldown = 44, -- hours - storage = Storage.Quest.U10_90.FerumbrasAscension.MazoranTime, - }, - ["shulgrax"] = { - teleportPos = Position(33486, 32796, 13), - godbreakerPos = Position(33459, 32820, 14), - cooldown = 44, -- hours - storage = Storage.Quest.U10_90.FerumbrasAscension.ShulgraxTime, - }, - ["ferumbras mortal shell"] = { - teleportPos = Position(33392, 31485, 14), - godbreakerPos = Position(33388, 31414, 14), - cooldown = 332, -- hours - 13 days and 20 hours - storage = Storage.Quest.U10_90.FerumbrasAscension.FerumbrasMortalShellTime, - }, -} - -local crystals = { - [1] = { crystalPosition = Position(33390, 31468, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal1 }, - [2] = { crystalPosition = Position(33394, 31468, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal2 }, - [3] = { crystalPosition = Position(33397, 31471, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal3 }, - [4] = { crystalPosition = Position(33397, 31475, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal4 }, - [5] = { crystalPosition = Position(33394, 31478, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal5 }, - [6] = { crystalPosition = Position(33390, 31478, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal6 }, - [7] = { crystalPosition = Position(33387, 31475, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal7 }, - [8] = { crystalPosition = Position(33387, 31471, 14), globalStorage = Storage.Quest.U10_90.FerumbrasAscension.Crystals.Crystal8 }, -} - -local function transformCrystal(player) - for c = 1, #crystals do - local crystal = crystals[c] - player:setStorageValue(crystal.globalStorage, 0) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.Crystals.AllCrystals, 0) - local item = Tile(crystal.crystalPosition):getItemById(14961) - if item then - item:transform(14955) - end - end -end - -local function revertTeleport(position, itemId, transformId, destination) - local item = Tile(position):getItemById(itemId) - if item then - item:transform(transformId) - item:setDestination(destination) - end -end - -local ascendantBossesKill = CreatureEvent("AscendantBossesDeath") - -local function formatCooldownMessage(cooldownHours) - local days = math.floor(cooldownHours / 24) - local hours = cooldownHours % 24 - if days > 0 then - return string.format("%d days and %d hours", days, hours) - else - return string.format("%d hours", hours) - end -end - -function ascendantBossesKill.onDeath(creature) - local bossConfig = bosses[creature:getName():lower()] - if not bossConfig then - return true - end - - onDeathForDamagingPlayers(creature, function(creature, player) - local bossName = creature:getName():lower() - if bossConfig.storage then - local cooldownTime = bossConfig.cooldown * 3600 - local nextAvailableTime = os.time() + cooldownTime - player:setStorageValue(bossConfig.storage, nextAvailableTime) - local cooldownMessage = formatCooldownMessage(bossConfig.cooldown) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have defeated " .. bossName .. ". You can challenge this boss again in " .. cooldownMessage .. ".") - end - end) - - local teleport = Tile(bossConfig.teleportPos):getItemById(1949) - if teleport then - teleport:transform(22761) - teleport:getPosition():sendMagicEffect(CONST_ME_THUNDER) - teleport:setDestination(bossConfig.godbreakerPos) - addEvent(revertTeleport, 1 * 60 * 1000, bossConfig.teleportPos, 22761, 1949, Position(33319, 32318, 13)) - end - - if creature:getName():lower() == "ferumbras mortal shell" then - onDeathForDamagingPlayers(creature, function(creature, player) - addEvent(transformCrystal, 2 * 60 * 1000, player) - end) - end - - return true -end - -ascendantBossesKill:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_boss_teleport.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_boss_teleport.lua deleted file mode 100644 index 41bf3809f13..00000000000 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_boss_teleport.lua +++ /dev/null @@ -1,79 +0,0 @@ -local config = { - [24830] = { - storage = Storage.Quest.U10_90.FerumbrasAscension.Razzagorn, - cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.RazzagornTime, - bossName = "Razzagorn", - }, - [24831] = { - storage = Storage.Quest.U10_90.FerumbrasAscension.Ragiaz, - cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.RagiazTime, - bossName = "Ragiaz", - }, - [24832] = { - storage = Storage.Quest.U10_90.FerumbrasAscension.Zamulosh, - cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.ZamuloshTime, - bossName = "Zamulosh", - }, - [24833] = { - storage = Storage.Quest.U10_90.FerumbrasAscension.Mazoran, - cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.MazoranTime, - bossName = "Mazoran", - }, - [24834] = { - storage = Storage.Quest.U10_90.FerumbrasAscension.Tarbaz, - cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.TarbazTime, - bossName = "Tarbaz", - }, - [24835] = { - storage = Storage.Quest.U10_90.FerumbrasAscension.Shulgrax, - cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.ShulgraxTime, - bossName = "Shulgrax", - }, - [24836] = { - storage = Storage.Quest.U10_90.FerumbrasAscension.Plagirath, - cooldownStorage = Storage.Quest.U10_90.FerumbrasAscension.PlagirathTime, - bossName = "Plagirath", - }, -} - -local bossTeleport = MoveEvent() - -function bossTeleport.onStepIn(creature, item, position, fromPosition) - local teleportConfig = config[item.actionid] - if not teleportConfig then - return false - end - local player = creature:getPlayer() - if not player then - return true - end - - local cooldownStorage = teleportConfig.cooldownStorage - local bossName = teleportConfig.bossName - local cooldownTime = player:getStorageValue(cooldownStorage) - - if cooldownTime > os.time() then - local remainingTime = cooldownTime - os.time() - local hours = math.floor(remainingTime / 3600) - local minutes = math.floor((remainingTime % 3600) / 60) - player:teleportTo(fromPosition) - player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - return true - end - - if player:getStorageValue(teleportConfig.storage) ~= 1 then - player:teleportTo(fromPosition) - player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - return true - end - - return true -end - -bossTeleport:type("stepin") - -for index, value in pairs(config) do - bossTeleport:aid(index) -end - -bossTeleport:register() diff --git a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_desperate_soul.lua b/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_desperate_soul.lua deleted file mode 100644 index 4d2fc197bc4..00000000000 --- a/data-otservbr-global/scripts/quests/ferumbras_ascension/movements_desperate_soul.lua +++ /dev/null @@ -1,24 +0,0 @@ -local desperateSoul = MoveEvent() - -function desperateSoul.onStepIn(creature, item, position, fromPosition) - if not creature:isMonster() or creature:getName():lower() ~= "desperate soul" then - return true - end - - creature:remove() - position:sendMagicEffect(CONST_ME_POFF) - - local player = Tile(fromPosition):getTopCreature() - if player and player:isPlayer() then - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FerumbrasEssence, 1) - addEvent(function() - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.FerumbrasEssence, 0) - end, 2 * 60 * 1000) - end - - return true -end - -desperateSoul:type("stepin") -desperateSoul:aid(54390) -desperateSoul:register() diff --git a/data-otservbr-global/scripts/quests/formogar_mine_hoist/movements_hoist.lua b/data-otservbr-global/scripts/quests/formogar_mine_hoist/movements_hoist.lua index 5fd560ef6db..1673696aaea 100644 --- a/data-otservbr-global/scripts/quests/formogar_mine_hoist/movements_hoist.lua +++ b/data-otservbr-global/scripts/quests/formogar_mine_hoist/movements_hoist.lua @@ -6,7 +6,7 @@ function hoist.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.FormorgarMinesHoistSkeleton) ~= 1 or player:getStorageValue(Storage.Quest.U8_0.TheIceIslands.FormorgarMinesHoistChest) ~= 1 then + if player:getStorageValue(Storage.QuestChests.FormorgarMinesHoistSkeleton) ~= 1 or player:getStorageValue(Storage.QuestChests.FormorgarMinesHoistChest) ~= 1 then player:teleportTo(fromPosition) player:getPosition():sendMagicEffect(CONST_ME_POFF) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You must first find the hoist instruction before using it.") diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_amforas.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_amforas.lua similarity index 70% rename from data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_amforas.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_amforas.lua index fd0409e50f8..fa21b30302e 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_amforas.lua +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_amforas.lua @@ -1,9 +1,9 @@ local gravediggerAmforas = Action() function gravediggerAmforas.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission05) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission06) ~= 1 then + if player:getStorageValue(Storage.GravediggerOfDrefia.Mission05) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission06) ~= 1 then local chances = math.random(30) if chances == 13 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission06, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission06, 1) player:say("You've got an amazing heart!", TALKTYPE_MONSTER_SAY) player:getPosition():sendMagicEffect(CONST_ME_HEARTS) player:addItem(19077, 1) diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_ashes.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_ashes.lua similarity index 60% rename from data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_ashes.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_ashes.lua index 2f0666aed31..7d8ce67c2e4 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_ashes.lua +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_ashes.lua @@ -4,8 +4,8 @@ function gravediggerAshes.onUse(player, item, fromPosition, target, toPosition, return false end - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission28) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission29) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission29, 1) + if player:getStorageValue(Storage.GravediggerOfDrefia.Mission28) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission29) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission29, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The ashes swirl with a life of their own, mixing with the sparks of the altar.") item:remove(1) end diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_blood.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_blood.lua similarity index 57% rename from data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_blood.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_blood.lua index 3a63c70c89d..7047c57eb0f 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_blood.lua +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_blood.lua @@ -1,6 +1,6 @@ local config = { - [4644] = { storageKey = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission36, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission36a }, message = "The blood in the vial is of a deep, ruby red.", itemId = 19101 }, - [4645] = { storageKey = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission36a, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission37 }, message = "The blood in the vial is of a strange colour, as if tainted.", itemId = 19102 }, + [4644] = { storageKey = { Storage.GravediggerOfDrefia.Mission36, Storage.GravediggerOfDrefia.Mission36a }, message = "The blood in the vial is of a deep, ruby red.", itemId = 21418 }, + [4645] = { storageKey = { Storage.GravediggerOfDrefia.Mission36a, Storage.GravediggerOfDrefia.Mission37 }, message = "The blood in the vial is of a strange colour, as if tainted.", itemId = 21419 }, } local gravediggerBlood = Action() diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_bones.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_bones.lua similarity index 53% rename from data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_bones.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_bones.lua index 85ec1a05be4..7e762e3d2c5 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_bones.lua +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_bones.lua @@ -4,8 +4,8 @@ function gravediggerBones.onUse(player, item, fromPosition, target, toPosition, return false end - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission17) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission19) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission19, 1) + if player:getStorageValue(Storage.GravediggerOfDrefia.Mission17) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission19) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission19, 1) player:addItem(19089, 1) item:remove() end diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_bookcase.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_bookcase.lua similarity index 68% rename from data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_bookcase.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_bookcase.lua index 4a5132f80fb..9d999259a8c 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_bookcase.lua +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_bookcase.lua @@ -1,7 +1,7 @@ local gravediggerBook = Action() function gravediggerBook.onUse(player, item, fromPosition, itemEx, toPosition) - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Bookcase) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Bookcase, 1) + if player:getStorageValue(Storage.GravediggerOfDrefia.Bookcase) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Bookcase, 1) player:addItem(19158, 1) player:say("You have found a crumpled paper.", TALKTYPE_MONSTER_SAY) else diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_brain.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_brain.lua similarity index 74% rename from data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_brain.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_brain.lua index ab3cc28d95a..370545b18d7 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_brain.lua +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_brain.lua @@ -2,9 +2,9 @@ local gravediggerBrain = Action() function gravediggerBrain.onUse(player, item, fromPosition, target, toPosition, isHotkey) local rightbrain = Tile(Position(33025, 32332, 10)) local leftbrain = Tile(Position(33020, 32332, 10)) - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission08) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission09) < 1 then + if player:getStorageValue(Storage.GravediggerOfDrefia.Mission08) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission09) < 1 then if leftbrain:getItemById(9659) and rightbrain:getItemById(9659) then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission09, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission09, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, " ") leftbrain:getItemById(9659):remove() rightbrain:getItemById(9659):remove() diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_caixa.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_caixa.lua similarity index 55% rename from data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_caixa.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_caixa.lua index c21f7d8996f..421d8585d5b 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_caixa.lua +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_caixa.lua @@ -1,7 +1,7 @@ local gravediggerCaixa = Action() function gravediggerCaixa.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission67) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission68) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission68, 1) + if player:getStorageValue(Storage.GravediggerOfDrefia.Mission67) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission68) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission68, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found an incantation fragment.") player:addItem(18933, 1) end diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_candles.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_candles.lua similarity index 62% rename from data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_candles.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_candles.lua index 83590484c5a..d75088bb5ed 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_candles.lua +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_candles.lua @@ -4,8 +4,8 @@ function gravediggerCandles.onUse(player, item, fromPosition, target, toPosition return false end - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission31) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission32) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission32, 1) + if player:getStorageValue(Storage.GravediggerOfDrefia.Mission31) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission32) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission32, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Reading the parchment, you identify three human tallow candles and pocket them.") player:addItem(18931, 3) item:remove(1) diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_cape.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_cape.lua similarity index 58% rename from data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_cape.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_cape.lua index da540e4e7b4..fe8a07f677f 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_cape.lua +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_cape.lua @@ -1,7 +1,7 @@ local gravediggerCape = Action() function gravediggerCape.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission59) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission60) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission60, 1) + if player:getStorageValue(Storage.GravediggerOfDrefia.Mission59) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission60) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission60, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You now look like a Necromancer.") player:getPosition():sendMagicEffect(CONST_ME_POFF) player:removeItem(19148, 1) diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_chalk.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_chalk.lua similarity index 63% rename from data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_chalk.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_chalk.lua index 6e9f17f1d56..ccbdafcace2 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_chalk.lua +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_chalk.lua @@ -4,8 +4,8 @@ function gravediggerChalk.onUse(player, item, fromPosition, target, toPosition, return false end - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission27) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission28) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission28, 1) + if player:getStorageValue(Storage.GravediggerOfDrefia.Mission27) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission28) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission28, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The flame wavers as it engulfs the chalk. Strange ashes appear beside it.") Game.createItem(19129, 1, Position(32983, 32376, 11)) item:remove(1) diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_flask.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_flask.lua new file mode 100644 index 00000000000..987ccb4838a --- /dev/null +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_flask.lua @@ -0,0 +1,17 @@ +local gravediggerFlask = Action() +function gravediggerFlask.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if target.itemid ~= 3998 then + return false + end + + if player:getStorageValue(Storage.GravediggerOfDrefia.Mission11) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission12) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission12, 1) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Done! Report back to Omrabas.") + player:addItem(19086, 1) + item:remove() + end + return true +end + +gravediggerFlask:id(19085) +gravediggerFlask:register() diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_hallowed.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_hallowed.lua similarity index 61% rename from data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_hallowed.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_hallowed.lua index 9f78e921485..44064626a23 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_hallowed.lua +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_hallowed.lua @@ -4,8 +4,8 @@ function gravediggerHallowed.onUse(player, item, fromPosition, target, toPositio return false end - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission19) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission20) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission20, 1) + if player:getStorageValue(Storage.GravediggerOfDrefia.Mission19) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission20) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission20, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The flames roar and eat the bone hungrily. The Dark Lord is satisfied with your gift") item:remove() end diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_inscriptions.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_inscriptions.lua new file mode 100644 index 00000000000..2f1960bfdb4 --- /dev/null +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_inscriptions.lua @@ -0,0 +1,20 @@ +local gravediggerInscriptions = Action() +function gravediggerInscriptions.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if player:getStorageValue(Storage.GravediggerOfDrefia.Mission45) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission46) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission46, 1) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The words seem to breathe, stangely. One word stays in your mind: bronze") + player:getPosition():sendMagicEffect(CONST_ME_ENERGYHIT) + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission46) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission47) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission47, 1) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The words seem to glow slightly. A name fixes in your mind: Takesha Antishu") + player:getPosition():sendMagicEffect(CONST_ME_ENERGYHIT) + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission47) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission48) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission48, 1) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The words seem to flutter. One word stays in your mind: floating") + player:getPosition():sendMagicEffect(CONST_ME_ENERGYHIT) + end + return true +end + +gravediggerInscriptions:aid(4651, 4652, 4653) +gravediggerInscriptions:register() diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_key1.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_key1.lua similarity index 82% rename from data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_key1.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_key1.lua index fc2ecbbabcc..acfc73a775e 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_key1.lua +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_key1.lua @@ -4,7 +4,7 @@ function gravediggerKey1.onUse(player, item, fromPosition, target, toPosition, i return false end - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission31) == 1 then + if player:getStorageValue(Storage.GravediggerOfDrefia.Mission31) == 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, " ") item:remove(1) Tile(Position(33071, 32442, 11)):getItemById(8708):transform(8709) diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_key2.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_key2.lua similarity index 52% rename from data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_key2.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_key2.lua index 1957c95bebc..ae6a0020793 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_key2.lua +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_key2.lua @@ -4,13 +4,13 @@ function gravediggerKey2.onUse(player, item, fromPosition, target, toPosition, i return false end - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission52) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission53) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission53, 1) + if player:getStorageValue(Storage.GravediggerOfDrefia.Mission52) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission53) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission53, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "An invisible hand pulls you inside.") player:teleportTo(Position({ x = 33011, y = 32392, z = 10 })) player:getPosition():sendMagicEffect(CONST_ME_POFF) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission53) == 1 then --and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission55) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission55, 1) + elseif player:getStorageValue(Storage.GravediggerOfDrefia.Mission53) == 1 then --and player:getStorageValue(Storage.GravediggerOfDrefia.Mission55) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission55, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Get out of my room!") player:teleportTo(Position({ x = 33008, y = 32392, z = 10 })) player:getPosition():sendMagicEffect(CONST_ME_POFF) @@ -18,5 +18,5 @@ function gravediggerKey2.onUse(player, item, fromPosition, target, toPosition, i return true end -gravediggerKey2:id(19173) +gravediggerKey2:id(21489) gravediggerKey2:register() diff --git a/data-otservbr-global/scripts/quests/gravedigger/actions_monks.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_monks.lua new file mode 100644 index 00000000000..cfd0f644704 --- /dev/null +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_monks.lua @@ -0,0 +1,24 @@ +local config = { + [4641] = { storageKey = { Storage.GravediggerOfDrefia.Mission32, Storage.GravediggerOfDrefia.Mission32a }, message = "Shadows rise and engulf the candle. The statue flickers in an unearthly light." }, + [4642] = { storageKey = { Storage.GravediggerOfDrefia.Mission32a, Storage.GravediggerOfDrefia.Mission32b }, message = "The shadows of the statue swallow the candle hungrily." }, + [4643] = { storageKey = { Storage.GravediggerOfDrefia.Mission32b, Storage.GravediggerOfDrefia.Mission33 }, message = "A shade emerges and snatches the candle from your hands." }, +} + +local gravediggerMonks = Action() +function gravediggerMonks.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local targetItem = config[target.actionid] + if not targetItem then + return true + end + + local cStorages = targetItem.storageKey + if player:getStorageValue(cStorages[1]) == 1 and player:getStorageValue(cStorages[2]) < 1 then + player:setStorageValue(cStorages[2], 1) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, targetItem.message) + item:remove(1) + end + return true +end + +gravediggerMonks:id(18931) +gravediggerMonks:register() diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_palanca.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_palanca.lua similarity index 56% rename from data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_palanca.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_palanca.lua index eb5a52cb1d4..7335cf98ba1 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_palanca.lua +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_palanca.lua @@ -1,12 +1,10 @@ local gravediggerPalanca = Action() - function gravediggerPalanca.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission39) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission40) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission40, 1) + if player:getStorageValue(Storage.GravediggerOfDrefia.Mission39) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission40) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission40, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, " ") player:getPosition():sendMagicEffect(CONST_ME_ENERGYHIT) end - return true end diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_pyramids1.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_pyramids1.lua similarity index 53% rename from data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_pyramids1.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_pyramids1.lua index 6cd4808fc9d..686a0917e4d 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_pyramids1.lua +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_pyramids1.lua @@ -1,8 +1,8 @@ local config = { - [4646] = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38a }, - [4647] = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38a, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38b }, - [4648] = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38b, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38c }, - [4649] = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38c, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission39 }, + [4646] = { Storage.GravediggerOfDrefia.Mission38, Storage.GravediggerOfDrefia.Mission38a }, + [4647] = { Storage.GravediggerOfDrefia.Mission38a, Storage.GravediggerOfDrefia.Mission38b }, + [4648] = { Storage.GravediggerOfDrefia.Mission38b, Storage.GravediggerOfDrefia.Mission38c }, + [4649] = { Storage.GravediggerOfDrefia.Mission38c, Storage.GravediggerOfDrefia.Mission39 }, } local gravediggerPyramids1 = Action() diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_pyramids2.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_pyramids2.lua similarity index 50% rename from data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_pyramids2.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_pyramids2.lua index 1e28ebd8b35..93b6589e764 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_pyramids2.lua +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_pyramids2.lua @@ -1,9 +1,9 @@ local config = { - [4663] = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission62 }, - [4664] = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38a, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission63 }, - [4665] = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38b, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission64 }, - [4666] = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38c, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission65 }, - [4667] = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission38c, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission66 }, + [4663] = { Storage.GravediggerOfDrefia.Mission38, Storage.GravediggerOfDrefia.Mission62 }, + [4664] = { Storage.GravediggerOfDrefia.Mission38a, Storage.GravediggerOfDrefia.Mission63 }, + [4665] = { Storage.GravediggerOfDrefia.Mission38b, Storage.GravediggerOfDrefia.Mission64 }, + [4666] = { Storage.GravediggerOfDrefia.Mission38c, Storage.GravediggerOfDrefia.Mission65 }, + [4667] = { Storage.GravediggerOfDrefia.Mission38c, Storage.GravediggerOfDrefia.Mission66 }, } local gravediggerPyramids2 = Action() @@ -23,5 +23,5 @@ function gravediggerPyramids2.onUse(player, item, fromPosition, target, toPositi return true end -gravediggerPyramids2:id(18932) +gravediggerPyramids2:id(21249) gravediggerPyramids2:register() diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_sacrifice.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_sacrifice.lua similarity index 61% rename from data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_sacrifice.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_sacrifice.lua index 1c6fc409291..eeae28a1103 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_sacrifice.lua +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_sacrifice.lua @@ -1,14 +1,16 @@ local gravediggerSacrifice = Action() function gravediggerSacrifice.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission74) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission75) < 1 then + if player:getStorageValue(Storage.GravediggerOfDrefia.Mission74) == 1 then --and player:getStorageValue(Storage.GravediggerOfDrefia.Mission73) < 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission74) < 1 then local skullItem = Tile(Position(33015, 32418, 11)):getItemById(19160) if skullItem then skullItem:remove() player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The scroll burns to dust. The magic stutters. Omrabas' soul flees to his old hideaway.") player:removeItem(18934, 1) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission75, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission74, 1) Game.createMonster("Chicken", Position(33015, 32418, 11)) end + else + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Teste") end return true end diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_scroll.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_scroll.lua similarity index 55% rename from data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_scroll.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_scroll.lua index e9b187040a7..f5243717b84 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_scroll.lua +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_scroll.lua @@ -1,8 +1,8 @@ local gravediggerScroll = Action() function gravediggerScroll.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission53) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission54) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission54, 1) - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission55, 1) + if player:getStorageValue(Storage.GravediggerOfDrefia.Mission53) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission54) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission54, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission55, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Somebody left a card. It says: Looking for the scroll? Come find me. Take the stairs next to the students. Dorm.") player:getPosition():sendMagicEffect(CONST_ME_POFF) end diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_statue.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_statue.lua similarity index 54% rename from data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_statue.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_statue.lua index dca0119d990..da3888a2343 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_statue.lua +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_statue.lua @@ -1,18 +1,14 @@ local gravediggerStatue = Action() - function gravediggerStatue.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local expectedPosition = Position(32998, 32416, 11) - - if toPosition ~= expectedPosition then + if target.itemid ~= 19112 then return false end - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission24) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission25) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission25, 1) + if player:getStorageValue(Storage.GravediggerOfDrefia.Mission20) >= 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission25) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission25, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, " A slow throbbing, like blood pulsing, runs through the floor.") player:getPosition():sendMagicEffect(CONST_ME_SOUND_GREEN) end - return true end diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_tears.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_tears.lua similarity index 59% rename from data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_tears.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_tears.lua index b88441f3198..299c9c5fbca 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_tears.lua +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_tears.lua @@ -4,8 +4,8 @@ function gravediggerTears.onUse(player, item, fromPosition, target, toPosition, return false end - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission14) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission15) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission15, 1) + if player:getStorageValue(Storage.GravediggerOfDrefia.Mission14) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission15) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission15, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The dragon tears glow and disappear. The old powers are appeased.") item:remove(3) end diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_tincture.lua b/data-otservbr-global/scripts/quests/gravedigger/actions_tincture.lua similarity index 60% rename from data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_tincture.lua rename to data-otservbr-global/scripts/quests/gravedigger/actions_tincture.lua index 83bdd720aeb..becda5f68ad 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_tincture.lua +++ b/data-otservbr-global/scripts/quests/gravedigger/actions_tincture.lua @@ -4,8 +4,8 @@ function gravediggerTincture.onUse(player, item, fromPosition, target, toPositio return false end - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission23) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission24) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission24, 1) + if player:getStorageValue(Storage.GravediggerOfDrefia.Mission23) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission24) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission24, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You crash the vial and spill the blood tincture. This altar is anointed.") item:remove() end diff --git a/data-otservbr-global/scripts/quests/grimvale/actions_ancient_feud_entrances.lua b/data-otservbr-global/scripts/quests/grimvale/actions_ancient_feud_entrances.lua index df23caae4bb..426a043f54d 100644 --- a/data-otservbr-global/scripts/quests/grimvale/actions_ancient_feud_entrances.lua +++ b/data-otservbr-global/scripts/quests/grimvale/actions_ancient_feud_entrances.lua @@ -11,7 +11,7 @@ function entranceAncientFeud.onUse(creature, item, position, fromPosition) if not player then return false end - if player:getStorageValue(Storage.Quest.U10_80.GrimvaleQuest.AncientFeudShortcut) < 0 then + if player:getStorageValue(Storage.Quest.U10_80.Grimvale.AncientFeudShortcut) < 0 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You are not worthy to travel by the lion's roar.") player:teleportTo(fromPosition, true) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) diff --git a/data-otservbr-global/scripts/quests/lions_rock/actions_lions_rock.lua b/data-otservbr-global/scripts/quests/lions_rock/actions_lions_rock.lua index fcadada9939..dc2870c1d72 100644 --- a/data-otservbr-global/scripts/quests/lions_rock/actions_lions_rock.lua +++ b/data-otservbr-global/scripts/quests/lions_rock/actions_lions_rock.lua @@ -12,7 +12,7 @@ local rewards = { local tests = { { - storage = Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsStrength, + storage = Storage.LionsRock.OuterSanctum.LionsStrength, itemPosition = { x = 33137, y = 32291, z = 8 }, pagodaPosition = { x = 33134, y = 32289, z = 8 }, item = 9634, @@ -20,7 +20,7 @@ local tests = { effect = CONST_ME_BLOCKHIT, }, { - storage = Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsBeauty, + storage = Storage.LionsRock.OuterSanctum.LionsBeauty, itemPosition = { x = 33138, y = 32369, z = 8 }, pagodaPosition = { x = 33136, y = 32369, z = 8 }, item = 21389, @@ -28,7 +28,7 @@ local tests = { effect = CONST_ME_REDSMOKE, }, { - storage = Storage.Quest.U10_70.LionsRock.OuterSanctum.LionsTears, + storage = Storage.LionsRock.OuterSanctum.LionsTears, itemPosition = { x = 33154, y = 32279, z = 8 }, pagodaPosition = { x = 33156, y = 32279, z = 8 }, item = 21466, @@ -58,11 +58,11 @@ function lionsRockSacrificesTest.onUse(player, item, fromPosition, target, toPos pagoda:transform(2075) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, setting.message) player:setStorageValue(setting.storage, 1) - if player:getStorageValue(Storage.Quest.U10_70.LionsRock.Questline) < 1 then - player:setStorageValue(Storage.Quest.U10_70.LionsRock.Questline, math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.Questline), 1)) - player:setStorageValue(Storage.Quest.U10_70.LionsRock.Questline, player:getStorageValue(Storage.Quest.U10_70.LionsRock.Questline) + 1) + if player:getStorageValue(Storage.LionsRock.Questline) < 1 then + player:setStorageValue(Storage.LionsRock.Questline, math.max(player:getStorageValue(Storage.LionsRock.Questline), 1)) + player:setStorageValue(Storage.LionsRock.Questline, player:getStorageValue(Storage.LionsRock.Questline) + 1) else - player:setStorageValue(Storage.Quest.U10_70.LionsRock.Questline, player:getStorageValue(Storage.Quest.U10_70.LionsRock.Questline) + 1) + player:setStorageValue(Storage.LionsRock.Questline, player:getStorageValue(Storage.LionsRock.Questline) + 1) end player:removeItem(setting.item, 1) toPosition:sendMagicEffect(setting.effect) @@ -83,8 +83,8 @@ local lionsGetLionsMane = Action() function lionsGetLionsMane.onUse(player, item, fromPosition, target, toPosition, isHotkey) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You picked a beautiful lion's mane flower.") player:addItem(21389, 1) - player:setStorageValue(Storage.Quest.U10_70.LionsRock.Questline, math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.Questline), 1)) - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.LionsRock.Questline, math.max(player:getStorageValue(Storage.LionsRock.Questline), 1)) + player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) item:transform(21935) addEvent(function() item:transform(21388) @@ -101,8 +101,8 @@ local lionsGetHolyWater = Action() function lionsGetHolyWater.onUse(player, item, fromPosition, target, toPosition, isHotkey) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You took some holy water from the sacred well.") player:addItem(21466, 1) - player:setStorageValue(Storage.Quest.U10_70.LionsRock.Questline, math.max(player:getStorageValue(Storage.Quest.U10_70.LionsRock.Questline), 1)) - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.DefaultStart, 1) + player:setStorageValue(Storage.LionsRock.Questline, math.max(player:getStorageValue(Storage.LionsRock.Questline), 1)) + player:setStorageValue(Storage.TibiaTales.DefaultStart, 1) return true end @@ -116,7 +116,7 @@ function lionsRockFountain.onUse(player, item, fromPosition, target, toPosition, if item:getId() ~= 6389 then return false end - if player:getStorageValue(Storage.Quest.U10_70.LionsRock.Time) < os.time() then + if player:getStorageValue(Storage.LionsRock.Time) < os.time() then local reward = "" if player:hasMount(40) then repeat @@ -131,8 +131,8 @@ function lionsRockFountain.onUse(player, item, fromPosition, target, toPosition, player:addAchievement("Lion's Den Explorer") item:transform(lionsRockSanctuaryRockId) player:addItem(rewards[reward], 1) - player:setStorageValue(Storage.Quest.U10_70.LionsRock.Time, os.time() + 24 * 60 * 60) - player:setStorageValue(Storage.Quest.U10_70.LionsRock.Questline, 11) + player:setStorageValue(Storage.LionsRock.Time, os.time() + 24 * 60 * 60) + player:setStorageValue(Storage.LionsRock.Questline, 11) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "At the moment there is neither a treasure nor anything else in the fountain. Perhaps you might return later.") end diff --git a/data-otservbr-global/scripts/quests/lions_rock/movements_lions_rock.lua b/data-otservbr-global/scripts/quests/lions_rock/movements_lions_rock.lua index b3c0238d32d..8e91e90579f 100644 --- a/data-otservbr-global/scripts/quests/lions_rock/movements_lions_rock.lua +++ b/data-otservbr-global/scripts/quests/lions_rock/movements_lions_rock.lua @@ -1,25 +1,25 @@ local signs = { { pos = { x = 33095, y = 32244, z = 9 }, - storage = Storage.Quest.U10_70.LionsRock.InnerSanctum.SnakeSign, + storage = Storage.LionsRock.InnerSanctum.SnakeSign, message1 = "With the aid of the old scroll you translate the inscriptions on the floor: And the mighty lion defeated the jealous snake.", message2 = "As a sign of victory he tooks its eye, yellow as envy and malevolence, and out of a foul creature created a precious treasure.", }, { pos = { x = 33128, y = 32300, z = 9 }, - storage = Storage.Quest.U10_70.LionsRock.InnerSanctum.LizardSign, + storage = Storage.LionsRock.InnerSanctum.LizardSign, message1 = "With the aid of the old scroll you translate the inscriptions on the floor: And the mighty lion defeated the lazy lizard.", message2 = "As a sign of victory he tooks its egg, blue as sloth and conceit, and out of a foul creature created a precious treasure.", }, { pos = { x = 33109, y = 32329, z = 9 }, - storage = Storage.Quest.U10_70.LionsRock.InnerSanctum.ScorpionSign, + storage = Storage.LionsRock.InnerSanctum.ScorpionSign, message1 = "With the aid of the old scroll you translate the inscriptions on the golden altar: And the mighty lion defeated the treacherous scorpion.", message2 = "As a sign of victory he tooks its poison, violet as deceit and betrayal, and created a precious treasure.", }, { pos = { x = 33127, y = 32340, z = 9 }, - storage = Storage.Quest.U10_70.LionsRock.InnerSanctum.HyenaSign, + storage = Storage.LionsRock.InnerSanctum.HyenaSign, message1 = "With the aid of the old scroll you translate the inscriptions on the golden statue: And the mighty lion defeated the greedy hyaena.", message2 = "As a sign of victory he tooks its blood, red as voracity and lust, and created a precious treasure.", }, @@ -34,7 +34,7 @@ function lionsRockEntrance.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.Quest.U10_70.LionsRock.Questline) >= 4 then + if player:getStorageValue(Storage.LionsRock.Questline) >= 4 then player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo({ x = 33122, y = 32308, z = 8 }) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have passed the Lion's Tests and are now worthy to enter the inner sanctum!") @@ -79,12 +79,12 @@ function lionsRockTranslationScroll.onStepIn(creature, item, position, fromPosit end end - if player:getStorageValue(Storage.Quest.U10_70.LionsRock.Questline) == 4 then + if player:getStorageValue(Storage.LionsRock.Questline) == 4 then local amphora = Tile(amphoraPos):getItemById(amphoraID) if amphora then amphora:transform(amphoraBrokenID) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "As you pass incautiously, the ancient amphora crumbles to shards and dust. Amidst the debris you discover an old scroll.") - player:setStorageValue(Storage.Quest.U10_70.LionsRock.Questline, 5) + player:setStorageValue(Storage.LionsRock.Questline, 5) player:addItem(21467, 1) amphoraPos:sendMagicEffect(CONST_ME_GROUNDSHAKER) addEvent(reset, 15 * 1000) @@ -113,7 +113,7 @@ function lionsRockSigns.onStepIn(creature, item, position, fromPosition) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, setting.message1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, setting.message2) player:setStorageValue(setting.storage, 1) - player:setStorageValue(Storage.Quest.U10_70.LionsRock.Questline, player:getStorageValue(Storage.Quest.U10_70.LionsRock.Questline) + 1) + player:setStorageValue(Storage.LionsRock.Questline, player:getStorageValue(Storage.LionsRock.Questline) + 1) end end return true @@ -133,9 +133,9 @@ function lionsRockMessage.onStepIn(creature, item, position, fromPosition) if not player then return end - if player:getStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.Message) < 1 then + if player:getStorageValue(Storage.LionsRock.InnerSanctum.Message) < 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You enter a temple area which is gorgeously decorated and mysteriously unaffected by the course of time.") - player:setStorageValue(Storage.Quest.U10_70.LionsRock.InnerSanctum.Message, 1) + player:setStorageValue(Storage.LionsRock.InnerSanctum.Message, 1) end return true end diff --git a/data-otservbr-global/scripts/quests/roshamuul_quest/actions_bone.lua b/data-otservbr-global/scripts/quests/lower_roshamuul/actions_bone.lua similarity index 100% rename from data-otservbr-global/scripts/quests/roshamuul_quest/actions_bone.lua rename to data-otservbr-global/scripts/quests/lower_roshamuul/actions_bone.lua diff --git a/data-otservbr-global/scripts/quests/roshamuul_quest/actions_chalk.lua b/data-otservbr-global/scripts/quests/lower_roshamuul/actions_chalk.lua similarity index 100% rename from data-otservbr-global/scripts/quests/roshamuul_quest/actions_chalk.lua rename to data-otservbr-global/scripts/quests/lower_roshamuul/actions_chalk.lua diff --git a/data-otservbr-global/scripts/quests/roshamuul_quest/actions_gravel.lua b/data-otservbr-global/scripts/quests/lower_roshamuul/actions_gravel.lua similarity index 100% rename from data-otservbr-global/scripts/quests/roshamuul_quest/actions_gravel.lua rename to data-otservbr-global/scripts/quests/lower_roshamuul/actions_gravel.lua diff --git a/data-otservbr-global/scripts/quests/roshamuul_quest/actions_mixture.lua b/data-otservbr-global/scripts/quests/lower_roshamuul/actions_mixture.lua similarity index 100% rename from data-otservbr-global/scripts/quests/roshamuul_quest/actions_mixture.lua rename to data-otservbr-global/scripts/quests/lower_roshamuul/actions_mixture.lua diff --git a/data-otservbr-global/scripts/quests/roshamuul_quest/actions_mortar.lua b/data-otservbr-global/scripts/quests/lower_roshamuul/actions_mortar.lua similarity index 100% rename from data-otservbr-global/scripts/quests/roshamuul_quest/actions_mortar.lua rename to data-otservbr-global/scripts/quests/lower_roshamuul/actions_mortar.lua diff --git a/data-otservbr-global/scripts/quests/roshamuul_quest/actions_resonance_chamber.lua b/data-otservbr-global/scripts/quests/lower_roshamuul/actions_resonance_chamber.lua similarity index 100% rename from data-otservbr-global/scripts/quests/roshamuul_quest/actions_resonance_chamber.lua rename to data-otservbr-global/scripts/quests/lower_roshamuul/actions_resonance_chamber.lua diff --git a/data-otservbr-global/scripts/quests/roshamuul_quest/actions_trough.lua b/data-otservbr-global/scripts/quests/lower_roshamuul/actions_trough.lua similarity index 66% rename from data-otservbr-global/scripts/quests/roshamuul_quest/actions_trough.lua rename to data-otservbr-global/scripts/quests/lower_roshamuul/actions_trough.lua index c511ae3d921..35888d262d8 100644 --- a/data-otservbr-global/scripts/quests/roshamuul_quest/actions_trough.lua +++ b/data-otservbr-global/scripts/quests/lower_roshamuul/actions_trough.lua @@ -1,5 +1,4 @@ local lowerRoshamuulTrough = Action() - function lowerRoshamuulTrough.onUse(player, item, fromPosition, target, toPosition, isHotkey) if (target == nil) or not target:isItem() then return false @@ -8,7 +7,7 @@ function lowerRoshamuulTrough.onUse(player, item, fromPosition, target, toPositi if target:getId() == 20216 then item:transform(2873, 0) toPosition:sendMagicEffect(10) - player:setStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Mortar_Thrown, math.max(0, player:getStorageValue(Storage.Quest.U10_30.RoshamuulQuest.Roshamuul_Mortar_Thrown)) + 1) + player:setStorageValue(ROSHAMUUL_MORTAR_THROWN, math.max(0, player:getStorageValue(ROSHAMUUL_MORTAR_THROWN)) + 1) end return true end diff --git a/data-otservbr-global/scripts/quests/oramond/to_take_roots/actions_to_take_roots.lua b/data-otservbr-global/scripts/quests/oramond/chavis_tasks/actions_to_take_roots.lua similarity index 60% rename from data-otservbr-global/scripts/quests/oramond/to_take_roots/actions_to_take_roots.lua rename to data-otservbr-global/scripts/quests/oramond/chavis_tasks/actions_to_take_roots.lua index 71c4f55d8b4..bf827c7e4f3 100644 --- a/data-otservbr-global/scripts/quests/oramond/to_take_roots/actions_to_take_roots.lua +++ b/data-otservbr-global/scripts/quests/oramond/chavis_tasks/actions_to_take_roots.lua @@ -15,13 +15,13 @@ function toTakeRoots.onUse(player, item, fromPosition, target, toPosition, isHot item:transform(item.itemid + 2) addEvent(revertRoot, 120000, toPosition, 21106, 21104) toPosition:sendMagicEffect(CONST_ME_GREEN_RINGS) - if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine) <= 0 then - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine, 1) + if player:getStorageValue(Storage.Oramond.QuestLine) <= 0 then + player:setStorageValue(Storage.Oramond.QuestLine, 1) end - if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Mission) <= 0 then - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Mission, 1) + if player:getStorageValue(Storage.Oramond.MissionToTakeRoots) <= 0 then + player:setStorageValue(Storage.Oramond.MissionToTakeRoots, 1) end - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Count, player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Count) > 0 and player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Count) + 1 or 1) + player:setStorageValue(Storage.Oramond.HarvestedRootCount, player:getStorageValue(Storage.Oramond.HarvestedRootCount) > 0 and player:getStorageValue(Storage.Oramond.HarvestedRootCount) + 1 or 1) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your harvesting attempt destroyed more of the juicy roots than you could salvage.") item:transform(item.itemid + 2) @@ -35,13 +35,13 @@ function toTakeRoots.onUse(player, item, fromPosition, target, toPosition, isHot item:transform(item.itemid + 2) addEvent(revertRoot, 120000, toPosition, 21107, 21105) toPosition:sendMagicEffect(CONST_ME_GREEN_RINGS) - if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine) <= 0 then - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.QuestLine, 1) + if player:getStorageValue(Storage.Oramond.QuestLine) <= 0 then + player:setStorageValue(Storage.Oramond.QuestLine, 1) end - if player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Mission) <= 0 then - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Mission, 1) + if player:getStorageValue(Storage.Oramond.MissionToTakeRoots) <= 0 then + player:setStorageValue(Storage.Oramond.MissionToTakeRoots, 1) end - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Count, player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Count) > 0 and player:getStorageValue(Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Count) + 1 or 1) + player:setStorageValue(Storage.Oramond.HarvestedRootCount, player:getStorageValue(Storage.Oramond.HarvestedRootCount) > 0 and player:getStorageValue(Storage.Oramond.HarvestedRootCount) + 1 or 1) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your harvesting attempt destroyed more of the juicy roots than you could salvage.") item:transform(item.itemid + 2) diff --git a/data-otservbr-global/scripts/quests/oramond/probing/actions_mono_detector_strange_probing_device.lua b/data-otservbr-global/scripts/quests/oramond/probing/actions_mono_detector_strange_probing_device.lua deleted file mode 100644 index 04966ae8c7b..00000000000 --- a/data-otservbr-global/scripts/quests/oramond/probing/actions_mono_detector_strange_probing_device.lua +++ /dev/null @@ -1,106 +0,0 @@ -if not MONO_DETECTOR_MAP then - MONO_DETECTOR_MAP = {} -end - -local primary_area = { - from = Position(33612, 31867, 10), - to = Position(33679, 31983, 10), -} - -local secondary_area = { - from = Position(33607, 31905, 11), - to = Position(33664, 31953, 11), -} - -local function isPositionInArea(pos, area) - return pos.x >= area.from.x and pos.x <= area.to.x and pos.y >= area.from.y and pos.y <= area.to.y and pos.z >= area.from.z and pos.z <= area.to.z -end - -local function getRandomPositionInPrimaryArea() - local randomPos - repeat - randomPos = Position(math.random(primary_area.from.x, primary_area.to.x), math.random(primary_area.from.y, primary_area.to.y), primary_area.from.z) - until isPositionInArea(randomPos, primary_area) - return randomPos -end - -local function getRandomPositionInSecondaryArea() - local randomPos - repeat - randomPos = Position(math.random(secondary_area.from.x, secondary_area.to.x), math.random(secondary_area.from.y, secondary_area.to.y), secondary_area.from.z) - until isPositionInArea(randomPos, secondary_area) - return randomPos -end - -local actions_mono_detector = Action() - -function actions_mono_detector.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local stat = player:getStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.Mission) - - if stat == 0 or stat >= 2 then - return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - end - - local current = MONO_DETECTOR_MAP[player:getGuid()] - if not current then - local random - if isPositionInArea(player:getPosition(), primary_area) then - random = getRandomPositionInPrimaryArea() - else - random = getRandomPositionInSecondaryArea() - end - MONO_DETECTOR_MAP[player:getGuid()] = random - current = random - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The probe has been adjusted.") - return true - end - - local playerPos = player:getPosition() - local dx = math.abs(playerPos.x - current.x) - local dy = math.abs(playerPos.y - current.y) - local dz = math.abs(playerPos.z - current.z) - - if dx <= 15 and dy <= 15 and dz == 0 then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The device reads: 'abnormal glooth structure detected, possible probing location'") - else - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Hm... the device reads: 0,0,zero,0,zero which may roughly translate to: NOTHING OF INTEREST HERE") - end - - return true -end - -actions_mono_detector:id(21192) -actions_mono_detector:register() - -local actions_strange_probing_device = Action() - -function actions_strange_probing_device.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local stat = player:getStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.Mission) - local current = MONO_DETECTOR_MAP[player:getGuid()] - - if stat == 0 or stat >= 2 then - return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - end - - if fromPosition.x ~= item:getPosition().x or fromPosition.y ~= item:getPosition().y or fromPosition.z ~= item:getPosition().z then - return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) - end - - if current and item:getPosition() then - local itemPos = item:getPosition() - local dx = math.abs(itemPos.x - current.x) - local dy = math.abs(itemPos.y - current.y) - local dz = math.abs(itemPos.z - current.z) - - if dx <= 15 and dy <= 15 and dz == 0 then - item:remove() - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.Probing.Mission, 2) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have successfully gathered the data.") - end - end - - return true -end - -actions_strange_probing_device:id(21208) -actions_strange_probing_device:register() diff --git a/data-otservbr-global/scripts/quests/oramond/the_ancient_sewers/actions_the_ancient_sewers.lua b/data-otservbr-global/scripts/quests/oramond/the_ancient_sewers/actions_the_ancient_sewers.lua deleted file mode 100644 index 18bcd791fea..00000000000 --- a/data-otservbr-global/scripts/quests/oramond/the_ancient_sewers/actions_the_ancient_sewers.lua +++ /dev/null @@ -1,46 +0,0 @@ -local config = { - [21039] = { itemGerator = 21792, itemTransform = 21039 }, - [21040] = { itemGerator = 21792, itemTransform = 21040 }, -} - -local function revertItem(toPosition, getItemId, itemTransform) - local tile = toPosition:getTile() - if tile then - local thing = tile:getItemById(getItemId) - if thing then - thing:transform(itemTransform) - end - end -end - -local theAncientSewers = Action() - -function theAncientSewers.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local gerator = config[item.itemid] - if not gerator then - return true - end - - player:say((math.random(1, 100) < 50) and " There This piece fixed." or " This should do it.", TALKTYPE_MONSTER_SAY) - item:transform(gerator.itemGerator) - addEvent(revertItem, 2 * 60 * 1000, toPosition, gerator.itemGerator, gerator.itemTransform) - toPosition:sendMagicEffect(CONST_ME_BLOCKHIT) - - local currentMission = player:getStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission) - if currentMission >= 1 and currentMission < 20 then - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission, currentMission + 1) - elseif currentMission == 20 then - if player:getStorageValue(Storage.Quest.U10_50.DarkTrails.Mission03) < 1 then - player:setStorageValue(Storage.Quest.U10_50.DarkTrails.Mission03, 1) - end - - player:setStorageValue(Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Mission, 21) - end - return true -end - -for itemId, info in pairs(config) do - theAncientSewers:id(itemId) -end - -theAncientSewers:register() diff --git a/data-otservbr-global/scripts/quests/oramond/the_glooth_brothers_tasks/actions_the_ancient_sewers.lua b/data-otservbr-global/scripts/quests/oramond/the_glooth_brothers_tasks/actions_the_ancient_sewers.lua new file mode 100644 index 00000000000..1419a97a709 --- /dev/null +++ b/data-otservbr-global/scripts/quests/oramond/the_glooth_brothers_tasks/actions_the_ancient_sewers.lua @@ -0,0 +1,84 @@ +local function revertItem(toPosition, getItemId, itemTransform) + local tile = toPosition:getTile() + if tile then + local thing = tile:getItemById(getItemId) + if thing then + thing:transform(itemTransform) + end + end +end + +local config = { + [21039] = { itemGerator = 21792, itemTransform = 21039 }, -- Gerator 1 + [21040] = { itemGerator = 21792, itemTransform = 21040 }, -- Gerator 2 +} + +local theAncientSewers = Action() + +function theAncientSewers.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local gerator = config[item.itemid] + if gerator then + local chance = math.random(1, 100) + if (chance >= 1) and (chance < 50) then + player:say(" There This piece fixed.", TALKTYPE_MONSTER_SAY) + elseif (chance >= 50) and (chance < 100) then + player:say(" This should do it.", TALKTYPE_MONSTER_SAY) + end + + item:transform(gerator.itemGerator) + addEvent(revertItem, 2 * 60 * 1000, toPosition, gerator.itemGerator, gerator.itemTransform) + toPosition:sendMagicEffect(CONST_ME_BLOCKHIT) + if player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) <= 0 then + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 1) + player:setStorageValue(Storage.Oramond.MissionToTakeRoots1) + elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 1 then + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 2) + elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 2 then + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 3) + elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 3 then + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 4) + elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 4 then + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 5) + elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 5 then + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 6) + elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 6 then + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 7) + elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 7 then + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 8) + elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 8 then + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 9) + elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 9 then + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 10) + elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 10 then + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 11) + elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 11 then + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 12) + elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 12 then + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 13) + elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 13 then + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 14) + elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 14 then + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 15) + elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 15 then + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 16) + elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 16 then + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 17) + elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 17 then + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 18) + elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 18 then + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 19) + elseif player:getStorageValue(Storage.Oramond.MissionAbandonedSewer) == 19 then + if player:getStorageValue(Storage.DarkTrails.Mission03) < 1 then + player:setStorageValue(Storage.DarkTrails.Mission03, 1) + end + player:setStorageValue(Storage.Oramond.MissionAbandonedSewer, 20) + end + end + return true +end + +for itemId, info in pairs(config) do + theAncientSewers:id(itemId) +end + +theAncientSewers:register() diff --git a/data-otservbr-global/scripts/quests/oramond/the_powder_of_the_stars/actions_blue_pollen.lua b/data-otservbr-global/scripts/quests/oramond/the_powder_of_the_stars/actions_blue_pollen.lua deleted file mode 100644 index 8f80a6ab9a7..00000000000 --- a/data-otservbr-global/scripts/quests/oramond/the_powder_of_the_stars/actions_blue_pollen.lua +++ /dev/null @@ -1,41 +0,0 @@ -local function revertItem(toPosition, getItemId, itemTransform) - local tile = toPosition:getTile() - if tile then - local thing = tile:getItemById(getItemId) - if thing then - thing:transform(itemTransform) - end - end -end - -local config = { - [21088] = { transformedItemId = 21090, rewardItemId = 21089, revertTime = 10 * 60 * 1000 }, -} - -local itemTransformation = Action() - -function itemTransformation.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local transformation = config[item.itemid] - if transformation then - item:transform(transformation.transformedItemId) - - player:addItem(transformation.rewardItemId, 1) - - local messages = { - "Achoo! You spill the pollen into your bag.", - "You collected the smelly pollen into a bag.", - } - player:say(messages[math.random(#messages)], TALKTYPE_MONSTER_SAY, false, player, toPosition) - - addEvent(revertItem, transformation.revertTime, toPosition, transformation.transformedItemId, item.itemid) - - toPosition:sendMagicEffect(CONST_ME_MAGIC_BLUE) - end - return true -end - -for itemId, info in pairs(config) do - itemTransformation:id(itemId) -end - -itemTransformation:register() diff --git a/data-otservbr-global/scripts/quests/others/actions_ectoplasm_container.lua b/data-otservbr-global/scripts/quests/others/actions_ectoplasm_container.lua index 46c65505a37..80e45219e2a 100644 --- a/data-otservbr-global/scripts/quests/others/actions_ectoplasm_container.lua +++ b/data-otservbr-global/scripts/quests/others/actions_ectoplasm_container.lua @@ -2,11 +2,11 @@ local othersEctoplasm = Action() function othersEctoplasm.onUse(player, item, fromPosition, target, toPosition, isHotkey) if target.actionid == 4206 then - if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit) ~= 1 then + if player:getStorageValue(Storage.TibiaTales.IntoTheBonePit) ~= 1 then return false end - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.IntoTheBonePit, 2) + player:setStorageValue(Storage.TibiaTales.IntoTheBonePit, 2) item:transform(131) target:remove() toPosition:sendMagicEffect(CONST_ME_POFF) diff --git a/data-otservbr-global/scripts/quests/others/actions_exterminator_flask.lua b/data-otservbr-global/scripts/quests/others/actions_exterminator_flask.lua index 8f2eca8dcc6..c02731008ef 100644 --- a/data-otservbr-global/scripts/quests/others/actions_exterminator_flask.lua +++ b/data-otservbr-global/scripts/quests/others/actions_exterminator_flask.lua @@ -11,10 +11,10 @@ local exterminatorFlask = Action() function exterminatorFlask.onUse(player, item, fromPosition, target, toPosition, isHotkey) if target.actionid == 4207 then - if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.TheExterminator) ~= 1 then + if player:getStorageValue(Storage.TibiaTales.TheExterminator) ~= 1 then return false end - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.TheExterminator, 2) + player:setStorageValue(Storage.TibiaTales.TheExterminator, 2) item:transform(2874, 0) toPosition:sendMagicEffect(CONST_ME_GREEN_RINGS) return true diff --git a/data-otservbr-global/scripts/quests/others/actions_fire_bug.lua b/data-otservbr-global/scripts/quests/others/actions_fire_bug.lua index ab532eef8fb..5e941bc89d7 100644 --- a/data-otservbr-global/scripts/quests/others/actions_fire_bug.lua +++ b/data-otservbr-global/scripts/quests/others/actions_fire_bug.lua @@ -29,19 +29,19 @@ local positions = { local othersFireBug = Action() function othersFireBug.onUse(player, item, fromPosition, target, toPosition, isHotkey) if target.actionid == 54387 and target.itemid == 22875 then - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BasinCounter) >= 8 or player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BoneFlute) < 1 then + if player:getStorageValue(Storage.FerumbrasAscension.BasinCounter) >= 8 or player:getStorageValue(Storage.FerumbrasAscension.BoneFlute) < 1 then return false end - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BasinCounter) < 0 then - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BasinCounter, 0) + if player:getStorageValue(Storage.FerumbrasAscension.BasinCounter) < 0 then + player:setStorageValue(Storage.FerumbrasAscension.BasinCounter, 0) end - if player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BasinCounter) == 7 then + if player:getStorageValue(Storage.FerumbrasAscension.BasinCounter) == 7 then player:say("You ascended the last basin.", TALKTYPE_MONSTER_SAY) item:remove() - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.MonsterDoor, 1) + player:setStorageValue(Storage.FerumbrasAscension.MonsterDoor, 1) end target:transform(22876) - player:setStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BasinCounter, player:getStorageValue(Storage.Quest.U10_90.FerumbrasAscension.BasinCounter) + 1) + player:setStorageValue(Storage.FerumbrasAscension.BasinCounter, player:getStorageValue(Storage.FerumbrasAscension.BasinCounter) + 1) toPosition:sendMagicEffect(CONST_ME_FIREAREA) addEvent(revert, 2 * 60 * 1000, toPosition, 22876, 22875) return true diff --git a/data-otservbr-global/scripts/quests/others/actions_holy_water.lua b/data-otservbr-global/scripts/quests/others/actions_holy_water.lua index 9db4ff810eb..37dce9a342c 100644 --- a/data-otservbr-global/scripts/quests/others/actions_holy_water.lua +++ b/data-otservbr-global/scripts/quests/others/actions_holy_water.lua @@ -20,22 +20,22 @@ local function nexusMessage(player, message) end local storages = { - [4208] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave1, - [4209] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave2, - [4210] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave3, - [4211] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave4, - [4212] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave5, - [4213] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave6, - [4214] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave7, - [4215] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave8, - [4216] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave9, - [4217] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave10, - [4218] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave11, - [4219] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave12, - [4220] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave13, - [4221] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave14, - [4222] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave15, - [4223] = Storage.Quest.U8_1.RestInHallowedGround.Graves.Grave16, + [4208] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave1, + [4209] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave2, + [4210] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave3, + [4211] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave4, + [4212] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave5, + [4213] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave6, + [4214] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave7, + [4215] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave8, + [4216] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave9, + [4217] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave10, + [4218] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave11, + [4219] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave12, + [4220] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave13, + [4221] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave14, + [4222] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave15, + [4223] = Storage.TibiaTales.RestInHallowedGround.Graves.Grave16, } local config = { @@ -46,11 +46,12 @@ local config = { local othersHolyWater = Action() function othersHolyWater.onUse(player, item, fromPosition, target, toPosition, isHotkey) - -- Transformação do Antler Talisman + -- Antler Talisman Transformation if target.itemid == config.antler_talisman then - target:transform(config.sacred_antler_talisman) + item:transform(config.sacred_antler_talisman) item:remove(1) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You besprinkle the antler talisman with holy water. It glitters faintly.") + target:remove(1) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You besprinkle the antler talisman with holy water. It glittlers faintly") player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) return true @@ -83,19 +84,19 @@ function othersHolyWater.onUse(player, item, fromPosition, target, toPosition, i -- Rest in Hallowed Ground Quest elseif target.actionid >= 4208 and target.actionid <= 4223 then local graveStorage = storages[target.actionid] - local questline = player:getStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline) + local questline = player:getStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline) if player:getStorageValue(graveStorage) == 1 or questline ~= 3 then return false end player:setStorageValue(graveStorage, 1) - local cStorage = player:getStorageValue(Storage.Quest.U8_1.RestInHallowedGround.HolyWater) + local cStorage = player:getStorageValue(Storage.TibiaTales.RestInHallowedGround.HolyWater) if cStorage < 14 then - player:setStorageValue(Storage.Quest.U8_1.RestInHallowedGround.HolyWater, math.max(0, cStorage) + 1) + player:setStorageValue(Storage.TibiaTales.RestInHallowedGround.HolyWater, math.max(0, cStorage) + 1) elseif cStorage == 14 then - player:setStorageValue(Storage.Quest.U8_1.RestInHallowedGround.HolyWater, -1) - player:setStorageValue(Storage.Quest.U8_1.RestInHallowedGround.Questline, 4) + player:setStorageValue(Storage.TibiaTales.RestInHallowedGround.HolyWater, -1) + player:setStorageValue(Storage.TibiaTales.RestInHallowedGround.Questline, 4) item:transform(2874, 0) end @@ -115,10 +116,10 @@ function othersHolyWater.onUse(player, item, fromPosition, target, toPosition, i nexusMessage(player, player:getName() .. " damaged the shadow nexus! You can't damage it while it's burning.") toPosition:sendMagicEffect(CONST_ME_ENERGYHIT) - -- Transformação do Shadow Nexus + -- Shadow Nexus Transformation elseif target.itemid == 7931 then if Game.getStorageValue(GlobalStorage.Inquisition) > 0 then - Game.setStorageValue(GlobalStorage.Inquisition, Game.getStorageValue(GlobalStorage.Inquisition) - 1) + Game.setStorageValue(GlobalStorage.Inquisition, (Game.getStorageValue(GlobalStorage.Inquisition) - 1)) if player:getStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline) < 22 then player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Mission07, 2) player:setStorageValue(Storage.Quest.U8_2.TheInquisitionQuest.Questline, 22) diff --git a/data-otservbr-global/scripts/quests/others/actions_steal_from_thieves.lua b/data-otservbr-global/scripts/quests/others/actions_steal_from_thieves.lua index 641bbf9c953..c6ba00dbd90 100644 --- a/data-otservbr-global/scripts/quests/others/actions_steal_from_thieves.lua +++ b/data-otservbr-global/scripts/quests/others/actions_steal_from_thieves.lua @@ -5,14 +5,14 @@ local chests = { local othersSteal = Action() function othersSteal.onUse(player, item, fromPosition, target, toPosition, isHotkey) if chests[item.uid] then - if player:getStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.StealFromThieves) > 1 then + if player:getStorageValue(Storage.QuestChests.StealFromThieves) > 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "It's empty.") return true end local chest = chests[item.uid] player:addItem(chest.itemid, 1) - player:setStorageValue(Storage.Quest.U8_2.TheThievesGuildQuest.StealFromThieves, 2) + player:setStorageValue(Storage.QuestChests.StealFromThieves, 2) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You found a bag.") end diff --git a/data-otservbr-global/scripts/quests/roshamuul_quest/movements_lower_roshamuul.lua b/data-otservbr-global/scripts/quests/roshamuul_quest/movements_lower_roshamuul.lua deleted file mode 100644 index 3f112843642..00000000000 --- a/data-otservbr-global/scripts/quests/roshamuul_quest/movements_lower_roshamuul.lua +++ /dev/null @@ -1,50 +0,0 @@ -local lowerRoshamuul20122 = MoveEvent() - -function lowerRoshamuul20122.onStepIn(creature, item, position, fromPosition) - local player = creature:getPlayer() - if not player then - return false - end - - if item:getId() == 20122 then - player:teleportTo(Position(33554, 32546, 7)) - player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - return true - end - - return false -end - -lowerRoshamuul20122:type("stepin") -lowerRoshamuul20122:id(20122) -lowerRoshamuul20122:register() - -local roshamuulCaves = { - Position(33560, 32523, 8), - Position(33554, 32543, 8), - Position(33573, 32545, 8), - Position(33543, 32560, 8), - Position(33579, 32565, 8), - Position(33527, 32597, 8), -} - -local lowerRoshamuul1500 = MoveEvent() - -function lowerRoshamuul1500.onStepIn(creature, item, position, fromPosition) - local player = creature:getPlayer() - if not player then - return false - end - - if item:getActionId() == 55000 then - player:teleportTo(roshamuulCaves[math.random(#roshamuulCaves)]) - player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - return true - end - - return false -end - -lowerRoshamuul1500:type("stepin") -lowerRoshamuul1500:aid(55000) -lowerRoshamuul1500:register() diff --git a/data-otservbr-global/scripts/quests/spike_tasks/actions_fertilizer.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_fertilizer.lua index c97e06e98a4..9301633af95 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/actions_fertilizer.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/actions_fertilizer.lua @@ -4,7 +4,7 @@ end local spikeTasksFertilizer = Action() function spikeTasksFertilizer.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if table.contains({ -1, 4 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main)) then + if table.contains({ -1, 4 }, player:getStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN)) then return false end @@ -22,8 +22,8 @@ function spikeTasksFertilizer.onUse(player, item, fromPosition, target, toPositi end table.insert(FERTILIZED_MUSHROOMS[player:getGuid()], mushPos) - local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main) + 1 - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Mushroom_Main, sum) + local sum = player:getStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN) + 1 + player:setStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN, sum) if sum == 4 then item:remove() diff --git a/data-otservbr-global/scripts/quests/spike_tasks/actions_ghost_detector.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_ghost_detector.lua index 8daead707f6..8fdadc412e0 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/actions_ghost_detector.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/actions_ghost_detector.lua @@ -3,8 +3,8 @@ if not GHOST_DETECTOR_MAP then end ghost_detector_area = { - from = Position(32171, 32512, 8), - to = Position(32352, 32671, 10), + from = Position(32008, 32522, 8), + to = Position(32365, 32759, 10), } local function getSearchString(fromPos, toPos) @@ -65,7 +65,7 @@ end local spikeTasksGhost = Action() function spikeTasksGhost.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local stat = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Main) + local stat = player:getStorageValue(SPIKE_UPPER_TRACK_MAIN) if table.contains({ -1, 3 }, stat) then return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) @@ -73,30 +73,22 @@ function spikeTasksGhost.onUse(player, item, fromPosition, target, toPosition, i local current = GHOST_DETECTOR_MAP[player:getGuid()] if not current then - local levelZ = 8 + stat - local random = Position(math.random(32171, 32352), math.random(32512, 32671), levelZ) + local random = Position.getFreeSand() GHOST_DETECTOR_MAP[player:getGuid()] = random current = random end - local playerPos = player:getPosition() - local dx = math.abs(playerPos.x - current.x) - local dy = math.abs(playerPos.y - current.y) - local dz = math.abs(playerPos.z - current.z) - - if dx <= 4 and dy <= 4 and dz == 0 then + if player:getPosition():compare(current) then if stat == 2 then item:remove() GHOST_DETECTOR_MAP[player:getGuid()] = nil player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Report the task to Gnomilly.") player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You found a malignant presence, the glowing detector signals that it does not need any further data.") else - local levelZ = 8 + (stat + 1) % 3 - local random = Position(math.random(32171, 32352), math.random(32512, 32671), levelZ) - GHOST_DETECTOR_MAP[player:getGuid()] = random + GHOST_DETECTOR_MAP[player:getGuid()] = getFreeSand() player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You found a malignant presence, the glowing detector signals another presence nearby.") end - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Track_Main, stat + 1) + player:setStorageValue(SPIKE_UPPER_TRACK_MAIN, stat + 1) else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The detector points " .. getSearchString(player:getPosition(), current) .. ".") end diff --git a/data-otservbr-global/scripts/quests/spike_tasks/actions_lode_stone.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_lode_stone.lua index 7a3060a1fc9..16740c7163b 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/actions_lode_stone.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/actions_lode_stone.lua @@ -1,13 +1,16 @@ -local area = { +local transformTo = { + [19207] = 19216, + [19216] = 19218, +} + +local area = { --area where to teleport Position(32152, 32502, 11), Position(32365, 32725, 12), } local spikeTasksStone = Action() - function spikeTasksStone.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local currentProgress = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main) - if currentProgress == 3 then + if player:getStorageValue(SPIKE_MIDDLE_CHARGE_MAIN) ~= 0 then return false end @@ -15,43 +18,26 @@ function spikeTasksStone.onUse(player, item, fromPosition, target, toPosition, i return false end - if target:getId() == 19217 then - target:transform(19379) - target:decay() - end - - local itemId = item:getId() - - if itemId == 19207 then - item:transform(19216) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main, 1) -- Define o progresso inicial - elseif itemId == 19216 then - local useCount = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main) - if useCount == -1 then - useCount = 0 + target:transform(19379) + target:decay() + if item:getId() == 19218 then + player:setStorageValue(SPIKE_MIDDLE_CHARGE_MAIN, 1) + player:getPosition():sendMagicEffect(12) + player:say("Your tinkering caused some kind of magnetic storm that caused you to get disorientated.", TALKTYPE_MONSTER_SAY) + item:remove() + else + item:transform(transformTo[item:getId()]) + if math.random(100) > 60 then + player:teleportTo(Position.getFreePosition(area[1], area[2])) + player:getPosition():sendMagicEffect(11) end - - useCount = useCount + 1 - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main, useCount) - - if useCount == 3 then -- Corrigido para checar se o uso é 3 - item:transform(19218) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main, 3) -- Finaliza a missão - return true - end - end - - if math.random(100) > 60 then - player:teleportTo(Position.getFreePosition(area[1], area[2])) end - return toPosition:sendMagicEffect(12) end -local itemIds = { 19207, 19216 } - -for _, id in ipairs(itemIds) do - spikeTasksStone:id(id) +for itemId, info in pairs(transformTo) do + spikeTasksStone:id(itemId) end +spikeTasksStone:id(21568) spikeTasksStone:register() diff --git a/data-otservbr-global/scripts/quests/spike_tasks/actions_nests.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_nests.lua index 2e1b2a66e6d..4c55dd1b72a 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/actions_nests.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/actions_nests.lua @@ -2,7 +2,7 @@ local summon = { "Spider", "Larva", "Scarab", "Tarantula" } local spikeTasksNests = Action() function spikeTasksNests.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if table.contains({ -1, 5 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main)) then + if table.contains({ -1, 8 }, player:getStorageValue(SPIKE_MIDDLE_NEST_MAIN)) then return false end @@ -10,11 +10,11 @@ function spikeTasksNests.onUse(player, item, fromPosition, target, toPosition, i return false end - local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main) + 1 - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main, sum) + local sum = player:getStorageValue(SPIKE_MIDDLE_NEST_MAIN) + 1 + player:setStorageValue(SPIKE_MIDDLE_NEST_MAIN, sum) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have destroyed a monster nest.") - if sum == 5 then + if sum == 8 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Report the task to Gnombold.") end diff --git a/data-otservbr-global/scripts/quests/spike_tasks/actions_spirit_shovel.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_spirit_shovel.lua index 51979b622ca..619c93bf024 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/actions_spirit_shovel.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/actions_spirit_shovel.lua @@ -8,7 +8,7 @@ local chance = { local spikeTasksShovel = Action() function spikeTasksShovel.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if table.contains({ -1, 1 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main)) then + if table.contains({ -1, 4 }, player:getStorageValue(SPIKE_UPPER_MOUND_MAIN)) then return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) end @@ -26,9 +26,9 @@ function spikeTasksShovel.onUse(player, item, fromPosition, target, toPosition, Game.createMonster(result[3], toPosition) end if i == 1 then - local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main) + 1 - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Mound_Main, sum) - if sum == 1 then + local sum = player:getStorageValue(SPIKE_UPPER_MOUND_MAIN) + 1 + player:setStorageValue(SPIKE_UPPER_MOUND_MAIN, sum) + if sum == 4 then item:remove() player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Report the task to Gnomilly.") end diff --git a/data-otservbr-global/scripts/quests/spike_tasks/actions_thermometer.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_thermometer.lua index 9b95cc083d3..9b2c6cbc037 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/actions_thermometer.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/actions_thermometer.lua @@ -16,7 +16,7 @@ end local spikeTasksThermometer = Action() function spikeTasksThermometer.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local status = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Main) + local status = player:getStorageValue(SPIKE_LOWER_LAVA_MAIN) if table.contains({ -1, 1 }, status) then return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) @@ -25,7 +25,7 @@ function spikeTasksThermometer.onUse(player, item, fromPosition, target, toPosit if player:getPosition():isInRange(hot_lava_pools[SPIKE_LOWER_HOTTEST_POOL][1], hot_lava_pools[SPIKE_LOWER_HOTTEST_POOL][2]) then item:remove() player:getPosition():sendMagicEffect(16) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Lava_Main, 1) + player:setStorageValue(SPIKE_LOWER_LAVA_MAIN, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Whew! That was that hot, it melted the thermometer! At least you've found the hot spot!") else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "This is not the hot spot!") diff --git a/data-otservbr-global/scripts/quests/spike_tasks/actions_tuning_fork.lua b/data-otservbr-global/scripts/quests/spike_tasks/actions_tuning_fork.lua index 2ae79bd368c..55382b260e8 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/actions_tuning_fork.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/actions_tuning_fork.lua @@ -1,6 +1,6 @@ local spikeTasksFork = Action() function spikeTasksFork.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if table.contains({ -1, 7 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main)) then + if table.contains({ -1, 7 }, player:getStorageValue(SPIKE_UPPER_PACIFIER_MAIN)) then return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) end @@ -8,8 +8,8 @@ function spikeTasksFork.onUse(player, item, fromPosition, target, toPosition, is return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) end - local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main) + 1 - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Pacifier_Main, sum) + local sum = player:getStorageValue(SPIKE_UPPER_PACIFIER_MAIN) + 1 + player:setStorageValue(SPIKE_UPPER_PACIFIER_MAIN, sum) if sum == 7 then item:remove() diff --git a/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_lower_spike_kill.lua b/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_lower_spike_kill.lua index 2d4d300fc8c..16c79963c42 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_lower_spike_kill.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_lower_spike_kill.lua @@ -11,9 +11,9 @@ function lowerSpikeKill.onDeath(creature, _corpse, _lastHitKiller, mostDamageKil end onDeathForParty(creature, mostDamageKiller, function(creature, player) - if not table.contains({ -1, 7 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main)) then - local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main) + 1 - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Lower_Kill_Main, sum) + if not table.contains({ -1, 7 }, player:getStorageValue(SPIKE_LOWER_KILL_MAIN)) then + local sum = player:getStorageValue(SPIKE_LOWER_KILL_MAIN) + 1 + player:setStorageValue(SPIKE_LOWER_KILL_MAIN, sum) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have slayed " .. sum .. " out of 7 Drillworms.") if sum == 7 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Report the task to Gnomargery.") diff --git a/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_middle_spike_kill.lua b/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_middle_spike_kill.lua index b047e9d985b..2dd6017d106 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_middle_spike_kill.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_middle_spike_kill.lua @@ -10,9 +10,9 @@ function middleSpikeKill.onDeath(creature, _corpse, _lastHitKiller, mostDamageKi return true end onDeathForParty(creature, mostDamageKiller, function(creature, player) - if not table.contains({ -1, 7 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main)) then - local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main) + 1 - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Kill_Main, sum) + if not table.contains({ -1, 7 }, player:getStorageValue(SPIKE_MIDDLE_KILL_MAIN)) then + local sum = player:getStorageValue(SPIKE_MIDDLE_KILL_MAIN) + 1 + player:setStorageValue(SPIKE_MIDDLE_KILL_MAIN, sum) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have slayed " .. sum .. " out of 7 Crystalcrushers.") if sum == 7 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Report the task to Gnombold.") diff --git a/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_upper_spike_kill.lua b/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_upper_spike_kill.lua index 860b5f6b183..96f9dc6b397 100644 --- a/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_upper_spike_kill.lua +++ b/data-otservbr-global/scripts/quests/spike_tasks/creaturescripts_upper_spike_kill.lua @@ -11,9 +11,9 @@ function upperSpikeKill.onDeath(creature, _corpse, _lastHitKiller, mostDamageKil end onDeathForParty(creature, mostDamageKiller, function(creature, player) - if not table.contains({ -1, 7 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main)) then - local sum = player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main) + 1 - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Upper_Kill_Main, sum) + if not table.contains({ -1, 7 }, player:getStorageValue(SPIKE_UPPER_KILL_MAIN)) then + local sum = player:getStorageValue(SPIKE_UPPER_KILL_MAIN) + 1 + player:setStorageValue(SPIKE_UPPER_KILL_MAIN, sum) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have slayed " .. sum .. " out of 7 Demon Skeletons.") if sum == 7 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Report the task to Gnomilly.") diff --git a/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_MedusaOil.lua b/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_MedusaOil.lua index 2b9d58b8414..37428f549f7 100644 --- a/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_MedusaOil.lua +++ b/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_MedusaOil.lua @@ -1,21 +1,18 @@ -local TCC_PILLARPETRIFIED = Position(31942, 32936, 10) local ItemsCursed = { - [11466] = { usedID = 21504, finalID = 21505 }, - [21504] = { usedID = 11466, finalID = 21505 }, - [21505] = { usedID = 21507, finalID = 21506 }, - [21507] = { usedID = 21505, finalID = 21506 }, + [11466] = { usedID = 21504, finalID = 21505 }, -- Flask with oil and blood + [21504] = { usedID = 11466, finalID = 21505 }, -- Flask with oil and blood + [21505] = { usedID = 21507, finalID = 21506 }, -- Medusa's oilment + [21507] = { usedID = 21505, finalID = 21506 }, -- Medusa's oilment } local theCursedMedusa = Action() - function theCursedMedusa.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if (item.itemid == 21506) and (target.itemid == 10420) then - if player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) == 2 then - local playerPos = player:getPosition() - if not ((math.abs(playerPos.x - TCC_PILLARPETRIFIED.x) < 5) and (math.abs(playerPos.y - TCC_PILLARPETRIFIED.y) < 5) and (playerPos.z == TCC_PILLARPETRIFIED.z)) then + if (item.itemid == 21506) and (item.itemid == 10420) then + if player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) == 2 then + if not (((Player(player):getPosition().x - TCC_PILLARPETRIFIED.x) < 5) and ((Player(player):getPosition().x - TCC_PILLARPETRIFIED.x) > -5) and ((Player(player):getPosition().y - TCC_PILLARPETRIFIED.y) < 5) and ((Player(player):getPosition().y - TCC_PILLARPETRIFIED.y) > -5) and (Player(player):getPosition().z == TCC_PILLARPETRIFIED.z)) then return end - player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe, 3) + player:setStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe, 3) item:remove(1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You unpetrify a banshee's scream near the evil crystal, your ears protected by wax. Thus the baleful artefact is destroyed.") local stone = Tile(TCC_PILLARPETRIFIED):getItemById(10797) @@ -27,41 +24,47 @@ function theCursedMedusa.onUse(player, item, fromPosition, target, toPosition, i end return elseif item.itemid == 9106 then - local topCreature = Tile(toPosition):getTopCreature() - if not topCreature or not topCreature:isPlayer() then + if not (Tile(topos)) or not (Tile(topos):getTopCreature()) or not (Tile(topos):getTopCreature():isPlayer()) then return end - if (player == topCreature) and (player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) < 2) then - local playerPos = player:getPosition() - if not ((math.abs(playerPos.x - TCC_PILLARPETRIFIED.x) < 5) and (math.abs(playerPos.y - TCC_PILLARPETRIFIED.y) < 5) and (playerPos.z == TCC_PILLARPETRIFIED.z)) then + if (Player(player) == Player(Tile(topos):getTopCreature())) and (player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) < 2) then + if not (((Player(player):getPosition().x - TCC_PILLARPETRIFIED.x) < 5) and ((Player(player):getPosition().x - TCC_PILLARPETRIFIED.x) > -5) and ((Player(player):getPosition().y - TCC_PILLARPETRIFIED.y) < 5) and ((Player(player):getPosition().y - TCC_PILLARPETRIFIED.y) > -5) and (Player(player):getPosition().z == TCC_PILLARPETRIFIED.z)) then return end - player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe, 2) + player:setStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe, 2) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You use the molten wax to plug your ears.") doSendMagicEffect(player:getPosition(), CONST_ME_YELLOWSMOKE) item:remove(1) end return end - for index, value in pairs(ItemsCursed) do - if item.itemid == index and target.itemid == value.usedID then + if item.itemid == index and item.itemid == value.usedID then if value.finalID == 21505 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You mixed the first ingredients to create a special ointment. But it isn't complete yet.") elseif value.finalID == 21506 then - if player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline) < 2 then - player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline, 2) + if player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Questline) < 2 then + player:setStorageValue(Storage.TibiaTales.TheCursedCrystal.Questline, 2) end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You mixed the proper ingredients to create a special ointment. With this salve you may unpetrify a petrified object.") end - + local topParent = item:getTopParent() + if topParent.isItem and (not topParent:isItem() or topParent.itemid ~= 470) then + local parent = item:getParent() + if not parent:isTile() and (parent:addItem(value.finalID, 1) or topParent:addItem(value.finalID, 1)) then + item:remove(1) + Game.createItem(value.finalID, 1, item:getPosition()) + return true + else + Game.createItem(value.finalID, 1, item:getPosition()) + end + else + Game.createItem(value.finalID, 1, item:getPosition()) + end item:remove(1) - target:remove(1) - player:addItem(value.finalID, 1) - return true + return end end - player:sendTextMessage(MESSAGE_FAILURE, "Sorry, not possible.") end diff --git a/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_Misc.lua b/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_Misc.lua index 43cd52f72ec..fd2e42d286e 100644 --- a/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_Misc.lua +++ b/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_Misc.lua @@ -1,115 +1,63 @@ -local cursedMiscItem = Action() - -local MIN_POS_GO = Position(31957, 32935, 9) -local MAX_POS_GO = Position(31966, 32942, 9) - -local validItems = { 4809, 4810, 4811, 4812, 4813 } - -local function isInArea(pos, fromPos, toPos) - return pos.x >= fromPos.x and pos.x <= toPos.x and pos.y >= fromPos.y and pos.y <= toPos.y and pos.z == fromPos.z -end - -local function hasValidItem(position) - local tile = Tile(position) - if tile then - for _, itemId in ipairs(validItems) do - if tile:getItemById(itemId) then - return true - end - end - end - return false -end - -local function isVortexInArea(fromPos, toPos) - for x = fromPos.x, toPos.x do - for y = fromPos.y, toPos.y do - local tile = Tile(Position(x, y, fromPos.z)) - if tile and tile:getItemById(7804) then - return true - end - end - end - return false -end - -function cursedMiscItem.onUse(player, item, fromPosition, target, toPosition, isHotkey) +local theCursedMiscItem = Action() +function theCursedMiscItem.onUse(cid, item, frompos, item2, topos) + local user1 = Player(cid) if item.itemid == 5902 then - if (target.itemid == 2535) or (target.itemid == 2537) or (target.itemid == 2539) or (target.itemid == 2541) then + if (item2.itemid == 2535) or (item2.itemid == 2537) or (item2.itemid == 2539) or (item2.itemid == 2541) then item:remove(1) - player:addItem(9106, 1) + doPlayerAddItem(cid, 9106, 1) end + return elseif item.itemid == 21554 then - local playerPos = player:getPosition() - - if isInArea(playerPos, MIN_POS_GO, MAX_POS_GO) and hasValidItem(playerPos) then - if not isVortexInArea(MIN_POS_GO, MAX_POS_GO) then - Game.createItem(7804, 1, playerPos) - local vortex = Tile(playerPos):getItemById(7804) - - if vortex then - vortex:setActionId(35001) - player:getPosition():sendMagicEffect(CONST_ME_SOUND_WHITE) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "As you use the small bell, an unearthly sound rings out sweetly. At the same moment, the lake's waters begin to whirl.") - - addEvent(function() - local vortexItem = Tile(playerPos):getItemById(7804) - if vortexItem then - vortexItem:remove() - end - end, 10000) - end - else - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "A vortex already exists in this area.") - end + if (((user1:getPosition().x - TCC_VORTEX_POSITION.x) < 4) and ((user1:getPosition().x - TCC_VORTEX_POSITION.x) > -4)) and (((user1:getPosition().y - TCC_VORTEX_POSITION.y) < 4) and ((user1:getPosition().y - TCC_VORTEX_POSITION.y) > -4)) then + Game.createItem(7804, 1, TCC_VORTEX_POSITION) + Tile(TCC_VORTEX_POSITION):getItemById(7804):setActionId(35001) + doSendMagicEffect(user1:getPosition(), CONST_ME_SOUND_WHITE) + user1:sendTextMessage(MESSAGE_EVENT_ADVANCE, "As you use the small bell an unearthly sound rings out sweetly. At the same moment, the lake's waters begin to whirl.") + addEvent(function() + Tile(TCC_VORTEX_POSITION):getItemById(7804):remove() + end, 10000) end end - - return true end -cursedMiscItem:id(5902, 21554) -cursedMiscItem:register() - -local TCC_SKELETON_PAPER_POS = Position(31974, 32907, 8) -local TCC_SKELETON_BELL_POS = Position(32031, 32914, 8) +theCursedMiscItem:id(5902, 21554, 21572) +theCursedMiscItem:register() local theCursedMiscAction = Action() - -function theCursedMiscAction.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if item.actionid == 40001 and item:getPosition() == TCC_SKELETON_PAPER_POS then - if player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) < 1 and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.SheetOfPaper) < 1 then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a sheet of paper.") - local paperCursedCrystal = player:addItem(2820, 1) - paperCursedCrystal:setAttribute( +function theCursedMiscAction.onUse(cid, item, frompos, item2, topos) + if (item.actionid == 40001) and (item:getPosition() == TCC_SKELETON_PAPER_POS) then -- 40028 + if user1:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) < 1 then + user1:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a sheet of paper.") + local paperCursedCrystal = doPlayerAddItem(cid, 2820, 1) + Item(paperCursedCrystal):setAttribute( ITEM_ATTRIBUTE_TEXT, - "I did it! I reached the crystal gardens! What beauty and splendor I have seen down there. Even more: I discovered a small subterranean lake - but Harry was there before me. And he did something strange: He ringed a small, transparent looking bell and immediately a big whirl appeared in the water. I suppose this is the mysterious way deeper into the caves we sought after for so long. But Harry, the coward, didn't dare to dive into the water. Instead he left the caverns and headed back to the surface. I must have this bell!" + "I did it! I reached the crystal gardens! What beauty and splendor I have seen down there. Even more: I discovered a small subterranean lake - but Harry was there before me. And he did something strange: He ringed a small, transparent looking bell and immediatly a big whirl appeared in the water. I suppose this is the mysterious way deeper into the caves we sought after for so long. But Harry, the coward, didn't dare to dive into the water. Instead he left the caverns and heeded back to the surface. I have to go after him tomorrow. I must have this bell!" ) - player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.SheetOfPaper, 1) else - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The pile of bones is empty.") + user1:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The pile of bones empty.") end - elseif item.actionid == 40001 and item:getPosition() == TCC_SKELETON_BELL_POS then - if player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) < 1 and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.SmallCrystalBell) < 1 then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a small crystal bell.") - player:addItem(21554, 1) - player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.SmallCrystalBell, 1) + return + elseif (item.actionid == 40001) and (item:getPosition() == TCC_SKELETON_BELL_POS) then -- 40029 + if user1:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) < 1 then + user1:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a small crystal bell.") + doPlayerAddItem(cid, 21554, 1) + user1:setStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe, 1) else - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The pile of bones is empty.") + user1:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The pile of bones empty.") end - elseif item.actionid == 40002 and item.itemid == 21572 then - if player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) < 1 and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.SheetOfPaper) > 0 and player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.SmallCrystalBell) > 0 then - if player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Time) < os.time() then - player:addItem(21504, 1) - item:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You take some blood out of the hollow crystal. Hopefully it is actually a medusa's blood.") - player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe, 1) + return + elseif (item.actionid == 40002) and (item.itemid == 21572) then + if user1:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) > 0 then + if user1:getStorageValue(Storage.TibiaTales.TheCursedCrystal.MedusaOil) < os.time() then + user1:setStorageValue(Storage.TibiaTales.TheCursedCrystal.MedusaOil, os.time() + 72000) + doPlayerAddItem(cid, 21504, 1) + doSendMagicEffect(item:getPosition(), CONST_ME_MAGIC_RED) + user1:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You take some blood out of the hollow crystal. Hopefully that it is actually a medusa's blood.") end + return end end - - return true end -theCursedMiscAction:aid(40001, 40002) +theCursedMiscAction:id(40001, 40002) theCursedMiscAction:register() diff --git a/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_Ointment.lua b/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_Ointment.lua index 3dc4a6ddba7..e857ec66253 100644 --- a/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_Ointment.lua +++ b/data-otservbr-global/scripts/quests/the_cursed_crystal/actions_Ointment.lua @@ -1,14 +1,15 @@ local theCursedOintment = Action() function theCursedOintment.onUse(player, item, frompos, item2, topos) + -- The Cursed Crystal quest: if (item.itemid == 21506) and (item2.itemid == 10420) then - if player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe) == 2 then + if player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) == 2 then if not (((Player(player):getPosition().x - TCC_PILLARPETRIFIED.x) < 5) and ((Player(player):getPosition().x - TCC_PILLARPETRIFIED.x) > -5) and ((Player(player):getPosition().y - TCC_PILLARPETRIFIED.y) < 5) and ((Player(player):getPosition().y - TCC_PILLARPETRIFIED.y) > -5) and (Player(player):getPosition().z == TCC_PILLARPETRIFIED.z)) then return end - if player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline) < 3 then - player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline, 3) + if player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Questline) < 3 then + player:setStorageValue(Storage.TibiaTales.TheCursedCrystal.Questline, 3) end - player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Oneeyedjoe, 3) + player:setStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe, 3) item:remove(1) item2:remove(1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You unpetrify a banshee's scream near the evil crystal, your ears protected by wax. Thus the baleful artefact is destroyed.") diff --git a/data-otservbr-global/scripts/quests/the_cursed_crystal/movements_StepIn_CursedCrystal.lua b/data-otservbr-global/scripts/quests/the_cursed_crystal/movements_StepIn_CursedCrystal.lua index b96f5f3d03b..87d7be27c71 100644 --- a/data-otservbr-global/scripts/quests/the_cursed_crystal/movements_StepIn_CursedCrystal.lua +++ b/data-otservbr-global/scripts/quests/the_cursed_crystal/movements_StepIn_CursedCrystal.lua @@ -1,56 +1,56 @@ -local StepInCursedCrystal = MoveEvent() - -local MIN_POS_GO = Position(31957, 32935, 9) -local MAX_POS_GO = Position(31966, 32942, 9) +local teleports = { + [TCC_MEDUSACRYSTAL_ENTRY_MAP] = { position = TCC_MEDUSACRYSTAL_ENTRY }, -- medusa entry + [TCC_MEDUSACRYSTAL_EXIT_MAP] = { position = TCC_MEDUSACRYSTAL_EXIT }, -- medusa exit + [TCC_VORTEX_POSITION] = { position = TCC_VORTEX_TELEPORTED }, -- Vortex + [TCC_MEDUSAMSG_ONEMAP] = {}, -- medusa crystal message + [TCC_MEDUSAMSG_TWOMAP] = {}, -- medusa crystal message + [TCC_AFTERVORTEX_EXIT_ONE_MAP] = { position = TCC_AFTERVORTEX_EXIT_ONE }, -- Vortex exit 1 + [TCC_AFTERVORTEX_EXIT_TWO_MAP] = { position = TCC_AFTERVORTEX_EXIT_TWO }, -- Vortex exit 2 +} -local function isInArea(pos, fromPos, toPos) - return pos.x >= fromPos.x and pos.x <= toPos.x and pos.y >= fromPos.y and pos.y <= toPos.y and pos.z == fromPos.z -end +local StepInCursedCrystal = MoveEvent() function StepInCursedCrystal.onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() if not player then return false end - - if item.actionid == 35001 then - local playerPos = player:getPosition() - - if isInArea(playerPos, MIN_POS_GO, MAX_POS_GO) then - player:teleportTo(Position(31961, 32938, 10)) - player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - else - player:sendCancelMessage("You are not in the correct area.") - end - elseif item.actionid == 25018 then - -- (O código para o actionid 25018 permanece o mesmo) - local playerPos = player:getPosition() - - if playerPos == Position(31973, 32905, 11) then - player:teleportTo(Position(31971, 32904, 10)) - elseif playerPos == Position(31973, 32905, 10) then - player:teleportTo(Position(31975, 32911, 9)) - elseif playerPos == Position(32009, 32928, 9) then - player:teleportTo(Position(32009, 32929, 10)) - elseif playerPos == Position(32009, 32928, 10) then - player:teleportTo(Position(32009, 32929, 9)) - elseif playerPos == Position(32017, 32917, 10) or playerPos == Position(32017, 32918, 10) then - if player:getStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline) == 0 then - player:setStorageValue(Storage.Quest.U10_70.TheCursedCrystal.Questline, 1) + for index, value in pairs(teleports) do + if item:getPosition() == index then + if item:getPosition() == TCC_MEDUSACRYSTAL_ENTRY_MAP then + if player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Oneeyedjoe) > 0 then + doSendMagicEffect(player:getPosition(), CONST_ME_TELEPORT) + player:teleportTo(value.position) + doSendMagicEffect(value.position, CONST_ME_TELEPORT) + else + nopermission(player, fromPosition) + end + return + elseif item:getPosition() == TCC_MEDUSAMSG_ONEMAP or item:getPosition() == TCC_MEDUSAMSG_TWOMAP then + if player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.MedusaOil) < os.time() then + if player:getStorageValue(Storage.TibiaTales.TheCursedCrystal.Questline) == 0 then + player:setStorageValue(Storage.TibiaTales.TheCursedCrystal.Questline, 1) + end + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "This small room could once have been a shrine of some kind. You discover an old inscription between two ornate stone walls.") + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The text is partly crumbled: 'Take ... vial of emb... fl... and mix ... a medusa's bl.... Then .. the dust of ... crystal, so ... will get the Medusa's Ointm... powerful ... able to unpetrify ...") + return + end + else + doSendMagicEffect(player:getPosition(), CONST_ME_TELEPORT) + player:teleportTo(value.position) + doSendMagicEffect(value.position, CONST_ME_TELEPORT) + return end - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "This small room could once have been a shrine of some kind. You discover an old inscription between two ornate stone walls.") - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The text is partly crumbled: 'Take ... vial of emb... fl... and mix ... a medusa's bl.... Then .. the dust of ... crystal, so ... will get the Medusa's Ointm... powerful ... able to unpetrify ...") - return true - else - player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) end - - player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) end +end - return true +function nopermission(teleporter, fromthisposition) + teleporter:teleportTo(fromthisposition, false) + doSendMagicEffect(fromthisposition, CONST_ME_TELEPORT) + teleporter:say("You need permision to access this area.", TALKTYPE_MONSTER_SAY) end StepInCursedCrystal:type("stepin") -StepInCursedCrystal:aid(35001, 25018) +StepInCursedCrystal:aid(25018, 35001) StepInCursedCrystal:register() diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_flask.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_flask.lua deleted file mode 100644 index 30c7b35ff7c..00000000000 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_flask.lua +++ /dev/null @@ -1,19 +0,0 @@ -local gravediggerFlask = Action() - -function gravediggerFlask.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if not target:isCreature() or target:getName():lower() ~= "snake" then - return false - end - - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission11) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission12) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission12, 1) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Done! Report back to Omrabas.") - player:addItem(19086, 1) - item:remove() - target:remove() - end - return true -end - -gravediggerFlask:id(19085) -gravediggerFlask:register() diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_inscriptions.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_inscriptions.lua deleted file mode 100644 index feb887d8353..00000000000 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_inscriptions.lua +++ /dev/null @@ -1,20 +0,0 @@ -local gravediggerInscriptions = Action() -function gravediggerInscriptions.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission45) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission46) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission46, 1) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The words seem to breathe, stangely. One word stays in your mind: bronze") - player:getPosition():sendMagicEffect(CONST_ME_ENERGYHIT) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission46) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission47) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission47, 1) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The words seem to glow slightly. A name fixes in your mind: Takesha Antishu") - player:getPosition():sendMagicEffect(CONST_ME_ENERGYHIT) - elseif player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission47) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission48) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission48, 1) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The words seem to flutter. One word stays in your mind: floating") - player:getPosition():sendMagicEffect(CONST_ME_ENERGYHIT) - end - return true -end - -gravediggerInscriptions:aid(4651, 4652, 4653) -gravediggerInscriptions:register() diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_monks.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_monks.lua deleted file mode 100644 index cef89283d92..00000000000 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/actions_monks.lua +++ /dev/null @@ -1,24 +0,0 @@ -local config = { - [4641] = { storageKey = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission32, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission32a }, message = "Shadows rise and engulf the candle. The statue flickers in an unearthly light." }, - [4642] = { storageKey = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission32a, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission32b }, message = "The shadows of the statue swallow the candle hungrily." }, - [4643] = { storageKey = { Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission32b, Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission33 }, message = "A shade emerges and snatches the candle from your hands." }, -} - -local gravediggerMonks = Action() -function gravediggerMonks.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local targetItem = config[target.actionid] - if not targetItem then - return true - end - - local cStorages = targetItem.storageKey - if player:getStorageValue(cStorages[1]) == 1 and player:getStorageValue(cStorages[2]) < 1 then - player:setStorageValue(cStorages[2], 1) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, targetItem.message) - item:remove(1) - end - return true -end - -gravediggerMonks:id(18931) -gravediggerMonks:register() diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/creaturescripts_necromancer_servant.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/creaturescripts_necromancer_servant.lua deleted file mode 100644 index 266c6d738ab..00000000000 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/creaturescripts_necromancer_servant.lua +++ /dev/null @@ -1,12 +0,0 @@ -local creaturescripts_necromancer_servant = CreatureEvent("NecromancerServantDeath") - -function creaturescripts_necromancer_servant.onDeath(creature) - onDeathForDamagingPlayers(creature, function(creature, player) - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission57) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission57, 1) - end - end) - return true -end - -creaturescripts_necromancer_servant:register() diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_dormitory_teleport.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_dormitory_teleport.lua index ace4be4c035..3173cb23af7 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_dormitory_teleport.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_dormitory_teleport.lua @@ -6,11 +6,13 @@ function dormitoryTeleport.onStepIn(creature, item, position, fromPosition) return true end - if item.actionid == 4534 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission55) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission56) < 1 then - player:setStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission56, 1) + if item.actionid == 4534 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission55) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission56) < 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission56, 1) + player:setStorageValue(Storage.GravediggerOfDrefia.Mission57, 1) player:teleportTo(Position(33015, 32440, 10)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You should hurry, try not to dwell here any longer than a few minutes.") + Game.createMonster("necromancer servant", { x = 33008, y = 32437, z = 11 }) else player:teleportTo(Position(33018, 32437, 10)) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The teleport is accessible only once.") diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_necromancer_servant.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_necromancer_servant.lua index 935114e0261..194505b3a71 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_necromancer_servant.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_necromancer_servant.lua @@ -6,13 +6,12 @@ function necromancerServant.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission56) == 1 and player:getStorageValue(Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission57) < 1 then + if player:getStorageValue(Storage.GravediggerOfDrefia.Mission56) == 1 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission57) ~= 1 then + player:setStorageValue(Storage.GravediggerOfDrefia.Mission57, 1) Game.createMonster("necromancer servant", Position(33011, 32437, 11)) end - - return true end necromancerServant:type("stepin") -necromancerServant:aid(4536) +necromancerServant:aid(4541, 4542) necromancerServant:register() diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_sacrifice_teleport.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_sacrifice_teleport.lua index c4582854abc..14d98de5393 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_sacrifice_teleport.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_sacrifice_teleport.lua @@ -1,8 +1,3 @@ -local teleportDestinations = { - [4541] = { position = Position(33017, 32419, 11), storageKey = Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission74 }, - [4542] = { position = Position(33018, 32425, 11), storageKey = Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission75 }, -} - local sacrificeTeleport = MoveEvent() function sacrificeTeleport.onStepIn(creature, item, position, fromPosition) @@ -11,19 +6,16 @@ function sacrificeTeleport.onStepIn(creature, item, position, fromPosition) return true end - local destination = teleportDestinations[item.actionid] - if destination and player:getStorageValue(destination.storageKey) == 1 then - player:teleportTo(destination.position) + if item.actionid == 4541 and player:getStorageValue(Storage.GravediggerOfDrefia.Mission73) == 1 then + player:teleportTo(Position(33015, 32422, 11)) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + else + player:teleportTo(Position(33021, 32419, 11)) + player:getPosition():sendMagicEffect(CONST_ME_POFF) end - return true end sacrificeTeleport:type("stepin") - -for actionId in pairs(teleportDestinations) do - sacrificeTeleport:aid(actionId) -end - +sacrificeTeleport:aid(4536) sacrificeTeleport:register() diff --git a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_teleport.lua b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_teleport.lua index ca22c669e52..ad3f9447859 100644 --- a/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_teleport.lua +++ b/data-otservbr-global/scripts/quests/the_gravedigger_of_drefia/movements_teleport.lua @@ -1,13 +1,13 @@ local setting = { [4530] = { - firstStorage = Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission05, - secondStorage = Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission06, + firstStorage = Storage.GravediggerOfDrefia.Mission05, + secondStorage = Storage.GravediggerOfDrefia.Mission06, firstDestination = Position(32987, 32401, 9), secondDestination = Position(32988, 32397, 9), }, [4532] = { - firstStorage = Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission08, - secondStorage = Storage.Quest.U10_10.TheGravediggerOfDrefia.Mission09, + storage = Storage.GravediggerOfDrefia.Mission08, + storageTwo = Storage.GravediggerOfDrefia.Mission09, firstDestination = Position(33022, 32334, 10), secondDestination = Position(33022, 32338, 10), }, diff --git a/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_pythius_boss_teleport.lua b/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_pythius_boss_teleport.lua index 66569e33a7d..38db1e856b2 100644 --- a/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_pythius_boss_teleport.lua +++ b/data-otservbr-global/scripts/quests/the_hidden_city_of_beregar/moviments_pythius_boss_teleport.lua @@ -15,7 +15,7 @@ function pythiusBossTeleport.onStepIn(creature, item, position, fromPosition) end if item.actionid == 50126 then - if player:getStorageValue(Storage.Quest.U8_4.TheHiddenCityOfBeregar.FirewalkerBoots) == 1 or roomIsOccupied() then + if player:getStorageValue(Storage.QuestChests.FirewalkerBoots) == 1 or roomIsOccupied() then player:teleportTo(fromPosition, true) fromPosition:sendMagicEffect(CONST_ME_TELEPORT) return true diff --git a/data-otservbr-global/scripts/quests/the_lost_brother/movement-find-remains.lua b/data-otservbr-global/scripts/quests/the_lost_brother/movement-find-remains.lua index 7db346ff3e3..c2ddb8efcb7 100644 --- a/data-otservbr-global/scripts/quests/the_lost_brother/movement-find-remains.lua +++ b/data-otservbr-global/scripts/quests/the_lost_brother/movement-find-remains.lua @@ -6,9 +6,9 @@ function findRemains.onStepIn(creature, item, position, fromPosition) return true end - if player:getStorageValue(Storage.Quest.U10_80.TheLostBrotherQuest) == 1 then + if player:getStorageValue(Storage.AdventurersGuild.TheLostBrother) == 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You stumble over some old bones. Something is carved into the stone wall here: 'Tarun, my brother, you were right. She's evil.'") - player:setStorageValue(Storage.Quest.U10_80.TheLostBrotherQuest, 2) + player:setStorageValue(Storage.AdventurersGuild.TheLostBrother, 2) player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) end diff --git a/data-otservbr-global/scripts/quests/the_outlaw_camp/actions_the_outlaw_camp_quest.lua b/data-otservbr-global/scripts/quests/the_outlaw_camp/actions_the_outlaw_camp_quest.lua index 110cc819ec0..bdecd57c01f 100644 --- a/data-otservbr-global/scripts/quests/the_outlaw_camp/actions_the_outlaw_camp_quest.lua +++ b/data-otservbr-global/scripts/quests/the_outlaw_camp/actions_the_outlaw_camp_quest.lua @@ -23,7 +23,7 @@ function outlawQuest.onUse(player, item, fromPosition, target, toPosition, isHot end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a bag.") player:questKV("outlaw"):set("completed", true) - player:setStorageValue(Storage.Quest.U6_4.OutlawCampQuest, 1) + player:setStorageValue(Storage.QuestChests.OutlawCamp, 1) end return true diff --git a/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_package.lua b/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_package.lua index 0f7475d10de..95f32bfe748 100644 --- a/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_package.lua +++ b/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_package.lua @@ -1,8 +1,8 @@ local postmanPackage = Action() function postmanPackage.onUse(player, item, fromPosition, target, toPosition, isHotkey) if target.actionid == 101 and target.itemid == 3221 then - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission09) == 2 then - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission09, 3) + if player:getStorageValue(Storage.Postman.Mission09) == 2 then + player:setStorageValue(Storage.Postman.Mission09, 3) toPosition:sendMagicEffect(CONST_ME_MAGIC_GREEN) item:transform(2859) end diff --git a/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_waldos_posthorn.lua b/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_waldos_posthorn.lua index a4330a815d6..17b032dadf8 100644 --- a/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_waldos_posthorn.lua +++ b/data-otservbr-global/scripts/quests/the_postman_missions_quest/actions_waldos_posthorn.lua @@ -1,7 +1,7 @@ local postmanWaldos = Action() function postmanWaldos.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08) == 1 then - player:setStorageValue(Storage.Quest.U7_24.ThePostmanMissions.Mission08, 2) + if player:getStorageValue(Storage.Postman.Mission08) == 1 then + player:setStorageValue(Storage.Postman.Mission08, 2) player:addItem(3219, 1) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You found Waldo's posthorn.") else diff --git a/data-otservbr-global/scripts/quests/the_spike_tasks/movements_geomantic_charges.lua b/data-otservbr-global/scripts/quests/the_spike_tasks/movements_geomantic_charges.lua index a2c9edbb27a..816033d902a 100644 --- a/data-otservbr-global/scripts/quests/the_spike_tasks/movements_geomantic_charges.lua +++ b/data-otservbr-global/scripts/quests/the_spike_tasks/movements_geomantic_charges.lua @@ -11,10 +11,10 @@ function geomanticCharges.onStepIn(creature, item, position, fromPosition) end local tasksLoaded = {} - if not table.contains({ -1, 8 }, player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Nest_Main)) then + if not table.contains({ -1, 8 }, player:getStorageValue(SPIKE_MIDDLE_NEST_MAIN)) then tasksLoaded["NEST"] = true end - if player:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main) == 1 then + if player:getStorageValue(SPIKE_MIDDLE_CHARGE_MAIN) == 1 then tasksLoaded["CHARGE"] = true end @@ -34,7 +34,7 @@ function geomanticCharges.onStepIn(creature, item, position, fromPosition) if tasksLoaded["CHARGE"] then player:getPosition():sendMagicEffect(12) - player:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Spike_Middle_Charge_Main, 2) + player:setStorageValue(SPIKE_MIDDLE_CHARGE_MAIN, 2) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have charged your body with geomantic energy and can report about it.") end return true diff --git a/data-otservbr-global/scripts/quests/the_tainted_soul/actions_star_herb.lua b/data-otservbr-global/scripts/quests/the_tainted_soul/actions_star_herb.lua index d76b2fcd9c9..05e7a80e844 100644 --- a/data-otservbr-global/scripts/quests/the_tainted_soul/actions_star_herb.lua +++ b/data-otservbr-global/scripts/quests/the_tainted_soul/actions_star_herb.lua @@ -4,12 +4,12 @@ local config = { } local starHerb = Action() - function starHerb.onUse(player, item, fromPosition, target, toPosition, isHotkey) if target.itemid == config.antlers then - target:transform(config.antler_talisman) + item:transform(config.antler_talisman) item:remove(1) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You entwine the antler with fresh star herb.") + target:remove(1) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You entwine the antler with fresh star herb") player:getPosition():sendMagicEffect(CONST_ME_MAGIC_GREEN) end return true diff --git a/data-otservbr-global/scripts/quests/tibia_tales/actions_ultimate_booze_beer_bottle.lua b/data-otservbr-global/scripts/quests/tibia_tales/actions_ultimate_booze_beer_bottle.lua index 3bdfa5410d1..1e63ccc7b1a 100644 --- a/data-otservbr-global/scripts/quests/tibia_tales/actions_ultimate_booze_beer_bottle.lua +++ b/data-otservbr-global/scripts/quests/tibia_tales/actions_ultimate_booze_beer_bottle.lua @@ -4,8 +4,8 @@ function ultimateBoozer.onUse(player, item, fromPosition, target, toPosition, is return false end - if player:getStorageValue(Storage.Quest.U8_1.TibiaTales.UltimateBoozeQuest) == 1 then - player:setStorageValue(Storage.Quest.U8_1.TibiaTales.UltimateBoozeQuest, 2) + if player:getStorageValue(Storage.TibiaTales.UltimateBoozeQuest) == 1 then + player:setStorageValue(Storage.TibiaTales.UltimateBoozeQuest, 2) end player:removeItem(138, 1) player:addItem(136, 1) diff --git a/data-otservbr-global/scripts/quests/tinder_box/actions_reward.lua b/data-otservbr-global/scripts/quests/tinder_box/actions_reward.lua new file mode 100644 index 00000000000..42b97a26622 --- /dev/null +++ b/data-otservbr-global/scripts/quests/tinder_box/actions_reward.lua @@ -0,0 +1,12 @@ +local tinderReward = Action() +function tinderReward.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if player:getStorageValue(12450) >= os.time() then + return player:sendCancelMessage("The pile of bones is empty.") + end + player:addItem(20357, 1) + player:setStorageValue(12450, os.time() + 20 * 3600) + return player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a tinder box.") +end + +tinderReward:uid(3263) +tinderReward:register() diff --git a/data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/actions_tinder_box.lua b/data-otservbr-global/scripts/quests/tinder_box/actions_tinder_box.lua similarity index 99% rename from data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/actions_tinder_box.lua rename to data-otservbr-global/scripts/quests/tinder_box/actions_tinder_box.lua index a796b8bcaeb..cb21dcb9f3c 100644 --- a/data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/actions_tinder_box.lua +++ b/data-otservbr-global/scripts/quests/tinder_box/actions_tinder_box.lua @@ -3,9 +3,7 @@ local config = { target = 20356, reward = 20355, } - local tinderBox = Action() - function tinderBox.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == config.item and target.itemid == config.target then item:remove(1) diff --git a/data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/actions_reward.lua b/data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/actions_reward.lua deleted file mode 100644 index d9561a07505..00000000000 --- a/data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/actions_reward.lua +++ /dev/null @@ -1,23 +0,0 @@ -local tinderReward = Action() - -function tinderReward.onUse(player, item, fromPosition, target, toPosition, isHotkey) - local currentDate = os.date("*t") - local currentTime = os.time() - - if currentDate.month < 4 or currentDate.month > 5 or (currentDate.month == 5 and currentDate.day > 1) then - return player:sendCancelMessage("This can only be used between 1st of April and 1st of May.") - end - - if player:getStorageValue(Storage.Quest.U10_37.TinderBoxQuestChyllfroest.Reward) >= currentTime then - return player:sendCancelMessage("The pile of bones is empty.") - end - - player:addItem(20357, 1) - player:setStorageValue(Storage.Quest.U10_37.TinderBoxQuestChyllfroest.Reward, currentTime + 72000) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a tinder box.") - - return true -end - -tinderReward:uid(3263) -tinderReward:register() diff --git a/data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/movements_prohibit_entry.lua b/data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/movements_prohibit_entry.lua deleted file mode 100644 index 90c0eb585fd..00000000000 --- a/data-otservbr-global/scripts/quests/tinder_box_quest_chyllfroest/movements_prohibit_entry.lua +++ /dev/null @@ -1,23 +0,0 @@ -local movements_prohibit_entry = MoveEvent() - -function movements_prohibit_entry.onStepIn(creature, item, position, fromPosition) - local player = creature:getPlayer() - if not player then - return false - end - - local currentDate = os.date("*t") - - if currentDate.month < 4 or currentDate.month > 5 or (currentDate.month == 5 and currentDate.day > 1) then - player:teleportTo(Position(32063, 31091, 7)) - player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You cannot pass here outside the period from April 1st to May 1st.") - return true - end - - return true -end - -movements_prohibit_entry:type("stepin") -movements_prohibit_entry:aid(50000) -movements_prohibit_entry:register() diff --git a/data-otservbr-global/scripts/quests/to_blind_the_enemy_quest/mirror.lua b/data-otservbr-global/scripts/quests/to_blind_the_enemy_quest/mirror.lua index 454d1692742..95da06446a5 100644 --- a/data-otservbr-global/scripts/quests/to_blind_the_enemy_quest/mirror.lua +++ b/data-otservbr-global/scripts/quests/to_blind_the_enemy_quest/mirror.lua @@ -8,13 +8,13 @@ local function revertItem(position, itemId) end function mirror.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:getStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.Questline) == 1 then + if player:getStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline) == 1 then if target:getActionId() == 4001 and target.itemid == 132 then local itemToRemove = Tile(toPosition):getItemById(132) if itemToRemove then itemToRemove:remove() toPosition:sendMagicEffect(CONST_ME_MAGIC_POWDER) - player:setStorageValue(Storage.Quest.U8_1.ToBlindTheEnemy.Questline, 2) + player:setStorageValue(Storage.TibiaTales.ToBlindTheEnemy.Questline, 2) player:say("KABOOM !!", TALKTYPE_MONSTER_SAY, false, player, toPosition) addEvent(revertItem, 60 * 1000, toPosition, 132) item:remove(1) diff --git a/data-otservbr-global/startup/tables/chest.lua b/data-otservbr-global/startup/tables/chest.lua index d5b28c633ed..9ab3ea5a3b1 100644 --- a/data-otservbr-global/startup/tables/chest.lua +++ b/data-otservbr-global/startup/tables/chest.lua @@ -1064,14 +1064,14 @@ ChestUnique = { itemPos = { x = 32782, y = 32910, z = 8 }, reward = { { 4827, 1 } }, weight = 0.20, - storage = Storage.Quest.U7_6.WhisperMoss, + storage = Storage.QuestChests.WhisperMoss, }, [6103] = { -- Ape city itemId = 2473, itemPos = { x = 32935, y = 32886, z = 7 }, reward = { { 4831, 1 } }, weight = 2.00, - storage = Storage.Quest.U7_6.OldParchment, + storage = Storage.QuestChests.OldParchment, }, [6104] = { itemId = 2472, @@ -1770,22 +1770,20 @@ ChestUnique = { }, -- Witch House Quest [6188] = { - useKV = true, itemId = 2472, itemPos = { x = 32867, y = 31909, z = 8 }, weight = 23.30, container = 2853, reward = { { 3027, 2 }, { 3008, 1 }, { 3031, 100 } }, - questName = "WitchHouseQuest", + storage = Storage.QuestChests.WitchHouseQuest, }, -- Simon The Beggar's Favorite Staff [6189] = { - useKV = true, itemId = 2482, itemPos = { x = 33167, y = 31600, z = 15 }, weight = 38.00, reward = { { 6107, 1 } }, - questName = "SimonTheBeggarsFavoriteStaff", + storage = Storage.QuestChests.SimonTheBeggarsFavoriteStaff, }, -- Druid Outfit Quest - Wolf Tooth Chain [6190] = { @@ -2269,14 +2267,14 @@ ChestUnique = { itemPos = { x = 32591, y = 31647, z = 3 }, reward = { { 3425, 1 } }, weight = 55.00, - storage = Storage.Quest.U8_1.ToBlindTheEnemy.DwarvenShield, + storage = Storage.TibiaTales.ToBlindTheEnemy.DwarvenShield, }, [6254] = { itemId = 2472, itemPos = { x = 32590, y = 31647, z = 3 }, reward = { { 3282, 1 } }, weight = 54.00, - storage = Storage.Quest.U8_1.ToBlindTheEnemy.MorningStar, + storage = Storage.TibiaTales.ToBlindTheEnemy.MorningStar, }, [6255] = { itemId = 2434, @@ -2284,7 +2282,7 @@ ChestUnique = { container = 2853, reward = { { 237, 1 }, { 3147, 1 }, { 3059, 1 } }, weight = 31.00, - storage = Storage.Quest.U8_1.ToBlindTheEnemy.BP1, + storage = Storage.TibiaTales.ToBlindTheEnemy.BP1, }, [6256] = { itemId = 2434, @@ -2292,7 +2290,7 @@ ChestUnique = { container = 2853, reward = { { 3028, 2 }, { 3031, 100 } }, weight = 18.20, - storage = Storage.Quest.U8_1.ToBlindTheEnemy.BP2, + storage = Storage.TibiaTales.ToBlindTheEnemy.BP2, }, -- To Outfox a Fox Quest [6257] = { @@ -2300,7 +2298,7 @@ ChestUnique = { itemPos = { x = 32467, y = 31970, z = 5 }, reward = { { 139, 1 } }, weight = 7.00, - storage = Storage.Quest.U8_1.ToOutfoxAFoxQuest.MiningHelmet, + storage = Storage.TibiaTales.ToOutfoxAFoxQuest.MiningHelmet, }, -- Waterfall Quest [6258] = { @@ -2525,7 +2523,7 @@ ChestUnique = { itemPos = { x = 33004, y = 31530, z = 10 }, reward = { { 11699, 1 } }, weight = 15.00, - storage = Storage.Quest.U8_6.AnInterestInBotany.BotanyAlmanach, + storage = Storage.TibiaTales.AnInterestInBotany.BotanyAlmanach, }, -- Wrath of the Emperor Quest [6297] = { @@ -2566,61 +2564,6 @@ ChestUnique = { reward = { { 3725, 5 } }, questName = "Rookgaard05BrownMushrooms", }, - -- Dark Trails Quest - [6302] = { - itemId = 2469, - itemPos = { x = 33457, y = 32073, z = 8 }, - reward = { { 11450, 1 } }, - weight = 1.00, - storage = Storage.Quest.U10_50.DarkTrails.RewardSmallNotebook, - }, - [6303] = { - itemId = 2478, - itemPos = { x = 33468, y = 32083, z = 8 }, - container = 2853, - reward = { { 21203, 5 }, { 21333, 1 } }, - weight = 189.00, - storage = Storage.Quest.U10_50.DarkTrails.Reward05GlothAndBelongings, - }, - [6304] = { - itemId = 2478, - itemPos = { x = 33487, y = 32085, z = 9 }, - container = 2853, - reward = { { 21203, 10 }, { 21334, 1 } }, - weight = 338.00, - storage = Storage.Quest.U10_50.DarkTrails.Reward10GlothAndBelongings, - }, - -- Nightmare Teddy Quest - [6305] = { - useKV = true, - itemId = 2433, - itemPos = { x = 33444, y = 32605, z = 11 }, - reward = { { 21982, 1 } }, - weight = 6.00, - questName = "NightmareTeddyQuest", - }, - -- Ferumbras' Ascension Quest - [6306] = { - itemId = 1983, - itemPos = { x = 33384, y = 32323, z = 12 }, - reward = { { 22160, 1 } }, - weight = 1.00, - storage = Storage.Quest.U10_90.FerumbrasAscension.TheRiteOfEternalNight, - }, - [6307] = { - itemId = 1986, - itemPos = { x = 33393, y = 32373, z = 11 }, - reward = { { 22158, 1 } }, - weight = 15.00, - storage = Storage.Quest.U10_90.FerumbrasAscension.StoneCoffinsBones, - }, - [6309] = { - itemId = 21818, - itemPos = { x = 33408, y = 32396, z = 11 }, - reward = { { 9685, 1 } }, - weight = 1.00, - storage = Storage.Quest.U10_90.FerumbrasAscension.VampireTeeth, - }, -- Reward of others scrips files (varied rewards) -- The First dragon Quest -- Treasure chests (data\scripts\actions\quests\first_dragon\treasure_chests.lua) diff --git a/data-otservbr-global/startup/tables/corpse.lua b/data-otservbr-global/startup/tables/corpse.lua index 0efa3f46cae..d883939842d 100644 --- a/data-otservbr-global/startup/tables/corpse.lua +++ b/data-otservbr-global/startup/tables/corpse.lua @@ -8,27 +8,13 @@ CorpseAction = { itemId = false, itemPos = { { x = xxxxx, y = xxxxx, z = xx } }, }, + -- Others actions -- Threatened dreams quest [20002] = { itemId = 4285, itemPos = { { x = 32949, y = 31810, z = 7 } }, }, - -- The cursed crystal skeletons - [40001] = { - itemId = 4285, - itemPos = { - { x = 31974, y = 32907, z = 8 }, - { x = 32031, y = 32914, z = 8 }, - }, - }, - -- The Great Dragon Hunt Quest - [50806] = { - itemId = 21412, - itemPos = { - { x = 32991, y = 32642, z = 8 }, - }, - }, } CorpseUnique = { @@ -37,11 +23,6 @@ CorpseUnique = { itemId = 4024, itemPos = { x = 32258, y = 31098, z = 10 }, }, - -- Tinder Box Quest - Chyllfroest - [3263] = { - itemId = 4285, - itemPos = { x = 32085, y = 31025, z = 1 }, - }, -- Dark trails (Quandon corpse) -- Path: data\scripts\actions\quests\dark_trails\corpse.lua [20001] = { diff --git a/data-otservbr-global/startup/tables/door_quest.lua b/data-otservbr-global/startup/tables/door_quest.lua index 3e5888b7399..cf47a12bfe5 100644 --- a/data-otservbr-global/startup/tables/door_quest.lua +++ b/data-otservbr-global/startup/tables/door_quest.lua @@ -46,7 +46,7 @@ QuestDoorAction = { itemPos = { { x = 32455, y = 31967, z = 14 } }, }, -- To Outfox a Fox Quest, mining helmet door - [Storage.Quest.U8_1.ToOutfoxAFoxQuest.Questline] = { + [Storage.TibiaTales.ToOutfoxAFoxQuest.Questline] = { itemId = false, itemPos = { { x = 32467, y = 31969, z = 5 } }, }, @@ -258,15 +258,15 @@ QuestDoorAction = { itemPos = { { x = 33452, y = 32241, z = 7 } }, }, -- Ferumbras ascension door - [Storage.Quest.U10_90.FerumbrasAscension.FirstDoor] = { + [Storage.FerumbrasAscension.FirstDoor] = { itemId = false, itemPos = { { x = 33479, y = 32782, z = 11 } }, }, - [Storage.Quest.U10_90.FerumbrasAscension.MonsterDoor] = { + [Storage.FerumbrasAscension.MonsterDoor] = { itemId = false, itemPos = { { x = 33482, y = 32786, z = 11 } }, }, - [Storage.Quest.U10_90.FerumbrasAscension.TarbazDoor] = { + [Storage.FerumbrasAscension.TarbazDoor] = { itemId = false, itemPos = { { x = 33470, y = 32786, z = 11 } }, }, @@ -289,19 +289,19 @@ QuestDoorAction = { itemPos = { { x = 33046, y = 31302, z = 7 } }, }, -- Dark trails/oramond door - [Storage.Quest.U10_50.OramondQuest.ToTakeRoots.Door] = { + [Storage.Oramond.DoorBeggarKing] = { itemId = false, itemPos = { { x = 33573, y = 31982, z = 7 } }, }, - [Storage.Quest.U10_50.OramondQuest.TheAncientSewers.Door] = { + [Storage.Oramond.DoorAbandonedSewer] = { itemId = false, itemPos = { { x = 33549, y = 31974, z = 10 } }, }, - [Storage.Quest.U10_50.DarkTrails.DoorQuandon] = { + [Storage.DarkTrails.DoorQuandon] = { itemId = false, itemPos = { { x = 33573, y = 31953, z = 7 } }, }, - [Storage.Quest.U10_50.DarkTrails.DoorHideout] = { + [Storage.DarkTrails.DoorHideout] = { itemId = false, itemPos = { { x = 33666, y = 31924, z = 7 } }, }, @@ -481,19 +481,19 @@ QuestDoorAction = { itemPos = { { x = 32982, y = 31439, z = 3 } }, }, -- Postman door - [Storage.Quest.U7_24.ThePostmanMissions.Mission05] = { + [Storage.Postman.Mission05] = { itemId = false, itemPos = { { x = 32567, y = 32023, z = 6 } }, }, - [Storage.Quest.U7_24.ThePostmanMissions.Mission08] = { + [Storage.Postman.Mission08] = { itemId = false, itemPos = { { x = 32515, y = 32248, z = 8 } }, }, - [Storage.Quest.U7_24.ThePostmanMissions.Mission09] = { + [Storage.Postman.Mission09] = { itemId = false, itemPos = { { x = 32569, y = 32023, z = 6 } }, }, - [Storage.Quest.U7_24.ThePostmanMissions.Door] = { + [Storage.Postman.Door] = { itemId = false, itemPos = { { x = 31921, y = 32652, z = 8 }, @@ -592,11 +592,11 @@ QuestDoorAction = { itemId = false, itemPos = { { x = 32608, y = 31516, z = 14 } }, }, - [Storage.Quest.U8_6.AnInterestInBotany.ChestDoor] = { + [Storage.TibiaTales.AnInterestInBotany.ChestDoor] = { itemId = false, itemPos = { { x = 33007, y = 31536, z = 10 } }, }, - [Storage.Quest.U8_1.TibiaTales.AritosTaskDoor] = { + [Storage.TibiaTales.AritosTaskDoor] = { itemId = false, itemPos = { { x = 33247, y = 32534, z = 8 } }, }, @@ -656,7 +656,7 @@ QuestDoorAction = { }, }, -- Fathers burden door - [Storage.Quest.U8_6.AFathersBurden.QuestLog] = { + [Storage.FathersBurden.QuestLog] = { itemId = false, itemPos = { { x = 31989, y = 31225, z = 7 }, @@ -678,7 +678,7 @@ QuestDoorAction = { itemPos = { { x = 32316, y = 31757, z = 9 } }, }, -- White raven monastery door - [Storage.Quest.U7_24.TheWhiteRavenMonastery.Door] = { + [Storage.WhiteRavenMonastery.Door] = { itemId = false, itemPos = { { x = 32171, y = 31936, z = 7 }, @@ -825,7 +825,7 @@ QuestDoorAction = { itemId = false, itemPos = { { x = 32466, y = 32494, z = 8 } }, }, - [Storage.Quest.U10_80.GrimvaleQuest.AncientFeudDoors] = { + [Storage.Quest.U10_80.Grimvale.AncientFeudDoors] = { itemId = false, itemPos = { { x = 33124, y = 32261, z = 10 }, @@ -833,13 +833,6 @@ QuestDoorAction = { { x = 33159, y = 32322, z = 12 }, }, }, - [Storage.Quest.U10_90.FerumbrasAscension.TarbazDoor] = { - itemId = 22508, - itemPos = { - { x = 33476, y = 32791, z = 11 }, - { x = 33470, y = 32786, z = 11 }, - }, - }, [Storage.Kilmaresh.AccessDoor] = { itemId = false, itemPos = { { x = 33886, y = 31476, z = 7 } }, diff --git a/data-otservbr-global/startup/tables/item.lua b/data-otservbr-global/startup/tables/item.lua index ed01d30aeed..e2f94a88d18 100644 --- a/data-otservbr-global/startup/tables/item.lua +++ b/data-otservbr-global/startup/tables/item.lua @@ -208,354 +208,6 @@ ItemAction = { itemId = 1979, itemPos = { { x = 33217, y = 31661, z = 7 } }, }, - -- Spike Tasks - [4226] = { - itemId = 19387, - itemPos = { { x = 32624, y = 31853, z = 11 } }, - }, - [4227] = { - itemId = 19387, - itemPos = { { x = 32243, y = 32596, z = 8 } }, - }, - [4228] = { - itemId = 19387, - itemPos = { { x = 32234, y = 32604, z = 8 } }, - }, - [4229] = { - itemId = 19387, - itemPos = { { x = 32226, y = 32595, z = 8 } }, - }, - [4230] = { - itemId = 19387, - itemPos = { { x = 32234, y = 32604, z = 9 } }, - }, - [4231] = { - itemId = 19387, - itemPos = { { x = 32242, y = 32620, z = 9 } }, - }, - [4232] = { - itemId = 19387, - itemPos = { { x = 32234, y = 32604, z = 10 } }, - }, - [4233] = { - itemId = 19387, - itemPos = { { x = 32240, y = 32621, z = 10 } }, - }, - [4234] = { - itemId = 19387, - itemPos = { { x = 32234, y = 32604, z = 11 } }, - }, - [4235] = { - itemId = 19387, - itemPos = { { x = 32226, y = 32598, z = 11 } }, - }, - [4236] = { - itemId = 19387, - itemPos = { { x = 32234, y = 32604, z = 12 } }, - }, - [4237] = { - itemId = 19387, - itemPos = { { x = 32238, y = 32623, z = 12 } }, - }, - [4238] = { - itemId = 19387, - itemPos = { { x = 32234, y = 32604, z = 13 } }, - }, - [4239] = { - itemId = 19387, - itemPos = { { x = 32244, y = 32620, z = 13 } }, - }, - [4240] = { - itemId = 19387, - itemPos = { { x = 32234, y = 32604, z = 14 } }, - }, - [4241] = { - itemId = 19387, - itemPos = { { x = 32244, y = 32587, z = 14 } }, - }, - [4242] = { - itemId = 19387, - itemPos = { { x = 32234, y = 32604, z = 15 } }, - }, - [4243] = { - itemId = 19387, - itemPos = { { x = 32223, y = 32606, z = 15 } }, - }, - -- The Gravedigger of Drefia Quest - [4530] = { - itemId = 1949, - itemPos = { - { x = 32988, y = 32398, z = 9 }, - { x = 32987, y = 32400, z = 9 }, - }, - }, - [4532] = { - itemId = 1949, - itemPos = { - { x = 33022, y = 32337, z = 10 }, - { x = 33022, y = 32335, z = 10 }, - }, - }, - [4534] = { - itemId = 1949, - itemPos = { - { x = 33018, y = 32438, z = 10 }, - }, - }, - [4535] = { - itemId = 1949, - itemPos = { - { x = 33015, y = 32441, z = 10 }, - }, - }, - [4536] = { - itemId = 19147, - itemPos = { - { x = 33015, y = 32438, z = 11 }, - }, - }, - [4541] = { - itemId = 1949, - itemPos = { - { x = 33020, y = 32419, z = 11 }, - }, - }, - [4542] = { - itemId = 1949, - itemPos = { - { x = 33015, y = 32423, z = 11 }, - }, - }, - [4630] = { - itemId = 19075, - itemPos = { - { x = 32975, y = 32421, z = 9 }, - { x = 32970, y = 32420, z = 9 }, - { x = 32969, y = 32421, z = 9 }, - { x = 32974, y = 32425, z = 9 }, - { x = 32977, y = 32425, z = 9 }, - }, - }, - [4631] = { - itemId = false, - itemPos = { - { x = 33022, y = 32329, z = 10 }, - { x = 33023, y = 32329, z = 10 }, - }, - }, - [4632] = { - itemId = 3532, - itemPos = { - { x = 33036, y = 32400, z = 11 }, - }, - }, - [4633] = { - itemId = 19087, - itemPos = { - { x = 33102, y = 32375, z = 10 }, - { x = 33100, y = 32375, z = 10 }, - { x = 33100, y = 32379, z = 10 }, - { x = 33102, y = 32379, z = 10 }, - }, - }, - [4634] = { - itemId = false, - itemPos = { - { x = 33029, y = 32421, z = 11 }, - { x = 33030, y = 32421, z = 11 }, - { x = 33029, y = 32422, z = 11 }, - { x = 33030, y = 32422, z = 11 }, - }, - }, - [4635] = { - itemId = false, - itemPos = { - { x = 32995, y = 32417, z = 11 }, - { x = 32996, y = 32417, z = 11 }, - { x = 32996, y = 32425, z = 11 }, - { x = 32996, y = 32426, z = 11 }, - { x = 33000, y = 32425, z = 11 }, - { x = 33000, y = 32426, z = 11 }, - { x = 33000, y = 32417, z = 11 }, - { x = 33001, y = 32417, z = 11 }, - }, - }, - [4636] = { - itemId = 19112, - itemPos = { - { x = 32998, y = 32416, z = 11 }, - }, - }, - [4637] = { - itemId = false, - itemPos = { - { x = 32983, y = 32376, z = 11 }, - { x = 32983, y = 32377, z = 11 }, - }, - }, - [4638] = { - itemId = false, - itemPos = { - { x = 32993, y = 32401, z = 11 }, - { x = 32994, y = 32401, z = 11 }, - }, - }, - [4639] = { - itemId = 8708, - itemPos = { - { x = 33071, y = 32442, z = 11 }, - }, - }, - [4640] = { - itemId = 19130, - itemPos = { - { x = 33071, y = 32434, z = 12 }, - { x = 33072, y = 32433, z = 12 }, - { x = 33073, y = 32433, z = 12 }, - { x = 33074, y = 32434, z = 12 }, - }, - }, - [4641] = { - itemId = 19131, - itemPos = { - { x = 33012, y = 32388, z = 11 }, - }, - }, - [4642] = { - itemId = 19131, - itemPos = { - { x = 33015, y = 32388, z = 11 }, - }, - }, - [4643] = { - itemId = 19131, - itemPos = { - { x = 33014, y = 32378, z = 11 }, - }, - }, - [4644] = { - itemId = false, - itemPos = { - { x = 33036, y = 32439, z = 10 }, - { x = 33036, y = 32440, z = 10 }, - { x = 33037, y = 32439, z = 10 }, - { x = 33037, y = 32440, z = 10 }, - { x = 33039, y = 32439, z = 10 }, - { x = 33039, y = 32440, z = 10 }, - { x = 33040, y = 32439, z = 10 }, - { x = 33040, y = 32440, z = 10 }, - { x = 33042, y = 32439, z = 10 }, - }, - }, - [4645] = { - itemId = 18615, - itemPos = { - { x = 32929, y = 32446, z = 12 }, - { x = 32929, y = 32449, z = 12 }, - }, - }, - [4646] = { - itemId = 19134, - itemPos = { - { x = 32974, y = 32418, z = 11 }, - }, - }, - [4647] = { - itemId = 19134, - itemPos = { - { x = 32974, y = 32420, z = 11 }, - }, - }, - [4648] = { - itemId = 19134, - itemPos = { - { x = 32970, y = 32420, z = 11 }, - }, - }, - [4649] = { - itemId = 19134, - itemPos = { - { x = 32970, y = 32418, z = 11 }, - }, - }, - [4649] = { - itemId = 19134, - itemPos = { - { x = 32970, y = 32418, z = 11 }, - }, - }, - [4651] = { - itemId = 19142, - itemPos = { - { x = 32952, y = 32384, z = 13 }, - }, - }, - [4652] = { - itemId = 19141, - itemPos = { - { x = 32970, y = 32388, z = 13 }, - }, - }, - [4653] = { - itemId = 19140, - itemPos = { - { x = 32954, y = 32413, z = 13 }, - }, - }, - [4654] = { - itemId = 19099, - itemPos = { - { x = 32990, y = 32452, z = 10 }, - }, - }, - [4661] = { - itemId = 19201, - itemPos = { - { x = 33009, y = 32392, z = 10 }, - }, - }, - [4663] = { - itemId = 19198, - itemPos = { - { x = 33058, y = 32343, z = 10 }, - }, - }, - [4664] = { - itemId = 19199, - itemPos = { - { x = 33073, y = 32333, z = 10 }, - }, - }, - [4665] = { - itemId = 19198, - itemPos = { - { x = 33082, y = 32326, z = 10 }, - }, - }, - [4666] = { - itemId = 19199, - itemPos = { - { x = 33080, y = 32314, z = 10 }, - }, - }, - [4667] = { - itemId = 19199, - itemPos = { - { x = 33088, y = 32338, z = 10 }, - }, - }, - [4668] = { - itemId = 19099, - itemPos = { - { x = 33101, y = 32428, z = 11 }, - }, - }, - [4669] = { - itemId = 2435, - itemPos = { - { x = 32994, y = 32442, z = 11 }, - }, - }, -- In Service of Yalahar Quest [7812] = { itemId = 7804, @@ -824,79 +476,6 @@ ItemAction = { { x = 32741, y = 32382, z = 15 }, }, }, - -- Ferumbras' Ascension Quest - [24837] = { - itemId = 1949, - itemPos = { - { x = 33317, y = 32315, z = 13 }, - }, - }, - [24838] = { - itemId = 1949, - itemPos = { - { x = 33275, y = 32388, z = 8 }, - }, - }, - [24839] = { - itemId = 1949, - itemPos = { - { x = 33482, y = 32775, z = 12 }, - }, - }, - [24840] = { - itemId = 1949, - itemPos = { - { x = 33432, y = 32332, z = 14 }, - }, - }, - [24841] = { - itemId = 1949, - itemPos = { - { x = 33199, y = 31439, z = 13 }, - }, - }, - [24842] = { - itemId = 1949, - itemPos = { - { x = 33402, y = 32406, z = 15 }, - }, - }, - [24843] = { - itemId = 1949, - itemPos = { - { x = 33662, y = 32682, z = 10 }, - }, - }, - [24844] = { - itemId = 1949, - itemPos = { - { x = 33677, y = 32689, z = 13 }, - }, - }, - [24845] = { - itemId = 8280, - itemPos = { - { x = 33477, y = 32698, z = 14 }, - }, - }, - [24846] = { - itemId = 1949, - itemPos = { - { x = 33324, y = 31372, z = 14 }, - }, - }, - -- The Cursed Crystal - [25018] = { - itemId = false, - itemPos = { - { x = 31973, y = 32905, z = 11 }, - { x = 31973, y = 32905, z = 10 }, - { x = 32009, y = 32928, z = 9 }, - { x = 32017, y = 32917, z = 10 }, - { x = 32017, y = 32918, z = 10 }, - { x = 32009, y = 32928, z = 10 }, - }, - }, -- The Pits of Inferno Quest [28810] = { itemId = 353, @@ -1055,26 +634,6 @@ ItemAction = { { x = 32406, y = 32794, z = 9 }, }, }, - -- Ferumbras' Ascension Quest - [34313] = { - itemId = 1949, - itemPos = { - { x = 33637, y = 32650, z = 12 }, - }, - }, - [34314] = { - itemId = 1949, - itemPos = { - { x = 33629, y = 32739, z = 12 }, - }, - }, - [34323] = { - itemId = 1949, - itemPos = { - { x = 33666, y = 32624, z = 11 }, - { x = 33629, y = 32621, z = 11 }, - }, - }, -- The Pits of Inferno [39511] = { itemId = 6433, @@ -1082,6 +641,14 @@ ItemAction = { { x = 32739, y = 32392, z = 14 }, }, }, + -- The cursed crystal skeletons + [40001] = { + itemId = 27490, + itemPos = { + { x = 31974, y = 32907, z = 8 }, + { x = 32031, y = 32914, z = 8 }, + }, + }, [40002] = { -- The cursed crystal red crystal itemId = 21572, itemPos = { { x = 32022, y = 32918, z = 10 } }, @@ -1447,23 +1014,6 @@ ItemAction = { { x = 32652, y = 32200, z = 5 }, }, }, - -- Tinder Box Quest - Event Chyllfroests - [50000] = { - itemId = false, - itemPos = { - { x = 32056, y = 31088, z = 7 }, - { x = 32057, y = 31087, z = 7 }, - { x = 32058, y = 31086, z = 7 }, - { x = 32059, y = 31085, z = 7 }, - { x = 32060, y = 31084, z = 7 }, - { x = 32061, y = 31083, z = 7 }, - { x = 32060, y = 31083, z = 7 }, - { x = 32059, y = 31084, z = 7 }, - { x = 32058, y = 31085, z = 7 }, - { x = 32057, y = 31086, z = 7 }, - { x = 32056, y = 31087, z = 7 }, - }, - }, -- The Pits of Inferno [50082] = { itemId = 2576, @@ -1527,70 +1077,6 @@ ItemAction = { { x = 32788, y = 32227, z = 14 }, }, }, - -- The Great Dragon Hunt Quest - [50808] = { - itemId = false, - itemPos = { - { x = 33010, y = 32638, z = 5 }, - { x = 33039, y = 32652, z = 6 }, - { x = 33010, y = 32687, z = 7 }, - { x = 33037, y = 32662, z = 7 }, - { x = 33078, y = 32657, z = 6 }, - { x = 32994, y = 32625, z = 6 }, - }, - }, - -- Ferumbras' Ascension Quest - [53803] = { - itemId = 22872, - itemPos = { - { x = 33388, y = 32358, z = 11 }, - }, - }, - [53805] = { - itemId = false, - itemPos = { - { x = 33421, y = 32383, z = 12 }, - { x = 33422, y = 32383, z = 12 }, - { x = 33422, y = 32384, z = 12 }, - { x = 33421, y = 32384, z = 12 }, - }, - }, - [53812] = { - itemId = 8646, - itemPos = { - { x = 33626, y = 32621, z = 13 }, - }, - }, - [53813] = { - itemId = 8647, - itemPos = { - { x = 33635, y = 32682, z = 13 }, - }, - }, - [53814] = { - itemId = 8649, - itemPos = { - { x = 33660, y = 32627, z = 13 }, - }, - }, - -- Roshamuul Quest - [55000] = { - itemId = false, - itemPos = { - { x = 33560, y = 32525, z = 7 }, - { x = 33554, y = 32545, z = 7 }, - { x = 33573, y = 32547, z = 7 }, - { x = 33543, y = 32562, z = 7 }, - { x = 33579, y = 32567, z = 7 }, - }, - }, - -- Spike Tasks - [56421] = { - itemId = 1949, - itemPos = { - { x = 32242, y = 32611, z = 11 }, - }, - }, -- The Ice Islands Quest, Nibelor 1: Breaking the Ice [60000] = { itemId = 7185, @@ -1613,11 +1099,6 @@ ItemUnique = { itemId = 8821, itemPos = { x = 32682, y = 31242, z = 6 }, }, - -- Ferumbras' Ascension Quest - [1035] = { - itemId = 4073, - itemPos = { x = 33388, y = 31409, z = 14 }, - }, -- The Ice Islands Quest [1061] = { itemId = 2576, @@ -2089,11 +1570,6 @@ ItemUnique = { itemId = 2753, itemPos = { x = 32933, y = 32495, z = 7 }, }, - -- The Ape City - HolyApeHair - [4663] = { - itemId = 2433, - itemPos = { x = 33017, y = 32358, z = 11 }, - }, -- In Service of Yalahar Quest [7809] = { itemId = 1949, diff --git a/data-otservbr-global/startup/tables/lever.lua b/data-otservbr-global/startup/tables/lever.lua index 86798188a0a..3405b60769a 100644 --- a/data-otservbr-global/startup/tables/lever.lua +++ b/data-otservbr-global/startup/tables/lever.lua @@ -8,14 +8,6 @@ LeverAction = { { x = 32848, y = 32277, z = 9 }, }, }, - -- The Gravedigger of Drefia Quest - [4650] = { - itemId = 9110, - itemPos = { - { x = 32972, y = 32412, z = 11 }, - }, - }, - -- The Pits of Inferno Quest [7799] = { itemId = 431, itemPos = { @@ -171,62 +163,6 @@ LeverAction = { { x = 32600, y = 32105, z = 14 }, }, }, - -- Ferumbras' Ascension Quest - [34305] = { - itemId = 9125, - itemPos = { - { x = 33628, y = 32665, z = 12 }, - }, - }, - [34306] = { - itemId = 9125, - itemPos = { - { x = 33631, y = 32665, z = 12 }, - }, - }, - [34307] = { - itemId = 9125, - itemPos = { - { x = 33628, y = 32683, z = 12 }, - }, - }, - [34308] = { - itemId = 9125, - itemPos = { - { x = 33631, y = 32683, z = 12 }, - }, - }, - [34309] = { - itemId = 9125, - itemPos = { - { x = 33628, y = 32701, z = 12 }, - }, - }, - [34310] = { - itemId = 9125, - itemPos = { - { x = 33631, y = 32701, z = 12 }, - }, - }, - [34311] = { - itemId = 9125, - itemPos = { - { x = 33628, y = 32719, z = 12 }, - }, - }, - [34312] = { - itemId = 9125, - itemPos = { - { x = 33631, y = 32719, z = 12 }, - }, - }, - [34324] = { - itemId = 9125, - itemPos = { - { x = 33628, y = 32616, z = 11 }, - { x = 33671, y = 32623, z = 11 }, - }, - }, -- The Pits of Inferno Quest [50160] = { itemId = 2772, @@ -259,63 +195,6 @@ LeverUnique = { itemId = 2772, itemPos = { x = 33172, y = 31896, z = 8 }, }, - -- Ferumbras' Ascension Quest - [1021] = { - itemId = 8911, - itemPos = { x = 33270, y = 31476, z = 14 }, - }, - [1022] = { - itemId = 8911, - itemPos = { x = 33229, y = 31499, z = 13 }, - }, - [1023] = { - itemId = 8911, - itemPos = { x = 33455, y = 32356, z = 13 }, - }, - [1024] = { - itemId = 8911, - itemPos = { x = 33385, y = 32455, z = 14 }, - }, - [1025] = { - itemId = 8911, - itemPos = { x = 33593, y = 32643, z = 14 }, - }, - [1026] = { - itemId = 8911, - itemPos = { x = 33680, y = 32740, z = 11 }, - }, - [1027] = { - itemId = 8911, - itemPos = { x = 33418, y = 32848, z = 11 }, - }, - [1028] = { - itemId = 8911, - itemPos = { x = 33434, y = 32784, z = 13 }, - }, - [1029] = { - itemId = 8911, - itemPos = { x = 33402, y = 32465, z = 13 }, - }, - [1030] = { - itemId = 8911, - itemPos = { x = 33202, y = 31475, z = 11 }, - }, - [1031] = { - itemId = 8911, - itemPos = { x = 33385, y = 32410, z = 14 }, - }, - [1032] = { - itemId = 8911, - itemPos = { x = 33403, y = 32391, z = 14 }, - }, - [1033] = { - itemId = 8911, - itemPos = { x = 33410, y = 32441, z = 14 }, - }, - [1034] = { - itemId = 8911, - itemPos = { x = 33430, y = 32418, z = 14 }, - }, -- The Pits of Inferno [1037] = { itemId = 2772, diff --git a/data-otservbr-global/startup/tables/teleport.lua b/data-otservbr-global/startup/tables/teleport.lua index 367dc51ba4e..e746e98a028 100644 --- a/data-otservbr-global/startup/tables/teleport.lua +++ b/data-otservbr-global/startup/tables/teleport.lua @@ -16,6 +16,15 @@ TeleportAction = { { x = 32208, y = 31134, z = 7 }, }, }, + [35001] = { -- The Cursed Crystal teleports + itemId = 19387, + itemPos = { + { x = 31973, y = 32905, z = 10 }, + { x = 31973, y = 32905, z = 11 }, + { x = 32009, y = 32928, z = 10 }, + { x = 32009, y = 32928, z = 9 }, + }, + }, -- Path: data\scripts\movements\quests\the_queen_of_the_banshees\movement(2)-second_seal_pearl.lua [35002] = { itemId = 1949, diff --git a/data-otservbr-global/world/otservbr-npc.xml b/data-otservbr-global/world/otservbr-npc.xml index 5a475b8999d..2b3f88a00d7 100644 --- a/data-otservbr-global/world/otservbr-npc.xml +++ b/data-otservbr-global/world/otservbr-npc.xml @@ -147,9 +147,6 @@ - - - @@ -591,9 +588,6 @@ - - - @@ -2259,9 +2253,6 @@ - - - diff --git a/data/items/items.xml b/data/items/items.xml index df8ba8c122d..0afe5ebe858 100644 --- a/data/items/items.xml +++ b/data/items/items.xml @@ -22659,7 +22659,7 @@ - + @@ -39137,7 +39137,7 @@ - + @@ -42064,12 +42064,7 @@ - - - - - - + @@ -44205,7 +44200,7 @@ Awarded by TibiaMisterios.com.br"/> - + @@ -44220,7 +44215,7 @@ Awarded by TibiaMisterios.com.br"/> - + @@ -45292,10 +45287,8 @@ Awarded by TibiaMisterios.com.br"/> - - @@ -64912,7 +64905,7 @@ hands of its owner. Granted by TibiaRoyal.com"/> - + @@ -74924,15 +74917,15 @@ Granted by TibiaGoals.com"/> - + - + - + diff --git a/data/libs/functions/player.lua b/data/libs/functions/player.lua index a8497b9bef1..8dbd0cf9aff 100644 --- a/data/libs/functions/player.lua +++ b/data/libs/functions/player.lua @@ -158,21 +158,21 @@ function Player.checkGnomeRank(self) end function Player.addFamePoint(self) - local points = self:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Fame_Points) + local points = self:getStorageValue(SPIKE_FAME_POINTS) local current = math.max(0, points) - self:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Fame_Points, current + 1) + self:setStorageValue(SPIKE_FAME_POINTS, current + 1) self:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have received a fame point.") end function Player.getFamePoints(self) - local points = self:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Fame_Points) + local points = self:getStorageValue(SPIKE_FAME_POINTS) return math.max(0, points) end function Player.removeFamePoints(self, amount) - local points = self:getStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Fame_Points) + local points = self:getStorageValue(SPIKE_FAME_POINTS) local current = math.max(0, points) - self:setStorageValue(Storage.Quest.U10_20.SpikeTaskQuest.Constants.Spike_Fame_Points, current - amount) + self:setStorageValue(SPIKE_FAME_POINTS, current - amount) end function Player.depositMoney(self, amount)