Skip to content

Commit

Permalink
UPDATE: Bosses, Talks & others...
Browse files Browse the repository at this point in the history
  • Loading branch information
FlackoRJ committed Nov 5, 2023
1 parent 6933cea commit 23f309c
Show file tree
Hide file tree
Showing 42 changed files with 1,054 additions and 323 deletions.
18 changes: 9 additions & 9 deletions config.lua.dist
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,9 @@ kickIdlePlayerAfterMinutes = 15
maxMessageBuffer = 4
emoteSpells = false
allowWalkthrough = true
coinPacketSize = 25
coinPacketSize = 25
coinImagesURL = "http://144.217.201.226/images/store/"
classicAttackSpeed = false
classicAttackSpeed = true
showScriptsLogInConsole = false
-- configure maximum value of critical imbuement
criticalChance = 10
Expand All @@ -354,8 +354,8 @@ experienceDisplayRates = true
-- configure attack base on Fist Fighting skill/experience
-- multiplierSpeedOnFist * 5 (multiplies the value obtained from the player fist skill and multiplies it * 5) max 25 is recommended due minTicks limits else player stop attack
-- maxSpeedOnFist 500 miliseconds (The maximum attack speed that can be obtained no matter how high the player has the Fist Fighting skill.)
toggleAttackSpeedOnFist = true
multiplierSpeedOnFist = 5
toggleAttackSpeedOnFist = false
multiplierSpeedOnFist = 5
maxSpeedOnFist = 500

-- Global server Save
Expand All @@ -382,7 +382,7 @@ rateUseStages = true
lowLevelBonusExp = 50
rateExp = 1
rateSkill = 1
rateLoot = 2
rateLoot = 1
rateMagic = 1
rateSpawn = 1

Expand Down Expand Up @@ -413,7 +413,7 @@ rateBossHealth = 1.0
rateBossAttack = 1.0
rateBossDefense = 1.0

bossDefaultTimeToFightAgain = 8 * 60 * 60 -- 20 hours
bossDefaultTimeToFightAgain = 1 * 60 * 60 -- 20 hours
bossDefaultTimeToDefeat = 20 * 60 -- 20 minutes

-- Monsters
Expand Down Expand Up @@ -458,12 +458,12 @@ discordWebhookURL = ""
-- NOTE: GainCoin function, please configure script: data-otservbr-global/scripts/globalevents/vip/online_coins.lua
-- NOTE: GainToken function, please configure script: data-otservbr-global/scripts/globalevents/vip/online_tokens.lua
vipSystemEnabled = true
vipBonusExp = 0
vipBonusLoot = 0
vipBonusExp = 50
vipBonusLoot = 50
vipBonusSkill = 0
vipAutoLootVipOnly = false
vipStayOnline = false
vipFamiliarTimeCooldownReduction = 15
vipFamiliarTimeCooldownReduction = 15

-- NOTE: set rewardChestCollectEnabled to true to enable the reward collect system
-- NOTE set rewardChestMaxCollectItems max items per collect action
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ monster.flags = {
canWalkOnPoison = true,
}

monster.events = {
"HeartBossDeath",
monster.events = {
"craftQuest3",
}

monster.light = {
Expand Down
109 changes: 109 additions & 0 deletions data-otservbr-global/npc/Phoenix Seller.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
local internalNpcName = "Phoenix Seller"
local npcType = Game.createNpcType(internalNpcName)
local npcConfig = {}

npcConfig.name = internalNpcName
npcConfig.description = internalNpcName

npcConfig.health = 150
npcConfig.maxHealth = npcConfig.health
npcConfig.walkInterval = 2000
npcConfig.walkRadius = 2

npcConfig.outfit = {
lookType = 128,
lookHead = 114,
lookBody = 0,
lookLegs = 76,
lookFeet = 94,
lookAddons = 3,
}

npcConfig.flags = {
floorchange = false,
}

npcConfig.voices = {
interval = 15000,
chance = 50,
{ text = "Trading tokens! First-class bargains!" },
{ text = "Bespoke armor for all vocations! For the cost of some tokens only!" },
{ text = "Tokens! Bring your tokens!" },
}

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)

npcType.onThink = function(npc, interval)
npcHandler:onThink(npc, interval)
end

npcType.onAppear = function(npc, creature)
npcHandler:onAppear(npc, creature)
end

npcType.onDisappear = function(npc, creature)
npcHandler:onDisappear(npc, creature)
end

npcType.onMove = function(npc, creature, fromPosition, toPosition)
npcHandler:onMove(npc, creature, fromPosition, toPosition)
end

npcType.onSay = function(npc, creature, type, message)
npcHandler:onSay(npc, creature, type, message)
end

npcType.onCloseChannel = function(npc, creature)
npcHandler:onCloseChannel(npc, creature)
end

local function creatureSayCallback(npc, creature, type, message)
if not npcHandler:checkInteraction(npc, creature) then
return false
end
return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)

