diff options
-rw-r--r-- | db/re/item_db.conf | 2 | ||||
-rw-r--r-- | doc/script_commands.txt | 6 | ||||
-rw-r--r-- | npc/custom/breeder.txt | 2 | ||||
-rw-r--r-- | npc/custom/jobmaster.txt | 4 | ||||
-rw-r--r-- | npc/jobs/2-2e/SoulLinker.txt | 2 | ||||
-rw-r--r-- | npc/merchants/renters.txt | 6 | ||||
-rw-r--r-- | npc/other/CashShop_Functions.txt | 2 | ||||
-rw-r--r-- | npc/other/turbo_track.txt | 2 | ||||
-rw-r--r-- | npc/re/jobs/3-1/archbishop.txt | 2 | ||||
-rw-r--r-- | npc/re/jobs/3-1/guillotine_cross.txt | 2 | ||||
-rw-r--r-- | npc/re/jobs/3-1/mechanic.txt | 2 | ||||
-rw-r--r-- | npc/re/jobs/3-1/ranger.txt | 2 | ||||
-rw-r--r-- | npc/re/jobs/3-1/rune_knight.txt | 2 | ||||
-rw-r--r-- | npc/re/jobs/3-1/warlock.txt | 2 | ||||
-rw-r--r-- | npc/re/jobs/3-2/genetic.txt | 2 | ||||
-rw-r--r-- | npc/re/jobs/3-2/minstrel.txt | 2 | ||||
-rw-r--r-- | npc/re/jobs/3-2/royal_guard.txt | 2 | ||||
-rw-r--r-- | npc/re/jobs/3-2/shadow_chaser.txt | 2 | ||||
-rw-r--r-- | npc/re/jobs/3-2/sorcerer.txt | 2 | ||||
-rw-r--r-- | npc/re/jobs/3-2/sura.txt | 2 | ||||
-rw-r--r-- | npc/re/jobs/3-2/wanderer.txt | 2 | ||||
-rw-r--r-- | npc/re/merchants/renters.txt | 12 | ||||
-rw-r--r-- | src/map/atcommand.c | 7 | ||||
-rw-r--r-- | src/map/script.c | 23 |
24 files changed, 46 insertions, 48 deletions
diff --git a/db/re/item_db.conf b/db/re/item_db.conf index ff779399f..42cd378f1 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -82605,7 +82605,7 @@ item_db: ( Buy: 20 Upper: 63 Delay: 3000 - Script: <" setmounting(); "> + Script: <" setcashmount(); "> }, { Id: 12623 diff --git a/doc/script_commands.txt b/doc/script_commands.txt index b3f0b0e5c..c72910d12 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -3868,10 +3868,10 @@ Mado and 0 if they don't. --------------------------------------- -*setmounting; -*ismounting() +*setcashmount; +*hascashmount() -The 'setmounting' function toggles cash mount for the invoking character. +The 'setcashmount' function toggles cash mount for the invoking character. It will return 1 if successful, 0 otherwise. Note: Character must not be mounting a non-cash mount (eg. dragon, peco, diff --git a/npc/custom/breeder.txt b/npc/custom/breeder.txt index 0222f5b3a..af4a740b4 100644 --- a/npc/custom/breeder.txt +++ b/npc/custom/breeder.txt @@ -11,7 +11,7 @@ //============================================================ prontera,124,201,1 script Universal Rental NPC 4_F_JOB_BLACKSMITH,{ - if (ismounting()) { + if (hascashmount()) { message strcharinfo(0),"You must first remove your mount."; end; } diff --git a/npc/custom/jobmaster.txt b/npc/custom/jobmaster.txt index 88a1897da..e476ce2df 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() || ismounting()) { - mes "Please remove your "+((checkfalcon())?"falcon":"")+((checkcart())?"cart":"")+((checkriding())?"Peco":"")+((ismounting())?"mount":"") + if (checkfalcon() || checkcart() || checkriding() || hascashmount()) { + mes "Please remove your "+((checkfalcon())?"falcon":"")+((checkcart())?"cart":"")+((checkriding())?"Peco":"")+((hascashmount())?"mount":"") +" before proceeding."; close; } diff --git a/npc/jobs/2-2e/SoulLinker.txt b/npc/jobs/2-2e/SoulLinker.txt index 38fb47131..49fdcffd4 100644 --- a/npc/jobs/2-2e/SoulLinker.txt +++ b/npc/jobs/2-2e/SoulLinker.txt @@ -398,7 +398,7 @@ OnTouch: mes "if you talk to me later..."; close; } - if (ismounting()) { + if (hascashmount()) { mes "[Maia]"; mes "You are on a riding pet,"; mes "so you cannot change your job."; diff --git a/npc/merchants/renters.txt b/npc/merchants/renters.txt index 5944932e9..cac757f85 100644 --- a/npc/merchants/renters.txt +++ b/npc/merchants/renters.txt @@ -62,8 +62,7 @@ prontera,55,350,5 script Peco Peco Breeder#knt 8W_SOLDIER,{ mes "mounted on a"; mes "Peco Peco."; close; - } - else if(ismounting()) { + } else if(hascashmount()) { mes "[Peco Peco Breeder]"; mes "Please remove your cash mount."; close; @@ -125,8 +124,7 @@ prontera,232,318,3 script Peco Peco Breeder#cru 8W_SOLDIER,{ mes "You are already"; mes "mounted on a Peco Peco."; close; - } - else if(ismounting()) { + } else if(hascashmount()) { mes "[Peco Peco Breeder]"; mes "Please remove your cash mount."; close; diff --git a/npc/other/CashShop_Functions.txt b/npc/other/CashShop_Functions.txt index 76056cb52..1a2627d02 100644 --- a/npc/other/CashShop_Functions.txt +++ b/npc/other/CashShop_Functions.txt @@ -59,7 +59,7 @@ 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() && !ismounting()) { + if (Class != Job_Novice && Weight == 0 && !checkriding() && !checkfalcon() && !checkcart() && !hascashmount()) { resetskill; sc_end SC_ALL; if (countitem(12213)) delitem 12213,1; diff --git a/npc/other/turbo_track.txt b/npc/other/turbo_track.txt index 2d9b967d8..5cc10d624 100644 --- a/npc/other/turbo_track.txt +++ b/npc/other/turbo_track.txt @@ -4691,7 +4691,7 @@ alde_gld,186,199,3 script Turbo Track Guide#Entran 4_F_RACING,{ - script ::MountManager_turbo -1,{ set .@n$, "["+strnpcinfo(1)+"]"; mes .@n$; - if (ismounting()) { + if (hascashmount()) { mes "Please get off of that creature you're riding on."; mes "Then talk to me again."; close; diff --git a/npc/re/jobs/3-1/archbishop.txt b/npc/re/jobs/3-1/archbishop.txt index 26782eb94..2daf9d7b5 100644 --- a/npc/re/jobs/3-1/archbishop.txt +++ b/npc/re/jobs/3-1/archbishop.txt @@ -1188,7 +1188,7 @@ OnTouch: mes "- and come for the challenge again. -"; close; } - if (ismounting()) { + if (hascashmount()) { mes "You are on a riding pet,"; mes "so you cannot change your job."; mes "Please unequip your riding pet and try again!"; diff --git a/npc/re/jobs/3-1/guillotine_cross.txt b/npc/re/jobs/3-1/guillotine_cross.txt index df51c3496..7bafa8562 100644 --- a/npc/re/jobs/3-1/guillotine_cross.txt +++ b/npc/re/jobs/3-1/guillotine_cross.txt @@ -3624,7 +3624,7 @@ job3_guil01,148,53,3 script Bercasell#3rdgc16 4_M_GUILLOTINE,{ switch(select("Yes, change my job.:I need to rethink it.")) { case 1: mes "[Bercasell]"; - if (ismounting()) { + if (hascashmount()) { mes "I cannot perform the job change."; mes "Please remove your mount and try again."; close; diff --git a/npc/re/jobs/3-1/mechanic.txt b/npc/re/jobs/3-1/mechanic.txt index e34fccc72..73e74983c 100644 --- a/npc/re/jobs/3-1/mechanic.txt +++ b/npc/re/jobs/3-1/mechanic.txt @@ -30,7 +30,7 @@ yuno,129,156,3 script Chainheart 4_M_DOCTOR,{ close; } else if (job__mechanic == 11) { if (BaseJob == Job_Blacksmith && BaseLevel > 98 && JobLevel > 49 && SkillPoint == 0) { - if (ismounting()) { + if (hascashmount()) { mes "You are on a riding pet,"; mes "so you cannot change your job."; mes "Please unequip your riding pet and try again!"; diff --git a/npc/re/jobs/3-1/ranger.txt b/npc/re/jobs/3-1/ranger.txt index 0b52df91f..d8a10820f 100644 --- a/npc/re/jobs/3-1/ranger.txt +++ b/npc/re/jobs/3-1/ranger.txt @@ -1692,7 +1692,7 @@ job3_rang01,90,43,3 script Ranger Master#jr_29 4_M_REIDIN_KURS,{ close; } mes "[Ranger Master, Neveragain]"; - if (ismounting()) { + if (hascashmount()) { mes "You are on a riding pet,"; mes "so you cannot change your job."; mes "Please unequip your riding pet and try again!"; diff --git a/npc/re/jobs/3-1/rune_knight.txt b/npc/re/jobs/3-1/rune_knight.txt index ffb395e07..ad8e4b8da 100644 --- a/npc/re/jobs/3-1/rune_knight.txt +++ b/npc/re/jobs/3-1/rune_knight.txt @@ -518,7 +518,7 @@ job3_rune01,80,60,3 script Rune Knight Captain 4_M_KNIGHT_SILVER,2,2,{ mes "It seems not enough?"; close; } - if (ismounting()) { + if (hascashmount()) { mes "[Captain Tigris]"; mes "Please unequip your mount and come back again."; close; diff --git a/npc/re/jobs/3-1/warlock.txt b/npc/re/jobs/3-1/warlock.txt index 671340a03..973dc915f 100644 --- a/npc/re/jobs/3-1/warlock.txt +++ b/npc/re/jobs/3-1/warlock.txt @@ -672,7 +672,7 @@ spl_in02,80,108,5 script Guild Master#Warlock 4_F_FAIRY1,{ mes "Unless you like your current job, you should use all your skill points."; close; } - if (ismounting()) { + if (hascashmount()) { mes "You are on a riding pet,"; mes "so you cannot change your job."; mes "Please unequip your riding pet and try again!"; diff --git a/npc/re/jobs/3-2/genetic.txt b/npc/re/jobs/3-2/genetic.txt index 92b015bf4..e264bfdca 100644 --- a/npc/re/jobs/3-2/genetic.txt +++ b/npc/re/jobs/3-2/genetic.txt @@ -546,7 +546,7 @@ job3_gen01,25,58,3 script Devries#gen 4_LGTSCIENCE,{ mes "<We hope that you yield good fruits in the future as well.>"; next; mes "[Devries]"; - if (ismounting()) { + if (hascashmount()) { mes "You are on a riding pet,"; mes "so you cannot change your job."; mes "Please unequip your riding pet and try again!"; diff --git a/npc/re/jobs/3-2/minstrel.txt b/npc/re/jobs/3-2/minstrel.txt index 1435b23fd..a189d438d 100644 --- a/npc/re/jobs/3-2/minstrel.txt +++ b/npc/re/jobs/3-2/minstrel.txt @@ -1839,7 +1839,7 @@ prt_in,94,172,4 script Karian#job_min3 4_M_MINSTREL1,{ mes "How did you degrade?"; close; } - if (ismounting()) { + if (hascashmount()) { mes "Please unequip your riding pet and try again!"; close; } diff --git a/npc/re/jobs/3-2/royal_guard.txt b/npc/re/jobs/3-2/royal_guard.txt index 82632ed36..bf569118d 100644 --- a/npc/re/jobs/3-2/royal_guard.txt +++ b/npc/re/jobs/3-2/royal_guard.txt @@ -340,7 +340,7 @@ glast_01,240,366,5 script Memory of King Schmidtz CLEAR_NPC,{ mes "- and please try again. -"; close; } - if (ismounting() || checkriding()) { + if (hascashmount() || checkriding()) { mes " Please unequip your riding pet and try again!"; close; } diff --git a/npc/re/jobs/3-2/shadow_chaser.txt b/npc/re/jobs/3-2/shadow_chaser.txt index 230d5b49c..d1c6ce75f 100644 --- a/npc/re/jobs/3-2/shadow_chaser.txt +++ b/npc/re/jobs/3-2/shadow_chaser.txt @@ -1358,7 +1358,7 @@ s_atelier,70,66,4 script Dumk#sc13_lgh 4_M_SHADOWCHASER,{ mes "- You can't continue on in this quest because you are overweight. -"; close; } - if (ismounting()) { + if (hascashmount()) { mes "[Dumk]"; mes "Who is this guy? Why should he sit in front of me so high?"; mes "Although I do not know why you riding on it, but here is in door,"; diff --git a/npc/re/jobs/3-2/sorcerer.txt b/npc/re/jobs/3-2/sorcerer.txt index 05c568431..5108dbe49 100644 --- a/npc/re/jobs/3-2/sorcerer.txt +++ b/npc/re/jobs/3-2/sorcerer.txt @@ -351,7 +351,7 @@ gef_tower,113,161,5 script Karacas 4_M_SAGE_A,{ mes "You must have the etiquette of your job now before you accept the new job! "; close; } - if (ismounting()) { + if (hascashmount()) { mes "Good, before we get started..."; mes "Please unequip your riding pet~"; close; diff --git a/npc/re/jobs/3-2/sura.txt b/npc/re/jobs/3-2/sura.txt index 8bbc45cfe..ce6aa152a 100644 --- a/npc/re/jobs/3-2/sura.txt +++ b/npc/re/jobs/3-2/sura.txt @@ -794,7 +794,7 @@ sword_1-1,223,167,2 script Master#job_shu 4_M_SURA,{ mes "[Master]"; mes "I hope those days will not come but... I'll willingly be the ghost and kill all enemies."; next; - if (ismounting()) { + if (hascashmount()) { mes "[Master]"; mes "So... please get down from your riding pet!"; mes "It is a loss of etiquette on this situation."; diff --git a/npc/re/jobs/3-2/wanderer.txt b/npc/re/jobs/3-2/wanderer.txt index 9ce297068..ae8cb109c 100644 --- a/npc/re/jobs/3-2/wanderer.txt +++ b/npc/re/jobs/3-2/wanderer.txt @@ -898,7 +898,7 @@ xmas,147,135,5 script Dancer Kim#xmas 4_F_WANDERER,{ mes "- You need to empty your inventory if you want to continue the quest. -"; close; } - if (ismounting()) { + if (hascashmount()) { mes "[Dancer Kim]"; mes "Please get off of that creature you're riding on."; mes "Then talk to me again."; diff --git a/npc/re/merchants/renters.txt b/npc/re/merchants/renters.txt index 59894c678..781467e20 100644 --- a/npc/re/merchants/renters.txt +++ b/npc/re/merchants/renters.txt @@ -31,8 +31,7 @@ job3_rune01,88,62,5 script Dragon Breeder 8W_SOLDIER,{ mes "[Dragon Breeder]"; mes "You already have a Dragon."; close; - } - else if(ismounting()) { + } else if(hascashmount()) { mes "[Dragon Breeder]"; mes "Please remove your cash mount."; close; @@ -69,8 +68,7 @@ prontera,130,213,5 script Riding Creature Master 8W_SOLDIER,{ mes "[Riding Creature Master]"; mes "You already have a Dragon."; close; - } - else if(ismounting()) { + } else if(hascashmount()) { mes "[Riding Creature Master]"; mes "Please remove your cash mount."; close; @@ -97,8 +95,7 @@ prontera,130,213,5 script Riding Creature Master 8W_SOLDIER,{ mes "[Riding Creature Master]"; mes "You already have a Gryphon."; close; - } - else if(ismounting()) { + } else if(hascashmount()) { mes "[Riding Creature Master]"; mes "Please remove your cash mount."; close; @@ -178,8 +175,7 @@ prontera,125,208,5 script Peco Peco Remover 8W_SOLDIER,{ mes "[Magic Gear Master]"; mes "Please learn the skill to get the Magic Gear License first."; close; - } - else if(ismounting()) { + } else if(hascashmount()) { mes "[Magic Gear Master]"; mes "Please remove your cash mount."; close; diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 9472fe36d..ef528c454 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -8357,7 +8357,8 @@ ACMD(charcommands) return true; } /* for new mounts */ -ACMD(mount2) { +ACMD(cashmount) +{ if (pc_hasmount(sd)) { clif->message(fd, msg_txt(1476)); // You are already mounting something else @@ -8365,7 +8366,7 @@ ACMD(mount2) { } clif->message(sd->fd,msg_txt(1362)); // NOTICE: If you crash with mount your LUA is outdated. - if( !(sd->sc.data[SC_ALL_RIDING]) ) { + if (!sd->sc.data[SC_ALL_RIDING]) { clif->message(sd->fd,msg_txt(1363)); // You have mounted. sc_start(NULL,&sd->bl,SC_ALL_RIDING,100,0,-1); } else { @@ -9633,7 +9634,7 @@ void atcommand_basecommands(void) { ACMD_DEF2("rmvperm", addperm), ACMD_DEF(unloadnpcfile), ACMD_DEF(cart), - ACMD_DEF(mount2), + ACMD_DEF(cashmount), ACMD_DEF(join), ACMD_DEF(channel), ACMD_DEF(fontcolor), diff --git a/src/map/script.c b/src/map/script.c index 24011c910..f71b0e64b 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -17363,9 +17363,10 @@ BUILDIN(setdragon) { } /** - * ismounting() returns 1 if mounting a new mount or 0 otherwise + * hascashmount() returns 1 if mounting a cash mount or 0 otherwise **/ -BUILDIN(ismounting) { +BUILDIN(hascashmount) +{ TBL_PC* sd; if( (sd = script->rid2sd(st)) == NULL ) return true; @@ -17377,12 +17378,14 @@ BUILDIN(ismounting) { } /** - * setmounting() returns 1 on success or 0 otherwise - * - Toggles new mounts on a player when he can mount - * - Will fail if the player is mounting a non-new mount, e.g. dragon, peco, wug, etc. - * - Will unmount the player is he is already mounting + * setcashmount() returns 1 on success or 0 otherwise + * + * - Toggles cash mounts on a player when he can mount + * - Will fail if the player is already riding a standard mount e.g. dragon, peco, wug, mado, etc. + * - Will unmount the player is he is already mounting a cash mount **/ -BUILDIN(setmounting) { +BUILDIN(setcashmount) +{ TBL_PC* sd; if ((sd = script->rid2sd(st)) == NULL) return true; @@ -17390,7 +17393,7 @@ BUILDIN(setmounting) { clif->msgtable(sd->fd, 0X78b); script_pushint(st,0);//can't mount with one of these } else { - if( sd->sc.data[SC_ALL_RIDING] ) + if (sd->sc.data[SC_ALL_RIDING]) status_change_end(&sd->bl, SC_ALL_RIDING, INVALID_TIMER); else sc_start(NULL,&sd->bl, SC_ALL_RIDING, 100, 0, -1); @@ -19303,8 +19306,8 @@ void script_parse_builtin(void) { BUILDIN_DEF(makerune,"i"), BUILDIN_DEF(checkdragon,""),//[Ind] BUILDIN_DEF(setdragon,"?"),//[Ind] - BUILDIN_DEF(ismounting,""),//[Ind] - BUILDIN_DEF(setmounting,""),//[Ind] + BUILDIN_DEF(hascashmount,""),//[Ind] + BUILDIN_DEF(setcashmount,""),//[Ind] BUILDIN_DEF(checkre,"i"), /** * rAthena and beyond! |