summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2025-01-12 21:47:15 -0300
committerJesusaves <cpntb1@ymail.com>2025-01-12 21:47:15 -0300
commit1fb07ae6bbd9ad941e112f81228bde2dfdf376ff (patch)
tree3bf528f7670d9cb9bdfc84420c536adf87601263
parentf90fab19a4c2f2c65e0d02dca214e2d776a02e09 (diff)
downloadserverdata-1fb07ae6bbd9ad941e112f81228bde2dfdf376ff.tar.gz
serverdata-1fb07ae6bbd9ad941e112f81228bde2dfdf376ff.tar.bz2
serverdata-1fb07ae6bbd9ad941e112f81228bde2dfdf376ff.tar.xz
serverdata-1fb07ae6bbd9ad941e112f81228bde2dfdf376ff.zip
Fix stuff :)
-rw-r--r--npc/003-3/malindou.txt4
-rw-r--r--npc/functions/bank.txt13
-rw-r--r--npc/functions/event.txt2
3 files changed, 13 insertions, 6 deletions
diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt
index bd49b3e11..73f232013 100644
--- a/npc/003-3/malindou.txt
+++ b/npc/003-3/malindou.txt
@@ -11,11 +11,15 @@
close;
OnScoutPing:
+ // Check for termination
+ if (!MERCHANT_ID)
+ end;
// Check for failure
if (getunittype(MERCHANT_ID) != UNITTYPE_MOB) {
dispbottom l("The associate teleports away to avoid an injury. You have failed the escorting quest.");
setq General_MerchantRequest, MERCQ_NONE, 0, gettimetick(2)+900;
MERCHANT_ID = 0;
+ end;
}
// Map fix
getmapxy(.@m$, .@x, .@y, 0);
diff --git a/npc/functions/bank.txt b/npc/functions/bank.txt
index e6b77be5b..6459eed36 100644
--- a/npc/functions/bank.txt
+++ b/npc/functions/bank.txt
@@ -425,7 +425,10 @@ function script MerchantQuest {
mes "";
if (@menu == 1)
return;
+ deltimer("Malindou::OnScoutPing");
setq General_MerchantRequest, MERCQ_NONE, 0, gettimetick(2);
+ unitkill(MERCHANT_ID);
+ MERCHANT_ID = 0;
}
break;
}
@@ -441,7 +444,7 @@ function script MerchantQuest {
l("How does this works?"),
rif(.@town != .@id, l("★ Deliver a letter")),
l("★★ Purchase goods"),
- rif(is_sponsor() && .@town != .@id, l("★★★ Scout a merchant")),
+ rif(.@town != .@id, l("★★★ Scout a merchant")),
l("Sorry, I won't accept any.");
mes "";
switch (@menu) {
@@ -485,13 +488,13 @@ function script MerchantQuest {
if (askyesno() == ASK_YES) {
mesc l("I'm counting on you!");
getmapxy(.@m$, .@x, .@y, 0);
- MERCHANT_ID=monster(.@m$, .@x, .@y, "Merchant", any(GameMaster, GameMistress), 1);
+ MERCHANT_ID=monster(.@m$, .@x, .@y, "Merchant", any(GameMaster, GameMistress), 1, "Malindou::OnScoutPing", Size_Medium, 2);
// Could also be a Gladiator, as long that you can distinguish them
setunitdata(MERCHANT_ID, UDT_MAXHP, 1);
setunitdata(MERCHANT_ID, UDT_HP, 1);
- setunitdata(MERCHANT_ID, UDT_DEF, 1);
- setunitdata(MERCHANT_ID, UDT_MDEF, 1);
- setunitdata(MERCHANT_ID, UDT_FLEE, 1);
+ setunitdata(MERCHANT_ID, UDT_DEF, 2);
+ setunitdata(MERCHANT_ID, UDT_MDEF, 2);
+ setunitdata(MERCHANT_ID, UDT_FLEE, 2);
setunitdata(MERCHANT_ID, UDT_LEVEL, 1);
// Timer which makes Merchant follow you every once in a while
@merc_map$ = getmap();
diff --git a/npc/functions/event.txt b/npc/functions/event.txt
index 4bddb9568..603f5c607 100644
--- a/npc/functions/event.txt
+++ b/npc/functions/event.txt
@@ -192,7 +192,7 @@ OnTimer90000:
}
// Handle Siege season
- if ($EVENT$ == "Siege" && (.users >= 3 || $@GM_OVERRIDE) && !$@MK_SCENE && !$@GM_EVENT && rand2(199999) < .users) {
+ if ($EVENT$ == "Siege" && (.users >= 3 || $@GM_OVERRIDE) && !$@MK_SCENE && !$@GM_EVENT && rand2(19999) < .users) {
$@SIEGE_ABORTED = false;
.@towns = rand2(1, 15);
kamibroadcast("Monster King! Seize and destroy some towns!", "Moubootaur");