Skip to content

Commit

Permalink
fix: some errors and nil value in lua scripts (opentibiabr#830)
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas committed Feb 7, 2023
1 parent 5f80dfb commit 7d813d5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ rightMirror:register()


-- Memories

local shardIds = {31354, 31355, 31356}

local memoriesWords = {
"The Ambassador tells another dignitary: Rathleton must never be surpassed! I will procure that the Empire falters!",
"Through a dimensional gate you can see the Ambassador of Rathleton wearing a cloak with a black sphinx on it.",
Expand Down Expand Up @@ -112,7 +109,7 @@ function memoryShards.onUse(player, item, fromPosition, target, toPosition, isHo
return false
end

memoryShards:id(shardIds) -- Green, blue and purple memory shards
memoryShards:id(31354, 31355, 31356) -- Green, blue and purple memory shards
memoryShards:register()


Expand All @@ -130,6 +127,7 @@ function energyField.onStepIn(creature, item, position, fromPosition)

local playerShardIds = {}

local shardIds = {31354, 31355, 31356}
-- Get player owned shards
for i = 1, #shardIds do
if player:getItemById(shardIds[i], true) then
Expand Down
20 changes: 11 additions & 9 deletions data-otservbr-global/startup/tables/chest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,8 @@
]]

ChestAction = {
[false] = {
itemId = false,
itemPos = {
{x = 33057, y = 31029, z = 7},
{x = 33055, y = 31029, z = 7},
{x = 33053, y = 31029, z = 7}
}
},
-- Keys quest
--[[
-- Example of usage
[5000] = {
itemId = xxxx,
itemPos = {
Expand All @@ -48,6 +41,15 @@ ChestAction = {
action = xxxx,
reward = {{xxxx, 1}},
storage = storage
},]]
-- Keys quest
[5000] = {
itemId = false,
itemPos = {
{x = 33057, y = 31029, z = 7},
{x = 33055, y = 31029, z = 7},
{x = 33053, y = 31029, z = 7}
}
},
-- The New Frontier Quest
[5001] = { -- Reward Outfit
Expand Down

0 comments on commit 7d813d5

Please sign in to comment.