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

@ -1 +1 @@
next: 17751
next: 17752

View File

@ -601,4 +601,18 @@
<missionstate id="3" description="You have completed this Test! You can now be a citizen of Svargrond!" />
</mission>
</quest>
<quest name="The Ultimate Challenges" startstorageid="50140" startstoragevalue="1">
<mission name="Barbarian Arena - Greenhorn Mode" storageid="50140" startvalue="1" endvalue="2">
<missionstate id="1" description="You have to defeat all enemies in this mode." />
<missionstate id="2" description="You have defeated all enemies in this mode." />
</mission>
<mission name="Barbarian Arena - Scrapper Mode" storageid="50141" startvalue="1" endvalue="2">
<missionstate id="1" description="You have to defeat all enemies in this mode." />
<missionstate id="2" description="You have defeated all enemies in this mode." />
</mission>
<mission name="Barbarian Arena - Warlord Mode" storageid="50142" startvalue="1" endvalue="2">
<missionstate id="1" description="You have to defeat all enemies in this mode." />
<missionstate id="2" description="You have defeated all enemies in this mode." />
</mission>
</quest>
</quests>

View File

@ -215,6 +215,15 @@
<action itemid="5668" script="misc/dolls.lua" />
<action itemid="5791" script="misc/dolls.lua" />
<action itemid="6511" script="misc/dolls.lua" />
<action itemid="7184" script="misc/dolls.lua" />
<!-- Surprise bags -->
<action fromid="6570" toid="6571" script="misc/surprisebag.lua" />
<!-- Strengthening potions -->
<action itemid="7439" script="misc/strengthening_potions.lua" />
<action itemid="7440" script="misc/strengthening_potions.lua" />
<action itemid="7443" script="misc/strengthening_potions.lua" />
<!-- Keys -->
<action fromid="2967" toid="2973" script="misc/key.lua" />
@ -367,6 +376,12 @@
<action itemid="6545" script="misc/food.lua" />
<action itemid="6569" script="misc/food.lua" />
<action itemid="6574" script="misc/food.lua" />
<action itemid="7372" script="misc/food.lua" />
<action itemid="7373" script="misc/food.lua" />
<action itemid="7374" script="misc/food.lua" />
<action itemid="7375" script="misc/food.lua" />
<action itemid="7376" script="misc/food.lua" />
<action itemid="7377" script="misc/food.lua" />
<!-- Passthrough -->
<action fromid="2334" toid="2341" script="misc/doors.lua" />

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

View File

@ -13,4 +13,7 @@
<event type="kill" name="InquisitionUngreez" script="inquisitionQuestUngreez.lua" />
<event type="kill" name="InquisitionBosses" script="inquisitionQuestBosses.lua" />
<!-- Svargrond Arena: Killing a boss -->
<event type="kill" name="SvargrondArenaKill" script="arena_kill.lua" />
</creaturescripts>

View File

@ -0,0 +1,41 @@
function onKill(creature, target)
local targetMonster = target:getMonster()
if not targetMonster then
return
end
local player = creature:getPlayer()
local pit = player:getStorageValue(1101)
if pit < 1 or pit > 10 then
return
end
local arena = player:getStorageValue(1100)
if arena < 1 then
return
end
if not isInArray(ARENA[arena].creatures, targetMonster:getName():lower()) then
return
end
-- Remove pillar and create teleport
local pillarTile = Tile(PITS[pit].pillar)
if pillarTile then
local pillarItem = pillarTile:getItemById(SvargrondArena.itemPillar)
if pillarItem then
pillarItem:remove()
local teleportItem = Game.createItem(SvargrondArena.itemTeleport, 1, PITS[pit].tp)
if teleportItem then
teleportItem:setMovementId(25200)
end
SvargrondArena.sendPillarEffect(pit)
end
end
player:setStorageValue(1101, pit + 1)
player:say('Victory! Head through the new teleporter into the next room.', TALKTYPE_MONSTER_SAY)
return true
end

View File

@ -323,6 +323,7 @@ function onLogin(player)
player:registerEvent("RegenerateStamina")
player:registerEvent("InquisitionUngreez")
player:registerEvent("InquisitionBosses")
player:registerEvent("SvargrondArenaKill")
return true
end

View File

