introduce svargrond arena quest

This commit is contained in:
ErikasKontenis
2022-07-24 21:42:40 +03:00
parent a041827f2a
commit b130e66149
24 changed files with 2152 additions and 1178 deletions

View File

@@ -26,6 +26,9 @@ local dolls = {
"Have you been nice?",
"Merry Christmas!",
"Can you stop squeezing me now... I'm starting to feel a little sick."
},
[7184] = {
"Hug me!",
}
}
@@ -66,6 +69,9 @@ function onUse(player, item, fromPosition, target, toPosition, isHotkey)
elseif item.itemid == 6511 then
item:transform(6567)
item:decay()
elseif item.itemid == 7184 then
item:transform(7183)
item:decay()
end
sound = sound:gsub('|PLAYERNAME|', player:getName())

View File

@@ -53,6 +53,12 @@ local foods = {
[6545] = "Gulp.", -- coloured egg
[6569] = "Mmmm.", -- candy
[6574] = "Mmmm.", -- bar of chocolate
[7372] = "Slurp.", -- ice cream cone
[7373] = "Slurp.", -- ice cream cone
[7374] = "Slurp.", -- ice cream cone
[7375] = "Slurp.", -- ice cream cone
[7376] = "Slurp.", -- ice cream cone
[7377] = "Slurp.", -- ice cream cone
}
function onUse(player, item, fromPosition, target, toPosition)

View File

@@ -0,0 +1,39 @@
local berserker = Condition(CONDITION_ATTRIBUTES)
berserker:setParameter(CONDITION_PARAM_TICKS, 10 * 60 * 1000)
berserker:setParameter(CONDITION_PARAM_SKILL_MELEE, 5)
berserker:setParameter(CONDITION_PARAM_SKILL_SHIELD, -10)
local mastermind = Condition(CONDITION_ATTRIBUTES)
mastermind:setParameter(CONDITION_PARAM_TICKS, 10 * 60 * 1000)
mastermind:setParameter(CONDITION_PARAM_STAT_MAGICPOINTS, 3)
mastermind:setParameter(CONDITION_PARAM_SKILL_SHIELD, -10)
local bullseye = Condition(CONDITION_ATTRIBUTES)
bullseye:setParameter(CONDITION_PARAM_TICKS, 30 * 60 * 1000)
bullseye:setParameter(CONDITION_PARAM_SKILL_DISTANCE, 5)
bullseye:setParameter(CONDITION_PARAM_SKILL_SHIELD, -10)
local config = {
[7439] = berserker,
[7440] = mastermind,
[7443] = bullseye
}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local useItem = config[item.itemid]
if not useItem then
return true
end
if item.itemid == 7440 then
if not player:isSorcerer() or not player:isDruid() then
player:say('Only sorcerers and druids may drink this fluid.', TALKTYPE_MONSTER_SAY)
return true
end
end
player:addCondition(useItem)
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED)
item:remove(1)
return true
end

View File

@@ -0,0 +1,27 @@
local config = {
[6570] = { -- bluePresent
{3598, 10}, {6393, 3}, 6279, 6574, 6578, 6575, 6577, 6569, 6576, 6572, 2995
},
[6571] = { -- redPresent
{3035, 10}, {3035, 10}, {3035, 10}, 3036, 5944, 2993, 6568, 6566, 3386, 3420, 3079, 2995, 2995, 2995, 6393, 6393, 6576, 6576, 6578, 6578, 6574, 6574
}
}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
local present = config[item.itemid]
if not present then
return false
end
local count = 1
local gift = present[math.random(#present)]
if type(gift) == "table" then
count = gift[2]
gift = gift[1]
end
player:addItem(gift, count)
item:remove(1)
fromPosition:sendMagicEffect(CONST_ME_GIFT_WRAPS)
return true
end