summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-04-29 10:20:40 -0300
committerJesusaves <cpntb1@ymail.com>2019-04-29 10:20:40 -0300
commit3ed73e0a0b424ca5b2b8491f365bf601e34220f9 (patch)
tree3adb5b2710137faa017443551fff67e912b6ea30 /npc
parent7b1f6f59b0781188c967b896a62c6ecc05df84e4 (diff)
downloadserverdata-3ed73e0a0b424ca5b2b8491f365bf601e34220f9.tar.gz
serverdata-3ed73e0a0b424ca5b2b8491f365bf601e34220f9.tar.bz2
serverdata-3ed73e0a0b424ca5b2b8491f365bf601e34220f9.tar.xz
serverdata-3ed73e0a0b424ca5b2b8491f365bf601e34220f9.zip
@ucp may now update your save point if you SAVE AND EXIT.
Diffstat (limited to 'npc')
-rw-r--r--npc/000-1/exit.txt11
-rw-r--r--npc/012-1/guards.txt6
-rw-r--r--npc/commands/ucp.txt23
-rw-r--r--npc/functions/siege.txt2
4 files changed, 30 insertions, 12 deletions
diff --git a/npc/000-1/exit.txt b/npc/000-1/exit.txt
index 4e2e9c2a2..aaeed2d4e 100644
--- a/npc/000-1/exit.txt
+++ b/npc/000-1/exit.txt
@@ -28,11 +28,12 @@ OnTalkNearby:
warp "002-1", 53, 38;
end;
-OnSetLX:
- @lx=array_find(.LOCMASTER_LOC$, LOCATION$);
-savepoint .LOCMASTER_MAP$[@lx], .LOCMASTER_X[@lx], .LOCMASTER_Y[@lx];
- end;
-// Begin
+// Save your location to last visited town for @ucp. I won't hate you for this.
+/OnSetLX:
+ @lx=array_find(.LOCMASTER_LOC$, LOCATION$);
+ savepoint .LOCMASTER_MAP$[@lx], .LOCMASTER_X[@lx], .LOCMASTER_Y[@lx];
+ end;
+
OnInit:
setarray .LOCMASTER_LOC$, "Candor", "Tulim", "Halin", "Hurns", "LoF", "Lilit", "Nival", "Frostia";
setarray .LOCMASTER_MAP$, "005-1", "003-1", "009-1", "012-1", "017-1", "018-5", "020-1", "024-1";
diff --git a/npc/012-1/guards.txt b/npc/012-1/guards.txt
index 449ae0dc0..1c1735bbf 100644
--- a/npc/012-1/guards.txt
+++ b/npc/012-1/guards.txt
@@ -699,14 +699,14 @@ OnTimer15000:
disablenpc "Rakinorf, Mayor";
end;
-OnTimer60000:
+OnTimer30000:
debugmes "6k";
siege_spawn("012-1", BlackScorpion, 3, "#HurnscaldSiege::OnBlackScorpion2Death");
siege_spawn("012-1", GreenSlime, 10+$@SIEGE_HURNS, "#HurnscaldSiege::OnGreenSlimeDeath");
siege_spawn("012-1", CandiedSlime, 1+$@SIEGE_HURNS, "#HurnscaldSiege::OnCandiedSlimeDeath");
end;
-OnTimer120000:
+OnTimer60000:
debugmes "12k";
if ($@SIEGE_HURNS >= 5) {
siege_selectmob(siege_calcdiff("012-1", 80), $@SIEGE_HURNS);
@@ -727,7 +727,7 @@ OnTimer120000:
siege_spawn("012-1", any_of($@SIEGE_TMPMOBS), 2+$@SIEGE_HURNS, "#HurnscaldSiege::OnRespawn");
end;
-OnTimer180000:
+OnTimer90000:
debugmes "18k";
siege_selectmob(siege_calcdiff("012-1"), $@SIEGE_HURNS, TP_HURNS);
siege_spawn("012-1", any_of($@SIEGE_TMPMOBS), 1+$@SIEGE_HURNS, "#HurnscaldSiege::OnRespawn");
diff --git a/npc/commands/ucp.txt b/npc/commands/ucp.txt
index a5d61d2f1..04743f0f5 100644
--- a/npc/commands/ucp.txt
+++ b/npc/commands/ucp.txt
@@ -5,6 +5,7 @@
function script UserCtrlPanel {
do
{
+ @unsaved=false;
clear;
setnpcdialogtitle l("User Control Panel");
mes l("This menu gives you some options which affect your account.");
@@ -12,6 +13,10 @@ function script UserCtrlPanel {
mes "";
mes l("What do you want to access?");
next;
+ if (@unsaved) {
+ mesc l("Careful: You have unsaved changes!"), 1;
+ mes "";
+ }
select
l("Rules"),
l("Game News"),
@@ -20,7 +25,7 @@ function script UserCtrlPanel {
l("Change Language"),
rif(is_admin() && $@GM_OVERRIDE, l("LoF Merge")),
l("Game Settings"),
- l("Quit");
+ l("Save & Exit");
switch (@menu)
{
@@ -145,6 +150,11 @@ function script UserCtrlPanel {
else
mes l("Autoreceive Strange Coins: ") + col(l("Enabled"), 2);
+ if (@unsaved) {
+ mes "";
+ mesc l("Careful: You have unsaved changes!"), 1;
+ }
+
mes "";
select
l("Return to User Control Panel"),
@@ -156,7 +166,8 @@ function script UserCtrlPanel {
switch (@menu) {
case 2:
GSET_SOULMENHIR_MANUAL=!GSET_SOULMENHIR_MANUAL;
- if (!GSET_SOULMENHIR_MANUAL) savepoint "000-1", 22, 22; break;
+ @unsaved=true;
+ break;
case 3:
GSET_DAILYREWARD_SILENT=!GSET_DAILYREWARD_SILENT; break;
case 4:
@@ -165,7 +176,13 @@ function script UserCtrlPanel {
clear;
} while (@menu != 1);
break;
- case 8: close; break;
+ case 8:
+ // Update savepoint if needed
+ if (@unsaved) {
+ if (!GSET_SOULMENHIR_MANUAL) savepoint "000-1", 22, 22;
+ else doevent "Emergency Exit::OnSetLX";
+ }
+ close; break;
}
} while (1);
}
diff --git a/npc/functions/siege.txt b/npc/functions/siege.txt
index 9149cfaa4..af6198446 100644
--- a/npc/functions/siege.txt
+++ b/npc/functions/siege.txt
@@ -67,7 +67,7 @@ function script siege_selectmob {
.@blv+=.@dif*3;
deletearray $@SIEGE_TMPMOBS;
- setarray $@SIEGE_TMPMOBS, ManaGhost, CandiedSlime, Bif;
+ setarray $@SIEGE_TMPMOBS, ManaGhost, CandiedSlime, Bif, SlimeBlast;
// Now we must select mobs, using array_push() to $@SIEGE_TMPMOBS
// First, mobs on all envs
siege_push(BlackScorpion, .@blv);