@ -32415,8 +32415,8 @@ Flags = {Unmove}
TypeID = 7183
Name = "a baby seal doll"
Flags = {Take}
Attributes = {Weight=850}
Flags = {Take,Expire}
Attributes = {Weight=850,ExpireTarget=7184,TotalExpireTime=3}
TypeID = 7184
Name = "a baby seal doll"
@ -33289,37 +33289,37 @@ TypeID = 7372
Name = "an ice cream cone"
Description = "It's the famous Venorean Dream flavour, but the ice cream is melting rapidly"
Flags = {Take,Expire}
Attributes = {Weight=100,ExpireTarget=0,TotalExpireTime=120}
Attributes = {Weight=100,Nutrition=1,ExpireTarget=0,TotalExpireTime=120}
TypeID = 7373
Name = "an ice cream cone"
Description = "It's the famous velvet vanilla flavour"
Flags = {Take}
Attributes = {Weight=100}
Attributes = {Weight=100,Nutrition=1}
TypeID = 7374
Name = "an ice cream cone"
Description = "It's the famous sweet strawberry flavour"
Flags = {Take}
Attributes = {Weight=100}
Attributes = {Weight=100,Nutrition=1}
TypeID = 7375
Name = "an ice cream cone"
Description = "It's the famous chilly cherry flavour"
Flags = {Take}
Attributes = {Weight=100}
Attributes = {Weight=100,Nutrition=1}
TypeID = 7376
Name = "an ice cream cone"
Description = "It's the famous mellow melon flavour"
Flags = {Take}
Attributes = {Weight=100}
Attributes = {Weight=100,Nutrition=1}
TypeID = 7377
Name = "an ice cream cone"
Description = "It's the famous blue-barian flavour"
Flags = {Take}
Attributes = {Weight=100}
Attributes = {Weight=100,Nutrition=1}
TypeID = 7378
Name = "a royal spear"

View File

@ -11,3 +11,4 @@ dofile('data/lib/core/teleport.lua')
dofile('data/lib/core/tile.lua')
dofile('data/lib/core/vocation.lua')
dofile('data/lib/core/guildwars.lua')
dofile('data/lib/core/svargrondArenaQuest.lua')

View File

