This repository has been archived by the owner on Dec 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1465 from Nireya/retrace-and-usables
Implements the Retrace spell and related usable items
- Loading branch information
Showing
10 changed files
with
196 additions
and
65 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
----------------------------------------- | ||
-- ID: 18614 | ||
-- Cobra Staff | ||
-- Enchantment: "Retrace" (Windurst Waters[S]) | ||
----------------------------------------- | ||
require("scripts/globals/status") | ||
require("scripts/globals/teleports") | ||
----------------------------------------- | ||
|
||
function onItemCheck(target) | ||
return 0 | ||
end | ||
|
||
function onItemUse(target) | ||
target:addStatusEffectEx(tpz.effect.TELEPORT, 0, tpz.teleport.id.WINDURST_WATERS_S, 0, 4) | ||
end |
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,16 @@ | ||
----------------------------------------- | ||
-- ID: 18613 | ||
-- Fourth Staff | ||
-- Enchantment: "Retrace" (Bastok Markets[S]) | ||
----------------------------------------- | ||
require("scripts/globals/status") | ||
require("scripts/globals/teleports") | ||
----------------------------------------- | ||
|
||
function onItemCheck(target) | ||
return 0 | ||
end | ||
|
||
function onItemUse(target) | ||
target:addStatusEffectEx(tpz.effect.TELEPORT, 0, tpz.teleport.id.BASTOK_MARKETS_S, 0, 4) | ||
end |
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,16 @@ | ||
----------------------------------------- | ||
-- ID: 18612 | ||
-- Ram Staff | ||
-- Enchantment: "Retrace" (Southern San d'Oria[S]) | ||
----------------------------------------- | ||
require("scripts/globals/status") | ||
require("scripts/globals/teleports") | ||
----------------------------------------- | ||
|
||
function onItemCheck(target) | ||
return 0 | ||
end | ||
|
||
function onItemUse(target) | ||
target:addStatusEffectEx(tpz.effect.TELEPORT, 0, tpz.teleport.id.SOUTHERN_SAN_DORIA_S, 0, 4) | ||
end |
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,22 @@ | ||
----------------------------------------- | ||
-- ID: 5428 | ||
-- Scroll of Instant Retrace | ||
-- Transports the user to their Allied Nation. | ||
----------------------------------------- | ||
require("scripts/globals/teleports") | ||
require("scripts/globals/status") | ||
----------------------------------------- | ||
|
||
function onItemCheck(target) | ||
if not (target:getCampaignAllegiance() > 0) then | ||
return 56 | ||
else | ||
return 0 | ||
end | ||
end | ||
|
||
function onItemUse(target) | ||
if (target:getCampaignAllegiance() > 0) then | ||
target:addStatusEffectEx(tpz.effect.TELEPORT, 0, tpz.teleport.id.RETRACE, 0, 2) | ||
end | ||
end |
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,26 @@ | ||
----------------------------------------- | ||
-- Spell: Retrace | ||
-- Transports player to their Allied Nation. Can cast on allies. | ||
----------------------------------------- | ||
require("scripts/globals/teleports") | ||
require("scripts/globals/status") | ||
require("scripts/globals/msg") | ||
----------------------------------------- | ||
|
||
function onMagicCastingCheck(caster, target, spell) | ||
if not (target:getCampaignAllegiance() > 0) then | ||
return 48 | ||
else | ||
return 0 | ||
end | ||
end | ||
|
||
function onSpellCast(caster, target, spell) | ||
if (target:getCampaignAllegiance() > 0) then | ||
target:addStatusEffectEx(tpz.effect.TELEPORT, 0, tpz.teleport.id.RETRACE, 0, 4) | ||
spell:setMsg(tpz.msg.basic.MAGIC_TELEPORT) | ||
else | ||
spell:setMsg(tpz.msg.basic.NONE) | ||
end | ||
return 0 | ||
end |
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
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