npcConfig.currency = 22516

npcConfig.shop = {
{ itemName = "earthheart cuirass", clientId = 22521, buy = 100 },
{ itemName = "earthheart hauberk", clientId = 22522, buy = 100 },
{ itemName = "earthheart platemail", clientId = 22523, buy = 100 },
{ itemName = "earthmind raiment", clientId = 22535, buy = 100 },
{ itemName = "earthsoul tabard", clientId = 22531, buy = 100 },
{ itemName = "fireheart cuirass", clientId = 22518, buy = 100 },
{ itemName = "fireheart hauberk", clientId = 22519, buy = 100 },
{ itemName = "fireheart platemail", clientId = 22520, buy = 100 },
{ itemName = "firemind raiment", clientId = 22534, buy = 100 },
{ itemName = "firesoul tabard", clientId = 22530, buy = 100 },
{ itemName = "frostheart cuirass", clientId = 22527, buy = 100 },
{ itemName = "frostheart hauberk", clientId = 22528, buy = 100 },
{ itemName = "frostheart platemail", clientId = 22529, buy = 100 },
{ itemName = "frostmind raiment", clientId = 22537, buy = 100 },
{ itemName = "frostsoul tabard", clientId = 22533, buy = 100 },
{ itemName = "magic shield potion", clientId = 35563, buy = 1 },
{ itemName = "thunderheart cuirass", clientId = 22524, buy = 100 },
{ itemName = "thunderheart hauberk", clientId = 22525, buy = 100 },
{ itemName = "thunderheart platemail", clientId = 22526, buy = 100 },
{ itemName = "thundermind raiment", clientId = 22536, buy = 100 },
{ itemName = "thundersoul tabard", clientId = 22532, buy = 100 },
}

-- On buy npc shop message
npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost)
npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks)
end
-- On sell npc shop message
npcType.onSellItem = function(npc, player, itemId, subtype, amount, ignore, name, totalCost)
player:sendTextMessage(MESSAGE_INFO_DESCR, string.format("Sold %ix %s for %i gold.", amount, name, totalCost))
end
-- On check npc shop message (look item)
npcType.onCheckItem = function(npc, player, clientId, subType) end

npcType:register(npcConfig)

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ local config = {
to = Position(18199, 17954, 15),
},
exit = Position(18182, 17913, 15),

storage = 376353,
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
local config = {
boss = {
name = "Goshnar's Malice",
position = Position(17929, 18588, 11),
},
timeAfterKill = 60,
playerPositions = {
{ pos = Position(17899, 18588, 11), teleport = Position(17929, 18594, 11) },
{ pos = Position(17900, 18588, 11), teleport = Position(17929, 18595, 11) },
{ pos = Position(17901, 18588, 11), teleport = Position(17929, 18596, 11) },
{ pos = Position(17902, 18588, 11), teleport = Position(17929, 18593, 11) },
{ pos = Position(17903, 18588, 11), teleport = Position(17929, 18592, 11) },
},
specPos = {
from = Position(17919, 18579, 11),
to = Position(17940, 18597, 11),
},
exit = Position(17895, 18587, 11),

storage = 376383,
}

local lever = BossLever(config)
lever:aid(37666)
lever:register()
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
local config = {
boss = {
name = "Goshnar's Megalomania",
position = Position(17930, 18623, 11),
},
timeAfterKill = 60,
playerPositions = {
{ pos = Position(17896, 18623, 11), teleport = Position(17931, 18629, 11) },
{ pos = Position(17897, 18623, 11), teleport = Position(17932, 18629, 11) },
{ pos = Position(17898, 18623, 11), teleport = Position(17930, 18629, 11) },
{ pos = Position(17899, 18623, 11), teleport = Position(17929, 18629, 11) },
{ pos = Position(17900, 18623, 11), teleport = Position(17928, 18629, 11) },
},
specPos = {
from = Position(17920, 18614, 11),
to = Position(17940, 18632, 11),
},
exit = Position(17892, 18622, 11),

storage = 376394,
}