@ -0,0 +1,342 @@
--[[
TODO
- Include PITS and ARENA table in SvargrondArena -> SvargrondArena.arenas / SvargrondArena.pits
- Restructure PITS and ARENA table (reward.storage does not seem to be used)
]]
SvargrondArena = {
-- kick time in seconds (10 minutes)
kickTime = 600,
kickPosition = Position(32251, 31098, 6),
rewardPosition = Position(32222, 31080, 6),
-- used to store event ids
kickEvents = {},
timerEvents = {},
effectPositionCache = {},
-- item ids used by the script
itemTimer = 10288,
itemPillar = 1841,
itemTeleport = 5023,
itemsNotErasable = {10288, 1354, 1543, 1544, 1545},
}
-- Script automatically derives other pit positions from this one
local firstPit = {
fromPos = {x = 32205, y = 31094, z = 7},
toPos = {x = 32214, y = 31103, z = 7},
center = {x = 32210, y = 31098, z = 7},
pillar = {x = 32204, y = 31098, z = 7},
tp = {x = 32204, y = 31098, z = 7},
summon = {x = 32210, y = 31100, z = 7}
}
PITS = {
[1] = {
fromPos = firstPit.fromPos,
toPos = firstPit.toPos,
center = firstPit.center,
pillar = firstPit.pillar,
tp = firstPit.tp,
summon = firstPit.summon
},
[2] = {
fromPos = {x = firstPit.fromPos.x - 14, y = firstPit.fromPos.y, z = firstPit.fromPos.z},
toPos = {x = firstPit.toPos.x - 14, y = firstPit.toPos.y, z = firstPit.toPos.z},
center = {x = firstPit.center.x - 14, y = firstPit.center.y, z = firstPit.center.z},
pillar = {x = firstPit.pillar.x - 14, y = firstPit.pillar.y, z = firstPit.pillar.z},
tp = {x = firstPit.tp.x - 14, y = firstPit.tp.y, z = firstPit.tp.z},
summon = {x = firstPit.summon.x - 14, y = firstPit.summon.y, z = firstPit.summon.z}
},
[3] = {
fromPos = {x = firstPit.fromPos.x - 28, y = firstPit.fromPos.y, z = firstPit.fromPos.z},
toPos = {x = firstPit.toPos.x - 28, y = firstPit.toPos.y, z = firstPit.toPos.z},
center = {x = firstPit.center.x - 28, y = firstPit.center.y, z = firstPit.center.z},
pillar = {x = firstPit.pillar.x - 28, y = firstPit.pillar.y, z = firstPit.pillar.z},
tp = {x = firstPit.tp.x - 28, y = firstPit.tp.y, z = firstPit.tp.z},
summon = {x = firstPit.summon.x - 28, y = firstPit.summon.y, z = firstPit.summon.z}
},
[4] = {
fromPos = {x = firstPit.fromPos.x - 42, y = firstPit.fromPos.y, z = firstPit.fromPos.z},
toPos = {x = firstPit.toPos.x - 42, y = firstPit.toPos.y, z = firstPit.toPos.z},
center = {x = firstPit.center.x - 42, y = firstPit.center.y, z = firstPit.center.z},
pillar = {x = firstPit.pillar.x - 42, y = firstPit.pillar.y, z = firstPit.pillar.z},
tp = {x = firstPit.tp.x - 42, y = firstPit.tp.y, z = firstPit.tp.z},
summon = {x = firstPit.summon.x - 42, y = firstPit.summon.y, z = firstPit.summon.z}
},
[5] = {
fromPos = {x = firstPit.fromPos.x - 35, y = firstPit.fromPos.y - 14, z = firstPit.fromPos.z},
toPos = {x = firstPit.toPos.x - 35, y = firstPit.toPos.y - 14, z = firstPit.toPos.z},
center = {x = firstPit.center.x - 35, y = firstPit.center.y - 14, z = firstPit.center.z},
pillar = {x = firstPit.pillar.x - 35, y = firstPit.pillar.y - 14, z = firstPit.pillar.z},
tp = {x = firstPit.tp.x - 35, y = firstPit.tp.y - 14, z = firstPit.tp.z},
summon = {x = firstPit.summon.x - 35, y = firstPit.summon.y - 14, z = firstPit.summon.z}
},
[6] = {
fromPos = {x = firstPit.fromPos.x - 21, y = firstPit.fromPos.y - 14, z = firstPit.fromPos.z},
toPos = {x = firstPit.toPos.x - 21, y = firstPit.toPos.y - 14, z = firstPit.toPos.z},
center = {x = firstPit.center.x - 21, y = firstPit.center.y - 14, z = firstPit.center.z},
pillar = {x = firstPit.pillar.x - 21, y = firstPit.pillar.y - 14, z = firstPit.pillar.z},
tp = {x = firstPit.tp.x - 21, y = firstPit.tp.y - 14, z = firstPit.tp.z},
summon = {x = firstPit.summon.x - 21, y = firstPit.summon.y - 14, z = firstPit.summon.z}
},
[7] = {
fromPos = {x = firstPit.fromPos.x - 7, y = firstPit.fromPos.y - 14, z = firstPit.fromPos.z},
toPos = {x = firstPit.toPos.x - 7, y = firstPit.toPos.y - 14, z = firstPit.toPos.z},
center = {x = firstPit.center.x - 7, y = firstPit.center.y - 14, z = firstPit.center.z},
pillar = {x = firstPit.pillar.x - 7, y = firstPit.pillar.y - 14, z = firstPit.pillar.z},
tp = {x = firstPit.tp.x - 7, y = firstPit.tp.y - 14, z = firstPit.tp.z},
summon = {x = firstPit.summon.x - 7, y = firstPit.summon.y - 14, z = firstPit.summon.z}
},
[8] = {
fromPos = {x = firstPit.fromPos.x - 14, y = firstPit.fromPos.y - 28, z = firstPit.fromPos.z},
toPos = {x = firstPit.toPos.x - 14, y = firstPit.toPos.y - 28, z = firstPit.toPos.z},
center = {x = firstPit.center.x - 14, y = firstPit.center.y - 28, z = firstPit.center.z},
pillar = {x = firstPit.pillar.x - 14, y = firstPit.pillar.y - 28, z = firstPit.pillar.z},
tp = {x = firstPit.tp.x - 14, y = firstPit.tp.y - 28, z = firstPit.tp.z},
summon = {x = firstPit.summon.x - 14, y = firstPit.summon.y - 28, z = firstPit.summon.z}
},
[9] = {
fromPos = {x = firstPit.fromPos.x - 28, y = firstPit.fromPos.y - 28, z = firstPit.fromPos.z},
toPos = {x = firstPit.toPos.x - 28, y = firstPit.toPos.y - 28, z = firstPit.toPos.z},
center = {x = firstPit.center.x - 28, y = firstPit.center.y - 28, z = firstPit.center.z},
pillar = {x = firstPit.pillar.x - 28, y = firstPit.pillar.y - 28, z = firstPit.pillar.z},
tp = {x = firstPit.tp.x - 28, y = firstPit.tp.y - 28, z = firstPit.tp.z},
summon = {x = firstPit.summon.x - 28, y = firstPit.summon.y - 28, z = firstPit.summon.z}
},
[10] = {
fromPos = {x = firstPit.fromPos.x - 21, y = firstPit.fromPos.y - 42, z = firstPit.fromPos.z},
toPos = {x = firstPit.toPos.x - 21, y = firstPit.toPos.y - 42, z = firstPit.toPos.z},
center = {x = firstPit.center.x - 21, y = firstPit.center.y - 41, z = firstPit.center.z},
pillar = {x = firstPit.pillar.x - 21, y = firstPit.pillar.y - 41, z = firstPit.pillar.z},
tp = {x = firstPit.tp.x - 21, y = firstPit.tp.y - 41, z = firstPit.tp.z},
summon = {x = firstPit.summon.x - 21, y = firstPit.summon.y - 41, z = firstPit.summon.z}
}
}
ARENA = {
[1] = {
name = 'Greenhorn',
price = 1000,
questLog = 50140,
achievement = 'Greenhorn',
creatures = {
[1] = 'frostfur',
[2] = 'bloodpaw',
[3] = 'bovinus',
[4] = 'achad',
[5] = 'colerian the barbarian',
[6] = 'the hairy one',
[7] = 'axeitus headbanger',
[8] = 'rocky',
[9] = 'cursed gladiator',
[10] = 'orcus the cruel'
},
reward = {
trophy = 5807,
trophyStorage = 1103,
desc = 'It is given to the courageous victor of the barbarian arena in greenhorn difficulty. Awarded to %s',
}
},
[2] = {
name = 'Scrapper',
price = 5000,
questLog = 50141,
achievement = 'Scrapper',
creatures = {
[1] = 'avalanche',
[2] = 'kreebosh the exile',
[3] = 'the dark dancer',
[4] = 'the hag',
[5] = 'slim',
[6] = 'grimgor guteater',
[7] = 'drasilla',
[8] = 'spirit of earth',
[9] = 'spirit of water',
[10] = 'spirit of fire'
},
reward = {
trophy = 5806,
trophyStorage = 1105,
desc = 'It is given to the courageous victor of the barbarian arena in scrapper difficulty. Awarded to %s.',
}
},
[3] = {
name = 'Warlord',
price = 10000,
questLog = 50142,
achievement = 'Warlord of Svargrond',
creatures = {
[1] = 'webster',
[2] = 'darakan the executioner',
[3] = 'norgle glacierbeard',
[4] = 'the pit lord',
[5] = 'svoren the mad',
[6] = 'the masked marauder',
[7] = 'gnorre chyllson',
[8] = 'fallen mooh\'tah master ghar',
[9] = 'deathbringer',
[10] = 'the obliverator'
},
reward = {
trophy = 5805,
trophyStorage = 1107,
desc = 'It is given to the courageous victor of the barbarian arena in warlord difficulty. Awarded to %s.',
}
}
}
function SvargrondArena.getPitCreatures(pitId)
if not PITS[pitId] then
return {}
end
local ret = {}
local specs = Game.getSpectators(PITS[pitId].center, false, false, 5, 5, 5, 5)
for i = 1, #specs do
ret[#ret+1] = specs[i]
end
return ret
end
function SvargrondArena.resetPit(pitId)
if not PITS[pitId] then
return
end
for x = PITS[pitId].fromPos.x, PITS[pitId].toPos.x do
for y = PITS[pitId].fromPos.y, PITS[pitId].toPos.y do
for z = PITS[pitId].fromPos.z, PITS[pitId].toPos.z do
local tile = Tile({x=x, y=y, z=z})
if tile then
local movableItem = tile:getThing(255)
if movableItem and movableItem:isItem() then
local itemType = ItemType(movableItem:getId())
if itemType and itemType:isMovable() and not isInArray(SvargrondArena.itemsNotErasable, movableItem:getId()) then
moveableItem:remove()
end
end
local creature = tile:getTopCreature()
if creature and creature:isMonster() then
creature:remove()
end
end
end
end
end
local pillarTile = Tile(PITS[pitId].pillar)
if pillarTile then
local teleportItem = pillarTile:getItemById(SvargrondArena.itemTeleport)
if teleportItem then
teleportItem:remove()
end
local pillarItem = pillarTile:getItemById(SvargrondArena.itemPillar)
if not pillarItem then
Game.createItem(SvargrondArena.itemPillar, 1, PITS[pitId].pillar)
end
end
end
function SvargrondArena.getPitOccupant(pitId, ignorePlayer)
local creatures = SvargrondArena.getPitCreatures(pitId)
for i = 1, #creatures do
if creatures[i]:isPlayer() and creatures[i]:getId() ~= ignorePlayer:getId() then
return creatures[i]
end
end
return nil
end
function SvargrondArena.kickPlayer(cid, hideMessage)
SvargrondArena.cancelEvents(cid)
local player = Player(cid)
if not player then
return
end
if player:getStorageValue(1101) > 0 then
player:teleportTo(SvargrondArena.kickPosition)
SvargrondArena.kickPosition:sendMagicEffect(CONST_ME_TELEPORT)
player:setStorageValue(1101, 0)
if not hideMessage then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'Your time ran out!')
end
end
end
function SvargrondArena.cancelEvents(cid)
local kickEvent = SvargrondArena.kickEvents[cid]
if kickEvent then
SvargrondArena.removeTimer(kickEvent.pitId)
stopEvent(kickEvent.eventId)
end
SvargrondArena.kickEvents[cid] = nil
end
function SvargrondArena.scheduleKickPlayer(cid, pitId)
SvargrondArena.cancelEvents(cid)
SvargrondArena.startTimer(pitId)
local eventId = addEvent(SvargrondArena.kickPlayer, SvargrondArena.kickTime * 1000, cid)
SvargrondArena.kickEvents[cid] = {eventId = eventId, pitId = pitId}
end
function SvargrondArena.startTimer(pitId)
local tile = Tile(PITS[pitId].fromPos)
if not tile then
return
end
local timerItem = tile:getItemById(SvargrondArena.itemTimer)
if timerItem then
timerItem:remove()
end
timerItem = Game.createItem(SvargrondArena.itemTimer, 1, PITS[pitId].fromPos)
if timerItem then
timerItem:decay()
end
if SvargrondArena.timerEvents[pitId] then
stopEvent(SvargrondArena.timerEvents[pitId])
end
SvargrondArena.timerEvents[pitId] = addEvent(SvargrondArena.removeTimer, SvargrondArena.kickTime * 1000, pitId)
end
function SvargrondArena.removeTimer(pitId)
local tile = Tile(PITS[pitId].fromPos)
if not tile then
return
end
local timerItem = tile:getItemById(SvargrondArena.itemTimer)
if timerItem then
timerItem:remove()
end
SvargrondArena.timerEvents[pitId] = nil
end
function SvargrondArena.sendPillarEffect(pitId)
local positions = SvargrondArena.effectPositionCache[pitId]
if not positions then
local position = PITS[pitId].pillar
local effectPositions = {
Position(position.x - 1, position.y, position.z),
Position(position.x + 1, position.y, position.z),
Position(position.x + 1, position.y - 1, position.z),
Position(position.x + 1, position.y + 1, position.z),
Position(position.x, position.y, position.z)
}
SvargrondArena.effectPositionCache[pitId] = effectPositions
positions = effectPositions
end
for i = 1, #positions do
positions[i]:sendMagicEffect(CONST_ME_MAGIC_BLUE)
end
end

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Fallen Mooh'Tah Master Ghar" nameDescription="Fallen Mooh'Tah Master Ghar" race="blood" experience="4400" speed="210" manacost="0">
<health now="8000" max="8000" />
<look type="611" corpse="7349" />
<look type="29" corpse="7349" />
<targetchange interval="1000" chance="5" />
<targetstrategy nearest="70" weakest="10" mostdamage="10" random="10" />
<flags>

