diff options
-rw-r--r-- | npc/000-2-1/savepoint.txt | 20 | ||||
-rw-r--r-- | npc/functions/savepoint.txt | 14 |
2 files changed, 12 insertions, 22 deletions
diff --git a/npc/000-2-1/savepoint.txt b/npc/000-2-1/savepoint.txt index 4eec9298..a71ff140 100644 --- a/npc/000-2-1/savepoint.txt +++ b/npc/000-2-1/savepoint.txt @@ -5,33 +5,21 @@ // Saves locations in 000-2-1 map. 000-2-1.gat,40,37,0,2 script #name 900;2,{ - set @map$, "000-2-1.gat"; - set @x, 40; - set @y, 37; - callfunc "SavePoint"; + callfunc "SavePoint", "000-2-1.gat", 40, 37; close; } 000-2-1.gat,46,37,0,2 script #name 900;2,{ - set @map$, "000-2-1.gat"; - set @x, 46; - set @y, 37; - callfunc "SavePoint"; + callfunc "SavePoint", "000-2-1.gat", 46, 37; close; } 000-2-1.gat,50,38,0,2 script #name 900;2,{ - set @map$, "000-2-1.gat"; - set @x, 50; - set @y, 38; - callfunc "SavePoint"; + callfunc "SavePoint", "000-2-1.gat", 50, 38; close; } 000-2-1.gat,55,40,0,2 script #name 900;2,{ - set @map$, "000-2-1.gat"; - set @x, 55; - set @y, 40; - callfunc "SavePoint"; + callfunc "SavePoint", "000-2-1.gat", 55, 40; close; } diff --git a/npc/functions/savepoint.txt b/npc/functions/savepoint.txt index 9a8eae78..5e8838fa 100644 --- a/npc/functions/savepoint.txt +++ b/npc/functions/savepoint.txt @@ -3,13 +3,15 @@ // Reid // Description: // Adds a new save point location. +// Description: +// Save location with arguments: +// getarg(0) map name, +// getarg(1) x's value, +// getarg(2) y's value. function script SavePoint { + message strcharinfo(0), "Your position has been saved."; - npctalk3 "Your position has been saved."; - - savepoint @map$, @x, @y; - set @q, getcharid(3); - misceffect 4, @q; - + savepoint getarg(0), getarg(1), getarg(2); + misceffect 4, getcharid(3); } |