local lever = BossLever(config)
lever:aid(37677)
lever:register()
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
local config = {
boss = {
name = "Goshnar's Spite",
position = Position(17962, 18622, 11),
},
timeAfterKill = 60,
playerPositions = {
{ pos = Position(17994, 18623, 11), teleport = Position(17962, 18627, 11) },
{ pos = Position(17995, 18623, 11), teleport = Position(17963, 18627, 11) },
{ pos = Position(17996, 18623, 11), teleport = Position(17964, 18627, 11) },
{ pos = Position(17997, 18623, 11), teleport = Position(17961, 18627, 11) },
{ pos = Position(17998, 18623, 11), teleport = Position(17960, 18627, 11) },
},
specPos = {
from = Position(17952, 18613, 11),
to = Position(17952, 18613, 11),
},
exit = Position(17995, 18618, 11),

storage = 376384,
}

local lever = BossLever(config)
lever:aid(37667)
lever:register()
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
local config = {
boss = {
name = "King Zelos",
position = Position(18293, 18130, 13),
},
timeAfterKill = 60,
playerPositions = {
{ pos = Position(18335, 18129, 13), teleport = Position(18290, 18133, 13) },
{ pos = Position(18335, 18130, 13), teleport = Position(18292, 18133, 13) },
{ pos = Position(18335, 18131, 13), teleport = Position(18294, 18133, 13) },
{ pos = Position(18335, 18132, 13), teleport = Position(18296, 18133, 13) },
{ pos = Position(18335, 18133, 13), teleport = Position(18291, 18134, 13) },
{ pos = Position(18336, 18129, 13), teleport = Position(18293, 18134, 13) },
{ pos = Position(18336, 18130, 13), teleport = Position(18295, 18134, 13) },
{ pos = Position(18336, 18131, 13), teleport = Position(18292, 18135, 13) },
{ pos = Position(18336, 18132, 13), teleport = Position(18294, 18135, 13) },
{ pos = Position(18336, 18133, 13), teleport = Position(18293, 18136, 13) },
},
specPos = {
from = Position(18283, 18120, 13),
to = Position(18304, 18141, 13),
},
exit = Position(18340, 18130, 13),

storage = 376393,
}

local lever = BossLever(config)
lever:aid(37676)
lever:register()
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
local config = {
boss = {
name = "Lokathmor",
position = Position(17997, 18132, 8),
},
timeAfterKill = 60,
playerPositions = {
{ pos = Position(17967, 18192, 8), teleport = Position(17996, 18137, 8) },
{ pos = Position(17968, 18192, 8), teleport = Position(17997, 18137, 8) },
{ pos = Position(17969, 18192, 8), teleport = Position(17998, 18137, 8) },
{ pos = Position(17970, 18192, 8), teleport = Position(17995, 18137, 8) },
{ pos = Position(17971, 18192, 8), teleport = Position(17994, 18137, 8) },
},
specPos = {
from = Position(17986, 18122, 8),
to = Position(18006, 18140, 8),
},
exit = Position(17965, 18187, 8),

storage = 376385,
}

local lever = BossLever(config)
lever:aid(37668)
lever:register()
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
local config = {
boss = {
name = "Lord Azaram",
position = Position(18211, 18116, 13),
},
timeAfterKill = 60,
playerPositions = {
{ pos = Position(18209, 18137, 13), teleport = Position(18211, 18123, 13) },
{ pos = Position(18210, 18137, 13), teleport = Position(18212, 18123, 13) },
{ pos = Position(18211, 18137, 13), teleport = Position(18213, 18123, 13) },
{ pos = Position(18212, 18137, 13), teleport = Position(18210, 18123, 13) },
{ pos = Position(18213, 18137, 13), teleport = Position(18209, 18123, 13) },
},
specPos = {
from = Position(18201, 18107, 13),
to = Position(18222, 18127, 13),
},
exit = Position(18205, 18142, 13),

storage = 376386,
}

local lever = BossLever(config)
lever:aid(37669)
lever:register()
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
local config = {
boss = {
name = "Magma Bubble",
position = Position(17033, 17727, 8),
},
timeAfterKill = 60,
playerPositions = {
{ pos = Position(17050, 17745, 8), teleport = Position(17033, 17736, 8) },
{ pos = Position(17050, 17746, 8), teleport = Position(17034, 17736, 8) },
{ pos = Position(17050, 17747, 8), teleport = Position(17035, 17736, 8) },
{ pos = Position(17050, 17748, 8), teleport = Position(17032, 17736, 8) },
{ pos = Position(17050, 17749, 8), teleport = Position(17031, 17736, 8) },
},
specPos = {
from = Position(17020, 17715, 8),
to = Position(17044, 17739, 8),
},
exit = Position(17050, 17752, 8),

storage = 376387,
}

local lever = BossLever(config)
lever:aid(37670)
lever:register()
Loading

0 comments on commit 23f309c

Please sign in to comment.