Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Update Crystal Server Map #37

Merged
merged 4 commits into from
Feb 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions data-crystal/npc/lara.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ npcConfig.walkInterval = 2000
npcConfig.walkRadius = 2

npcConfig.outfit = {
lookType = 128,
lookType = 136,
lookHead = 40,
lookBody = 37,
lookLegs = 116,
lookFeet = 95,
lookAddons = 0,
lookAddons = 3,
}

npcConfig.flags = {
Expand Down
76 changes: 76 additions & 0 deletions data-crystal/npc/sherlock.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
local internalNpcName = "Sherlock"
local npcType = Game.createNpcType(internalNpcName)
local npcConfig = {}

npcConfig.name = internalNpcName
npcConfig.description = internalNpcName

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

npcConfig.outfit = {
lookType = 151,
lookHead = 78,
lookBody = 51,
lookLegs = 85,
lookFeet = 126,
lookAddons = 3,
}

npcConfig.flags = {
floorchange = false,
}

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

-- Travel
local function addTravelKeyword(keyword, cost, destination)
local travelKeyword = keywordHandler:addKeyword({ keyword }, StdModule.say, { npcHandler = npcHandler, text = "Do you want go to the " .. keyword:titleCase() .. " for |TRAVELCOST|?", cost = cost })
travelKeyword:addChildKeyword({ "yes" }, StdModule.travel, { npcHandler = npcHandler, premium = false, cost = cost, destination = destination })
travelKeyword:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "Alright then!", reset = true })
end

addTravelKeyword("karmia", 100, Position(577, 492, 6))
addTravelKeyword("mistrock", 100, Position(843, 537, 7))

-- Basic
keywordHandler:addKeyword({ "travel" }, StdModule.say, { npcHandler = npcHandler, text = "I can take you to {Mistrock} and {Karmia}!" })
keywordHandler:addAliasKeyword({ "passage" })
keywordHandler:addKeyword({ "job" }, StdModule.say, { npcHandler = npcHandler, text = "I am Maris, Captain of this ship." })
keywordHandler:addAliasKeyword({ "captain" })

npcHandler:setMessage(MESSAGE_GREET, "I hope you have a good reason to step near my ship, say {travel}, |PLAYERNAME|.")
npcHandler:setMessage(MESSAGE_FAREWELL, "Yeah, bye or whatever.")
npcHandler:setMessage(MESSAGE_WALKAWAY, "Bye.")

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

-- npcType registering the npcConfig table
npcType:register(npcConfig)
2 changes: 1 addition & 1 deletion data-crystal/scripts/actions/objects/imbuement_shrine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function imbuement.onUse(player, item, fromPosition, target, toPosition, isHotke
return true
end

imbuement:position({ x = 438, y = 501, z = 6 }, 25061)
--imbuement:position({ x = 438, y = 501, z = 6 }, 25061)

imbuement:id(25060, 25061, 25103, 25104, 25202, 25174, 25175, 25182, 25183)
imbuement:register()
Loading