summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-10-22 04:43:41 +0200
committerHaru <haru@dotalux.com>2014-10-30 01:22:52 +0100
commitb3aef69807e315f71109ee00755087303b5336df (patch)
treea4fd6889accd1d825ccc0016e405d8fad09ae41d
parentcf8d24e602cce90d8f7c22e3d4a04aca4b66a3f3 (diff)
downloadhercules-b3aef69807e315f71109ee00755087303b5336df.tar.gz
hercules-b3aef69807e315f71109ee00755087303b5336df.tar.bz2
hercules-b3aef69807e315f71109ee00755087303b5336df.tar.xz
hercules-b3aef69807e315f71109ee00755087303b5336df.zip
Deprecated checkmadogear and setmadogear commands
Replaced their use in scripts with checkmount and setmount, respectively. Signed-off-by: Haru <haru@dotalux.com>
-rw-r--r--db/re/item_db.conf6
-rw-r--r--doc/script_commands.txt8
-rw-r--r--npc/custom/breeder.txt19
-rw-r--r--npc/other/turbo_track.txt8
-rw-r--r--npc/re/merchants/renters.txt6
-rw-r--r--src/map/script.c4
6 files changed, 31 insertions, 20 deletions
diff --git a/db/re/item_db.conf b/db/re/item_db.conf
index 42cd378f1..0f6d51c72 100644
--- a/db/re/item_db.conf
+++ b/db/re/item_db.conf
@@ -80155,7 +80155,7 @@ item_db: (
Job: 0x00000400
Upper: 63
BuyingStore: true
- Script: <" if(checkmadogear()) itemheal rand(200,300),0; ">
+ Script: <" if(checkmount() == MOUNT_MADO) itemheal rand(200,300),0; ">
},
{
Id: 12393
@@ -80167,7 +80167,7 @@ item_db: (
Job: 0x00000400
Upper: 63
BuyingStore: true
- Script: <" if(checkmadogear()) itemheal rand(300,400),0; ">
+ Script: <" if(checkmount() == MOUNT_MADO) itemheal rand(300,400),0; ">
},
{
Id: 12394
@@ -80179,7 +80179,7 @@ item_db: (
Job: 0x00000400
Upper: 63
BuyingStore: true
- Script: <" if(checkmadogear()) itemheal rand(400,500),0; ">
+ Script: <" if(checkmount() == MOUNT_MADO) itemheal rand(400,500),0; ">
},
{
Id: 12395
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 7e00e50dc..7c4a90003 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -3921,7 +3921,13 @@ riding a dragon and 0 if they aren't.
*setmadogear {<flag>};
*checkmadogear()
-[ DEPRECATED - Please use setmount / checkmount]
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ @ /!\ This command is deprecated @
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+
+This command is deprecated and it should not be used in new scripts, as it
+is scheduled to be removed on or after November 30th, 2014. Please consider
+using setmount and checkmount() instead.
If <flag> is 0 this command will remove the mount from the character.
Otherwise it gives the invoking character a Mado (if they are a Mechanic).
diff --git a/npc/custom/breeder.txt b/npc/custom/breeder.txt
index af4a740b4..252511355 100644
--- a/npc/custom/breeder.txt
+++ b/npc/custom/breeder.txt
@@ -11,6 +11,8 @@
//============================================================
prontera,124,201,1 script Universal Rental NPC 4_F_JOB_BLACKSMITH,{
+ /* TODO: This can be optimized with just setmount(), as it can
+ auto-detect the proper mount for the class/skills. */
if (hascashmount()) {
message strcharinfo(0),"You must first remove your mount.";
end;
@@ -24,10 +26,13 @@ prontera,124,201,1 script Universal Rental NPC 4_F_JOB_BLACKSMITH,{
}
else getitem 6124,1;
}
- else if ((eaclass()&EAJ_THIRDMASK) == EAJ_MECHANIC && !checkcart() && getskilllv("MC_PUSHCART")) {
- if (!checkmadogear() && getskilllv("NC_MADOLICENCE")) {
- if(select(" ~ Cart: ~ Mado")==1) setcart;
- else setmadogear;
+ else if ((eaclass()&EAJ_THIRDMASK) == EAJ_MECHANIC && !checkcart() && getskilllv(MC_PUSHCART)) {
+ if (!checkmount() != MOUNT_MADO && getskilllv(NC_MADOLICENCE)) {
+ if (select(" ~ Cart: ~ Mado") == 1) {
+ setcart;
+ } else {
+ setmount(MOUNT_MADO);
+ }
specialeffect2 EF_TEIHIT3;
close;
}
@@ -38,9 +43,9 @@ prontera,124,201,1 script Universal Rental NPC 4_F_JOB_BLACKSMITH,{
else if (!checkriding() && getskilllv("KN_RIDING")) {
if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) setdragon;
else setriding;
- }
- else if (!checkmadogear() && getskilllv("NC_MADOLICENCE")) setmadogear;
- else {
+ } else if (checkmount() != MOUNT_MADO && getskilllv(NC_MADOLICENCE)) {
+ setmount(MOUNT_MADO);
+ } else {
message strcharinfo(0),"You do not meet requirements to rent.";
end;
}
diff --git a/npc/other/turbo_track.txt b/npc/other/turbo_track.txt
index 5cc10d624..28451f9bb 100644
--- a/npc/other/turbo_track.txt
+++ b/npc/other/turbo_track.txt
@@ -4648,7 +4648,7 @@ OnTouch:
setoption Option_Wugrider,0;
warp "turbo_room",100,65;
}
- } else if ((Class == Job_Mechanic || Class == Job_Mechanic_T || Class == Job_Baby_Mechanic) && checkmadogear()) {
+ } else if ((Class == Job_Mechanic || Class == Job_Mechanic_T || Class == Job_Baby_Mechanic) && checkmount() == MOUNT_MADO) {
if (MaxWeight-Weight < 20000) {
mes "[Helper]";
mes "Magic Gears are prohibited";
@@ -4660,7 +4660,7 @@ OnTouch:
warp "alde_gld",183,199;
end;
} else {
- setmadogear 0;
+ setmount(MOUNT_NONE);
warp "turbo_room",100,65;
}
} else
@@ -4730,7 +4730,7 @@ alde_gld,186,199,3 script Turbo Track Guide#Entran 4_F_RACING,{
set .@mount$,"Magic Gear";
set .@skill,2255;
set .@skill$,"Magic Gear License";
- set .@riding, checkmadogear();
+ set .@riding, checkmount() == MOUNT_MADO ? true : false; // FIXME
set .@i,3;
} else {
mes "Thank you for";
@@ -4783,7 +4783,7 @@ alde_gld,186,199,3 script Turbo Track Guide#Entran 4_F_RACING,{
switch(.@i) {
case 1: setriding; break;
case 2: setdragon; break;
- case 3: setmadogear; break;
+ case 3: setmount(MOUNT_MADO); break;
}
mes .@n$;
mes "Thank you for";
diff --git a/npc/re/merchants/renters.txt b/npc/re/merchants/renters.txt
index 781467e20..e245968f0 100644
--- a/npc/re/merchants/renters.txt
+++ b/npc/re/merchants/renters.txt
@@ -165,13 +165,13 @@ prontera,125,208,5 script Peco Peco Remover 8W_SOLDIER,{
mes "There you go!";
close;
case 2:
- if (checkmadogear()) {
+ if (checkmount() == MOUNT_MADO) {
mes "[Magic Gear Master]";
mes "I'm sorry, but you're already";
mes "riding a Magic Gear.";
close;
}
- else if (!getskilllv("NC_MADOLICENCE")) {
+ else if (!getskilllv(NC_MADOLICENCE)) {
mes "[Magic Gear Master]";
mes "Please learn the skill to get the Magic Gear License first.";
close;
@@ -180,7 +180,7 @@ prontera,125,208,5 script Peco Peco Remover 8W_SOLDIER,{
mes "Please remove your cash mount.";
close;
}
- setmadogear;
+ setmount(MOUNT_MADO);
mes "[Magic Gear Master]";
mes "Have fun, and please come again!";
close;
diff --git a/src/map/script.c b/src/map/script.c
index 1885c3c2c..11fef0f07 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -19074,8 +19074,8 @@ void script_parse_builtin(void) {
BUILDIN_DEF(setmount,"?"),
BUILDIN_DEF(checkmount,""),
BUILDIN_DEF(checkwug,""),
- BUILDIN_DEF(checkmadogear,""),
- BUILDIN_DEF(setmadogear,"?"),
+ BUILDIN_DEF_DEPRECATED(checkmadogear,""), // Deprecated 2014-10-30 [Haru]
+ BUILDIN_DEF_DEPRECATED(setmadogear,"?"), // Deprecated 2014-10-30 [Haru]
BUILDIN_DEF2(savepoint,"save","sii"),
BUILDIN_DEF(savepoint,"sii"),
BUILDIN_DEF(gettimetick,"i"),