View File

@ -436,6 +436,14 @@
<movevent event="StepIn" movementid="17689" script="pits_of_inferno/pumin_throne_room_teleport_back.lua" />
<movevent event="AddItem" movementid="17689" tileitem="1" script="pits_of_inferno/pumin_throne_room_teleport_back.lua" />
<!--Svargrond Arena Quest-->
<movevent event="StepIn" movementid="25100" script="svargrond_arena/arenaEnter.lua" />
<movevent event="StepIn" movementid="25200" script="svargrond_arena/arenaPit.lua" />
<movevent event="StepIn" movementid="25300" script="svargrond_arena/arenaPit.lua" />
<movevent event="StepIn" frommovementid="23201" tomovementid="23203" script="svargrond_arena/arenaTrophy.lua" />
<movevent event="StepIn" movementid="17751" script="svargrond_arena/back.lua" />
<movevent event="AddItem" movementid="17751" tileitem="1" script="svargrond_arena/back.lua" />
<!-- Serpentine Tower -->
<movevent event="StepIn" frommovementid="17602" tomovementid="17603" script="serpentine_tower/final_tile.lua" />
<movevent event="RemoveItem" movementid="17605" tileitem="1" script="serpentine_tower/take_waterwalking_boots.lua" />

View File

@ -0,0 +1,35 @@
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
local pitId = player:getStorageValue(1101)
if pitId < 1 or pitId > 10 then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You cannot enter without Halvar\'s permission.')
player:teleportTo(fromPosition)
return true
end
local arenaId = player:getStorageValue(1100)
if not(PITS[pitId] and ARENA[arenaId]) then
player:teleportTo(fromPosition)
return true
end
local occupant = SvargrondArena.getPitOccupant(pitId, player)
if occupant then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, occupant:getName() .. ' is currently in the next arena pit. Please wait until ' .. (occupant:getSex() == PLAYERSEX_FEMALE and 's' or '') .. 'he is done fighting.')
player:teleportTo(fromPosition)
return true
end
SvargrondArena.resetPit(pitId)
SvargrondArena.scheduleKickPlayer(player.uid, pitId)
Game.createMonster(ARENA[arenaId].creatures[pitId], PITS[pitId].summon, false, true)
player:teleportTo(PITS[pitId].center)
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED)
player:say('FIGHT!', TALKTYPE_MONSTER_SAY)
return true
end

