From 5cb8aef1637db5d132c1a442ec8781fed635ec9c Mon Sep 17 00:00:00 2001
From: murilo09 <78226931+murilo09@users.noreply.github.com>
Date: Thu, 1 Sep 2022 23:14:10 -0300
Subject: [PATCH 01/17] Fixes in Warzones I, II & III
---
data/lib/core/storages.lua | 3 +-
data/npc/commander_stone.lua | 19 +++++----
data/npc/gnomad.lua | 42 +++++++++++++++++++
data/npc/gnomaticus.lua | 8 +---
data/npc/gnomelvis.lua | 1 +
data/npc/gnomeral.lua | 28 ++++++++-----
data/npc/gnomercy.lua | 28 +++++++++++++
data/npc/gnomerik.lua | 1 +
data/npc/gnomespector.lua | 1 +
data/npc/gnomewart.lua | 1 +
.../quests/bigfoot_burden/mushroom.lua | 2 +-
.../bigfoot_burden/gnomebase_teleport.lua | 11 ++++-
.../quests/bigfoot_burden/task_shooting.lua | 11 ++++-
.../bigfoot_burden/warzone_teleport.lua | 2 +-
data/scripts/talkactions/god/attributes.lua | 2 +-
15 files changed, 127 insertions(+), 33 deletions(-)
diff --git a/data/lib/core/storages.lua b/data/lib/core/storages.lua
index 10e6c9e52..bf0250bdb 100644
--- a/data/lib/core/storages.lua
+++ b/data/lib/core/storages.lua
@@ -682,7 +682,8 @@ Storage = {
DoorGoldenFruits = 50706,
BossWarzone1 = 50707,
BossWarzone2 = 50708,
- BossWarzone3 = 50709
+ BossWarzone3 = 50709,
+ GnomedixMsg = 50710
},
TheirMastersVoice = {
-- Reserved storage from 50720 - 50739
diff --git a/data/npc/commander_stone.lua b/data/npc/commander_stone.lua
index 61f76a939..faff0b2e8 100644
--- a/data/npc/commander_stone.lua
+++ b/data/npc/commander_stone.lua
@@ -59,19 +59,19 @@ local function creatureSayCallback(npc, creature, type, message)
end
- if(MsgContains(message, "mission")) then
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 25 then
+ if(MsgContains(message, "mission") and player:getStorageValue(Storage.BigfootBurden.QuestLineComplete) >= 2) then
+ if player:getStorageValue(Storage.BigfootBurden.Rank) < 30 then
npcHandler:say({"Two missions are available for your {rank}: crystal {keeper} and {spark} hunting. You can undertake each mission but you can turn in a specific mission only once each 20 hours. ...",
"If you lose a mission item you can probably buy it from Gnomally."}, npc, creature)
npcHandler:setTopic(playerId, 0)
- elseif player:getStorageValue(Storage.BigfootBurden.QuestLine) >= 26 then
+ elseif player:getStorageValue(Storage.BigfootBurden.Rank) >= 30 then
npcHandler:say({"For your {rank} there are four missions avaliable: crystal {keeper}, {spark} hunting, monster {extermination} and mushroom {digging}. By the way, you {rank} now allows you to take aditional missions from {Gnomeral} in {Gnomebase Alpha}. ... ", "If you lose a mission item you can probably buy it from Gnomally."}, npc, creature)
npcHandler:setTopic(playerId, 0)
end
-- Crystal Kepper
elseif MsgContains(message, "keeper") then
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) >= 25 then
+ if player:getStorageValue(Storage.BigfootBurden.Rank) < 30 then
if player:getStorageValue(Storage.BigfootBurden.MissionCrystalKeeper) < 1 and player:getStorageValue(Storage.BigfootBurden.CrystalKeeperTimout) < os.time() then
npcHandler:say("You will have to repair some damaged crystals. Go into the Crystal grounds and repair them, using this harmonic crystal. Repair five of them and return to me. ", npc, creature)
player:setStorageValue(Storage.BigfootBurden.MissionCrystalKeeper, 1)
@@ -108,7 +108,7 @@ local function creatureSayCallback(npc, creature, type, message)
-- Raiders of the Lost Spark
elseif MsgContains(message, "spark") then
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) >= 25 then
+ if player:getStorageValue(Storage.BigfootBurden.Rank) < 30 then
if player:getStorageValue(Storage.BigfootBurden.MissionRaidersOfTheLostSpark) < 1 and player:getStorageValue(Storage.BigfootBurden.RaidersOfTheLostSparkTimeout) < os.time() then
npcHandler:say({"Take this extractor and drive it into a body of a slain crystal crusher. This will charge your own body with energy sparks. Charge it with seven sparks and return to me. ...",
"Don't worry. The gnomes assured me you'd be save. That is if nothing strange or unusual occurs! "}, npc, creature)
@@ -146,7 +146,7 @@ local function creatureSayCallback(npc, creature, type, message)
-- Exterminators
elseif MsgContains(message, "extermination") then
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) >= 26 then
+ if player:getStorageValue(Storage.BigfootBurden.Rank) >= 30 then
if player:getStorageValue(Storage.BigfootBurden.MissionExterminators) < 1 and player:getStorageValue(Storage.BigfootBurden.ExterminatorsTimeout) < os.time() then
npcHandler:say("The wigglers have become a pest that threaten our resources and supplies. Kill 10 wigglers in the caves like the mushroon gardens or the truffles ground. {Report} back to me when you are done. ", npc, creature)
player:setStorageValue(Storage.BigfootBurden.MissionExterminators, 1)
@@ -181,7 +181,7 @@ local function creatureSayCallback(npc, creature, type, message)
-- Mushroom Digger
elseif MsgContains(message, "digging") then
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) >= 26 then
+ if player:getStorageValue(Storage.BigfootBurden.Rank) >= 30 then
if player:getStorageValue(Storage.BigfootBurden.MissionMushroomDigger) < 1 and player:getStorageValue(Storage.BigfootBurden.MushroomDiggerTimeout) < os.time() then
npcHandler:say({
"Take this little piggy here. It will one day become a great mushroom hunter for sure. For now it is depended on you and other pigs. ...",
@@ -222,10 +222,10 @@ local function creatureSayCallback(npc, creature, type, message)
-- Mushroom Digger
elseif(MsgContains(message, "report")) then
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 25 then
+ if player:getStorageValue(Storage.BigfootBurden.Rank) < 30 then
npcHandler:say("Which mission do you want to report: crystal {keeper}, {spark} hunting?", npc, creature)
npcHandler:setTopic(playerId, 1)
- elseif player:getStorageValue(Storage.BigfootBurden.QuestLine) >= 26 then
+ elseif player:getStorageValue(Storage.BigfootBurden.Rank) >= 30 then
npcHandler:say("Which mission do you want to report: crystal {keeper}, {spark} hunting, monster {extermination} or mushroom {digging}?", npc, creature)
npcHandler:setTopic(playerId, 2)
end
@@ -233,6 +233,7 @@ local function creatureSayCallback(npc, creature, type, message)
return true
end
+npcHandler:setMessage(MESSAGE_GREET, 'Hello recruit.')
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
diff --git a/data/npc/gnomad.lua b/data/npc/gnomad.lua
index 2dea08b2c..340961f09 100644
--- a/data/npc/gnomad.lua
+++ b/data/npc/gnomad.lua
@@ -50,6 +50,48 @@ npcType.onCloseChannel = function(npc, creature)
npcHandler:onCloseChannel(npc, creature)
end
+local function creatureSayCallback(npc, creature, type, message)
+ local player = Player(creature)
+ local playerId = player:getId()
+
+ if not npcHandler:checkInteraction(npc, creature) then
+ return false
+ end
+
+ if (MsgContains(message, "tactical")) then
+ npcHandler:say(
+ {"You will encounter quite a lot of beasties in the area ahead of us. The end of the cave-system is where the trouble begins though. The monsters here all serve some massive creature only known as Deathstrike. ...",
+ "The creature is hidden in a well protected chamber. The good news is, we've managed to erect a crystal structure close to the cave that is able to breach its defence and teleport someone into the chamber. ...",
+ "The bad new is that the crystals need a specific charge before they can work. As soon as the crystals begin to charge up, Deathstrikes' minions will frenzy and spawn in waves to crush all opposition. ...",
+ "You will have to kill them quite fast, to not be overwhelmed by their numbers! Our own tries to breach the defence has proven that you'll have to endure six waves until the teleporter to Deathtstrikes' cave opens for a short 30 seconds. ...",
+ "Use the GREEN command crystal in the cave to begin the charging of the teleport! Good luck."}, npc,
+ creature)
+ npcHandler:setTopic(playerId, 0)
+ elseif (MsgContains(message, "job")) then
+ npcHandler:say("I'm the gnomish tactical advisor for this area!", npc, creature)
+ npcHandler:setTopic(playerId, 0)
+ elseif (MsgContains(message, "crystals")) then
+ npcHandler:say(
+ "Ah you are amazed by our crystals, aren't you? Well, you have only seen a tiny fraction of what they are able to do.",
+ npc, creature)
+ npcHandler:setTopic(playerId, 0)
+ elseif (MsgContains(message, "mushrooms")) then
+ npcHandler:say(
+ "In the last century mushrooms have become more and more important for producing raw materials and tools and less important for sustenance.",
+ npc, creature)
+ npcHandler:setTopic(playerId, 0)
+ elseif (MsgContains(message, "gnomes")) then
+ npcHandler:say(
+ "We gnomes are masters of growing and working crystals and we also mastered the raising of a variety of mushrooms for different purposes.",
+ npc, creature)
+ npcHandler:setTopic(playerId, 0)
+ end
+ return true
+end
+
+npcHandler:setMessage(MESSAGE_GREET, 'Hi there! I\'m ready to brief you with tactical advice.')
+npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye and take care!")
+npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
-- npcType registering the npcConfig table
diff --git a/data/npc/gnomaticus.lua b/data/npc/gnomaticus.lua
index 41b167c6b..3e014d621 100644
--- a/data/npc/gnomaticus.lua
+++ b/data/npc/gnomaticus.lua
@@ -58,18 +58,13 @@ local function creatureSayCallback(npc, creature, type, message)
return false
end
-
- if MsgContains(message, "again") then
- player:setStorageValue(Storage.BigfootBurden.QuestLine, 19)
- end
-
if MsgContains(message, "shooting") then
if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 11 then
npcHandler:say({
"To the left you see our shooting range. Grab a cannon and shoot at the targets. You need five hits to succeed. ...",
"Shoot at the villain targets that will pop up. DON'T shoot innocent civilians since this will reset your score and you have to start all over. Report to me afterwards."
}, npc, creature)
- player:setStorageValue(Storage.BigfootBurden.QuestLine, 13) -- tirar do questlog
+ player:setStorageValue(Storage.BigfootBurden.QuestLine, 13)
player:setStorageValue(Storage.BigfootBurden.Shooting, 0)
elseif player:getStorageValue(Storage.BigfootBurden.QuestLine) == 13 then
npcHandler:say("Shoot at the villain targets that will pop up. DON'T shoot innocent civilians since this will reset your score and you have to start all over. {Report} to me afterwards.", npc, creature)
@@ -88,6 +83,7 @@ local function creatureSayCallback(npc, creature, type, message)
return true
end
+npcHandler:setMessage(MESSAGE_GREET, 'Hi there! Are you here for the shooting test or to report your success?')
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
diff --git a/data/npc/gnomelvis.lua b/data/npc/gnomelvis.lua
index 702fbfcd3..edf5e8367 100644
--- a/data/npc/gnomelvis.lua
+++ b/data/npc/gnomelvis.lua
@@ -99,6 +99,7 @@ local function creatureSayCallback(npc, creature, type, message)
return true
end
+npcHandler:setMessage(MESSAGE_GREET, 'Hello. Is it me you\'re looking for?')
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
diff --git a/data/npc/gnomeral.lua b/data/npc/gnomeral.lua
index e6ec67ff8..e8f02e55e 100644
--- a/data/npc/gnomeral.lua
+++ b/data/npc/gnomeral.lua
@@ -11,7 +11,12 @@ npcConfig.walkInterval = 1000
npcConfig.walkRadius = 2
npcConfig.outfit = {
- lookType = 493
+ lookType = 493,
+ lookHead = 78,
+ lookBody = 57,
+ lookLegs = 78,
+ lookFeet = 76,
+ lookAddons = 0
}
npcConfig.flags = {
@@ -57,18 +62,18 @@ local function creatureSayCallback(npc, creature, type, message)
return false
end
- if(MsgContains(message, "mission")) then
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 27 then
+ if(MsgContains(message, "mission") and player:getStorageValue(Storage.BigfootBurden.QuestLineComplete) >= 2) then
+ if player:getStorageValue(Storage.BigfootBurden.Rank) >= 120 and player:getStorageValue(Storage.BigfootBurden.Rank) < 480 then
npcHandler:say("For your rank there are two missions available: {matchmaker} and golem {repair}. You can undertake each mission, but you can turn in a specific mission only once every 20 hours. ", npc, creature)
npcHandler:setTopic(playerId, 0)
- elseif player:getStorageValue(Storage.BigfootBurden.QuestLine) >= 28 then
+ elseif player:getStorageValue(Storage.BigfootBurden.Rank) >= 480 then
npcHandler:say("For your rank there are four missions available: {matchmaker}, golem {repair}, {spore} gathering and {grindstone} hunt. You can undertake each mission, but you can turn in a specific mission only once every 20 hours.", npc, creature)
npcHandler:setTopic(playerId, 0)
end
-- Matchmaker
elseif MsgContains(message, "matchmaker") then
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) >= 27 then
+ if player:getStorageValue(Storage.BigfootBurden.Rank) >= 120 then
if player:getStorageValue(Storage.BigfootBurden.MissionMatchmaker) < 1 and player:getStorageValue(Storage.BigfootBurden.MatchmakerTimeout) < os.time() then
npcHandler:say({
"You will have to find a lonely crystal a perfect match. I don't understand the specifics but the gnomes told me that even crystals need a mate to produce offspring. ...",
@@ -77,7 +82,7 @@ local function creatureSayCallback(npc, creature, type, message)
}, npc, creature)
player:setStorageValue(Storage.BigfootBurden.MissionMatchmaker, 1)
player:setStorageValue(Storage.BigfootBurden.MatchmakerStatus, 0)
- player:setStorageValue(Storage.BigfootBurden.MatchmakerIdNeeded, math.random(18320, 18326))
+ player:setStorageValue(Storage.BigfootBurden.MatchmakerIdNeeded, math.random(15809, 15815))
player:addItem(15802, 1) --- taking missions
elseif player:getStorageValue(Storage.BigfootBurden.MatchmakerTimeout) > os.time() then -- trying to take mission while in cooldown
npcHandler:say("Sorry, you will have to wait before you can undertake this mission again.", npc, creature)
@@ -110,7 +115,7 @@ local function creatureSayCallback(npc, creature, type, message)
-- Golem Repair
elseif MsgContains(message, "repair") then
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) >= 27 then
+ if player:getStorageValue(Storage.BigfootBurden.Rank) >= 120 then
if player:getStorageValue(Storage.BigfootBurden.MissionTinkersBell) < 1 and player:getStorageValue(Storage.BigfootBurden.TinkerBellTimeout) < os.time() then
npcHandler:say("Our gnomish crystal golems sometimes go nuts. A recent earthquake has disrupted the entire production of a golem factory. ... ", npc, creature)
npcHandler:say({
@@ -152,7 +157,7 @@ local function creatureSayCallback(npc, creature, type, message)
-- Spore Gathering
elseif MsgContains(message, "spore") then
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) >= 28 then
+ if player:getStorageValue(Storage.BigfootBurden.Rank) >= 480 then
if player:getStorageValue(Storage.BigfootBurden.MissionSporeGathering) < 1 and player:getStorageValue(Storage.BigfootBurden.SporeGatheringTimeout) < os.time() then
npcHandler:say({
"We gnomes want you to gather a special collection of spores. All you have to do is use a puffball mushroom and use the spore gathering kit I gave you to gather the spores. ...",
@@ -194,7 +199,7 @@ local function creatureSayCallback(npc, creature, type, message)
-- Grindstone Hunt
elseif MsgContains(message, "grindstone") then
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) >= 28 then
+ if player:getStorageValue(Storage.BigfootBurden.Rank) >= 480 then
if player:getStorageValue(Storage.BigfootBurden.MissionGrindstoneHunt) < 1 and player:getStorageValue(Storage.BigfootBurden.GrindstoneTimeout) < os.time() then
npcHandler:say({
"We gnomes need some special grindstones to cut and polish specific crystals. The thing is, they can only be found in a quite dangerous lava cave full of vile monsters. You'll reach it via the hot spot teleporter. ...",
@@ -233,10 +238,10 @@ local function creatureSayCallback(npc, creature, type, message)
-- Grindstone Hunt
elseif(MsgContains(message, "report")) then
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 27 then
+ if player:getStorageValue(Storage.BigfootBurden.Rank) >= 120 and player:getStorageValue(Storage.BigfootBurden.Rank) < 480 then
npcHandler:say("Which mission do you want to report: {matchmaker}, golem {repair}?", npc, creature)
npcHandler:setTopic(playerId, 1)
- elseif player:getStorageValue(Storage.BigfootBurden.QuestLine) >= 28 then
+ elseif player:getStorageValue(Storage.BigfootBurden.Rank) >= 480 then
npcHandler:say("Which mission do you want to report: {matchmaker}, golem {repair}, {spore} gathering or {grindstone} hunt?", npc, creature)
npcHandler:setTopic(playerId, 2)
end
@@ -244,6 +249,7 @@ local function creatureSayCallback(npc, creature, type, message)
return true
end
+npcHandler:setMessage(MESSAGE_GREET, 'Hello there recruit!')
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
diff --git a/data/npc/gnomercy.lua b/data/npc/gnomercy.lua
index c1ab161ac..3c201b874 100644
--- a/data/npc/gnomercy.lua
+++ b/data/npc/gnomercy.lua
@@ -49,6 +49,34 @@ npcType.onCloseChannel = function(npc, creature)
npcHandler:onCloseChannel(npc, creature)
end
+local function creatureSayCallback(npc, creature, type, message)
+ local player = Player(creature)
+ local playerId = player:getId()
+
+ if not npcHandler:checkInteraction(npc, creature) then
+ return false
+ end
+
+ if (MsgContains(message, "tactical")) then
+ npcHandler:say(
+ {"With your help and efforts we finally cornered what we think is one of 'those below'! For all you have done and endured you are granted the privilege to be one of the first to fight the true enemy. ...",
+ "For all we know your successes have brought some unrest to our enemies and they sent one of their observers to punish their slaves and force them to more fierce attacks. ...",
+ "This is our chance to deal the enemy the first blow in this conflict. With reinforcements from Gnomehome we are attacking the troops of the enemy and binding a great deal of their forces in battle. ...",
+ "Now it is up to you to fight your way to the heart of the enemy's defences and kill the observer. ...",
+ "Our first tries were met with no success though. The observer has brought with him one of his creatures or lieutenants, the lost call the thing Versperoth. I am not sure if it is a name or a race. ...",
+ "However Versperoth itself is protected by hoards of minions. Sometimes this thing will withdraw into the ground and let all hell loose in form of its' slaves. ...",
+ "You'd better be finished with them before Versperoth re-emerges. ...",
+ "Only when you manage to kill Versperoth, will you be able to enter the portal behind him and face the true evil of the observer. ...",
+ "Use the GREEN command crystal in the cave to begin the charging of the teleport! Good luck."}, npc,
+ creature)
+ npcHandler:setTopic(playerId, 0)
+ end
+ return true
+end
+
+npcHandler:setMessage(MESSAGE_GREET, 'Hi there! I\'m ready to brief you with tactical advice.')
+npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye and take care!")
+npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
-- npcType registering the npcConfig table
diff --git a/data/npc/gnomerik.lua b/data/npc/gnomerik.lua
index 7cbfb7c2c..a76189454 100644
--- a/data/npc/gnomerik.lua
+++ b/data/npc/gnomerik.lua
@@ -311,6 +311,7 @@ local function creatureSayCallback(npc, creature, type, message)
return true
end
+npcHandler:setMessage(MESSAGE_GREET, 'Hello and welcome in the gnomish recruitment office.')
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
diff --git a/data/npc/gnomespector.lua b/data/npc/gnomespector.lua
index b5b097a4d..7388f1e97 100644
--- a/data/npc/gnomespector.lua
+++ b/data/npc/gnomespector.lua
@@ -78,6 +78,7 @@ local function creatureSayCallback(npc, creature, type, message)
return true
end
+npcHandler:setMessage(MESSAGE_GREET, 'Hello fearless recruit.')
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
diff --git a/data/npc/gnomewart.lua b/data/npc/gnomewart.lua
index 6a6df2534..aa5a082d2 100644
--- a/data/npc/gnomewart.lua
+++ b/data/npc/gnomewart.lua
@@ -80,6 +80,7 @@ local function creatureSayCallback(npc, creature, type, message)
return true
end
+npcHandler:setMessage(MESSAGE_GREET, 'Oh! Hi there! I guess you are here for the endurance test!')
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
diff --git a/data/scripts/actions/quests/bigfoot_burden/mushroom.lua b/data/scripts/actions/quests/bigfoot_burden/mushroom.lua
index 756215dfa..8b3893557 100644
--- a/data/scripts/actions/quests/bigfoot_burden/mushroom.lua
+++ b/data/scripts/actions/quests/bigfoot_burden/mushroom.lua
@@ -12,7 +12,7 @@ function bigfootMushroom.onUse(player, item, fromPosition, target, toPosition, i
return true
end
- local spore = Game.createItem(math.random(18221, 18224), 1, toPosition)
+ local spore = Game.createItem(math.random(15705, 15708), 1, toPosition)
if spore then
spore:decay()
item:setActionId(100)
diff --git a/data/scripts/movements/quests/bigfoot_burden/gnomebase_teleport.lua b/data/scripts/movements/quests/bigfoot_burden/gnomebase_teleport.lua
index 5ca57aa4b..7cf676c83 100644
--- a/data/scripts/movements/quests/bigfoot_burden/gnomebase_teleport.lua
+++ b/data/scripts/movements/quests/bigfoot_burden/gnomebase_teleport.lua
@@ -5,7 +5,7 @@ local destination = {
[3129] = {position = Position(32795, 31762, 10), storageValue = 1},
[3130] = {position = Position(32864, 31844, 11), storageValue = 1},
[3131] = {position = Position(32803, 31746, 10), storageValue = 1},
- [3132] = {position = Position(32988, 31862, 9), storageValue = 27}, -- gnomebase alpha
+ [3132] = {position = Position(32988, 31862, 9), storageValue = 120}, -- gnomebase alpha
[3133] = {position = Position(32798, 31783, 10), storageValue = 27}, -- city
[3134] = {position = Position(32959, 31953, 9), storageValue = 27}, -- golems
[3135] = {position = Position(33001, 31915, 9), storageValue = 27}, -- back from golems
@@ -40,7 +40,14 @@ function gnomebaseTeleport.onStepIn(creature, item, position, fromPosition)
return false
end
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) < teleportCrystal.storageValue then
+ if item.actionid ~= 3132 and player:getStorageValue(Storage.BigfootBurden.QuestLine) < teleportCrystal.storageValue then
+ position:sendMagicEffect(CONST_ME_TELEPORT)
+ player:teleportTo(fromPosition)
+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your rank among the Gnomes is too low.")
+ return false
+ end
+
+ if item.actionid == 3132 and player:getStorageValue(Storage.BigfootBurden.Rank) < teleportCrystal.storageValue then
position:sendMagicEffect(CONST_ME_TELEPORT)
player:teleportTo(fromPosition)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your rank among the Gnomes is too low.")
diff --git a/data/scripts/movements/quests/bigfoot_burden/task_shooting.lua b/data/scripts/movements/quests/bigfoot_burden/task_shooting.lua
index ffb7ff1c2..0193c20fb 100644
--- a/data/scripts/movements/quests/bigfoot_burden/task_shooting.lua
+++ b/data/scripts/movements/quests/bigfoot_burden/task_shooting.lua
@@ -17,7 +17,7 @@ local function doCreateDummy(cid, position, storv)
end
position:sendMagicEffect(CONST_ME_POFF)
- Game.createItem(math.random(18226, 18227), 1, position)
+ Game.createItem(math.random(15710, 15711), 1, position)
addEvent(doCreateDummy, 4 * 1000, cid, position, storv)
end
@@ -34,6 +34,15 @@ function taskShooting.onStepIn(creature, item, position, fromPosition)
return true
end
+ thingpos = Position(position.x, position.y - 5, position.z)
+ local tile = Tile(thingpos)
+ if tile then
+ local thing = tile:getTopVisibleThing()
+ if thing and isInArray({15710, 15711}, thing.itemid) then
+ thing:remove()
+ end
+ end
+
Game.setStorageValue(position.x, 1) -- Set global storage for the script to know if someone is there shooting
local playerPosition = player:getPosition()
position:sendMagicEffect(CONST_ME_POFF)
diff --git a/data/scripts/movements/quests/bigfoot_burden/warzone_teleport.lua b/data/scripts/movements/quests/bigfoot_burden/warzone_teleport.lua
index bfa273476..ebf158e0d 100644
--- a/data/scripts/movements/quests/bigfoot_burden/warzone_teleport.lua
+++ b/data/scripts/movements/quests/bigfoot_burden/warzone_teleport.lua
@@ -17,7 +17,7 @@ function warzoneTeleport.onStepIn(creature, item, position, fromPosition)
return true
end
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) < 30 then
+ if player:getStorageValue(Storage.BigfootBurden.Rank) < 1440 then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You are not permitted to enter.")
player:teleportTo(fromPosition)
position:sendMagicEffect(CONST_ME_TELEPORT)
diff --git a/data/scripts/talkactions/god/attributes.lua b/data/scripts/talkactions/god/attributes.lua
index 8204af82b..80a83506e 100644
--- a/data/scripts/talkactions/god/attributes.lua
+++ b/data/scripts/talkactions/god/attributes.lua
@@ -65,7 +65,7 @@ function attributes.onSay(player, words, param)
position:getNextPosition(player:getDirection(), 1)
local split = param:split(",")
- local itemFunction, creatureFunction, playerFunction = itemFunctions[split[1]], creatureFunctions[split[1]], playerFunctions[split[1]]
+ local itemFunction, creatureFunction, playerFunction = itemFunctions[split[1]:lower()], creatureFunctions[split[1]:lower()], playerFunctions[split[1]:lower()]
if(itemFunction and itemFunction.isActive) then
local item = Tile(position):getTopVisibleThing(player)
if(not item or not item:isItem()) then
From 29f5f339e0494e7b2aeccdefc84bbaf93abadf00 Mon Sep 17 00:00:00 2001
From: murilo09 <78226931+murilo09@users.noreply.github.com>
Date: Fri, 2 Sep 2022 02:06:10 -0300
Subject: [PATCH 02/17] Highlighting conversation options NPC Gnomaticus
---
data/npc/gnomaticus.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/npc/gnomaticus.lua b/data/npc/gnomaticus.lua
index 3e014d621..b63c1b68f 100644
--- a/data/npc/gnomaticus.lua
+++ b/data/npc/gnomaticus.lua
@@ -83,7 +83,7 @@ local function creatureSayCallback(npc, creature, type, message)
return true
end
-npcHandler:setMessage(MESSAGE_GREET, 'Hi there! Are you here for the shooting test or to report your success?')
+npcHandler:setMessage(MESSAGE_GREET, 'Hi there! Are you here for the {shooting} test or to {report} your success?')
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
From 0ff7f24bff13fd17ae9a241201bd932bc24e1110 Mon Sep 17 00:00:00 2001
From: murilo09 <78226931+murilo09@users.noreply.github.com>
Date: Fri, 2 Sep 2022 02:15:20 -0300
Subject: [PATCH 03/17] Highlighting greeting message options
---
data/npc/gnomad.lua | 2 +-
data/npc/gnomelvis.lua | 2 +-
data/npc/gnomercy.lua | 2 +-
data/npc/gnomerik.lua | 2 +-
data/npc/gnomespector.lua | 2 +-
data/npc/gnomewart.lua | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/data/npc/gnomad.lua b/data/npc/gnomad.lua
index 340961f09..633e3ccec 100644
--- a/data/npc/gnomad.lua
+++ b/data/npc/gnomad.lua
@@ -89,7 +89,7 @@ local function creatureSayCallback(npc, creature, type, message)
return true
end
-npcHandler:setMessage(MESSAGE_GREET, 'Hi there! I\'m ready to brief you with tactical advice.')
+npcHandler:setMessage(MESSAGE_GREET, 'Hi there! I\'m ready to brief you with {tactical} advice.')
npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye and take care!")
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
diff --git a/data/npc/gnomelvis.lua b/data/npc/gnomelvis.lua
index edf5e8367..5061c8e43 100644
--- a/data/npc/gnomelvis.lua
+++ b/data/npc/gnomelvis.lua
@@ -99,7 +99,7 @@ local function creatureSayCallback(npc, creature, type, message)
return true
end
-npcHandler:setMessage(MESSAGE_GREET, 'Hello. Is it me you\'re looking for?')
+npcHandler:setMessage(MESSAGE_GREET, 'Hello. Is it me you\'re {looking} for?')
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
diff --git a/data/npc/gnomercy.lua b/data/npc/gnomercy.lua
index 3c201b874..8c169e642 100644
--- a/data/npc/gnomercy.lua
+++ b/data/npc/gnomercy.lua
@@ -74,7 +74,7 @@ local function creatureSayCallback(npc, creature, type, message)
return true
end
-npcHandler:setMessage(MESSAGE_GREET, 'Hi there! I\'m ready to brief you with tactical advice.')
+npcHandler:setMessage(MESSAGE_GREET, 'Hi there! I\'m ready to brief you with {tactical} advice.')
npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye and take care!")
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
diff --git a/data/npc/gnomerik.lua b/data/npc/gnomerik.lua
index a76189454..14b440ca5 100644
--- a/data/npc/gnomerik.lua
+++ b/data/npc/gnomerik.lua
@@ -311,7 +311,7 @@ local function creatureSayCallback(npc, creature, type, message)
return true
end
-npcHandler:setMessage(MESSAGE_GREET, 'Hello and welcome in the gnomish recruitment office.')
+npcHandler:setMessage(MESSAGE_GREET, 'Hello and welcome in the gnomish {recruitment} office.')
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
diff --git a/data/npc/gnomespector.lua b/data/npc/gnomespector.lua
index 7388f1e97..a5514c597 100644
--- a/data/npc/gnomespector.lua
+++ b/data/npc/gnomespector.lua
@@ -78,7 +78,7 @@ local function creatureSayCallback(npc, creature, type, message)
return true
end
-npcHandler:setMessage(MESSAGE_GREET, 'Hello fearless recruit.')
+npcHandler:setMessage(MESSAGE_GREET, 'Hello fearless {recruit}.')
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
diff --git a/data/npc/gnomewart.lua b/data/npc/gnomewart.lua
index aa5a082d2..6a9b91b1c 100644
--- a/data/npc/gnomewart.lua
+++ b/data/npc/gnomewart.lua
@@ -80,7 +80,7 @@ local function creatureSayCallback(npc, creature, type, message)
return true
end
-npcHandler:setMessage(MESSAGE_GREET, 'Oh! Hi there! I guess you are here for the endurance test!')
+npcHandler:setMessage(MESSAGE_GREET, 'Oh! Hi there! I guess you are here for the {endurance} test!')
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
From 460f33bfd77ef0d8601878aa7f798587d8696332 Mon Sep 17 00:00:00 2001
From: murilo09 <78226931+murilo09@users.noreply.github.com>
Date: Fri, 2 Sep 2022 02:33:51 -0300
Subject: [PATCH 04/17] Splitting task script
---
.../quests/bigfoot_burden/task_ear.lua | 72 +++++++++++++++++++
.../quests/bigfoot_burden/task_x_ray.lua | 54 --------------
2 files changed, 72 insertions(+), 54 deletions(-)
create mode 100644 data/scripts/movements/quests/bigfoot_burden/task_ear.lua
diff --git a/data/scripts/movements/quests/bigfoot_burden/task_ear.lua b/data/scripts/movements/quests/bigfoot_burden/task_ear.lua
new file mode 100644
index 000000000..c2a5d5e6d
--- /dev/null
+++ b/data/scripts/movements/quests/bigfoot_burden/task_ear.lua
@@ -0,0 +1,72 @@
+local messages = {
+ {"Gnomedix: So let the examination begin! Now don't move. Don't be afraid. \z
+ The good doctor gnome won't hurt you - hopefully!", CONST_ME_LOSEENERGY},
+ {"Gnomedix: Now! Now! Don't panic! It's all over soon!"},
+ {"Gnomedix: Let me try a bigger chisel!", CONST_ME_POFF},
+ {"Gnomedix: We're almost don... holy gnome! What's THIS???"},
+ {"Gnomedix: I need a drill! Gnomenursey, quick!"},
+ {"Gnomedix: Hold still now! This might tickle a little..", CONST_ME_STUN},
+ {"Gnomedix: Take this, you evil ... whatever you are!"},
+ {"Gnomedix: I got it! Yikes! What was that? Uhm, well ... \z
+ you passed the ear examination. Talk to Gnomaticus for your next test.", CONST_ME_BLOCKHIT}
+}
+
+local function sendTextMessages(cid, index, position)
+ local player = Player(cid)
+ if not player then
+ return true
+ end
+
+ if index ~= player:getStorageValue(Storage.BigfootBurden.GnomedixMsg) then
+ return false
+ end
+
+ local playerposuid = Tile(player:getPosition()):getGround()
+ playerposuid = playerposuid:getUniqueId()
+ if playerposuid ~= 3123 then
+ return false
+ end
+
+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, messages[index][1])
+ if messages[index][2] then
+ position:sendMagicEffect(messages[index][2])
+ end
+ player:setStorageValue(Storage.BigfootBurden.GnomedixMsg,
+ player:getStorageValue(Storage.BigfootBurden.GnomedixMsg) + 1)
+ if index == 8 then
+ position.y = position.y + 1
+ Game.createMonster("Strange Slime", position)
+ player:setStorageValue(Storage.BigfootBurden.QuestLine, 11)
+ end
+end
+
+local condition = Condition(CONDITION_OUTFIT)
+condition:setTicks(2000)
+condition:setOutfit({lookType = 33}) -- skeleton looktype
+
+local taskEar = MoveEvent()
+
+function taskEar.onStepIn(creature, item, position, fromPosition)
+ local player = creature:getPlayer()
+ if not player then
+ return true
+ end
+
+ if item.uid == 3123 then
+ if player:getStorageValue(Storage.BigfootBurden.QuestLine) ~= 10 then
+ return true
+ end
+ player:setStorageValue(Storage.BigfootBurden.GnomedixMsg, 1)
+ position:sendMagicEffect(CONST_ME_LOSEENERGY)
+
+ for i = player:getStorageValue(Storage.BigfootBurden.GnomedixMsg), #messages do
+ addEvent(sendTextMessages, (i - 1) * 4000, player.uid, i, player:getPosition())
+ end
+
+ end
+ return true
+end
+
+taskEar:type("stepin")
+taskEar:uid(3123)
+taskEar:register()
diff --git a/data/scripts/movements/quests/bigfoot_burden/task_x_ray.lua b/data/scripts/movements/quests/bigfoot_burden/task_x_ray.lua
index af5dbe76e..61365bd37 100644
--- a/data/scripts/movements/quests/bigfoot_burden/task_x_ray.lua
+++ b/data/scripts/movements/quests/bigfoot_burden/task_x_ray.lua
@@ -1,45 +1,3 @@
-local messages = {
- {"Gnomedix: So let the examination begin! Now don't move. Don't be afraid. \z
- The good doctor gnome won't hurt you - hopefully!", CONST_ME_LOSEENERGY},
- {"Gnomedix: Now! Now! Don't panic! It's all over soon!"},
- {"Gnomedix: Let me try a bigger chisel!", CONST_ME_POFF},
- {"Gnomedix: We're almost don... holy gnome! What's THIS???"},
- {"Gnomedix: I need a drill! Gnomenursey, quick!"},
- {"Gnomedix: Hold still now! This might tickle a little..", CONST_ME_STUN},
- {"Gnomedix: Take this, you evil ... whatever you are!"},
- {"Gnomedix: I got it! Yikes! What was that? Uhm, well ... \z
- you passed the ear examination. Talk to Gnomaticus for your next test.", CONST_ME_BLOCKHIT}
-}
-
-local function sendTextMessages(cid, index, position)
- local player = Player(cid)
- if not player then
- return true
- end
-
- if index ~= player:getStorageValue(Storage.BigfootBurden.GnomedixMsg) then
- return false
- end
-
- local playerposuid = Tile(player:getPosition()):getGround()
- playerposuid = playerposuid:getUniqueId()
- if playerposuid ~= 3123 then
- return false
- end
-
- player:sendTextMessage(MESSAGE_EVENT_ADVANCE, messages[index][1])
- if messages[index][2] then
- position:sendMagicEffect(messages[index][2])
- end
- player:setStorageValue(Storage.BigfootBurden.GnomedixMsg,
- player:getStorageValue(Storage.BigfootBurden.GnomedixMsg) + 1)
- if index == 8 then
- position.y = position.y + 1
- Game.createMonster("Strange Slime", position)
- player:setStorageValue(Storage.BigfootBurden.QuestLine, 11)
- end
-end
-
local condition = Condition(CONDITION_OUTFIT)
condition:setTicks(2000)
condition:setOutfit({lookType = 33}) -- skeleton looktype
@@ -65,22 +23,10 @@ function taskXRay.onStepIn(creature, item, position, fromPosition)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE,
"You have been succesfully g-rayed. Now let Doctor Gnomedix inspect your ears!")
end
- elseif item.uid == 3123 then
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) ~= 10 then
- return true
- end
- player:setStorageValue(Storage.BigfootBurden.GnomedixMsg, 1)
- position:sendMagicEffect(CONST_ME_LOSEENERGY)
-
- for i = player:getStorageValue(Storage.BigfootBurden.GnomedixMsg), #messages do
- addEvent(sendTextMessages, (i - 1) * 4000, player.uid, i, player:getPosition())
- end
-
end
return true
end
taskXRay:type("stepin")
taskXRay:aid(9200, 9201)
-taskXRay:uid(3123)
taskXRay:register()
From e739feb74fcd19ff5f5cd24777f606f382811344 Mon Sep 17 00:00:00 2001
From: murilo09 <78226931+murilo09@users.noreply.github.com>
Date: Fri, 2 Sep 2022 09:54:22 -0300
Subject: [PATCH 05/17] Change NPC Doctor Gnomedix position
---
data/world/otservbr-npc.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/world/otservbr-npc.xml b/data/world/otservbr-npc.xml
index a495e42f2..b9a16ab0d 100644
--- a/data/world/otservbr-npc.xml
+++ b/data/world/otservbr-npc.xml
@@ -2452,7 +2452,7 @@
-
+
From 033b9a09f9026cb50e959b3727b6528747a44018 Mon Sep 17 00:00:00 2001
From: murilo09 <78226931+murilo09@users.noreply.github.com>
Date: Fri, 2 Sep 2022 23:31:30 -0300
Subject: [PATCH 06/17] Using Positions instead of UID/AID
---
.../bigfoot_burden/gnomebase_teleport.lua | 156 +++++++++++-------
.../quests/bigfoot_burden/task_ear.lua | 42 ++---
.../quests/bigfoot_burden/task_shooting.lua | 20 ++-
.../quests/bigfoot_burden/task_x_ray.lua | 59 ++++---
.../bigfoot_burden/warzone_teleport.lua | 70 ++++----
5 files changed, 196 insertions(+), 151 deletions(-)
diff --git a/data/scripts/movements/quests/bigfoot_burden/gnomebase_teleport.lua b/data/scripts/movements/quests/bigfoot_burden/gnomebase_teleport.lua
index 7cf676c83..7f1844d8c 100644
--- a/data/scripts/movements/quests/bigfoot_burden/gnomebase_teleport.lua
+++ b/data/scripts/movements/quests/bigfoot_burden/gnomebase_teleport.lua
@@ -1,75 +1,117 @@
-local destination = {
- [4121] = {position = Position(32801, 31766, 9), storageValue = 1, needCrystal = true},
- [3220] = {position = Position(32627, 31864, 11), storageValue = 1, needCrystal = true},
- [3128] = {position = Position(33000, 31870, 13), storageValue = 1},
- [3129] = {position = Position(32795, 31762, 10), storageValue = 1},
- [3130] = {position = Position(32864, 31844, 11), storageValue = 1},
- [3131] = {position = Position(32803, 31746, 10), storageValue = 1},
- [3132] = {position = Position(32988, 31862, 9), storageValue = 120}, -- gnomebase alpha
- [3133] = {position = Position(32798, 31783, 10), storageValue = 27}, -- city
- [3134] = {position = Position(32959, 31953, 9), storageValue = 27}, -- golems
- [3135] = {position = Position(33001, 31915, 9), storageValue = 27}, -- back from golems
- [3136] = {position = Position(32904, 31894, 13), storageValue = 27}, -- vulcongras
- [3137] = {position = Position(32979, 31907, 9), storageValue = 27}, -- back from vulcongras
- [3215] = {position = Position(32329, 32172, 9), storageValue = 1, needCrystal = true},
- [3216] = {position = Position(32195, 31182, 8), storageValue = 1, needCrystal = true},
- [3217] = {position = Position(32402, 32816, 6), storageValue = 1, needCrystal = true},
- [3218] = {position = Position(33153, 31833, 10), storageValue = 1, needCrystal = true},
- [3219] = {position = Position(33186, 32385, 8), storageValue = 1, needCrystal = true},
- [3222] = {position = Position(32771, 31800, 10), storageValue = 11, needCrystal = false},
- [3221] = {position = Position(32790, 31795, 10), storageValue = 11, needCrystal = false}
+local teleports = {
+ {teleportsPosition = {
+ {x = 32628, y = 31863, z = 11},
+ {x = 32330, y = 32173, z = 9},
+ {x = 32403, y = 32818, z = 6},
+ {x = 33187, y = 32384, z = 8},
+ {x = 32196, y = 31183, z = 8},
+ {x = 33154, y = 31834, z = 10}}, destination = Position(32801, 31766, 9), storageValue = 1, needCrystal = true},
+ {teleportPosition = {x = 32803, y = 31798, z = 9}, destination = Position(32627, 31864, 11), storageValue = 1, needCrystal = true},
+ {teleportPosition = {x = 32795, y = 31761, z = 10}, destination = Position(33000, 31870, 13), storageValue = 1},
+ {teleportPosition = {x = 33000, y = 31871, z = 13}, destination = Position(32795, 31762, 10), storageValue = 1},
+ {teleportPosition = {x = 32803, y = 31745, z = 10}, destination = Position(32864, 31844, 11), storageValue = 1},
+ {teleportPosition = {x = 32864, y = 31845, z = 11}, destination = Position(32803, 31746, 10), storageValue = 1},
+ {teleportPosition = {x = 32796, y = 31780, z = 10}, destination = Position(32988, 31862, 9), storageValue = 120}, -- gnomebase alpha
+ {teleportPosition = {x = 32986, y = 31861, z = 9}, destination = Position(32798, 31783, 10), storageValue = 120}, -- city
+ {teleportPosition = {x = 33001, y = 31916, z = 9}, destination = Position(32959, 31953, 9), storageValue = 120}, -- golems
+ {teleportPosition = {x = 32959, y = 31952, z = 9}, destination = Position(33001, 31915, 9), storageValue = 120}, -- back from golems
+ {teleportPosition = {x = 32980, y = 31907, z = 9}, destination = Position(32904, 31894, 13), storageValue = 480}, -- vulcongras
+ {teleportPosition = {x = 32904, y = 31893, z = 13}, destination = Position(32979, 31907, 9), storageValue = 480}, -- back from vulcongras
+ {teleportPosition = {x = 32805, y = 31743, z = 9}, destination = Position(32329, 32172, 9), storageValue = 1, needCrystal = true},
+ {teleportPosition = {x = 32786, y = 31754, z = 9}, destination = Position(32195, 31182, 8), storageValue = 1, needCrystal = true},
+ {teleportPosition = {x = 32772, y = 31776, z = 9}, destination = Position(32402, 32816, 6), storageValue = 1, needCrystal = true},
+ {teleportPosition = {x = 32831, y = 31797, z = 9}, destination = Position(33153, 31833, 10), storageValue = 1, needCrystal = true},
+ {teleportPosition = {x = 32827, y = 31757, z = 9}, destination = Position(33186, 32385, 8), storageValue = 1, needCrystal = true},
+ {teleportPosition = {x = 32789, y = 31796, z = 10}, destination = Position(32771, 31800, 10), storageValue = 25, needCrystal = false},
+ {teleportPosition = {x = 32772, y = 31799, z = 10}, destination = Position(32790, 31795, 10), storageValue = 25, needCrystal = false}
}
local gnomebaseTeleport = MoveEvent()
-
function gnomebaseTeleport.onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return
end
- local teleportCrystal = destination[item.actionid]
- if not teleportCrystal then
- return
- end
+ for c = 1, #teleports do
+ if teleports[c].teleportsPosition then
+ for d = 1, #teleports[c].teleportsPosition do
+ if player:getPosition() == Position(teleports[c].teleportsPosition[d]) then
+ if player:getStorageValue(Storage.BigfootBurden.QuestLine) < 1 then
+ fromPosition:sendMagicEffect(CONST_ME_POFF)
+ player:teleportTo(fromPosition)
+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You have no idea on how to use this device. Xelvar in Kazordoon might tell you more about it.')
+ return false
+ end
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) < 1 then
- fromPosition:sendMagicEffect(CONST_ME_POFF)
- player:teleportTo(fromPosition)
- player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You have no idea on how to use this device. Xelvar in Kazordoon might tell you more about it.')
- return false
- end
+ if player:getPosition() ~= Position(32988, 31862, 9) and player:getStorageValue(Storage.BigfootBurden.QuestLine) < teleports[c].storageValue then
+ position:sendMagicEffect(CONST_ME_TELEPORT)
+ player:teleportTo(fromPosition)
+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your rank among the Gnomes is too low.")
+ return false
+ end
- if item.actionid ~= 3132 and player:getStorageValue(Storage.BigfootBurden.QuestLine) < teleportCrystal.storageValue then
- position:sendMagicEffect(CONST_ME_TELEPORT)
- player:teleportTo(fromPosition)
- player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your rank among the Gnomes is too low.")
- return false
- end
+ if player:getPosition() == Position(32988, 31862, 9) and player:getStorageValue(Storage.BigfootBurden.Rank) < teleports[c].storageValue then
+ position:sendMagicEffect(CONST_ME_TELEPORT)
+ player:teleportTo(fromPosition)
+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your rank among the Gnomes is too low.")
+ return false
+ end
- if item.actionid == 3132 and player:getStorageValue(Storage.BigfootBurden.Rank) < teleportCrystal.storageValue then
- position:sendMagicEffect(CONST_ME_TELEPORT)
- player:teleportTo(fromPosition)
- player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your rank among the Gnomes is too low.")
- return false
- end
+ if not teleports[c].needCrystal or player:removeItem(16167, 1) then
+ player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
+ player:teleportTo(teleports[c].destination)
+ player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
+ else
+ fromPosition:sendMagicEffect(CONST_ME_POFF)
+ player:teleportTo(fromPosition)
+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You need a teleport crystal in order to use this device.')
+ end
+ end
+ end
+ elseif player:getPosition() == Position(teleports[c].teleportPosition) then
+ if player:getStorageValue(Storage.BigfootBurden.QuestLine) < 1 then
+ fromPosition:sendMagicEffect(CONST_ME_POFF)
+ player:teleportTo(fromPosition)
+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You have no idea on how to use this device. Xelvar in Kazordoon might tell you more about it.')
+ return false
+ end
- if not teleportCrystal.needCrystal or player:removeItem(16167, 1) then
- player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
- player:teleportTo(teleportCrystal.position)
- player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
- else
- fromPosition:sendMagicEffect(CONST_ME_POFF)
- player:teleportTo(fromPosition)
- player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You need a teleport crystal in order to use this device.')
+ if teleports[c].storageValue < 100 and player:getStorageValue(Storage.BigfootBurden.QuestLine) < teleports[c].storageValue then
+ position:sendMagicEffect(CONST_ME_TELEPORT)
+ player:teleportTo(fromPosition)
+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your rank among the Gnomes is too low.")
+ return false
+ end
+
+ if teleports[c].storageValue >= 100 and player:getStorageValue(Storage.BigfootBurden.Rank) < teleports[c].storageValue then
+ position:sendMagicEffect(CONST_ME_TELEPORT)
+ player:teleportTo(fromPosition)
+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your rank among the Gnomes is too low.")
+ return false
+ end
+
+ if not teleports[c].needCrystal or player:removeItem(16167, 1) then
+ player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
+ player:teleportTo(teleports[c].destination)
+ player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
+ else
+ fromPosition:sendMagicEffect(CONST_ME_POFF)
+ player:teleportTo(fromPosition)
+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You need a teleport crystal in order to use this device.')
+ end
+ end
end
return true
end
-gnomebaseTeleport:type("stepin")
-
-for index, value in pairs(destination) do
- gnomebaseTeleport:aid(index)
+for a = 1, #teleports do
+ if teleports[a].teleportsPosition then
+ for b = 1, #teleports[a].teleportsPosition do
+ gnomebaseTeleport:position(teleports[a].teleportsPosition[b])
+ end
+ else
+ gnomebaseTeleport:position(teleports[a].teleportPosition)
+ end
end
-
-gnomebaseTeleport:register()
+gnomebaseTeleport:register()
\ No newline at end of file
diff --git a/data/scripts/movements/quests/bigfoot_burden/task_ear.lua b/data/scripts/movements/quests/bigfoot_burden/task_ear.lua
index c2a5d5e6d..c1ed101c4 100644
--- a/data/scripts/movements/quests/bigfoot_burden/task_ear.lua
+++ b/data/scripts/movements/quests/bigfoot_burden/task_ear.lua
@@ -1,17 +1,15 @@
local messages = {
- {"Gnomedix: So let the examination begin! Now don't move. Don't be afraid. \z
- The good doctor gnome won't hurt you - hopefully!", CONST_ME_LOSEENERGY},
+ {"Gnomedix: So let the examination begin! Now don't move. Don't be afraid. The good doctor gnome won't hurt you - hopefully!", CONST_ME_LOSEENERGY},
{"Gnomedix: Now! Now! Don't panic! It's all over soon!"},
{"Gnomedix: Let me try a bigger chisel!", CONST_ME_POFF},
{"Gnomedix: We're almost don... holy gnome! What's THIS???"},
{"Gnomedix: I need a drill! Gnomenursey, quick!"},
{"Gnomedix: Hold still now! This might tickle a little..", CONST_ME_STUN},
{"Gnomedix: Take this, you evil ... whatever you are!"},
- {"Gnomedix: I got it! Yikes! What was that? Uhm, well ... \z
- you passed the ear examination. Talk to Gnomaticus for your next test.", CONST_ME_BLOCKHIT}
+ {"Gnomedix: I got it! Yikes! What was that? Uhm, well ... you passed the ear examination. Talk to Gnomaticus for your next test.", CONST_ME_BLOCKHIT}
}
-local function sendTextMessages(cid, index, position)
+local function sendTextMessages(cid, index)
local player = Player(cid)
if not player then
return true
@@ -21,52 +19,40 @@ local function sendTextMessages(cid, index, position)
return false
end
- local playerposuid = Tile(player:getPosition()):getGround()
- playerposuid = playerposuid:getUniqueId()
- if playerposuid ~= 3123 then
+ if player:getPosition() ~= Position({x = 32767, y = 31771, z = 10}) then
return false
end
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, messages[index][1])
if messages[index][2] then
- position:sendMagicEffect(messages[index][2])
+ player:getPosition():sendMagicEffect(messages[index][2])
end
player:setStorageValue(Storage.BigfootBurden.GnomedixMsg,
player:getStorageValue(Storage.BigfootBurden.GnomedixMsg) + 1)
if index == 8 then
- position.y = position.y + 1
- Game.createMonster("Strange Slime", position)
+ Game.createMonster("Strange Slime", Position(32767, 31772, 10))
player:setStorageValue(Storage.BigfootBurden.QuestLine, 11)
end
end
-local condition = Condition(CONDITION_OUTFIT)
-condition:setTicks(2000)
-condition:setOutfit({lookType = 33}) -- skeleton looktype
-
local taskEar = MoveEvent()
-
function taskEar.onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
- if item.uid == 3123 then
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) ~= 10 then
- return true
- end
- player:setStorageValue(Storage.BigfootBurden.GnomedixMsg, 1)
- position:sendMagicEffect(CONST_ME_LOSEENERGY)
-
- for i = player:getStorageValue(Storage.BigfootBurden.GnomedixMsg), #messages do
- addEvent(sendTextMessages, (i - 1) * 4000, player.uid, i, player:getPosition())
- end
+ if player:getStorageValue(Storage.BigfootBurden.QuestLine) ~= 10 then
+ return true
+ end
+ player:setStorageValue(Storage.BigfootBurden.GnomedixMsg, 1)
+ position:sendMagicEffect(CONST_ME_LOSEENERGY)
+ for i = player:getStorageValue(Storage.BigfootBurden.GnomedixMsg), #messages do
+ addEvent(sendTextMessages, (i - 1) * 4000, player.uid, i)
end
return true
end
-taskEar:type("stepin")
-taskEar:uid(3123)
+taskEar:position({x = 32767, y = 31771, z = 10})
taskEar:register()
diff --git a/data/scripts/movements/quests/bigfoot_burden/task_shooting.lua b/data/scripts/movements/quests/bigfoot_burden/task_shooting.lua
index 0193c20fb..4278b0c6a 100644
--- a/data/scripts/movements/quests/bigfoot_burden/task_shooting.lua
+++ b/data/scripts/movements/quests/bigfoot_burden/task_shooting.lua
@@ -21,8 +21,13 @@ local function doCreateDummy(cid, position, storv)
addEvent(doCreateDummy, 4 * 1000, cid, position, storv)
end
-local taskShooting = MoveEvent()
+local shootingPos = {
+ {x = 32751, y = 31789, z = 10},
+ {x = 32753, y = 31789, z = 10},
+ {x = 32755, y = 31789, z = 10}
+}
+local taskShooting = MoveEvent()
function taskShooting.onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
@@ -50,12 +55,12 @@ function taskShooting.onStepIn(creature, item, position, fromPosition)
return true
end
-taskShooting:type("stepin")
-taskShooting:aid(8030)
+for a = 1, #shootingPos do
+ taskShooting:position(shootingPos[a])
+end
taskShooting:register()
taskShooting = MoveEvent()
-
function taskShooting.onStepOut(creature, item, position, fromPosition)
Game.setStorageValue(fromPosition.x, 0)
@@ -70,6 +75,7 @@ function taskShooting.onStepOut(creature, item, position, fromPosition)
end
end
-taskShooting:type("stepout")
-taskShooting:aid(8030)
-taskShooting:register()
+for b = 1, #shootingPos do
+ taskShooting:position(shootingPos[b])
+end
+taskShooting:register()
\ No newline at end of file
diff --git a/data/scripts/movements/quests/bigfoot_burden/task_x_ray.lua b/data/scripts/movements/quests/bigfoot_burden/task_x_ray.lua
index 61365bd37..39034093b 100644
--- a/data/scripts/movements/quests/bigfoot_burden/task_x_ray.lua
+++ b/data/scripts/movements/quests/bigfoot_burden/task_x_ray.lua
@@ -1,3 +1,23 @@
+local xRay = {
+ {x = 32764, y = 31758, z = 10},
+ {x = 32765, y = 31758, z = 10},
+ {x = 32766, y = 31758, z = 10},
+ {x = 32765, y = 31759, z = 10},
+ {x = 32766, y = 31759, z = 10},
+ {x = 32764, y = 31760, z = 10},
+ {x = 32765, y = 31760, z = 10},
+ {x = 32766, y = 31760, z = 10},
+ {x = 32764, y = 31761, z = 10},
+ {x = 32765, y = 31761, z = 10},
+ {x = 32766, y = 31761, z = 10},
+ {x = 32765, y = 31762, z = 10},
+ {x = 32766, y = 31762, z = 10},
+ {x = 32764, y = 31763, z = 10}, -- endline
+ {x = 32765, y = 31763, z = 10},
+ {x = 32766, y = 31763, z = 10},
+ {x = 32767, y = 31763, z = 10}
+}
+
local condition = Condition(CONDITION_OUTFIT)
condition:setTicks(2000)
condition:setOutfit({lookType = 33}) -- skeleton looktype
@@ -5,28 +25,25 @@ condition:setOutfit({lookType = 33}) -- skeleton looktype
local taskXRay = MoveEvent()
function taskXRay.onStepIn(creature, item, position, fromPosition)
- local player = creature:getPlayer()
- if not player then
- return true
- end
+ local player = creature:getPlayer()
+ if not player then
+ return true
+ end
- if item.actionid == 9200 then
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 8 then
- player:addCondition(condition)
- player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
- end
- elseif item.actionid == 9201 then
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 8 then
- player:addCondition(condition)
- player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
- player:setStorageValue(Storage.BigfootBurden.QuestLine, 10)
- player:sendTextMessage(MESSAGE_EVENT_ADVANCE,
- "You have been succesfully g-rayed. Now let Doctor Gnomedix inspect your ears!")
- end
- end
- return true
+ for a = 1, #xRay do
+ if player:getPosition() == Position(xRay[a]) and player:getStorageValue(Storage.BigfootBurden.QuestLine) ==8 then
+ player:addCondition(condition)
+ player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
+ if a >= 16 then
+ player:setStorageValue(Storage.BigfootBurden.QuestLine, 10)
+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have been succesfully g-rayed. Now let Doctor Gnomedix inspect your ears!")
+ end
+ end
+ end
+ return true
end
-taskXRay:type("stepin")
-taskXRay:aid(9200, 9201)
+for b = 1, #xRay do
+ taskXRay:position(xRay[b])
+end
taskXRay:register()
diff --git a/data/scripts/movements/quests/bigfoot_burden/warzone_teleport.lua b/data/scripts/movements/quests/bigfoot_burden/warzone_teleport.lua
index ebf158e0d..bcb85694c 100644
--- a/data/scripts/movements/quests/bigfoot_burden/warzone_teleport.lua
+++ b/data/scripts/movements/quests/bigfoot_burden/warzone_teleport.lua
@@ -1,53 +1,47 @@
-local destinations = {
- [3140] = {teleportPosition = Position(32996, 31922, 10), storage = Storage.BigfootBurden.Warzone1Access, value = 1},
- [3141] = {teleportPosition = Position(33011, 31943, 11), storage = Storage.BigfootBurden.Warzone2Access, value = 2},
- [3142] = {teleportPosition = Position(32989, 31909, 12), storage = Storage.BigfootBurden.Warzone3Access, value = 3},
+local teleports = {
+ {teleportPosition = {x = 33013, y = 31880, z = 9}, teleportDestination = Position(32996, 31922, 10), storage = Storage.BigfootBurden.Warzone1Access, value = 1},
+ {teleportPosition = {x = 33019, y = 31886, z = 9}, teleportDestination = Position(33011, 31943, 11), storage = Storage.BigfootBurden.Warzone2Access, value = 2},
+ {teleportPosition = {x = 33022, y = 31902, z = 9}, teleportDestination = Position(32989, 31909, 12), storage = Storage.BigfootBurden.Warzone3Access, value = 3},
}
local warzoneTeleport = MoveEvent()
-
function warzoneTeleport.onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
- local destination = destinations[item.uid]
- if not destination then
- return true
- end
-
- if player:getStorageValue(Storage.BigfootBurden.Rank) < 1440 then
- player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You are not permitted to enter.")
- player:teleportTo(fromPosition)
- position:sendMagicEffect(CONST_ME_TELEPORT)
- return true
- end
-
- if player:getStorageValue(Storage.BigfootBurden.WarzoneStatus) < 1 then
- player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You finally have enough renown among the gnomes, \z
- ask Gnomission for a mission to fight on the warzones.")
- player:teleportTo(fromPosition)
- position:sendMagicEffect(CONST_ME_TELEPORT)
- return true
- end
-
- if player:getStorageValue(destination.storage) < 1 and not player:removeItem(16242, 1) then
- player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need a mission crystal or a job done with Gnomission to enter.")
- player:teleportTo(fromPosition)
- position:sendMagicEffect(CONST_ME_TELEPORT)
- return true
+ for a = 1, #teleports do
+ if player:getPosition() == Position(teleports[a].teleportPosition) then
+ if player:getStorageValue(Storage.BigfootBurden.Rank) < 1440 then
+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You are not permitted to enter.")
+ player:teleportTo(fromPosition)
+ position:sendMagicEffect(CONST_ME_TELEPORT)
+ return true
+ end
+
+ if player:getStorageValue(Storage.BigfootBurden.WarzoneStatus) < 1 then
+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You finally have enough renown among the gnomes, ask Gnomission for a mission to fight on the warzones.")
+ player:teleportTo(fromPosition)
+ position:sendMagicEffect(CONST_ME_TELEPORT)
+ return true
+ end
+
+ if player:getStorageValue(teleports[a].storage) < 1 and not player:removeItem(16242, 1) then
+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need a mission crystal or a job done with Gnomission to enter.")
+ player:teleportTo(fromPosition)
+ position:sendMagicEffect(CONST_ME_TELEPORT)
+ return true
+ end
+
+ player:teleportTo(teleports[a].teleportDestination)
+ player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
+ end
end
-
- player:teleportTo(destination.teleportPosition)
- destination.teleportPosition:sendMagicEffect(CONST_ME_TELEPORT)
return true
end
-warzoneTeleport:type("stepin")
-
-for index, value in pairs(destinations) do
- warzoneTeleport:uid(index)
+for b = 1, #teleports do
+ warzoneTeleport:position(teleports[b].teleportPosition)
end
-
warzoneTeleport:register()
From 52348b67e354d30c684f20b35164cf82e5b84667 Mon Sep 17 00:00:00 2001
From: murilo09 <78226931+murilo09@users.noreply.github.com>
Date: Fri, 2 Sep 2022 23:32:22 -0300
Subject: [PATCH 07/17] Using Positions instead of UID/AID
---
data/scripts/actions/quests/bigfoot_burden/music.lua | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/data/scripts/actions/quests/bigfoot_burden/music.lua b/data/scripts/actions/quests/bigfoot_burden/music.lua
index c27a197b7..3f64826a0 100644
--- a/data/scripts/actions/quests/bigfoot_burden/music.lua
+++ b/data/scripts/actions/quests/bigfoot_burden/music.lua
@@ -8,6 +8,13 @@ local cToneStorages = {
Storage.BigfootBurden.MelodyTone7
}
+local Crystals = {
+ {x = 32776, y = 31804, z = 10}, -- Dark Blue Cystal
+ {x = 32781, y = 31807, z = 10}, -- Red Crystal
+ {x = 32777, y = 31812, z = 10}, -- Green Crystal
+ {x = 32771, y = 31810, z = 10} -- Light Blue Crystal
+}
+
local bigfootMusic = Action()
function bigfootMusic.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 21 then
@@ -30,5 +37,7 @@ function bigfootMusic.onUse(player, item, fromPosition, target, toPosition, isHo
return true
end
-bigfootMusic:uid(3124,3125,3126,3127)
+for b = 1, #Crystals do
+ bigfootMusic:position(Crystals[b])
+end
bigfootMusic:register()
\ No newline at end of file
From 2cb674c55217227da1695f9f131f8d724c971833 Mon Sep 17 00:00:00 2001
From: murilo09 <78226931+murilo09@users.noreply.github.com>
Date: Fri, 2 Sep 2022 23:33:11 -0300
Subject: [PATCH 08/17] Highlighting conversation options
---
data/npc/gnomission.lua | 31 +++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/data/npc/gnomission.lua b/data/npc/gnomission.lua
index c89a2f39e..e3072445b 100644
--- a/data/npc/gnomission.lua
+++ b/data/npc/gnomission.lua
@@ -64,7 +64,7 @@ local function creatureSayCallback(npc, creature, type, message)
"There are three warzones. In each warzone you will find fearsome foes. At the end you'll find their mean master. The masters is well protected though. ...",
"Make sure to talk to our gnomish agent in there for specifics of its' protection. ...",
"Oh, and to be able to enter the second warzone you have to best the first. To enter the third you have to best the second. ...",
- "And you can enter each one only once every twenty hours. Your normal teleport crystals won't work on these teleporters. You will have to get mission crystals from Gnomally."
+ "And you can enter each one only once every twenty hours. Your normal teleport crystals won't work on these teleporters. You will have to get {mission} crystals from Gnomally."
}, npc, creature)
npcHandler:setTopic(playerId, 1)
elseif(MsgContains(message, "job")) then
@@ -80,7 +80,7 @@ local function creatureSayCallback(npc, creature, type, message)
end
elseif(MsgContains(message, "snippet")) then
if npcHandler:getTopic(playerId) == 3 then
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) < 30 then
+ if player:getStorageValue(Storage.BigfootBurden.Rank) < 1440 then
npcHandler:say("It seems you did not even set one big foot into the warzone, I am sorry.")
else
if player:getStorageValue(Storage.BigfootBurden.Warzone1Access) < 1 then
@@ -98,7 +98,7 @@ local function creatureSayCallback(npc, creature, type, message)
end
elseif(MsgContains(message, "lash")) then
if npcHandler:getTopic(playerId) == 3 then
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) < 30 then
+ if player:getStorageValue(Storage.BigfootBurden.Rank) < 1440 then
npcHandler:say("It seems you did not even set one big foot into the warzone, I am sorry.")
else
if player:getStorageValue(Storage.BigfootBurden.Warzone3Access) < 1 then
@@ -120,7 +120,7 @@ local function creatureSayCallback(npc, creature, type, message)
end
elseif(MsgContains(message, "hat")) then
if npcHandler:getTopic(playerId) == 3 then
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) < 30 then
+ if player:getStorageValue(Storage.BigfootBurden.Rank) < 1440 then
npcHandler:say("It seems you did not even set one big foot into the warzone, I am sorry.")
else
if player:getStorageValue(Storage.BigfootBurden.Warzone2Access) < 1 then
@@ -141,28 +141,31 @@ local function creatureSayCallback(npc, creature, type, message)
end
end
elseif(MsgContains(message, "mission")) then
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) >= 30 then
- if player:getStorageValue(Storage.BigfootBurden.WarzoneStatus) < 1 then
- npcHandler:say("Fine, I grant you the permission to enter the warzones. Be warned though, this will be not a picnic. Better bring some friends with you. Bringing a lot of them sounds like a good idea.", npc, creature)
- player:setStorageValue(Storage.BigfootBurden.WarzoneStatus, 1)
+ if npcHandler:getTopic(playerId) == 1 then
+ if player:getStorageValue(Storage.BigfootBurden.Rank) >= 1440 then
+ if player:getStorageValue(Storage.BigfootBurden.WarzoneStatus) < 1 then
+ npcHandler:say("Fine, I grant you the permission to enter the warzones. Be warned though, this will be not a picnic. Better bring some friends with you. Bringing a lot of them sounds like a good idea.", npc, creature)
+ player:setStorageValue(Storage.BigfootBurden.WarzoneStatus, 1)
+ else
+ npcHandler:say("You have already accepted this mission.", npc, creature)
+ end
+ npcHandler:setTopic(playerId, 0)
else
- npcHandler:say("You have already accepted this mission.", npc, creature)
+ npcHandler:say("Sorry, you have not yet earned enough renown that we would risk your life in such a dangerous mission.", npc, creature)
+ npcHandler:setTopic(playerId, 0)
end
- npcHandler:setTopic(playerId, 0)
- else
- npcHandler:say("Sorry, you have not yet earned enough renown that we would risk your life in such a dangerous mission.", npc, creature)
- npcHandler:setTopic(playerId, 0)
end
end
return true
end
+npcHandler:setMessage(MESSAGE_GREET, 'Hello |PLAYERNAME|. You are probably eager to enter the {warzones}.')
+
local function onTradeRequest(npc, creature)
if Player(creature):getStorageValue(Storage.BigfootBurden.BossKills) < 20 then
npcHandler:say('Only if you have killed 20 of our major enemies in the warzones I am allowed to trade with you.', npc, creature)
return false
end
-
return true
end
From 49ba51fb7d45b5827d09ba3194adfae28d18df15 Mon Sep 17 00:00:00 2001
From: murilo09 <78226931+murilo09@users.noreply.github.com>
Date: Sat, 3 Sep 2022 00:04:41 -0300
Subject: [PATCH 09/17] Missing some positions
---
data/scripts/movements/quests/bigfoot_burden/task_x_ray.lua | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/data/scripts/movements/quests/bigfoot_burden/task_x_ray.lua b/data/scripts/movements/quests/bigfoot_burden/task_x_ray.lua
index 39034093b..1674219ef 100644
--- a/data/scripts/movements/quests/bigfoot_burden/task_x_ray.lua
+++ b/data/scripts/movements/quests/bigfoot_burden/task_x_ray.lua
@@ -2,6 +2,7 @@ local xRay = {
{x = 32764, y = 31758, z = 10},
{x = 32765, y = 31758, z = 10},
{x = 32766, y = 31758, z = 10},
+ {x = 32764, y = 31759, z = 10},
{x = 32765, y = 31759, z = 10},
{x = 32766, y = 31759, z = 10},
{x = 32764, y = 31760, z = 10},
@@ -10,9 +11,10 @@ local xRay = {
{x = 32764, y = 31761, z = 10},
{x = 32765, y = 31761, z = 10},
{x = 32766, y = 31761, z = 10},
+ {x = 32764, y = 31762, z = 10},
{x = 32765, y = 31762, z = 10},
{x = 32766, y = 31762, z = 10},
- {x = 32764, y = 31763, z = 10}, -- endline
+ {x = 32764, y = 31763, z = 10}, -- Endline
{x = 32765, y = 31763, z = 10},
{x = 32766, y = 31763, z = 10},
{x = 32767, y = 31763, z = 10}
From 7d72a0519359b77e05b491a1a6d36af0b548c955 Mon Sep 17 00:00:00 2001
From: murilo09 <78226931+murilo09@users.noreply.github.com>
Date: Sat, 3 Sep 2022 00:43:02 -0300
Subject: [PATCH 10/17] Fix Soul Melody
---
data/npc/gnomelvis.lua | 4 +-
.../actions/quests/bigfoot_burden/music.lua | 40 +++++++++----------
2 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/data/npc/gnomelvis.lua b/data/npc/gnomelvis.lua
index 5061c8e43..ac6b3ea99 100644
--- a/data/npc/gnomelvis.lua
+++ b/data/npc/gnomelvis.lua
@@ -75,7 +75,7 @@ local function creatureSayCallback(npc, creature, type, message)
player:setStorageValue(Storage.BigfootBurden.MelodyStatus, 1)
if player:getStorageValue(Storage.BigfootBurden.MelodyTone1) < 1 then
for i = 0, 6 do
- player:setStorageValue(Storage.BigfootBurden.MelodyTone1 + i, math.random(3124, 3127))
+ player:setStorageValue(Storage.BigfootBurden.MelodyTone1 + i, math.random(1, 4))
end
end
elseif player:getStorageValue(Storage.BigfootBurden.QuestLine) == 21 then
@@ -104,4 +104,4 @@ npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
-- npcType registering the npcConfig table
-npcType:register(npcConfig)
+npcType:register(npcConfig)
\ No newline at end of file
diff --git a/data/scripts/actions/quests/bigfoot_burden/music.lua b/data/scripts/actions/quests/bigfoot_burden/music.lua
index 3f64826a0..be5dde4fc 100644
--- a/data/scripts/actions/quests/bigfoot_burden/music.lua
+++ b/data/scripts/actions/quests/bigfoot_burden/music.lua
@@ -16,28 +16,28 @@ local Crystals = {
}
local bigfootMusic = Action()
-function bigfootMusic.onUse(player, item, fromPosition, target, toPosition, isHotkey)
- if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 21 then
- local value = player:getStorageValue(Storage.BigfootBurden.MelodyStatus)
- if player:getStorageValue(cToneStorages[value]) == item.uid then
- player:setStorageValue(Storage.BigfootBurden.MelodyStatus, value + 1)
- if value + 1 == 8 then
- toPosition:sendMagicEffect(CONST_ME_HEARTS)
- player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "That was the correct note! Now you know your soul melody!")
- player:setStorageValue(Storage.BigfootBurden.QuestLine, 22)
- else
- toPosition:sendMagicEffect(CONST_ME_SOUND_GREEN)
- player:getPosition():sendMagicEffect(CONST_ME_FIREWORK_YELLOW)
- end
- else
- player:setStorageValue(Storage.BigfootBurden.MelodyStatus, 1)
- toPosition:sendMagicEffect(CONST_ME_SOUND_RED)
- end
- end
- return true
+function bigfootMusic.onUse(player, item, fromPosition, target, toPosition, isHotskey)
+ if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 21 then
+ local value = player:getStorageValue(Storage.BigfootBurden.MelodyStatus)
+ if Position(Crystals[player:getStorageValue(cToneStorages[value])]) == item:getPosition() then
+ player:setStorageValue(Storage.BigfootBurden.MelodyStatus, value + 1)
+ if value + 1 == 8 then
+ toPosition:sendMagicEffect(CONST_ME_HEARTS)
+ player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "That was the correct note! Now you know your soul melody!")
+ player:setStorageValue(Storage.BigfootBurden.QuestLine, 22)
+ else
+ toPosition:sendMagicEffect(CONST_ME_SOUND_GREEN)
+ player:getPosition():sendMagicEffect(CONST_ME_FIREWORK_YELLOW)
+ end
+ else
+ player:setStorageValue(Storage.BigfootBurden.MelodyStatus, 1)
+ toPosition:sendMagicEffect(CONST_ME_SOUND_RED)
+ end
+ end
+ return true
end
for b = 1, #Crystals do
bigfootMusic:position(Crystals[b])
end
-bigfootMusic:register()
\ No newline at end of file
+bigfootMusic:register()
From 67eaeddddfe6ba4740fb744e8acdd4673c89803e Mon Sep 17 00:00:00 2001
From: murilo09 <78226931+murilo09@users.noreply.github.com>
Date: Sat, 3 Sep 2022 00:44:10 -0300
Subject: [PATCH 11/17] Fix typo
---
data/scripts/actions/quests/bigfoot_burden/music.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/scripts/actions/quests/bigfoot_burden/music.lua b/data/scripts/actions/quests/bigfoot_burden/music.lua
index be5dde4fc..233f0543c 100644
--- a/data/scripts/actions/quests/bigfoot_burden/music.lua
+++ b/data/scripts/actions/quests/bigfoot_burden/music.lua
@@ -16,7 +16,7 @@ local Crystals = {
}
local bigfootMusic = Action()
-function bigfootMusic.onUse(player, item, fromPosition, target, toPosition, isHotskey)
+function bigfootMusic.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if player:getStorageValue(Storage.BigfootBurden.QuestLine) == 21 then
local value = player:getStorageValue(Storage.BigfootBurden.MelodyStatus)
if Position(Crystals[player:getStorageValue(cToneStorages[value])]) == item:getPosition() then
From 7c1035f57e341f4e212ef90d31d518d1b269868c Mon Sep 17 00:00:00 2001
From: murilo09 <78226931+murilo09@users.noreply.github.com>
Date: Sat, 3 Sep 2022 13:21:10 -0300
Subject: [PATCH 12/17] Update Gnomad Greet Message
Co-authored-by: rigis1
---
data/npc/gnomad.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/npc/gnomad.lua b/data/npc/gnomad.lua
index 633e3ccec..6a7f38a6f 100644
--- a/data/npc/gnomad.lua
+++ b/data/npc/gnomad.lua
@@ -89,7 +89,7 @@ local function creatureSayCallback(npc, creature, type, message)
return true
end
-npcHandler:setMessage(MESSAGE_GREET, 'Hi there! I\'m ready to brief you with {tactical} advice.')
+npcHandler:setMessage(MESSAGE_GREET, "Hi there! I'm ready to brief you with {tactical} advice.")
npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye and take care!")
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
From b62b36c6914e5ec34fcb7d8f2767f778f28ed7f1 Mon Sep 17 00:00:00 2001
From: murilo09 <78226931+murilo09@users.noreply.github.com>
Date: Sat, 3 Sep 2022 13:21:41 -0300
Subject: [PATCH 13/17] Format Gnomelvis Greet Message
Co-authored-by: rigis1
---
data/npc/gnomelvis.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/npc/gnomelvis.lua b/data/npc/gnomelvis.lua
index ac6b3ea99..6b9414ffa 100644
--- a/data/npc/gnomelvis.lua
+++ b/data/npc/gnomelvis.lua
@@ -99,7 +99,7 @@ local function creatureSayCallback(npc, creature, type, message)
return true
end
-npcHandler:setMessage(MESSAGE_GREET, 'Hello. Is it me you\'re {looking} for?')
+npcHandler:setMessage(MESSAGE_GREET, "Hello. Is it me you're {looking} for?")
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
From 06a498dcbabb31f8c469187c1b2d7d8e84dd44c5 Mon Sep 17 00:00:00 2001
From: murilo09 <78226931+murilo09@users.noreply.github.com>
Date: Sat, 3 Sep 2022 13:22:34 -0300
Subject: [PATCH 14/17] Format Gnomercy Greet Message
Co-authored-by: rigis1
---
data/npc/gnomercy.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/npc/gnomercy.lua b/data/npc/gnomercy.lua
index 8c169e642..ccd04fa21 100644
--- a/data/npc/gnomercy.lua
+++ b/data/npc/gnomercy.lua
@@ -74,7 +74,7 @@ local function creatureSayCallback(npc, creature, type, message)
return true
end
-npcHandler:setMessage(MESSAGE_GREET, 'Hi there! I\'m ready to brief you with {tactical} advice.')
+npcHandler:setMessage(MESSAGE_GREET, "Hi there! I'm ready to brief you with {tactical} advice.")
npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye and take care!")
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
From 2a5a5f18e3f47a1aca81a961f408a6b9c6bc0d5d Mon Sep 17 00:00:00 2001
From: murilo09 <78226931+murilo09@users.noreply.github.com>
Date: Sat, 3 Sep 2022 22:38:33 -0300
Subject: [PATCH 15/17] Add NPC Gnomole
---
data/npc/gnomercy.lua | 8 ++++----
data/npc/gnomole.lua | 28 ++++++++++++++++++++++++++++
data/world/otservbr-npc.xml | 3 +++
3 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/data/npc/gnomercy.lua b/data/npc/gnomercy.lua
index ccd04fa21..c5639e058 100644
--- a/data/npc/gnomercy.lua
+++ b/data/npc/gnomercy.lua
@@ -63,10 +63,10 @@ local function creatureSayCallback(npc, creature, type, message)
"For all we know your successes have brought some unrest to our enemies and they sent one of their observers to punish their slaves and force them to more fierce attacks. ...",
"This is our chance to deal the enemy the first blow in this conflict. With reinforcements from Gnomehome we are attacking the troops of the enemy and binding a great deal of their forces in battle. ...",
"Now it is up to you to fight your way to the heart of the enemy's defences and kill the observer. ...",
- "Our first tries were met with no success though. The observer has brought with him one of his creatures or lieutenants, the lost call the thing Versperoth. I am not sure if it is a name or a race. ...",
- "However Versperoth itself is protected by hoards of minions. Sometimes this thing will withdraw into the ground and let all hell loose in form of its' slaves. ...",
- "You'd better be finished with them before Versperoth re-emerges. ...",
- "Only when you manage to kill Versperoth, will you be able to enter the portal behind him and face the true evil of the observer. ...",
+ "Our first tries were met with no success though. The observer has brought with him one of his creatures or lieutenants, the lost call the thing Versperoth. I am not sure if it is a name or a race. ...",
+ "However Versperoth itself is protected by hoards of minions. Sometimes this thing will withdraw into the ground and let all hell loose in form of its' slaves. ...",
+ "You'd better be finished with them before Versperoth re-emerges. ...",
+ "Only when you manage to kill Versperoth, will you be able to enter the portal behind him and face the true evil of the observer. ...",
"Use the GREEN command crystal in the cave to begin the charging of the teleport! Good luck."}, npc,
creature)
npcHandler:setTopic(playerId, 0)
diff --git a/data/npc/gnomole.lua b/data/npc/gnomole.lua
index f0d1a801a..f5a59ad1c 100644
--- a/data/npc/gnomole.lua
+++ b/data/npc/gnomole.lua
@@ -49,6 +49,34 @@ npcType.onCloseChannel = function(npc, creature)
npcHandler:onCloseChannel(npc, creature)
end
+local function creatureSayCallback(npc, creature, type, message)
+ local player = Player(creature)
+ local playerId = player:getId()
+
+ if not npcHandler:checkInteraction(npc, creature) then
+ return false
+ end
+
+ if (MsgContains(message, "tactical")) then
+ npcHandler:say(
+ {"Since you are seasoned adventurers I'll skip the basics and jump right to the important part! This cave system is overrun by the minions of ... ah well, the greatest shame of gnomekind. ...",
+ "That traitorous gnome, known as Gnomevil, who was my pupil before his changeover to the dark side of gnomedom, has abandoned all gnomish ethics and joined forces with our enemies. ...",
+ "It's hard to tell what led to his downfall. In the end he seems to have forgotten the principle that with small stature comes great responsibility. ...",
+ "He became tainted and corrupted by evil, obviously enough to grow in size, which is always an indicator for evil of course. ...",
+ "Now he commands his armies in the name of those below and hides in his lair protected by layers of thick crystal that only he can form and change due to his corrupted powers! ...",
+ "There is one thing though that could cause his downfall! His corruption has spread to his minions and in his lair there are some infected weepers that are full of parasites. ...",
+ "These parasites will spread a fluid that will weaken the integrity of the crystals in front of Gnomevils lair when they die. The entrance is marked with crystal columns, so you can't miss it. ...",
+ "You have to kill enough of the parasites DIRECTLY in front of the crystals. Eventually the columns will collapse and allow you entrance to Gnomevils lair. ...",
+ "Take care though, due to Gnomevils power the crystals will grow back quite fast. Better manage the parasites in quick succession or everything will be for naught. ..., Enter his lair and bring an end to his despicable reign!"}, npc,
+ creature)
+ npcHandler:setTopic(playerId, 0)
+ end
+ return true
+end
+
+npcHandler:setMessage(MESSAGE_GREET, "Hi there! I'm ready to brief you with {tactical} advice.")
+npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye and take care!")
+npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
-- npcType registering the npcConfig table
diff --git a/data/world/otservbr-npc.xml b/data/world/otservbr-npc.xml
index b9a16ab0d..dc3f4810b 100644
--- a/data/world/otservbr-npc.xml
+++ b/data/world/otservbr-npc.xml
@@ -2558,6 +2558,9 @@
+
+
+
From 2cdf228d5e76703edebd35f136241b52bfbd7a28 Mon Sep 17 00:00:00 2001
From: murilo09 <78226931+murilo09@users.noreply.github.com>
Date: Sat, 3 Sep 2022 22:40:02 -0300
Subject: [PATCH 16/17] Indentation Gnomercy
---
data/npc/gnomercy.lua | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/data/npc/gnomercy.lua b/data/npc/gnomercy.lua
index c5639e058..f6bb48d3c 100644
--- a/data/npc/gnomercy.lua
+++ b/data/npc/gnomercy.lua
@@ -63,10 +63,10 @@ local function creatureSayCallback(npc, creature, type, message)
"For all we know your successes have brought some unrest to our enemies and they sent one of their observers to punish their slaves and force them to more fierce attacks. ...",
"This is our chance to deal the enemy the first blow in this conflict. With reinforcements from Gnomehome we are attacking the troops of the enemy and binding a great deal of their forces in battle. ...",
"Now it is up to you to fight your way to the heart of the enemy's defences and kill the observer. ...",
- "Our first tries were met with no success though. The observer has brought with him one of his creatures or lieutenants, the lost call the thing Versperoth. I am not sure if it is a name or a race. ...",
- "However Versperoth itself is protected by hoards of minions. Sometimes this thing will withdraw into the ground and let all hell loose in form of its' slaves. ...",
- "You'd better be finished with them before Versperoth re-emerges. ...",
- "Only when you manage to kill Versperoth, will you be able to enter the portal behind him and face the true evil of the observer. ...",
+ "Our first tries were met with no success though. The observer has brought with him one of his creatures or lieutenants, the lost call the thing Versperoth. I am not sure if it is a name or a race. ...",
+ "However Versperoth itself is protected by hoards of minions. Sometimes this thing will withdraw into the ground and let all hell loose in form of its' slaves. ...",
+ "You'd better be finished with them before Versperoth re-emerges. ...",
+ "Only when you manage to kill Versperoth, will you be able to enter the portal behind him and face the true evil of the observer. ...",
"Use the GREEN command crystal in the cave to begin the charging of the teleport! Good luck."}, npc,
creature)
npcHandler:setTopic(playerId, 0)
From a14f16c9e51d9e4e85a55705d336b687d6ebfb8b Mon Sep 17 00:00:00 2001
From: murilo09 <78226931+murilo09@users.noreply.github.com>
Date: Sat, 3 Sep 2022 22:40:21 -0300
Subject: [PATCH 17/17] Indentation Gnomole
---
data/npc/gnomole.lua | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/data/npc/gnomole.lua b/data/npc/gnomole.lua
index f5a59ad1c..598fa7ac4 100644
--- a/data/npc/gnomole.lua
+++ b/data/npc/gnomole.lua
@@ -63,10 +63,10 @@ local function creatureSayCallback(npc, creature, type, message)
"That traitorous gnome, known as Gnomevil, who was my pupil before his changeover to the dark side of gnomedom, has abandoned all gnomish ethics and joined forces with our enemies. ...",
"It's hard to tell what led to his downfall. In the end he seems to have forgotten the principle that with small stature comes great responsibility. ...",
"He became tainted and corrupted by evil, obviously enough to grow in size, which is always an indicator for evil of course. ...",
- "Now he commands his armies in the name of those below and hides in his lair protected by layers of thick crystal that only he can form and change due to his corrupted powers! ...",
- "There is one thing though that could cause his downfall! His corruption has spread to his minions and in his lair there are some infected weepers that are full of parasites. ...",
- "These parasites will spread a fluid that will weaken the integrity of the crystals in front of Gnomevils lair when they die. The entrance is marked with crystal columns, so you can't miss it. ...",
- "You have to kill enough of the parasites DIRECTLY in front of the crystals. Eventually the columns will collapse and allow you entrance to Gnomevils lair. ...",
+ "Now he commands his armies in the name of those below and hides in his lair protected by layers of thick crystal that only he can form and change due to his corrupted powers! ...",
+ "There is one thing though that could cause his downfall! His corruption has spread to his minions and in his lair there are some infected weepers that are full of parasites. ...",
+ "These parasites will spread a fluid that will weaken the integrity of the crystals in front of Gnomevils lair when they die. The entrance is marked with crystal columns, so you can't miss it. ...",
+ "You have to kill enough of the parasites DIRECTLY in front of the crystals. Eventually the columns will collapse and allow you entrance to Gnomevils lair. ...",
"Take care though, due to Gnomevils power the crystals will grow back quite fast. Better manage the parasites in quick succession or everything will be for naught. ..., Enter his lair and bring an end to his despicable reign!"}, npc,
creature)
npcHandler:setTopic(playerId, 0)