summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-09-10 13:13:58 -0300
committerJesusaves <cpntb1@ymail.com>2019-09-10 13:13:58 -0300
commit3428c42f3acbd3e6661d92d988c1cdefaa42264f (patch)
treead1fe716734d411e16116ab74d6809420e82b384 /npc/functions
parent9cdccc4bc94f87e8fa2f4647a9ddd807fff4ab51 (diff)
downloadserverdata-3428c42f3acbd3e6661d92d988c1cdefaa42264f.tar.gz
serverdata-3428c42f3acbd3e6661d92d988c1cdefaa42264f.tar.bz2
serverdata-3428c42f3acbd3e6661d92d988c1cdefaa42264f.tar.xz
serverdata-3428c42f3acbd3e6661d92d988c1cdefaa42264f.zip
Replace ~= with compare() in several places.
Make notes about how EXP on PVP shall work. And later, that will give place to an honor system :3 But that's priority 2 out of a maximum of 7, so, only notes for now.
Diffstat (limited to 'npc/functions')
-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
5 files changed, 16 insertions, 12 deletions
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)