View File

@ -0,0 +1,65 @@
local condition = Condition(CONDITION_OUTFIT)
condition:setTicks(120000)
condition:setOutfit({lookType = 111})
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
local playerId = player.uid
if item:getMovementId() == 25300 then
player:addCondition(condition)
player:setStorageValue(1101, 0)
player:teleportTo(SvargrondArena.kickPosition)
player:say('Coward!', TALKTYPE_MONSTER_SAY)
SvargrondArena.cancelEvents(playerId)
return true
end
local pitId = player:getStorageValue(1101)
local arenaId = player:getStorageValue(1100)
if pitId > 10 then
player:teleportTo(SvargrondArena.rewardPosition)
player:setStorageValue(1101, 0)
if arenaId == 1 then
SvargrondArena.rewardPosition:sendMagicEffect(CONST_ME_FIREWORK_BLUE)
player:setStorageValue(26100, 1)
player:say('Welcome back, little hero!', TALKTYPE_MONSTER_SAY)
elseif arenaId == 2 then
SvargrondArena.rewardPosition:sendMagicEffect(CONST_ME_FIREWORK_YELLOW)
player:setStorageValue(27100, 1)
player:say('Congratulations, brave warrior!', TALKTYPE_MONSTER_SAY)
elseif arenaId == 3 then
SvargrondArena.rewardPosition:sendMagicEffect(CONST_ME_FIREWORK_RED)
player:setStorageValue(28100, 1)
player:say('Respect and honour to you, champion!', TALKTYPE_MONSTER_SAY)
end
player:setStorageValue(1100, player:getStorageValue(1100) + 1)
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_ORANGE, 'Congratulations! You completed ' .. ARENA[arenaId].name .. ' arena, you should take your reward now.')
player:setStorageValue(ARENA[arenaId].questLog, 2)
SvargrondArena.cancelEvents(playerId)
return true
end
local occupant = SvargrondArena.getPitOccupant(pitId, player)
if occupant then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, occupant:getName() .. ' is currently in the next arena pit. Please wait until ' .. (occupant:getSex() == PLAYERSEX_FEMALE and 's' or '') .. 'he is done fighting.')
player:teleportTo(fromPosition, true)
return true
end
SvargrondArena.cancelEvents(playerId)
SvargrondArena.resetPit(pitId)
SvargrondArena.scheduleKickPlayer(playerId, pitId)
Game.createMonster(ARENA[arenaId].creatures[pitId], PITS[pitId].summon, false, true)
player:teleportTo(PITS[pitId].center)
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED)
player:say('Fight!', TALKTYPE_MONSTER_SAY)
return true
end

