Skip to content

Commit

Permalink
Merge pull request #5925 from LandSandBoat/remove-unused-returns
Browse files Browse the repository at this point in the history
Remove unnecessary Lua returns
  • Loading branch information
claywar authored Jun 15, 2024
2 parents 9d9d0fe + ba44418 commit b34823f
Show file tree
Hide file tree
Showing 45 changed files with 7 additions and 79 deletions.
2 changes: 0 additions & 2 deletions scripts/zones/AlTaieu/mobs/Absolute_Virtue.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ entity.onMagicHit = function(caster, target, spell)
target:addMod(xi.mod.REGEN, -2)
end
end

return 1
end

entity.onMobDeath = function(mob, player, optParams)
Expand Down
1 change: 0 additions & 1 deletion scripts/zones/Bhaflau_Thickets/npcs/Hamta-Iramta.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ entity.onTrade = function(player, npc, trade)
player:tradeComplete()
player:setPos(-458, -16, 0, 189) -- using the pos method until the problem below is fixed
-- player:startEvent(135) -- << this CS goes black at the end, never fades in
return 1
end
end

Expand Down
1 change: 0 additions & 1 deletion scripts/zones/Bhaflau_Thickets/npcs/_1g0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ end

entity.onTrigger = function(player, npc)
player:startEvent(502)
return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
1 change: 0 additions & 1 deletion scripts/zones/Castle_Oztroja/npcs/_470.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ local entity = {}
entity.onTrigger = function(player, npc)
if npc:getAnimation() == xi.anim.CLOSE_DOOR then
player:messageSpecial(ID.text.ITS_LOCKED)
return 1
end
end

Expand Down
1 change: 0 additions & 1 deletion scripts/zones/Castle_Oztroja/npcs/_471.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ local entity = {}
entity.onTrigger = function(player, npc)
if npc:getAnimation() == xi.anim.CLOSE_DOOR then
player:messageSpecial(ID.text.ITS_LOCKED)
return 1
end
end

Expand Down
1 change: 0 additions & 1 deletion scripts/zones/Castle_Oztroja/npcs/_474.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ local entity = {}
entity.onTrigger = function(player, npc)
if npc:getAnimation() == xi.anim.CLOSE_DOOR then
player:messageSpecial(ID.text.ITS_LOCKED)
return 1
end
end

Expand Down
1 change: 0 additions & 1 deletion scripts/zones/Castle_Oztroja/npcs/_475.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ local entity = {}
entity.onTrigger = function(player, npc)
if npc:getAnimation() == xi.anim.CLOSE_DOOR then
player:messageSpecial(ID.text.ITS_LOCKED)
return 1
end
end

Expand Down
1 change: 0 additions & 1 deletion scripts/zones/Castle_Oztroja/npcs/_477.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ local entity = {}
entity.onTrigger = function(player, npc)
if npc:getAnimation() == xi.anim.CLOSE_DOOR then
player:messageSpecial(ID.text.ITS_LOCKED)
return 1
end
end

Expand Down
1 change: 0 additions & 1 deletion scripts/zones/Castle_Oztroja/npcs/_479.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ end
entity.onTrigger = function(player, npc)
if npc:getAnimation() == xi.anim.CLOSE_DOOR then
player:messageSpecial(ID.text.ITS_LOCKED)
return 1
end
end

Expand Down
1 change: 0 additions & 1 deletion scripts/zones/Castle_Zvahl_Keep/npcs/_4i5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ end

entity.onTrigger = function(player, npc)
player:startEvent(9)
return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
1 change: 0 additions & 1 deletion scripts/zones/Grand_Palace_of_HuXzoi/npcs/_0y0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ end

entity.onTrigger = function(player, npc)
player:startEvent(173)
return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
1 change: 0 additions & 1 deletion scripts/zones/Grand_Palace_of_HuXzoi/npcs/_iyc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ end

entity.onTrigger = function(player, npc)
player:startEvent(172)
return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
2 changes: 0 additions & 2 deletions scripts/zones/Heavens_Tower/npcs/_6q1.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ entity.onTrigger = function(player, npc)
else
player:messageSpecial(ID.text.STAIRWAY_ONLY_CITIZENS)
end

return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
2 changes: 0 additions & 2 deletions scripts/zones/Ilrusi_Atoll/npcs/Rune_of_Release.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ entity.onTrigger = function(player, npc)
if instance:completed() then
player:startEvent(100, 4)
end

