mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-11-28 23:46:49 +01:00
introduce raid sacrifices and bonus exp if you eat sabrehaven talon
This commit is contained in:
@@ -398,6 +398,16 @@
|
||||
<!-- Laguna Islands -->
|
||||
<movevent event="StepIn" frommovementid="17563" tomovementid="17564" script="laguna_islands/erayo_hut_stairs.lua" />
|
||||
|
||||
<!-- Raid Sacrifices -->
|
||||
<movevent event="StepIn" movementid="17578" script="misc/raid_sacrifice.lua" />
|
||||
<movevent event="AddItem" movementid="17578" tileitem="1" script="misc/raid_sacrifice.lua" />
|
||||
<movevent event="StepIn" movementid="17579" script="misc/raid_sacrifice.lua" />
|
||||
<movevent event="AddItem" movementid="17579" tileitem="1" script="misc/raid_sacrifice.lua" />
|
||||
<movevent event="StepIn" movementid="17580" script="misc/raid_sacrifice.lua" />
|
||||
<movevent event="AddItem" movementid="17580" tileitem="1" script="misc/raid_sacrifice.lua" />
|
||||
<movevent event="StepIn" movementid="17581" script="misc/raid_sacrifice.lua" />
|
||||
<movevent event="AddItem" movementid="17581" tileitem="1" script="misc/raid_sacrifice.lua" />
|
||||
|
||||
<!-- Goroma -->
|
||||
<movevent event="StepIn" frommovementid="17506" tomovementid="17508" script="goroma/energy_barrier.lua" />
|
||||
<movevent event="StepIn" movementid="17510" script="goroma/to_ramoa.lua" />
|
||||
|
||||
38
data/movements/scripts/misc/raid_sacrifice.lua
Normal file
38
data/movements/scripts/misc/raid_sacrifice.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
local config = {
|
||||
[17578] = { name = "edronorshabaal", message = "CHAMEK ATH UTHUL ARAK!", count=100 },
|
||||
[17579] = { name = "ferumbras", message = "Hahahaha! I have never been killed by the Avar Tar!", count=100 },
|
||||
[17580] = { name = "morgaroth", message = "THE TRIANGLE OF TERROR WILL RISE!", count=100 },
|
||||
[17581] = { name = "libertybaypirates", message = "Plundeeeeer!", count=100 }
|
||||
}
|
||||
|
||||
function onStepIn(creature, item, position, fromPosition)
|
||||
doRelocate(item:getPosition(),{x = 33268, y = 31835, z = 9})
|
||||
item:getPosition():sendMagicEffect(11)
|
||||
Game.sendMagicEffect({x = 33268, y = 31835, z = 9}, 11)
|
||||
item:getPosition():sendMonsterSay("Mystic flame ward you off.")
|
||||
end
|
||||
|
||||
function onAddItem(item, tileitem, position)
|
||||
local movementId = tileitem:getMovementId()
|
||||
local raid = config[movementId]
|
||||
|
||||
if (item:getId() ~= 5776) then
|
||||
doRelocate(item:getPosition(),{x = 33268, y = 31835, z = 9})
|
||||
item:getPosition():sendMagicEffect(11)
|
||||
Game.sendMagicEffect({x = 33268, y = 31835, z = 9}, 11)
|
||||
tileitem:getPosition():sendMonsterSay("Mystic flame spit out the sacrifice.")
|
||||
return true
|
||||
end
|
||||
|
||||
local currentCount = getGlobalStorageValue(movementId) + item:getCount()
|
||||
setGlobalStorageValue(movementId, currentCount)
|
||||
if (currentCount >= raid.count) then
|
||||
item:getPosition():sendMonsterSay(raid.message)
|
||||
Game.startRaid(raid.name)
|
||||
tileitem:remove()
|
||||
setGlobalStorageValue(movementId, 0)
|
||||
end
|
||||
|
||||
item:getPosition():sendMagicEffect(CONST_ME_FIREAREA)
|
||||
item:remove()
|
||||
end
|
||||
Reference in New Issue
Block a user