View File

@ -0,0 +1,25 @@
function onStepIn(creature, item, position, fromPosition)
if not creature:isPlayer() then
return true
end
local arenaId = item:getMovementId() - 23200
if arenaId >= creature:getStorageValue(1100) then
return true
end
local cStorage = ARENA[arenaId].reward.trophyStorage
if creature:getStorageValue(cStorage) ~= 1 then
local rewardPosition = creature:getPosition()
rewardPosition.y = rewardPosition.y - 1
local rewardItem = Game.createItem(ARENA[arenaId].reward.trophy, 1, rewardPosition)
if rewardItem then
rewardItem:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, string.format(ARENA[arenaId].reward.desc, creature:getName()))
end
creature:setStorageValue(cStorage, 1)
creature:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED)
end
return true
end

View File

@ -0,0 +1,16 @@
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
doRelocate(item:getPosition(),{x = 32222, y = 31094, z = 07})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 32222, y = 31094, z = 07}, 11)
end
function onAddItem(item, tileitem, position)
doRelocate(item:getPosition(),{x = 32222, y = 31094, z = 07})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 32222, y = 31094, z = 07}, 11)
end

20
data/npc/freezhild.npc Normal file
View File

@ -0,0 +1,20 @@
# GIMUD - Graphical Interface Multi User Dungeon
# boozer.npc: Datenbank für den Wirt Boozer
Name = "Freezhild"
Outfit = (149,0-47-105-105-0)
Home = [32024,31442,5]
Radius = 1
Behaviour = {
ADDRESS,"hello$",! -> "Welcome, to my cool home."
ADDRESS,"hi$",! -> *
ADDRESS,! -> Idle
BUSY,"hello$",! -> "Please give me a minute, %N.", Queue
BUSY,"hi$",! -> *
BUSY,! -> NOP
VANISH,! -> "I hope you have a cold day, friend."
"bye" -> "I hope you have a cold day, friend.", Idle
"farewell" -> *
}

72
data/npc/halvar.npc Normal file
View File

