forked from opentibiabr/canary
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
1,054 additions
and
323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
data-otservbr-global/scripts/actions/phoenixActions/bosses/GoshnarsMalice.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
25 changes: 25 additions & 0 deletions
25
data-otservbr-global/scripts/actions/phoenixActions/bosses/GoshnarsMegalomania.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
25 changes: 25 additions & 0 deletions
25
data-otservbr-global/scripts/actions/phoenixActions/bosses/GoshnarsSpite.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
30 changes: 30 additions & 0 deletions
30
data-otservbr-global/scripts/actions/phoenixActions/bosses/KingZelos.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
25 changes: 25 additions & 0 deletions
25
data-otservbr-global/scripts/actions/phoenixActions/bosses/Lokathmor.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
25 changes: 25 additions & 0 deletions
25
data-otservbr-global/scripts/actions/phoenixActions/bosses/LordAzaram.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
25 changes: 25 additions & 0 deletions
25
data-otservbr-global/scripts/actions/phoenixActions/bosses/MagmaBubble.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
Oops, something went wrong.