diff options
author | Haru <haru@dotalux.com> | 2014-10-22 05:20:14 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2014-10-30 01:22:52 +0100 |
commit | c6f102ef8f7a08903617e70135fca5ccfe11b75a (patch) | |
tree | a7736515f920d80baa581570372b2fed87dc9cd5 /npc | |
parent | a852bdd4c04fd3e6c08e950a320f0e78d61b3673 (diff) | |
download | hercules-c6f102ef8f7a08903617e70135fca5ccfe11b75a.tar.gz hercules-c6f102ef8f7a08903617e70135fca5ccfe11b75a.tar.bz2 hercules-c6f102ef8f7a08903617e70135fca5ccfe11b75a.tar.xz hercules-c6f102ef8f7a08903617e70135fca5ccfe11b75a.zip |
Deprecated checkriding and setriding commands
Replaced their use in scripts with checkmount and setmount,
respectively.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'npc')
-rw-r--r-- | npc/custom/breeder.txt | 33 | ||||
-rw-r--r-- | npc/custom/etc/penal_servitude.txt | 4 | ||||
-rw-r--r-- | npc/custom/jobmaster.txt | 4 | ||||
-rw-r--r-- | npc/events/event_skill_reset.txt | 6 | ||||
-rw-r--r-- | npc/events/halloween_2008.txt | 2 | ||||
-rw-r--r-- | npc/jobs/valkyrie.txt | 2 | ||||
-rw-r--r-- | npc/merchants/renters.txt | 12 | ||||
-rw-r--r-- | npc/other/CashShop_Functions.txt | 4 | ||||
-rw-r--r-- | npc/other/turbo_track.txt | 71 | ||||
-rw-r--r-- | npc/quests/quests_moscovia.txt | 4 | ||||
-rw-r--r-- | npc/re/jobs/3-1/rune_knight.txt | 2 | ||||
-rw-r--r-- | npc/re/jobs/3-2/royal_guard.txt | 4 | ||||
-rw-r--r-- | npc/re/merchants/renters.txt | 20 |
13 files changed, 72 insertions, 96 deletions
diff --git a/npc/custom/breeder.txt b/npc/custom/breeder.txt index cb43091d3..40d94d99d 100644 --- a/npc/custom/breeder.txt +++ b/npc/custom/breeder.txt @@ -16,17 +16,18 @@ prontera,124,201,1 script Universal Rental NPC 4_F_JOB_BLACKSMITH,{ if (hascashmount()) { message strcharinfo(0),"You must first remove your mount."; end; - } - else if ((eaclass()&EAJ_THIRDMASK) == EAJ_RANGER && !countitem(6124)) { - if (!checkfalcon() && getskilllv("HT_FALCON") && !checkoption(Option_Wug) && !checkoption(Option_Wugrider)) { - if(select(" ~ Falcon: ~ Warg")==1) setfalcon; - else getitem 6124,1; + } else if ((eaclass()&EAJ_THIRDMASK) == EAJ_RANGER && !countitem(Wolf's_Flute)) { + if (!checkfalcon() && getskilllv(HT_FALCON) && !checkwug()) { + if (select(" ~ Falcon: ~ Warg") == 1) + setfalcon; + else + getitem Wolf's_Flute, 1; specialeffect2 EF_TEIHIT3; close; + } else { + getitem Wolf's_Flute,1; } - else getitem 6124,1; - } - else if ((eaclass()&EAJ_THIRDMASK) == EAJ_MECHANIC && !checkcart() && getskilllv(MC_PUSHCART)) { + } else if ((eaclass()&EAJ_THIRDMASK) == EAJ_MECHANIC && !checkcart() && getskilllv(MC_PUSHCART)) { if (!checkmount() != MOUNT_MADO && getskilllv(NC_MADOLICENCE)) { if (select(" ~ Cart: ~ Mado") == 1) { setcart; @@ -35,15 +36,15 @@ prontera,124,201,1 script Universal Rental NPC 4_F_JOB_BLACKSMITH,{ } specialeffect2 EF_TEIHIT3; close; + } else { + setcart; } - else setcart; - } - else if (!checkcart() && getskilllv("MC_PUSHCART")) setcart; - else if (!checkfalcon() && getskilllv("HT_FALCON") && !checkoption(Option_Wug) && !checkoption(Option_Wugrider)) setfalcon; - else if (!checkriding() && getskilllv("KN_RIDING")) { - if ((eaclass()&EAJ_THIRDMASK) == EAJ_RUNE_KNIGHT) - setmount(MOUNT_DRAGON); - else setriding; + } else if (!checkcart() && getskilllv(MC_PUSHCART)) { + setcart; + } else if (!checkfalcon() && getskilllv(HT_FALCON) && !checkwug()) { + setfalcon; + } else if (checkmount() == MOUNT_PECO && getskilllv(KN_RIDING)) { + setmount; // Peco or Dragon } else if (checkmount() != MOUNT_MADO && getskilllv(NC_MADOLICENCE)) { setmount(MOUNT_MADO); } else { diff --git a/npc/custom/etc/penal_servitude.txt b/npc/custom/etc/penal_servitude.txt index e78833b66..b83bf3f83 100644 --- a/npc/custom/etc/penal_servitude.txt +++ b/npc/custom/etc/penal_servitude.txt @@ -84,9 +84,9 @@ M_Q1: menu "OK, I'll work off!",-, "I love this prison!",M_NO_THANKS; mes "[Saddeus]"; - if(checkcart() || checkfalcon() || checkriding()){ + if(checkcart() || checkfalcon() || checkmount()){ emotion e_hmm; - mes "I'm sorry, you should release your Cart, PecoPeco or Falcon!"; + mes "I'm sorry, you should release your Cart, Mount or Falcon!"; close; } mes "Talk to our overseer, Oliver."; diff --git a/npc/custom/jobmaster.txt b/npc/custom/jobmaster.txt index e476ce2df..ca102ed76 100644 --- a/npc/custom/jobmaster.txt +++ b/npc/custom/jobmaster.txt @@ -24,8 +24,8 @@ prontera,153,193,6 script Job Master 2_F_MAGICMASTER,{ mes "No more jobs are available."; close; } - if (checkfalcon() || checkcart() || checkriding() || hascashmount()) { - mes "Please remove your "+((checkfalcon())?"falcon":"")+((checkcart())?"cart":"")+((checkriding())?"Peco":"")+((hascashmount())?"mount":"") + if (checkfalcon() || checkcart() || checkmount() || hascashmount()) { + mes "Please remove your "+((checkfalcon())?"falcon":"")+((checkcart())?"cart":"")+((checkmount() || hascashmount())?"mount":"") +" before proceeding."; close; } diff --git a/npc/events/event_skill_reset.txt b/npc/events/event_skill_reset.txt index 15d781bff..ab8805736 100644 --- a/npc/events/event_skill_reset.txt +++ b/npc/events/event_skill_reset.txt @@ -30,7 +30,7 @@ yuno,138,187,4 script Hypnotist Teacher 4_F_TELEPORTER,{ mes "Please come again soon!"; close; } - if(Weight || checkfalcon() || checkcart() || checkriding()) { + if(Weight || checkfalcon() || checkcart() || checkmount()) { mes "Would you like to reset skills?"; mes "I'm sorry, but..."; next; @@ -43,8 +43,8 @@ yuno,138,187,4 script Hypnotist Teacher 4_F_TELEPORTER,{ mes "Please, drop your cart and we'll continue."; else if(checkfalcon()) mes "Please, free your Falcon and we'll continue."; - else if(checkriding()) - mes "Please, free your PecoPeco and we'll continue."; + else if(checkmount()) + mes "Please, free your mount and we'll continue."; next; mes @npcname$; mes "Come back soon!"; diff --git a/npc/events/halloween_2008.txt b/npc/events/halloween_2008.txt index aa2780716..9b80eb798 100644 --- a/npc/events/halloween_2008.txt +++ b/npc/events/halloween_2008.txt @@ -134,7 +134,7 @@ S_Participate: Hallow08Kill = 1; @Hallow08Warp = rand(1,3); percentheal -98,0; - setriding 0; + setmount(MOUNT_NONE); setcart 0; warp "evt_zombie",155,246; end; diff --git a/npc/jobs/valkyrie.txt b/npc/jobs/valkyrie.txt index ad6d5f795..651fd2b65 100644 --- a/npc/jobs/valkyrie.txt +++ b/npc/jobs/valkyrie.txt @@ -64,7 +64,7 @@ valkyrie,48,86,4 script Valkyrie# 4_F_VALKYRIE,{ mes "begin an entirely new life."; mes "Honor to the warriors!"; next; - if (Weight > 0 || Zeny > 0 || checkcart() != 0 || checkfalcon() != 0 || checkriding() != 0) { + if (Weight > 0 || Zeny > 0 || checkcart() || checkfalcon() || checkmount()) { mes "[Valkyrie]"; mes "There are a few things you must"; mes "do before we start. You must"; diff --git a/npc/merchants/renters.txt b/npc/merchants/renters.txt index cac757f85..255db3e62 100644 --- a/npc/merchants/renters.txt +++ b/npc/merchants/renters.txt @@ -48,7 +48,7 @@ prontera,55,350,5 script Peco Peco Breeder#knt 8W_SOLDIER,{ mes "bankrupt?"; close; } - else if(getskilllv("KN_RIDING") == 0) { + else if(getskilllv(KN_RIDING) == 0) { mes "[Peco Peco Breeder]"; mes "I'm sorry, but you're"; mes "not eligible for this"; @@ -56,7 +56,7 @@ prontera,55,350,5 script Peco Peco Breeder#knt 8W_SOLDIER,{ mes "the Peco Peco Ride skill first."; close; } - else if(checkriding()) { + else if(checkmount()) { mes "[Peco Peco Breeder]"; mes "You're already"; mes "mounted on a"; @@ -68,7 +68,7 @@ prontera,55,350,5 script Peco Peco Breeder#knt 8W_SOLDIER,{ close; } Zeny -= .@price; - setriding; + setmount(MOUNT_PECO); close; case 2: mes "[Peco Peco Breeder]"; @@ -112,14 +112,14 @@ prontera,232,318,3 script Peco Peco Breeder#cru 8W_SOLDIER,{ mes "bring "+.@price+" zeny..."; close; } - else if(getskilllv("KN_RIDING") == 0) { + else if(getskilllv(KN_RIDING) == 0) { mes "[Peco Peco Breeder]"; mes "You must first learn"; mes "to ride a PecoPeco before"; mes "I can rent one to you."; close; } - else if(checkriding()) { + else if(checkmount()) { mes "[Peco Peco Breeder]"; mes "You are already"; mes "mounted on a Peco Peco."; @@ -130,7 +130,7 @@ prontera,232,318,3 script Peco Peco Breeder#cru 8W_SOLDIER,{ close; } Zeny -= .@price; - setriding; + setmount(MOUNT_NONE); close; case 2: mes "[PecoPeco Breeder]"; diff --git a/npc/other/CashShop_Functions.txt b/npc/other/CashShop_Functions.txt index 1a2627d02..39bfa3c97 100644 --- a/npc/other/CashShop_Functions.txt +++ b/npc/other/CashShop_Functions.txt @@ -59,10 +59,10 @@ function script F_CashPartyCall { // - Reset players skills. Weight must be 0, options must be off. // - No arguments. function script F_CashReset { - if (Class != Job_Novice && Weight == 0 && !checkriding() && !checkfalcon() && !checkcart() && !hascashmount()) { + if (Class != Job_Novice && Weight == 0 && !checkmount() && !checkfalcon() && !checkcart() && !hascashmount()) { resetskill; sc_end SC_ALL; - if (countitem(12213)) delitem 12213,1; + if (countitem(Neuralizer)) delitem Neuralizer,1; } return; } diff --git a/npc/other/turbo_track.txt b/npc/other/turbo_track.txt index ded537086..bb38039a4 100644 --- a/npc/other/turbo_track.txt +++ b/npc/other/turbo_track.txt @@ -4600,10 +4600,10 @@ OnTouch: mes "things using the Kafra Service.^000000"; close; } - if ((BaseJob == Job_Knight || BaseJob == Job_Crusader) && checkriding()) { + if ((BaseJob == Job_Knight || BaseJob == Job_Crusader) && checkmount()) { if (MaxWeight-Weight < 20000) { if (!(eaclass()&EAJL_THIRD)) { - set .@mount$,(BaseJob == Job_Knight)?"Peco Peco":"Grand Peco"; + .@mount$ = (BaseJob == Job_Knight) ? "Peco Peco" : "Grand Peco"; mes "[Helper]"; mes .@mount$+"s are prohibited"; mes "in the Turbo Track Arena."; @@ -4612,7 +4612,7 @@ OnTouch: mes "a Free Ticket for Peco Ride"; mes "for retrieving your "+.@mount$+"."; } else { - set .@mount$,(BaseJob == Job_Knight)?"Dragon":"Gryphon"; + .@mount$ = (BaseJob == Job_Knight) ? "Dragon" : "Gryphon"; mes "[Helper]"; mes .@mount$+"s are prohibited"; mes "in the Turbo Track Arena."; @@ -4625,14 +4625,9 @@ OnTouch: end; } else { if (!(eaclass()&EAJL_THIRD)) { - setriding 0; - getitem 7310,1; //Free_Peco_Ticket - } else { - if (BaseJob == Job_Knight) - setmount(MOUNT_NONE); - else - setriding 0; + getitem Free_Peco_Ticket, 1; } + setmount(MOUNT_NONE); warp "turbo_room",100,65; } } else if ((Class == Job_Ranger || Class == Job_Ranger_T || Class == Job_Baby_Ranger) && checkoption(Option_Wugrider)) { @@ -4648,7 +4643,7 @@ OnTouch: setoption Option_Wugrider,0; warp "turbo_room",100,65; } - } else if ((Class == Job_Mechanic || Class == Job_Mechanic_T || Class == Job_Baby_Mechanic) && checkmount() == MOUNT_MADO) { + } else if ((Class == Job_Mechanic || Class == Job_Mechanic_T || Class == Job_Baby_Mechanic) && checkmount()) { if (MaxWeight-Weight < 20000) { mes "[Helper]"; mes "Magic Gears are prohibited"; @@ -4689,7 +4684,7 @@ alde_gld,186,199,3 script Turbo Track Guide#Entran 4_F_RACING,{ } - script ::MountManager_turbo -1,{ - set .@n$, "["+strnpcinfo(1)+"]"; + .@n$ = "["+strnpcinfo(1)+"]"; mes .@n$; if (hascashmount()) { mes "Please get off of that creature you're riding on."; @@ -4699,39 +4694,27 @@ alde_gld,186,199,3 script Turbo Track Guide#Entran 4_F_RACING,{ if (BaseJob == Job_Knight || BaseJob == Job_Crusader) { if (!(eaclass()&EAJL_THIRD)) { if (BaseJob == Job_Knight) { - set .@zeny,2500; - set .@zeny$,"2,500"; - set .@mount$,"Peco Peco"; + .@zeny = 2500; + .@zeny$ = "2,500"; + .@mount$ = "Peco Peco"; } else { - set .@zeny,3500; - set .@zeny$,"3,500"; - set .@mount$,"Grand Peco"; + .@zeny = 3500; + .@zeny$ = "3,500"; + .@mount$ = "Grand Peco"; } - set .@skill,63; - set .@skill$,"Peco Peco Ride"; - set .@riding, checkriding(); - set .@i,1; } else { if (BaseJob == Job_Knight) { - set .@mount$,"Dragon"; - set .@skill,63; - set .@skill$,"Dragon Training"; - set .@riding, checkmount() == MOUNT_DRAGON ? true : false; // FIXME - set .@i,2; + .@mount$ = "Dragon"; } else { - set .@mount$,"Gryphon"; - set .@skill,63; - set .@skill$,"Peco Peco Ride"; - set .@riding, checkriding(); - set .@i,1; + .@mount$ = "Gryphon"; } } + .@skill = KN_RIDING; + .@skill$ = "Peco Peco Ride"; } else if (Class == Job_Mechanic || Class == Job_Mechanic_T || Class == Job_Baby_Mechanic) { - set .@mount$,"Magic Gear"; - set .@skill,2255; - set .@skill$,"Magic Gear License"; - set .@riding, checkmount() == MOUNT_MADO ? true : false; // FIXME - set .@i,3; + .@mount$ = "Magic Gear"; + .@skill = NC_MADOLICENCE; + .@skill$ = "Magic Gear License"; } else { mes "Thank you for"; mes "visiting Al De Baran's"; @@ -4757,7 +4740,7 @@ alde_gld,186,199,3 script Turbo Track Guide#Entran 4_F_RACING,{ mes "the "+.@skill$+" skill first."; close; } else { - if (.@riding) { + if (checkmount()) { mes .@n$; mes "You're already"; mes "mounted on a"; @@ -4766,7 +4749,7 @@ alde_gld,186,199,3 script Turbo Track Guide#Entran 4_F_RACING,{ close; } else { if (.@zeny) { - if (countitem(7310) < 1 && Zeny < .@zeny) { + if (countitem(Free_Peco_Ticket) < 1 && Zeny < .@zeny) { mes .@n$; mes "I'm sorry, but you"; mes "don't have a Free Ticket"; @@ -4774,17 +4757,13 @@ alde_gld,186,199,3 script Turbo Track Guide#Entran 4_F_RACING,{ mes "to use the Peco rental service."; close; } else { - if (countitem(7310) > 0) - delitem 7310,1; //Free_Peco_Ticket + if (countitem(Free_Peco_Ticket) > 0) + delitem Free_Peco_Ticket, 1; else Zeny -= .@zeny; } } - switch(.@i) { - case 1: setriding; break; - case 2: setmount(MOUNT_DRAGON); break; - case 3: setmount(MOUNT_MADO); break; - } + setmount; mes .@n$; mes "Thank you for"; mes "your patronage~"; diff --git a/npc/quests/quests_moscovia.txt b/npc/quests/quests_moscovia.txt index 685010f1a..9303eda67 100644 --- a/npc/quests/quests_moscovia.txt +++ b/npc/quests/quests_moscovia.txt @@ -6716,7 +6716,7 @@ mosk_dun01,169,162,0 script Mysterious Stone#rus02 HIDDEN_NPC,{ warp "mosk_dun01",190,47; end; case 2: - if (!checkriding()) { + if (checkmount() != MOUNT_PECO) { mes "["+ strcharinfo(0) +"]"; mes "...What about the left...?"; next; @@ -6744,7 +6744,7 @@ mosk_dun01,169,162,0 script Mysterious Stone#rus02 HIDDEN_NPC,{ mes "- an unknown force and tries -"; mes "- to run away!! -"; sc_start SC_CURSE,60000,0; - setriding 0; + setmount(MOUNT_NONE); close2; warp "mosk_dun01",190,47; end; diff --git a/npc/re/jobs/3-1/rune_knight.txt b/npc/re/jobs/3-1/rune_knight.txt index 7c38c7c25..ceb38a0eb 100644 --- a/npc/re/jobs/3-1/rune_knight.txt +++ b/npc/re/jobs/3-1/rune_knight.txt @@ -504,7 +504,7 @@ job3_rune01,80,60,3 script Rune Knight Captain 4_M_KNIGHT_SILVER,2,2,{ next; switch(select("Every preparation is done.:I need more time to think.")) { case 1: - if (SkillPoint != 0 || checkriding()) { + if (SkillPoint != 0 || checkmount() == MOUNT_PECO) { mes "[Captain Tigris]"; mes "Weren't you listening?"; next; diff --git a/npc/re/jobs/3-2/royal_guard.txt b/npc/re/jobs/3-2/royal_guard.txt index bf569118d..c8c0346eb 100644 --- a/npc/re/jobs/3-2/royal_guard.txt +++ b/npc/re/jobs/3-2/royal_guard.txt @@ -32,7 +32,7 @@ prt_castle,48,161,3 script Middle-aged Gentleman#rg 1_M_LIBRARYMASTER,{ mes "Oh you are so young. Keep working hard."; close; } - if (checkriding() || checkcart() || checkfalcon()) { + if (checkmount() || checkcart() || checkfalcon()) { mes "[Middle-aged Gentleman]"; mes "You are dragging something. If you're riding something you better dismount it before proceeding."; close; @@ -340,7 +340,7 @@ glast_01,240,366,5 script Memory of King Schmidtz CLEAR_NPC,{ mes "- and please try again. -"; close; } - if (hascashmount() || checkriding()) { + if (hascashmount() || checkmount()) { mes " Please unequip your riding pet and try again!"; close; } diff --git a/npc/re/merchants/renters.txt b/npc/re/merchants/renters.txt index c128e1a3d..4bb929ac4 100644 --- a/npc/re/merchants/renters.txt +++ b/npc/re/merchants/renters.txt @@ -26,8 +26,7 @@ job3_rune01,88,62,5 script Dragon Breeder 8W_SOLDIER,{ mes "[Dragon Breeder]"; mes "Please learn how to ride a Dragon first."; close; - } - else if (checkriding()) { + } else if (checkmount()) { mes "[Dragon Breeder]"; mes "You already have a Dragon."; close; @@ -63,8 +62,7 @@ prontera,130,213,5 script Riding Creature Master 8W_SOLDIER,{ mes "[Riding Creature Master]"; mes "Please learn how to ride a Dragon first."; close; - } - else if (checkriding()) { + } else if (checkmount()) { mes "[Riding Creature Master]"; mes "You already have a Dragon."; close; @@ -86,12 +84,11 @@ prontera,130,213,5 script Riding Creature Master 8W_SOLDIER,{ next; switch(select("Yes:No")) { case 1: - if(!getskilllv("KN_RIDING")) { + if(!getskilllv(KN_RIDING)) { mes "[Riding Creature Master]"; mes "Please learn how to ride a Gryphon first."; close; - } - else if (checkriding()) { + } else if (checkmount()) { mes "[Riding Creature Master]"; mes "You already have a Gryphon."; close; @@ -100,7 +97,7 @@ prontera,130,213,5 script Riding Creature Master 8W_SOLDIER,{ mes "Please remove your cash mount."; close; } - setriding; + setmount(MOUNT_PECO); close; case 2: mes "[Riding Creature Master]"; @@ -119,7 +116,7 @@ prontera,125,208,5 script Peco Peco Remover 8W_SOLDIER,{ mes "If you're unable to dismount from a Peco Peco"; mes "for some unknown reason,"; mes "please feel free to use my services."; - if (checkriding()) { + if (checkmount() == MOUNT_PECO) { next; mes "[Soldier]"; mes "You're riding a Peco Peco."; @@ -127,7 +124,7 @@ prontera,125,208,5 script Peco Peco Remover 8W_SOLDIER,{ next; switch(select("Yes:No")) { case 1: - setriding 0; + setmount(MOUNT_NONE); mes "[Soldier]"; mes "Say, how does it feel to"; mes "step on the ground on your own"; @@ -170,8 +167,7 @@ prontera,125,208,5 script Peco Peco Remover 8W_SOLDIER,{ 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; |