@ -0,0 +1,72 @@
# GIMUD - Graphical Interface Multi User Dungeon
# boozer.npc: Datenbank für den Wirt Boozer
Name = "Halvar"
Outfit = (143,3-77-78-39-1)
Home = [32228,31096,7]
Radius = 2
Behaviour = {
ADDRESS,"hello$",! -> "Hello competitor! Do you want to fight in the arena or shall I explain the rules first?"
ADDRESS,"hi$",! -> *
ADDRESS,! -> Idle
BUSY,"hello$",! -> "Give me a minute, %N.", Queue
BUSY,"hi$",! -> *
BUSY,! -> NOP
VANISH,! -> "Bye."
"bye" -> "Bye.", Idle
"farewell" -> *
"job" -> "My job is to explain about the rules and to get the fee from the competitors."
"name" -> "I have no time to talk and you should FIGHT instead of wasting your time here!"
"king" -> *
"queen" -> *
"gods" -> *
"ferumbras" -> *
"news" -> *
"excalibug" -> *
"druids" -> *
"mission" -> "Well I would rather call it an 'Ultimate Challenge' than a mission."
"death" -> "It would be better not to die! In every pit there is an emergency exit to the south. If you die in a pit... well... your corpse and backpack are gone, so enter at your own risk."
"backpack" -> *
"die" -> *
"potion" -> "Like I said: Everything is allowed. Go in, kill monsters and try not to get killed by your own."
"weapon" -> "You can use whatever you want but be aware that you might lose items and your backpack if you die."
"rules" -> "What do you want to know? Something about the three different difficulties, the general rules or the prices? Maybe you also want to know what happens when you die?"
"fee" -> "The fee depends on the difficulty you choose. If you are a Greenhorn you have to pay 1000 gold, as a Scrapper you have to pay 5000 gold and as a Warlord the participation fee is 10000 gold. ...", "Each competitor who manages to win all ten pits will win the arena goblet and an unique item appropriate to your difficulty level."
"price" -> *
"general" -> "First you pay me the participation fee according to the difficulty you choose. This will grant you access to the door near me. ...", "In the next room there you will find three teleporters. They all lead to the first pit, which you can enter as soon as there is no battle going on there anymore. ...", "Beware though - when you enter the pit there is no turning back and the fight will start immediately! ...", "Should you notice that you have overestimated your abilities, you can run for your life and flee through the teleporter to the south of the pit. ...", "However, no real barbarian would run from a fight, right? When you successfully killed your opponent, a teleporter will appear to the west that brings you to the next pit. ...", "If there is still a fight going on in the pit you would proceed to, there will be a red shrine stone placed instead. ...", "As soon as the warrior in the next pit leaves the area, the red shrine stone will change into a teleporter. ...", "However if that warrior died, you have to walk in front of the red shrine stone to create a teleporter. ...", "There is a time limit of six to seven minutes to finish each pit. When the flame of life in the upper left corner is starting to wane, you have exactly one minute left to proceed to the next room. ...", "If you take longer to kill the monster and leave the room you will be kicked out dishonourably."
"difficulties" -> "There are three difficulties: Greenhorn, Scrapper and Warlord. On each challenge you will be confronted with ten monsters increasing in strength. ...", "Besides the glory and honour you will earn we have unique awards for those who manage to pass the arena completely."
"warlord" -> "Only the strongest among us will take this challenge. The fee is 10000 gold. If you pass that I promise you the respect of all citizens here. You will be a hero!"
"scrapper" -> "The most common difficulty for us. The fee is 5000 gold. So if you are experienced in fighting middle class monsters this is your challenge!"
"greenhorn" -> "That is the easiest way in our arena. The fee is 1000 gold. We were setting this up for of our children to challenge some easy monsters and train them for the future."
"fight",QuestValue(1101)=1 -> "You already paid the fee, go and fight!"
"pit",QuestValue(1101)=1 -> *
"challenge",QuestValue(1101)=1 -> *
"fight",QuestValue(12190)<8 -> "Only worthy barbarians which have passed the barbarian test may enter!"
"pit",QuestValue(12190)<8 -> *
"challenge",QuestValue(12190)<8 -> *
"fight",QuestValue(1100)=2 -> Price=5000, Data=2, Amount=50141, "So you agree with the rules and want to participate in the challenge? The fee for one try in Scrapper is 5000 gold pieces. Do you really want to participate and pay the fee?", topic=1
"pit",QuestValue(1100)=2 -> *
"challenge",QuestValue(1100)=2 -> *
"fight",QuestValue(1100)=3 -> Price=10000, Data=3, Amount=50142, "So you agree with the rules and want to participate in the challenge? The fee for one try in Warlord is 10000 gold pieces. Do you really want to participate and pay the fee?", topic=1
"pit",QuestValue(1100)=3 -> *
"challenge",QuestValue(1100)=3 -> *
"fight",QuestValue(1100)=4 -> "You've already completed the arena in all difficulty levels."
"pit",QuestValue(1100)=4 -> *
"challenge",QuestValue(1100)=4 -> *
"fight",QuestValue(1100)<=1 -> Price=1000, Data=1, Amount=50140, "So you agree with the rules and want to participate in the challenge? The fee for one try in Greenhorn is 1000 gold pieces. Do you really want to participate and pay the fee?", topic=1
"pit",QuestValue(1100)<=1 -> *
"challenge",QuestValue(1100)<=1 -> *
Topic=1,"yes",CountMoney>=Price -> "As you wish! You can pass the door now and enter the teleporter to the pits.", DeleteMoney, SetQuestValue(1101,1), SetQuestValue(1100,Data), SetQuestValue(Amount,1)
Topic=1,"yes" -> "You do not have enough money."
Topic=1 -> "Then not. Get away and don't waste my time!", Idle
}

View File

