mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-10-30 03:36:24 +01:00
introduce svargrond arena quest
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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)
|
||||
|
||||
39
data/actions/scripts/misc/strengthening_potions.lua
Normal file
39
data/actions/scripts/misc/strengthening_potions.lua
Normal 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
|
||||
27
data/actions/scripts/misc/surprisebag.lua
Normal file
27
data/actions/scripts/misc/surprisebag.lua
Normal 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
|
||||
Reference in New Issue
Block a user