mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-11-28 15:46:49 +01:00
finish hunter outfit quest
This commit is contained in:
@@ -85,9 +85,14 @@
|
||||
<action actionid="82" script="nostalrius/82.lua" />
|
||||
<action actionid="83" script="nostalrius/83.lua" />
|
||||
|
||||
<!-- Meriana Quest -->
|
||||
<action actionid="17525" script="meriana_quest/tortoise_egg.lua" />
|
||||
<action fromaid="17528" toaid="17530" script="meriana_quest/pirate_map.lua" />
|
||||
|
||||
<!-- Liberty Bay Misc -->
|
||||
<action fromid="6087" toid="6090" script="liberty_bay/cult_hymn.lua"/>
|
||||
<action actionid="33216" script="liberty_bay/cult_piano_teleport.lua"/>
|
||||
|
||||
<!-- Nostalrius Default Actions -->
|
||||
<!-- Furniture Parcels -->
|
||||
<action fromid="2775" toid="2812" script="misc/furniture_parcels.lua" />
|
||||
@@ -189,6 +194,7 @@
|
||||
<action itemid="5938" script="misc/ceirons_waterskin.lua" />
|
||||
|
||||
<!-- Chests -->
|
||||
<action itemid="2472" script="misc/chests.lua" />
|
||||
<action itemid="2479" script="misc/chests.lua" />
|
||||
<action itemid="2480" script="misc/chests.lua" />
|
||||
<action itemid="2543" script="misc/chests.lua" />
|
||||
|
||||
21
data/actions/scripts/liberty_bay/cult_hymn.lua
Normal file
21
data/actions/scripts/liberty_bay/cult_hymn.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
local config = {
|
||||
[6087] = {storage = 1053, text = 'first', effect = CONST_ME_SOUND_GREEN},
|
||||
[6088] = {storage = 1054, text = 'second', effect = CONST_ME_SOUND_RED},
|
||||
[6089] = {storage = 1055, text = 'third', effect = CONST_ME_SOUND_YELLOW},
|
||||
[6090] = {storage = 1056, text = 'fourth', effect = CONST_ME_SOUND_BLUE}
|
||||
}
|
||||
|
||||
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
|
||||
local playerPosition = player:getPosition()
|
||||
local useItem = config[item.itemid]
|
||||
if player:getStorageValue(useItem.storage) ~= 1 then
|
||||
player:setStorageValue(useItem.storage, 1)
|
||||
player:say("You have learned the ".. useItem.text .." part of a hymn.", TALKTYPE_MONSTER_SAY, false, 0, playerPosition)
|
||||
playerPosition:sendMagicEffect(useItem.effect)
|
||||
item:remove(1)
|
||||
else
|
||||
player:say("You already know the ".. useItem.text .." verse of the hymn.", TALKTYPE_MONSTER_SAY, false, 0, playerPosition)
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
18
data/actions/scripts/liberty_bay/cult_piano_teleport.lua
Normal file
18
data/actions/scripts/liberty_bay/cult_piano_teleport.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
local storages = {1053, 1054, 1055, 1056}
|
||||
|
||||
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
|
||||
local playerPosition = player:getPosition()
|
||||
|
||||
for i = 1, #storages do
|
||||
if player:getStorageValue(storages[i]) ~= 1 then
|
||||
player:say("You have not learned all the verses of the hymn.", TALKTYPE_MONSTER_SAY, false, 0, toPosition)
|
||||
playerPosition:sendMagicEffect(CONST_ME_POFF)
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
player:teleportTo(Position(32402, 32794, 9))
|
||||
player:say("You have sucessfully played the secret hymn of the cult.", TALKTYPE_MONSTER_SAY)
|
||||
Game.sendMagicEffect({x = 32402, y = 32794, z = 9}, CONST_ME_SOUND_PURPLE)
|
||||
return true
|
||||
end
|
||||
Reference in New Issue
Block a user