summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
Diffstat (limited to 'npc')
-rw-r--r--npc/002-1/peter.txt4
-rw-r--r--npc/005-1-1/main.txt2
-rw-r--r--npc/018-2-2/main.txt2
-rw-r--r--npc/018-5-boss/command.txt2
-rw-r--r--npc/commands/event.txt4
-rw-r--r--npc/functions/daily.txt2
-rw-r--r--npc/functions/gmbot.txt8
-rw-r--r--npc/functions/hub.txt2
-rw-r--r--npc/functions/mobpoint.txt12
-rw-r--r--npc/functions/soul_menhir.txt4
10 files changed, 23 insertions, 19 deletions
diff --git a/npc/002-1/peter.txt b/npc/002-1/peter.txt
index 1dcb89b8b..67a000eff 100644
--- a/npc/002-1/peter.txt
+++ b/npc/002-1/peter.txt
@@ -69,7 +69,7 @@ L_Task:
close;
OnLowTime:
- if ((getmap() ~= "002-2") || (getmap() ~= "nard*"))
+ if ((compare(getmap(), "002-2")) || (compare(getmap(), "nard")))
dispbottom l("Time is running out... Hurry up!");
end;
@@ -223,7 +223,7 @@ OnStartOutside:
close;
OnTimeout:
- if (!(getmap() ~= "002-2") && !(getmap() ~= "nard*"))
+ if (!(compare(getmap(), "002-2")) && !(compare(getmap(), "nard")))
end;
warp "002-1@"+LOCATION$, 35, 26;
.@q3 = getq3(ShipQuests_Peter);
diff --git a/npc/005-1-1/main.txt b/npc/005-1-1/main.txt
index d940ccd54..f7d1ab672 100644
--- a/npc/005-1-1/main.txt
+++ b/npc/005-1-1/main.txt
@@ -171,7 +171,7 @@ OnInteract:
htidelete(.@hti);
// Continue the cycle
- if (getmap() ~= "MRGO*" || getmap() ~= "005-1-1")
+ if (compare(getmap(), "MRGO") || compare(getmap(), "005-1-1"))
addtimer(400, "Nylo#Marggo::OnInteract");
end;
diff --git a/npc/018-2-2/main.txt b/npc/018-2-2/main.txt
index 2aab62ec2..cfa69dc8b 100644
--- a/npc/018-2-2/main.txt
+++ b/npc/018-2-2/main.txt
@@ -85,7 +85,7 @@ OnPlayerCycle:
}
// Continue the execution
- if (getmap() ~= "018-2-*")
+ if (compare(getmap(), "018-2-"))
addtimer(500, "#HH_CONTROLLER01::OnPlayerCycle");
end;
diff --git a/npc/018-5-boss/command.txt b/npc/018-5-boss/command.txt
index 0985a6fbe..119b14ffc 100644
--- a/npc/018-5-boss/command.txt
+++ b/npc/018-5-boss/command.txt
@@ -38,7 +38,7 @@ OnBegin:
end;
OnCycle:
- if (!(getmap() ~= "lilt*" ) || ispcdead())
+ if (!(compare(getmap(), "lilt") ) || ispcdead())
end;
@YETIFLY_CYCLE+=1;
diff --git a/npc/commands/event.txt b/npc/commands/event.txt
index c173f8090..4982d85f1 100644
--- a/npc/commands/event.txt
+++ b/npc/commands/event.txt
@@ -262,11 +262,11 @@ OnEffect:
dispbottom l("You cannot be fighting to do this trip.");
atcommand "@refresh";
end;
- } else if (getmapname() ~= "001-*" || (getmapinfo(MAPINFO_ZONE, getmap())) == "MMO") {
+ } else if (compare(getmapname(), "001-") || (getmapinfo(MAPINFO_ZONE, getmap())) == "MMO") {
dispbottom l("You are already at the Mana Plane of Existence.");
atcommand "@refresh";
end;
- } else if (getmapname() == "boss" || getmapname() == "sec_pri" || getmapname() ~= "000-*" || getmapname() ~= "008-*" || getmapname() ~= "sore*") {
+ } else if (getmapname() == "boss" || getmapname() == "sec_pri" || compare(getmapname(), "000-") || compare(getmapname(), "008-") || compare(getmapname(), "sore")) {
dispbottom l("The Mana Plane is currently out of reach.");
atcommand "@refresh";
end;
diff --git a/npc/functions/daily.txt b/npc/functions/daily.txt
index 8f4b71551..ab97b038c 100644
--- a/npc/functions/daily.txt
+++ b/npc/functions/daily.txt
@@ -33,7 +33,7 @@ function script daily_login_bonus_handler {
if (#LOGIN_DAY != gettime(5)) {
// demure check: Are you on a start area?
getmapxy(.@m$,.@x,.@y,0);
- if (.@m$ ~= "000")
+ if (compare(.@m$, "000-0"))
return;
//debugmes "[DLBH] Mapcheck ok";
diff --git a/npc/functions/gmbot.txt b/npc/functions/gmbot.txt
index cb053f14a..f71334435 100644
--- a/npc/functions/gmbot.txt
+++ b/npc/functions/gmbot.txt
@@ -155,28 +155,28 @@ OnTimer90000:
if ($GAME_STORYLINE == 3)
.@delta=12;
// Tulimshar
- if (.mp$ ~= "003-*") {
+ if (compare(.mp$, "003-")) {
announce ("Monster King: I smell humans! Humans must die!"), bc_map|bc_npc;
$@MK_THROTTLE=gettimetick(2)+.@delta*60*60;
$@MK_SCENE=MK_SIEGE_TULIM;
donpcevent("Lieutenant Dausen::OnMKSiege");
}
// Halinarzo
- else if (.mp$ ~= "009-*") {
+ else if (compare(.mp$, "009-")) {
announce ("Monster King: I smell humans! Humans must die!"), bc_map|bc_npc;
$@MK_THROTTLE=gettimetick(2)+.@delta*60*60;
$@MK_SCENE=MK_SIEGE_HALIN;
donpcevent("Lieutenant Jacob::OnMKSiege");
}
// Hurnscald
- else if (.mp$ ~= "012-*") {
+ else if (compare(.mp$, "012-")) {
announce ("Monster King: I smell humans! Humans must die!"), bc_map|bc_npc;
$@MK_THROTTLE=gettimetick(2)+.@delta*60*60;
$@MK_SCENE=MK_SIEGE_HURNS;
donpcevent("#HurnscaldSiege::OnMKSiege");
}
// Nivalis
- else if (.mp$ ~= "020-*") {
+ else if (compare(.mp$, "020-")) {
announce ("Monster King: I smell humans! Humans must die!"), bc_map|bc_npc;
$@MK_THROTTLE=gettimetick(2)+.@delta*60*60;
$@MK_SCENE=MK_SIEGE_NIVAL;
diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt
index 311cc0272..72ac5d1cb 100644
--- a/npc/functions/hub.txt
+++ b/npc/functions/hub.txt
@@ -44,7 +44,7 @@ function script HUB_Logout {
setq HurnscaldQuest_BloodDonor, 0, gettimetick(2)+3600; // one hour penalty
}
// Logout/Death on Nard's ship hold
- if (.@mapa$ ~= "002-2" || compare(.@mapa$,"nard")) {
+ if (compare(.@mapa$, "002-2") || compare(.@mapa$,"nard")) {
setq2 ShipQuests_Peter, 0;
setq3 ShipQuests_Peter, -1;
}
diff --git a/npc/functions/mobpoint.txt b/npc/functions/mobpoint.txt
index d525ed616..81c2030d7 100644
--- a/npc/functions/mobpoint.txt
+++ b/npc/functions/mobpoint.txt
@@ -68,21 +68,25 @@ OnPCKillEvent:
$PLAYERS_KILLED+=1;
// killedrid
.@m$=getmap();
+ // TODO: Start using readparam2() to read if the opponent was worthy
+ // That is, read total attack, defense, HP, evasion and hit chance
+ // And compare with your own readparam2(), then use a % and a table
+ // based on your (assassin's) level.
.@bxp=readparam(BaseLevel, killedrid);
.@jxp=readparam(JobLevel, killedrid);
- if (.@m$ ~= "001-8") {
+ if (compare(.@m$, "001-8")) {
// Quirino Voraz PVP Arena
// You get 5 times killed player level, and 1 time job level
getexp .@bxp*5, .@jxp;
- } else if (.@m$ ~= "ARENA" || .@m$ ~= "003-13") {
+ } else if (compare(.@m$, "ARENA") || compare(.@m$, "003-13")) {
// Tulimshar Duel Arena
// You get 3 times killed player level, and 2 times job level
getexp .@bxp*3, .@jxp*2;
- } else if (.@m$ ~= "001-10") {
+ } else if (compare(.@m$, "001-10")) {
// Call Of Dusty
// You get 3 times killed player level, and 3 times job level
getexp .@bxp*3, .@jxp*3;
- } else if (.@m$ ~= "001-10-1") {
+ } else if (compare(.@m$, "001-10-1")) {
// Call Of Dusty Boss Room
// You _may_ get a Bottled Dusty at random, but dead player status affect
.@bagistr=(readparam(bAgi, killedrid)*2)+readparam(bDex, killedrid);
diff --git a/npc/functions/soul_menhir.txt b/npc/functions/soul_menhir.txt
index f44cc7b3b..968eb83bf 100644
--- a/npc/functions/soul_menhir.txt
+++ b/npc/functions/soul_menhir.txt
@@ -25,9 +25,9 @@ function script SoulMenhir {
// goto L_Return;
L_Bind:
- if (@map$ ~= "003-1" && !(TELEPORTERS & TP_TULIM))
+ if (@map$ == "003-1" && !(TELEPORTERS & TP_TULIM))
TELEPORTERS=TELEPORTERS|TP_TULIM;
- if (@map$ ~= "012-1" && !(TELEPORTERS & TP_HURNS))
+ if (@map$ == "012-1" && !(TELEPORTERS & TP_HURNS))
TELEPORTERS=TELEPORTERS|TP_HURNS;
if (Menhir_Activated == 1)