mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-10-14 22:54:53 +02:00
implement few new 781 items
This commit is contained in:
53
data/actions/scripts/misc/dolls.lua
Normal file
53
data/actions/scripts/misc/dolls.lua
Normal file
@@ -0,0 +1,53 @@
|
||||
local dolls = {
|
||||
[5080] = {"Hug me."},
|
||||
[5668] = {
|
||||
"It's not winning that matters, but winning in style.",
|
||||
"Today's your lucky day. Probably.",
|
||||
"Do not meddle in the affairs of dragons, for you are crunchy and taste good with ketchup.",
|
||||
"That is one stupid question.",
|
||||
"You'll need more rum for that.",
|
||||
"Do or do not. There is no try.",
|
||||
"You should do something you always wanted to.",
|
||||
"If you walk under a ladder and it falls down on you it probably means bad luck.",
|
||||
"Never say 'oops'. Always say 'Ah, interesting!'",
|
||||
"Five steps east, fourteen steps south, two steps north and seventeen steps west!"
|
||||
},
|
||||
[5791] = {
|
||||
"Fchhhhhh!",
|
||||
"Zchhhhhh!",
|
||||
"Grooaaaaar*cough*",
|
||||
"Aaa... CHOO!",
|
||||
"You... will.... burn!!"
|
||||
}
|
||||
}
|
||||
|
||||
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
|
||||
local sounds = dolls[item.itemid]
|
||||
if not sounds then
|
||||
return false
|
||||
end
|
||||
|
||||
if fromPosition.x == CONTAINER_POSITION then
|
||||
fromPosition = player:getPosition()
|
||||
end
|
||||
|
||||
local random = math.random(#sounds)
|
||||
local sound = sounds[random]
|
||||
if item.itemid == 5791 then
|
||||
if random == 3 then
|
||||
fromPosition:sendMagicEffect(CONST_ME_POFF)
|
||||
elseif random == 4 then
|
||||
fromPosition:sendMagicEffect(CONST_ME_FIREAREA)
|
||||
elseif random == 5 then
|
||||
doTargetCombatHealth(0, player, COMBAT_PHYSICALDAMAGE, -1, -1, CONST_ME_EXPLOSIONHIT)
|
||||
end
|
||||
elseif item.itemid == 5668 then
|
||||
fromPosition:sendMagicEffect(CONST_ME_MAGIC_RED)
|
||||
item:transform(item.itemid + 1)
|
||||
item:decay()
|
||||
end
|
||||
|
||||
sound = sound:gsub('|PLAYERNAME|', player:getName())
|
||||
player:say(sound, TALKTYPE_MONSTER_SAY, false, 0, fromPosition)
|
||||
return true
|
||||
end
|
@@ -1,5 +1,5 @@
|
||||
local lockedDoors = {
|
||||
1628, 1631, 1650, 1653, 1668, 1671, 1682, 1691, 5006, 5007, 5097, 5106, 5115, 5124, 5133, 5136, 5139, 5142, 5277, 5280
|
||||
1628, 1631, 1650, 1653, 1668, 1671, 1682, 1691, 5006, 5007, 5097, 5106, 5115, 5124, 5133, 5136, 5139, 5142, 5277, 5280, 5732, 5735
|
||||
}
|
||||
|
||||
local closedNormalDoors = {
|
||||
@@ -39,6 +39,10 @@ local closedNormalDoors = {
|
||||
[5281] = 5282,
|
||||
[5283] = 5284,
|
||||
[5285] = 5286,
|
||||
[5514] = 5515,
|
||||
[5516] = 5517,
|
||||
[5733] = 5734,
|
||||
[5736] = 5737,
|
||||
}
|
||||
|
||||
local openVerticalDoors = {
|
||||
@@ -74,6 +78,9 @@ local openVerticalDoors = {
|
||||
[5284] = 5283,
|
||||
[5288] = 5287,
|
||||
[5292] = 5291,
|
||||
[5515] = 5514,
|
||||
[5737] = 5736,
|
||||
[5748] = 5749,
|
||||
}
|
||||
|
||||
local openHorizontalDoors = {
|
||||
@@ -109,6 +116,9 @@ local openHorizontalDoors = {
|
||||
[5286] = 5285,
|
||||
[5290] = 5289,
|
||||
[5294] = 5293,
|
||||
[5517] = 5516,
|
||||
[5734] = 5733,
|
||||
[5746] = 5745,
|
||||
}
|
||||
|
||||
local levelDoors = {
|
||||
@@ -143,6 +153,8 @@ local questDoors = {
|
||||
[5131] = 5132,
|
||||
[5287] = 5288,
|
||||
[5289] = 5290,
|
||||
[5745] = 5746,
|
||||
[5749] = 5748,
|
||||
}
|
||||
|
||||
local passthrough = {
|
||||
|
@@ -8,6 +8,15 @@ function onUse(player, item, fromPosition, target, toPosition)
|
||||
item:getPosition():sendMagicEffect(CONST_ME_SOUND_PURPLE)
|
||||
elseif item:getId() == 3219 then
|
||||
item:getPosition():sendMagicEffect(19)
|
||||
elseif item:getId() == 5786 then
|
||||
Game.createMonster("wolf", player:getPosition())
|
||||
local random = math.random(1,10)
|
||||
if random > 3 then -- destroy 70% chance
|
||||
item:getPosition():sendMagicEffect(CONST_ME_SOUND_RED)
|
||||
item:remove(1)
|
||||
else
|
||||
item:getPosition():sendMagicEffect(CONST_ME_SOUND_YELLOW)
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
|
@@ -1,4 +0,0 @@
|
||||
function onUse(player, item, fromPosition, target, toPosition)
|
||||
player:sendCancelMessage("Hug me ^^")
|
||||
return true
|
||||
end
|
@@ -3,7 +3,7 @@ local downstairs = {
|
||||
}
|
||||
|
||||
local upstairs = {
|
||||
1948, 1968
|
||||
1948, 1968, 5542
|
||||
}
|
||||
|
||||
function onUse(player, item, fromPosition, target, toPosition)
|
||||
|
Reference in New Issue
Block a user