return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
6 changes: 6 additions & 0 deletions scripts/zones/Inner_Horutoto_Ruins/DefaultActions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ local ID = zones[xi.zone.INNER_HORUTOTO_RUINS]
return {
['_5ca'] = { event = 44 },
['_5cb'] = { messageSpecial = ID.text.DOOR_FIRMLY_CLOSED },
['_5cc'] = { messageSpecial = ID.text.DOOR_FIRMLY_CLOSED },
['_5cd'] = { messageSpecial = ID.text.DOOR_FIRMLY_CLOSED },
['_5ce'] = { messageSpecial = ID.text.DOOR_FIRMLY_CLOSED },
['_5cf'] = { messageSpecial = ID.text.DOOR_FIRMLY_CLOSED },
['_5cg'] = { messageSpecial = ID.text.DOOR_FIRMLY_CLOSED },
['_5ch'] = { messageSpecial = ID.text.DOOR_FIRMLY_CLOSED },
['_5ci'] = { messageSpecial = ID.text.DOOR_FIRMLY_CLOSED },
['_5c5'] = { messageSpecial = ID.text.DOOR_FIRMLY_CLOSED },
}
2 changes: 0 additions & 2 deletions scripts/zones/Inner_Horutoto_Ruins/npcs/_5ca.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ entity.onTrigger = function(player, npc)
player:messageSpecial(ID.text.CAT_BURGLARS_HIDEOUT, 1, xi.ki.WINDURST_WOODS_SCOOP) -- Confirm Story
player:setCharVar('QuestMakingHeadlines_var', utils.mask.setBit(prog, 4, true))
end

return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
4 changes: 0 additions & 4 deletions scripts/zones/Inner_Horutoto_Ruins/npcs/_5cc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@
-- NPC: _5cc (Gate of Ice)
-- !pos -228 0 99 192
-----------------------------------
local ID = zones[xi.zone.INNER_HORUTOTO_RUINS]
-----------------------------------
local entity = {}

entity.onTrade = function(player, npc, trade)
end

entity.onTrigger = function(player, npc)
player:messageSpecial(ID.text.DOOR_FIRMLY_CLOSED)
return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
4 changes: 0 additions & 4 deletions scripts/zones/Inner_Horutoto_Ruins/npcs/_5cd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@
-- NPC: _5cd (Gate of Water)
-- !pos -228 0 140 192
-----------------------------------
local ID = zones[xi.zone.INNER_HORUTOTO_RUINS]
-----------------------------------
local entity = {}

entity.onTrade = function(player, npc, trade)
end

entity.onTrigger = function(player, npc)
player:messageSpecial(ID.text.DOOR_FIRMLY_CLOSED)
return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
4 changes: 0 additions & 4 deletions scripts/zones/Inner_Horutoto_Ruins/npcs/_5ce.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@
-- NPC: _5ce (Gate of Earth)
-- !pos -228 0 140 192
-----------------------------------
local ID = zones[xi.zone.INNER_HORUTOTO_RUINS]
-----------------------------------
local entity = {}

entity.onTrade = function(player, npc, trade)
end

entity.onTrigger = function(player, npc)
player:messageSpecial(ID.text.DOOR_FIRMLY_CLOSED)
return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
4 changes: 0 additions & 4 deletions scripts/zones/Inner_Horutoto_Ruins/npcs/_5cf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@
-- NPC: _5cf (Gate of Wind)
-- !pos -332 0 99 192
-----------------------------------
local ID = zones[xi.zone.INNER_HORUTOTO_RUINS]
-----------------------------------
local entity = {}

entity.onTrade = function(player, npc, trade)
end

entity.onTrigger = function(player, npc)
player:messageSpecial(ID.text.DOOR_FIRMLY_CLOSED)
return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
4 changes: 0 additions & 4 deletions scripts/zones/Inner_Horutoto_Ruins/npcs/_5cg.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@
-- NPC: _5cg (Gate of Fire)
-- !pos -332 0 99 192
-----------------------------------
local ID = zones[xi.zone.INNER_HORUTOTO_RUINS]
-----------------------------------
local entity = {}

entity.onTrade = function(player, npc, trade)
end

entity.onTrigger = function(player, npc)
player:messageSpecial(ID.text.DOOR_FIRMLY_CLOSED)
return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
4 changes: 0 additions & 4 deletions scripts/zones/Inner_Horutoto_Ruins/npcs/_5ch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@
-- NPC: _5ch (Gate of Thunder)
-- !pos -331 0 139 192
-----------------------------------
local ID = zones[xi.zone.INNER_HORUTOTO_RUINS]
-----------------------------------
local entity = {}

entity.onTrade = function(player, npc, trade)
end

