summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-05-23 23:15:32 -0300
committerJesusaves <cpntb1@ymail.com>2019-05-23 23:15:32 -0300
commit6a3facc4987f5bc32c87e6c1de96ef63d00c88dc (patch)
tree98f49f70494391e619e7b53be3b31a2b07dcff21 /npc/functions
parentb5db91cfc1e49aaed06437a0709c8a3c782958bb (diff)
downloadserverdata-6a3facc4987f5bc32c87e6c1de96ef63d00c88dc.tar.gz
serverdata-6a3facc4987f5bc32c87e6c1de96ef63d00c88dc.tar.bz2
serverdata-6a3facc4987f5bc32c87e6c1de96ef63d00c88dc.tar.xz
serverdata-6a3facc4987f5bc32c87e6c1de96ef63d00c88dc.zip
Meh, map zone changing is a mess >.>
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/siege.txt13
1 files changed, 8 insertions, 5 deletions
diff --git a/npc/functions/siege.txt b/npc/functions/siege.txt
index 1522549fb..63035ddc0 100644
--- a/npc/functions/siege.txt
+++ b/npc/functions/siege.txt
@@ -150,7 +150,7 @@ function script siege_selectmob {
// Prepare a siege with optional announce
// siege_setup ( map )
function script siege_setup {
- .@m$=getarg(0);
+ .@m$=getarg(0, "012-1");
// Save old map zone
$@MZONE$[getmapinfo(MAPINFO_ID, .@m$)]=getmapinfo(MAPINFO_ZONE, .@m$);
@@ -188,12 +188,13 @@ function script siege_check {
// Revert what siege_setup did
// siege_revert ( map )
function script siege_revert {
- .@m$=getarg(0);
+ .@m$=getarg(0, "012-1");
// Revert map zone (to town, or to blank) and delete backup
removemapflag(.@m$,mf_zone);
//setmapflag(.@m$,mf_zone,$@MZONE$[getmapinfo(MAPINFO_ID, .@m$)]);
- setmapflag(.@m$,mf_zone,"Normal");
+ setmapflag(.@m$,mf_zone,"Normal"); // Broken for some reason
+ setmapflag(.@m$,mf_zone,"All");
$@MZONE$[getmapinfo(MAPINFO_ID, .@m$)]="";
removemapmask .@m$, MASK_MATTACK;
@@ -201,6 +202,7 @@ function script siege_revert {
enablenpc("Mana Stone");
pvpoff(.@m$);
removemapflag(.@m$,mf_bexp);
+ removemapflag(.@m$,mf_nosave);
setmapflag(.@m$,mf_bexp,100);
killmonsterall(.@m$);
return;
@@ -406,11 +408,12 @@ function script do_siege {
siege_cast(.@m$, .@n$, getd("$@SIEGE_"+.@c$), .@tp);
break;
// Ending flow
- case (MK_SIEGE_DURATION-90):
+ // TODO: It would be better to make these values relative to MK_SIEGE_DURATION
+ case 700:
mapannounce("012-1", "##1The Monster Army is planning to retreat soon!", bc_map);
siege_cast(.@m$, .@n$, getd("$@SIEGE_"+.@c$), .@tp);
break;
- case (MK_SIEGE_DURATION-30):
+ case 760:
mapannounce("012-1", "##1The Monster Army is withdrawing within 30 seconds!", bc_map);
$@MK_SCENE=MK_NONE;
$@MK_AGGRO=$@MK_AGGRO/20;