Skip to content
Open
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
2 changes: 1 addition & 1 deletion data-otservbr-global/scripts/actions/other/enchanting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function enchanting.onUse(player, item, fromPosition, target, toPosition, isHotk
if table.contains({ 33268, 33269 }, toPosition.x) and toPosition.y == 31830 and toPosition.z == 10 and player:getStorageValue(Storage.Quest.U8_2.ElementalSpheres.QuestLine) > 0 then
if not table.contains(spheres[item.itemid], player:getVocation():getBaseId()) then
return false
elseif table.contains({ 842, 843 }, target.itemid) then
elseif table.contains({ 846, 847 }, target.itemid) then
player:say("Turn off the machine first.", TALKTYPE_MONSTER_SAY)
return true
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function elementalSpheresMachine1.onUse(player, item, fromPosition, target, toPo
toPosition.x = toPosition.x + (item.itemid == 846 and 1 or -1)
local tile = toPosition:getTile()
if tile then
local thing = tile:getItemById(item.itemid == 842 and 843 or 842)
local thing = tile:getItemById(item.itemid == 846 and 847 or 846)
if thing then
thing:transform(thing.itemid - 4)
end
Expand All @@ -39,5 +39,5 @@ function elementalSpheresMachine1.onUse(player, item, fromPosition, target, toPo
return true
end

elementalSpheresMachine1:id(842, 843)
elementalSpheresMachine1:id(842, 843, 846, 847)
elementalSpheresMachine1:register()
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function elementalSpheresMachine2.onUse(player, item, fromPosition, target, toPo
player:say("ON", TALKTYPE_MONSTER_SAY, false, player, toPosition)
else
toPosition.y = toPosition.y + (item.itemid == 848 and 1 or -1)
local machineItem = Tile(toPosition):getItemById(item.itemid == 848 and 845 or 849)
local machineItem = Tile(toPosition):getItemById(item.itemid == 848 and 849 or 848)
if machineItem then
machineItem:transform(machineItem.itemid - 4)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
local spheres = {
[8300] = VOCATION.BASE_ID.PALADIN,
[8304] = VOCATION.BASE_ID.SORCERER,
[8305] = VOCATION.BASE_ID.DRUID,
[8306] = VOCATION.BASE_ID.KNIGHT,
[942] = VOCATION.BASE_ID.PALADIN,
[946] = VOCATION.BASE_ID.SORCERER,
[947] = VOCATION.BASE_ID.DRUID,
[948] = VOCATION.BASE_ID.KNIGHT,
}

local globalTable = {
Expand All @@ -14,19 +14,19 @@ local globalTable = {

local elementalSpheresSoils2 = Action()
function elementalSpheresSoils2.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if not table.contains({ 7917, 7918, 7913, 7914 }, target.itemid) then
if not table.contains({ 842, 843, 844, 845 }, target.itemid) then
return false
end

if not toPosition:isInRange({ x = 33238, y = 31806, z = 12 }, { x = 33297, y = 31865, z = 12 }) then
return false
end

if not table.contains(spheres[item.itemid], player:getVocation():getBaseId()) then
if spheres[item.itemid] ~= player:getVocation():getBaseId() then
return false
end

if table.contains({ 7917, 7918 }, target.itemid) then
if table.contains({ 846, 847, 848, 849 }, target.itemid) then
player:say("Turn off the machine first.", TALKTYPE_MONSTER_SAY)
return true
end
Expand All @@ -37,5 +37,5 @@ function elementalSpheresSoils2.onUse(player, item, fromPosition, target, toPosi
return true
end

elementalSpheresSoils2:id(8300, 8304, 8305, 8306)
elementalSpheresSoils2:id(942, 946, 947, 948)
elementalSpheresSoils2:register()