mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-11-28 15:46:49 +01:00
implement few new 781 items
This commit is contained in:
@@ -94,6 +94,7 @@
|
||||
<action fromid="2948" toid="2950" script="misc/instruments.lua" />
|
||||
<action fromid="2952" toid="2965" script="misc/instruments.lua" />
|
||||
<action itemid="3219" script="misc/instruments.lua" />
|
||||
<action itemid="5786" script="misc/instruments.lua" />
|
||||
|
||||
<!-- Strange Levers -->
|
||||
<action fromid="2566" toid="2567" script="misc/strange_lever.lua" />
|
||||
@@ -103,6 +104,7 @@
|
||||
<action itemid="435" script="misc/teleporters.lua" />
|
||||
<action itemid="1948" script="misc/teleporters.lua" />
|
||||
<action itemid="1968" script="misc/teleporters.lua" />
|
||||
<action itemid="5542" script="misc/teleporters.lua" />
|
||||
|
||||
<!-- Special Right -->
|
||||
<action itemid="372" script="misc/special_rights.lua" />
|
||||
@@ -118,7 +120,6 @@
|
||||
|
||||
<!-- Fun -->
|
||||
<action itemid="611" script="misc/snowheap.lua" />
|
||||
<action itemid="5080" script="misc/panda_teddy.lua" />
|
||||
<action itemid="2974" script="misc/water_pipe.lua" />
|
||||
<action itemid="2976" script="misc/birdcage.lua" />
|
||||
<action itemid="3103" script="misc/cornucopia.lua" />
|
||||
@@ -146,6 +147,11 @@
|
||||
<action itemid="3208" script="misc/weapons.lua" />
|
||||
<action itemid="3059" script="misc/spellbook.lua" />
|
||||
|
||||
<!-- Dolls -->
|
||||
<action itemid="5080" script="misc/dolls.lua" />
|
||||
<action itemid="5668" script="misc/dolls.lua" />
|
||||
<action itemid="5791" script="misc/dolls.lua" />
|
||||
|
||||
<!-- Keys -->
|
||||
<action fromid="2967" toid="2973" script="misc/key.lua" />
|
||||
|
||||
@@ -166,6 +172,7 @@
|
||||
<action itemid="4872" script="misc/ice_pick.lua" />
|
||||
<action itemid="3456" script="misc/pick.lua" />
|
||||
<action itemid="3457" script="misc/shovel.lua" />
|
||||
<action itemid="5710" script="misc/shovel.lua" />
|
||||
<action itemid="3483" allowfaruse="1" script="misc/fishing_rod.lua" />
|
||||
|
||||
<!-- Miscellaneous -->
|
||||
@@ -224,6 +231,7 @@
|
||||
<action itemid="3478" script="misc/fluids.lua" />
|
||||
<action itemid="3479" script="misc/fluids.lua" />
|
||||
<action itemid="3480" script="misc/fluids.lua" />
|
||||
<action itemid="5552" script="misc/fluids.lua" />
|
||||
|
||||
<!-- Food -->
|
||||
<action itemid="3250" script="misc/food.lua" />
|
||||
@@ -266,6 +274,7 @@
|
||||
<action itemid="3731" script="misc/food.lua" />
|
||||
<action itemid="3732" script="misc/food.lua" />
|
||||
<action itemid="5096" script="misc/food.lua" />
|
||||
<action itemid="5678" script="misc/food.lua" />
|
||||
|
||||
<!-- Passthrough -->
|
||||
<action fromid="2334" toid="2341" script="misc/doors.lua" />
|
||||
@@ -291,6 +300,8 @@
|
||||
<action itemid="5142" script="misc/doors.lua" />
|
||||
<action itemid="5277" script="misc/doors.lua" />
|
||||
<action itemid="5280" script="misc/doors.lua" />
|
||||
<action itemid="5732" script="misc/doors.lua" />
|
||||
<action itemid="5735" script="misc/doors.lua" />
|
||||
|
||||
<!-- Level Doors -->
|
||||
<action itemid="1646" script="misc/doors.lua" />
|
||||
@@ -323,6 +334,8 @@
|
||||
<action itemid="5131" script="misc/doors.lua" />
|
||||
<action itemid="5287" script="misc/doors.lua" />
|
||||
<action itemid="5289" script="misc/doors.lua" />
|
||||
<action itemid="5745" script="misc/doors.lua" />
|
||||
<action itemid="5749" script="misc/doors.lua" />
|
||||
|
||||
<!-- Closed Normal Doors -->
|
||||
<action itemid="2177" script="misc/doors.lua" />
|
||||
@@ -360,6 +373,10 @@
|
||||
<action itemid="5281" script="misc/doors.lua" />
|
||||
<action itemid="5283" script="misc/doors.lua" />
|
||||
<action itemid="5285" script="misc/doors.lua" />
|
||||
<action itemid="5514" script="misc/doors.lua" />
|
||||
<action itemid="5516" script="misc/doors.lua" />
|
||||
<action itemid="5733" script="misc/doors.lua" />
|
||||
<action itemid="5736" script="misc/doors.lua" />
|
||||
|
||||
<!-- Open Vertical Doors -->
|
||||
<action itemid="1630" script="misc/doors.lua" />
|
||||
@@ -394,6 +411,9 @@
|
||||
<action itemid="5284" script="misc/doors.lua" />
|
||||
<action itemid="5288" script="misc/doors.lua" />
|
||||
<action itemid="5292" script="misc/doors.lua" />
|
||||
<action itemid="5515" script="misc/doors.lua" />
|
||||
<action itemid="5737" script="misc/doors.lua" />
|
||||
<action itemid="5748" script="misc/doors.lua" />
|
||||
|
||||
<!-- Open Horizontal Doors -->
|
||||
<action itemid="1633" script="misc/doors.lua" />
|
||||
@@ -428,4 +448,7 @@
|
||||
<action itemid="5286" script="misc/doors.lua" />
|
||||
<action itemid="5290" script="misc/doors.lua" />
|
||||
<action itemid="5294" script="misc/doors.lua" />
|
||||
<action itemid="5517" script="misc/doors.lua" />
|
||||
<action itemid="5734" script="misc/doors.lua" />
|
||||
<action itemid="5746" script="misc/doors.lua" />
|
||||
</actions>
|
||||
|
||||
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