summaryrefslogtreecommitdiff
path: root/npc/custom
diff options
context:
space:
mode:
authorEmistry <Equinox1991@gmail.com>2016-01-25 23:00:26 +0800
committerHaru <haru@dotalux.com>2016-02-29 01:52:22 +0100
commit05a2538114972de94352e66586f6f2a5affea9c6 (patch)
treef39d3e659d9b3801cc42a7b14e41aeec16c93ddf /npc/custom
parent75ba7024fe3b68718d0f0a289a68ea0719054d3b (diff)
downloadhercules-05a2538114972de94352e66586f6f2a5affea9c6.tar.gz
hercules-05a2538114972de94352e66586f6f2a5affea9c6.tar.bz2
hercules-05a2538114972de94352e66586f6f2a5affea9c6.tar.xz
hercules-05a2538114972de94352e66586f6f2a5affea9c6.zip
Replaced the SEX_FEMALE/SEX_MALE constants to scripts, where appropriate
Diffstat (limited to 'npc/custom')
-rw-r--r--npc/custom/etc/airplane.txt12
-rw-r--r--npc/custom/etc/marriage.txt40
-rw-r--r--npc/custom/etc/penal_servitude.txt5
-rw-r--r--npc/custom/events/uneasy_cemetery.txt12
4 files changed, 38 insertions, 31 deletions
diff --git a/npc/custom/etc/airplane.txt b/npc/custom/etc/airplane.txt
index 138755f6b..99260f455 100644
--- a/npc/custom/etc/airplane.txt
+++ b/npc/custom/etc/airplane.txt
@@ -252,8 +252,10 @@ L_Nope:
Notime:
mes "^FF0000[Porter]^000000";
- if(Sex==0) mes "Sorry, ma'am, but the plane currently isn't ported. However, you can view the airplane's hourly itinerary.";
- if(Sex==1) mes "Sorry, sir, but the plane currently isn't ported. However, you can view the airplane's hourly itinerary.";
+ if (Sex == SEX_FEMALE)
+ mes "Sorry, ma'am, but the plane currently isn't ported. However, you can view the airplane's hourly itinerary.";
+ else
+ mes "Sorry, sir, but the plane currently isn't ported. However, you can view the airplane's hourly itinerary.";
next;
menu "Yes, please.",Itin,"No thanks.",L_Nope;
close;
@@ -363,8 +365,10 @@ Lnope:
Notime:
mes "^FF0000[Airplane Attendant]^000000";
- if(Sex==0) mes "Sorry, ma'am, but the plane currently isn't docked. Please wait.";
- if(Sex==1) mes "Sorry, sir, but the plane currently isn't docked. Please wait.";
+ if (Sex == SEX_FEMALE)
+ mes "Sorry, ma'am, but the plane currently isn't docked. Please wait.";
+ else
+ mes "Sorry, sir, but the plane currently isn't docked. Please wait.";
close;
Nowhere:
diff --git a/npc/custom/etc/marriage.txt b/npc/custom/etc/marriage.txt
index 1d6d21c2a..2af343023 100644
--- a/npc/custom/etc/marriage.txt
+++ b/npc/custom/etc/marriage.txt
@@ -267,10 +267,10 @@ function SF_RetrieveRingM {
mes "What happened to your "+getitemname($@wed_ring)+"? You didn't lose it... did you? We need it to continue with the ceremony!";
close;
}
- if ($wed_bride_sex)
- set @item, 2634; //Groom's wedding ring
+ if ($wed_bride_sex == SEX_MALE)
+ @item = 2634; //Groom's wedding ring
else
- set @item, 2635; //Bride's wedding ring
+ @item = 2635; //Bride's wedding ring
if (getnameditem(@item,$wed_groom$) == 0) {
mes "You don't seem to have enough space to carry the ring... go free up some space and come back to reclaim your partner's ring.";
close;
@@ -293,10 +293,10 @@ function SF_RetrieveRingF {
mes "What happened to your "+getitemname($@wed_ring)+"? You didn't lose it... did you? We need it to continue with the ceremony!";
close;
}
- if ($wed_groom_sex)
- set @item, 2634; //Groom's wedding ring
+ if ($wed_groom_sex == SEX_MALE)
+ @item = 2634; //Groom's wedding ring
else
- set @item, 2635; //Bride's wedding ring
+ @item = 2635; //Bride's wedding ring
if (getnameditem(@item,$wed_bride$) == 0) {
mes "You don't seem to have enough space to carry the ring... go free up some space and come back to reclaim your partner's ring.";
@@ -392,19 +392,19 @@ OnTimer55000:
//Subfunction: Checks that the groom/bride is still wearing their stuff.
function SF_equip_check {
- if (Sex && getequipid(2) != 7170) {
+ if (Sex == SEX_MALE && getequipid(2) != 7170) {
mes "["+@name$+"]";
mes "Child, what did you do with your "+getitemname(7170)+"?";
emotion e_dots;
return 0;
}
- if (Sex == 0 && getequipid(2) != 2338) {
+ if (Sex == SEX_FEMALE && getequipid(2) != 2338) {
mes "["+@name$+"]";
mes "Child, you are supposed to wear a "+getitemname(2338)+" at all times during the ceremony...";
emotion e_dots;
return 0;
}
- if (Sex == 0 && $@wed_veil && getequipid(1) != 2206) {
+ if (Sex == SEX_FEMALE && $@wed_veil && getequipid(1) != 2206) {
mes "["+@name$+"]";
mes "Child, you can't take off your "+getitemname(2206)+" yet....";
emotion e_dots;
@@ -416,9 +416,9 @@ function SF_equip_check {
//Subfunction: Resets wedding variables.
function SF_wed_end {
set $wed_groom$,"";
- set $wed_groom_sex, 0;
+ $wed_groom_sex = -1;
set $wed_bride$,"";
- set $wed_bride_sex, 0;
+ $wed_bride_sex = -1;
set $wed_groom_progress,0;
set $wed_bride_progress,0;
set $wed_progress,0;
@@ -487,7 +487,7 @@ function SF_Register {
mes "Very well, whom would you like to register as?";
next;
set @submenu, select("Groom","Bride","Cancel");
- } else if (Sex) { //Groom
+ } else if (Sex == SEX_MALE) { //Groom
mes "["+@name$+"]";
mes "Very well, will you register as the Groom?";
next;
@@ -547,7 +547,7 @@ function SF_WedProgress {
mes "Tell your groom to register, what is taking so long? Time is running out.";
close;
}
- if (($wed_groom_progress == 0) && (Sex == 1 || $@wed_allow == 1)) {
+ if ($wed_groom_progress == 0 && (Sex == SEX_MALE || $@wed_allow == 1)) {
mes "["+@name$+"]";
mes $wed_bride$+" is waiting for the groom to register. Are you the one who came to register as groom?";
next;
@@ -569,7 +569,7 @@ function SF_WedProgress {
}
}
- if (($wed_bride_progress == 0) && (Sex == 0 || $@wed_allow == 1)) {
+ if ($wed_bride_progress == 0 && (Sex == SEX_FEMALE || $@wed_allow == 1)) {
mes "["+@name$+"]";
mes $wed_groom$+" is waiting for the bride to register. Are you the one who came to register as the bride?";
next;
@@ -660,9 +660,9 @@ OnTimer60000:
emotion e_hmm;
set $wed_groom$,"";
- set $wed_groom_sex, 0;
+ $wed_groom_sex = -1;
set $wed_bride$,"";
- set $wed_bride_sex, 0;
+ $wed_bride_sex = -1;
set $wed_groom_progress,0;
set $wed_bride_progress,0;
set $wed_progress,0;
@@ -685,7 +685,7 @@ function SF_TryRegister {
emotion e_gasp;
close;
}
- if (Sex)
+ if (Sex == SEX_MALE)
set @item, 7170;
else
set @item, 2338;
@@ -695,7 +695,7 @@ function SF_TryRegister {
mes "You should be wearing a "+getitemname(@item)+" if you want to get married.";
close;
}
- if (Sex == 0 && $@wed_veil && getequipid(1) != 2206) {
+ if (Sex == SEX_FEMALE && $@wed_veil && getequipid(1) != 2206) {
mes "["+@name$+"]";
mes "Where is your "+getitemname(2206)+"? It's a necessary complement to your dress.";
close;
@@ -721,13 +721,13 @@ function SF_TryRegister {
if (@bride) {
set $wed_bride_progress,1;
set $wed_bride$,strcharinfo(0);
- set $wed_bride_sex, Sex;
+ $wed_bride_sex = Sex;
if ($@wedding_effect == 1) //Store account id for effect.
set $wedding_effect_id, getcharid(3);
} else {
set $wed_groom_progress,1;
set $wed_groom$,strcharinfo(0);
- set $wed_groom_sex, Sex;
+ $wed_groom_sex = Sex;
if ($@wedding_effect == 2) //Store account id for effect.
set $wedding_effect_id, getcharid(3);
}
diff --git a/npc/custom/etc/penal_servitude.txt b/npc/custom/etc/penal_servitude.txt
index 8566fb871..5d1067d05 100644
--- a/npc/custom/etc/penal_servitude.txt
+++ b/npc/custom/etc/penal_servitude.txt
@@ -17,11 +17,10 @@
sec_pri,36,58,1 script Chief Warder 8W_SOLDIER,{
mes "[Saddeus]";
emotion 1;
- if(Sex) {
+ if (Sex == SEX_MALE)
mes "Mr. Prisoner #"+BaseLevel+JobLevel+",";
- } else {
+ else
mes "Ms. Prisoner #"+BaseLevel+JobLevel+",";
- }
mes "what's the noise over there?";
next;
menu "Let me free, I'll pay!",-, "Let me to work off my freedom!",M_Q1, "Nothing",M_NO_THANKS;
diff --git a/npc/custom/events/uneasy_cemetery.txt b/npc/custom/events/uneasy_cemetery.txt
index 6b1351eb4..99c1f21cb 100644
--- a/npc/custom/events/uneasy_cemetery.txt
+++ b/npc/custom/events/uneasy_cemetery.txt
@@ -45,8 +45,10 @@ OnZombieDead:
if ($@UNEASY_MOB>0) end;
set $UNEASY_DL,0;
set $UNEASY_H$,strcharinfo(0);
- if (Sex==1) mapannounce "prontera","[Mother Mathana]: Brave "+$UNEASY_H$+" has just killed the last undead in Prontera!",0;
- if (Sex==0) mapannounce "prontera","[Mother Mathana]: Lady "+$UNEASY_H$+" has just killed the last undead in Prontera!",0;
+ if (Sex == SEX_MALE)
+ mapannounce "prontera","[Mother Mathana]: Brave "+$UNEASY_H$+" has just killed the last undead in Prontera!",0;
+ else
+ mapannounce "prontera","[Mother Mathana]: Lady "+$UNEASY_H$+" has just killed the last undead in Prontera!",0;
set JobExp,JobExp+100;
set BaseExp,BaseExp+50;
end;
@@ -103,8 +105,10 @@ L_Undead_Walk:
mes "[Mother Mathana]";
mes "Our Church is going to thank you personally...";
next;
- if (Sex==1) mapannounce "prontera","[Mother Mathana]: In the name of Odin we declare handsom "+$UNEASY_H$+" as a Prontera savior!",0;
- if (Sex==0) mapannounce "prontera","[Mother Mathana]: In the name of Odin we declare beautiful "+$UNEASY_H$+" as a Prontera savior!",0;
+ if (Sex == SEX_MALE)
+ mapannounce "prontera","[Mother Mathana]: In the name of Odin we declare handsom "+$UNEASY_H$+" as a Prontera savior!",0;
+ else
+ mapannounce "prontera","[Mother Mathana]: In the name of Odin we declare beautiful "+$UNEASY_H$+" as a Prontera savior!",0;
mes "[Mother Mathana]";
mes "In the name of Odin we bless you and decently present a modest gift just from Mareusis' wine-cellar.";
getitem Blue_Potion,1;