entity.onTrigger = function(player, npc)
player:messageSpecial(ID.text.DOOR_FIRMLY_CLOSED)
return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
2 changes: 0 additions & 2 deletions scripts/zones/Lebros_Cavern/npcs/Rune_of_Release.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ entity.onTrigger = function(player, npc)
if instance:completed() then
player:startEvent(100, 2)
end

return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
2 changes: 0 additions & 2 deletions scripts/zones/Leujaoam_Sanctum/npcs/Rune_of_Release.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ entity.onTrigger = function(player, npc)
if instance:completed() then
player:startEvent(100, 0)
end

return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
2 changes: 0 additions & 2 deletions scripts/zones/Mamook/mobs/Chamrosh.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ entity.onMagicHit = function(caster, target, spell)
target:setLocalVar('COPY_SPELL', spell:getID())
target:setLocalVar('LAST_CAST', target:getBattleTime())
end

return 1
end

entity.onMobDeath = function(mob, player, optParams)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ entity.onTrigger = function(player, npc)
if instance:completed() then
player:startEvent(100, 1)
end

return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
1 change: 1 addition & 0 deletions scripts/zones/Metalworks/DefaultActions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ local ID = zones[xi.zone.METALWORKS]

return {
['_6ld'] = { event = 604 },
['_6le'] = { messageSpecial = ID.text.ITS_LOCKED },
['_6lg'] = { messageSpecial = ID.text.ITS_LOCKED },
['Alois'] = { event = 370 },
['Ayame'] = { event = 701 },
Expand Down
4 changes: 0 additions & 4 deletions scripts/zones/Metalworks/npcs/_6le.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@
-- Door: _6le (Presidential Suite)
-- !pos 113 -20 8 237
-----------------------------------
local ID = zones[xi.zone.METALWORKS]
-----------------------------------
local entity = {}

entity.onTrade = function(player, npc, trade)
end

entity.onTrigger = function(player, npc)
player:messageSpecial(ID.text.ITS_LOCKED)
return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
1 change: 0 additions & 1 deletion scripts/zones/Misareaux_Coast/npcs/_0p3.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ end

entity.onTrigger = function(player, npc)
player:startEvent(553)
return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
2 changes: 0 additions & 2 deletions scripts/zones/Periqia/npcs/Rune_of_Release.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ entity.onTrigger = function(player, npc)
if instance:completed() then
player:startEvent(100, 3)
end

return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
1 change: 0 additions & 1 deletion scripts/zones/Port_Bastok/npcs/_6k9.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ end

entity.onTrigger = function(player, npc)
player:startEvent(140)
return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
1 change: 0 additions & 1 deletion scripts/zones/Port_Jeuno/npcs/_6u2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ end

entity.onTrigger = function(player, npc)
player:startEvent(54)
return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
1 change: 0 additions & 1 deletion scripts/zones/Port_Jeuno/npcs/_6u6.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ end

entity.onTrigger = function(player, npc)
player:startEvent(53)
return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
1 change: 0 additions & 1 deletion scripts/zones/Port_Jeuno/npcs/_6uc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ end

entity.onTrigger = function(player, npc)
player:startEvent(52)
return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
1 change: 0 additions & 1 deletion scripts/zones/Port_Jeuno/npcs/_6ug.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ end

entity.onTrigger = function(player, npc)
player:startEvent(55)
return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
2 changes: 0 additions & 2 deletions scripts/zones/Port_San_dOria/npcs/_6g7.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ entity.onTrigger = function(player, npc)
if player:getZPos() >= 12 then
player:startEvent(518)
end

return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
1 change: 0 additions & 1 deletion scripts/zones/Port_Windurst/npcs/_6o7.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ end

entity.onTrigger = function(player, npc)
player:startEvent(182)
return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
2 changes: 0 additions & 2 deletions scripts/zones/Qulun_Dome/npcs/_441.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ entity.onTrigger = function(player, npc)
player:messageSpecial(ID.text.CANNOT_BE_OPENED_FROM_THIS_SIDE)
end
end

return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
1 change: 0 additions & 1 deletion scripts/zones/Ranguemont_Pass/npcs/_4m0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
local entity = {}

entity.onTrigger = function(player, npc)
return 1
end

return entity
2 changes: 0 additions & 2 deletions scripts/zones/Temple_of_Uggalepih/npcs/_mf1.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ entity.onTrigger = function(player, npc)
if guardian ~= nil and guardian:getHP() > 0 and guardian:getTarget() == nil then
guardian:updateClaim(player)
end

return 1
end

entity.onEventUpdate = function(player, csid, option, npc)
Expand Down
Loading

0 comments on commit b34823f

Please sign in to comment.