@ -5,9 +5,9 @@
<house name="Halls of the Adventurers" houseid="3" entryx="32397" entryy="32042" entryz="7" rent="29060" guildhall="true" townid="1" size="223" />
<house name="Dark Mansion" houseid="4" entryx="32397" entryy="32155" entryz="7" rent="34090" guildhall="true" townid="1" size="275" />
<house name="Bloodhall" houseid="5" entryx="32469" entryy="32170" entryz="7" rent="29040" guildhall="true" townid="1" size="232" />
<house name="Sunset Homes, Flat 01" houseid="6" entryx="32333" entryy="32232" entryz="7" rent="1040" townid="1" size="20" />
<house name="Sunset Homes, Flat 02" houseid="7" entryx="32333" entryy="32237" entryz="7" rent="1040" townid="1" size="20" />
<house name="Sunset Homes, Flat 03" houseid="8" entryx="32334" entryy="32244" entryz="7" rent="1040" townid="1" size="20" />
<house name="Sunset Homes, Flat 01" houseid="6" entryx="32333" entryy="32232" entryz="7" rent="1040" townid="1" size="10" />
<house name="Sunset Homes, Flat 02" houseid="7" entryx="32333" entryy="32237" entryz="7" rent="1040" townid="1" size="10" />
<house name="Sunset Homes, Flat 03" houseid="8" entryx="32334" entryy="32244" entryz="7" rent="1040" townid="1" size="10" />
<house name="Sunset Homes, Flat 11" houseid="9" entryx="32333" entryy="32232" entryz="6" rent="1040" townid="1" size="10" />
<house name="Sunset Homes, Flat 12" houseid="10" entryx="32333" entryy="32237" entryz="6" rent="1040" townid="1" size="10" />
<house name="Sunset Homes, Flat 13" houseid="11" entryx="32334" entryy="32244" entryz="6" rent="1620" townid="1" size="13" />
@ -16,12 +16,12 @@
<house name="Sunset Homes, Flat 22" houseid="14" entryx="32333" entryy="32237" entryz="5" rent="1040" townid="1" size="10" />
<house name="Sunset Homes, Flat 23" houseid="15" entryx="32334" entryy="32244" entryz="5" rent="1620" townid="1" size="13" />
<house name="Sunset Homes, Flat 24" houseid="16" entryx="32334" entryy="32249" entryz="5" rent="1040" townid="1" size="10" />
<house name="Beach Home Apartments, Flat 01" houseid="17" entryx="32314" entryy="32245" entryz="7" rent="1430" townid="1" size="16" />
<house name="Beach Home Apartments, Flat 02" houseid="18" entryx="32314" entryy="32240" entryz="7" rent="1430" townid="1" size="16" />
<house name="Beach Home Apartments, Flat 03" houseid="19" entryx="32317" entryy="32235" entryz="7" rent="1430" townid="1" size="16" />
<house name="Beach Home Apartments, Flat 04" houseid="20" entryx="32313" entryy="32235" entryz="7" rent="1430" townid="1" size="16" />
<house name="Beach Home Apartments, Flat 05" houseid="21" entryx="32309" entryy="32235" entryz="7" rent="1430" townid="1" size="16" />
<house name="Beach Home Apartments, Flat 06" houseid="22" entryx="32309" entryy="32243" entryz="7" rent="2190" townid="1" size="19" />
<house name="Beach Home Apartments, Flat 01" houseid="17" entryx="32314" entryy="32245" entryz="7" rent="1430" townid="1" size="10" />
<house name="Beach Home Apartments, Flat 02" houseid="18" entryx="32314" entryy="32240" entryz="7" rent="1430" townid="1" size="10" />
<house name="Beach Home Apartments, Flat 03" houseid="19" entryx="32317" entryy="32235" entryz="7" rent="1430" townid="1" size="10" />
<house name="Beach Home Apartments, Flat 04" houseid="20" entryx="32313" entryy="32235" entryz="7" rent="1430" townid="1" size="10" />
<house name="Beach Home Apartments, Flat 05" houseid="21" entryx="32309" entryy="32235" entryz="7" rent="1430" townid="1" size="10" />
<house name="Beach Home Apartments, Flat 06" houseid="22" entryx="32309" entryy="32243" entryz="7" rent="2190" townid="1" size="13" />
<house name="Beach Home Apartments, Flat 11" houseid="23" entryx="32314" entryy="32243" entryz="6" rent="1430" townid="1" size="10" />
<house name="Beach Home Apartments, Flat 12" houseid="24" entryx="32314" entryy="32238" entryz="6" rent="1760" townid="1" size="13" />
<house name="Beach Home Apartments, Flat 13" houseid="25" entryx="32314" entryy="32234" entryz="6" rent="1760" townid="1" size="13" />
@ -60,7 +60,7 @@
<house name="Southern Thais Guildhall" houseid="58" entryx="32401" entryy="32254" entryz="7" rent="43020" guildhall="true" townid="1" size="263" />
<house name="Upper Swamp Lane 10" houseid="59" entryx="32412" entryy="32256" entryz="7" rent="3920" townid="1" size="41" />
<house name="Upper Swamp Lane 12" houseid="60" entryx="32419" entryy="32256" entryz="7" rent="7400" townid="1" size="43" />
<house name="Sorcerer's Avenue 1a" houseid="61" entryx="32300" entryy="32254" entryz="7" rent="2410" townid="1" size="24" />
<house name="Sorcerer's Avenue 1a" houseid="61" entryx="32300" entryy="32254" entryz="7" rent="2410" townid="1" size="15" />
<house name="Sorcerer's Avenue 1b" houseid="62" entryx="32300" entryy="32251" entryz="6" rent="1970" townid="1" size="12" />
<house name="Sorcerer's Avenue 1c" houseid="63" entryx="32300" entryy="32249" entryz="6" rent="2410" townid="1" size="15" />
<house name="Sorcerer's Avenue 5" houseid="64" entryx="32284" entryy="32256" entryz="7" rent="5390" townid="1" size="40" />

File diff suppressed because it is too large Load Diff

Binary file not shown.