Skip to content
Permalink
Browse files
Global_Function updates.
* Added the following functions:
  - "F_GetPlural" (returns plural of noun) / "F_InsertPlural" (returns plural if arg != 1)  [credits: EnglishClub for formation rules]
  - "F_InsertArticle" (returns 'a' or 'an' preceding word)
  - "F_InsertComma" (formats number with commas)
  - "F_GetNumSuffix" (formats number with '-st', '-nd', '-rd', or '-th' suffix)
* Added and removed new functions where necessary. (incomplete)
* Added new types to "F_GetArmorType" function, and weapons will now pass to "F_GetWeaponType".
* Reformatted comments.

Other changes:
* Removed some garbage text from scripts.
* Slight edits to custom warper script.

Signed-off-by: Euphy <euphy.raliel@rathena.org>
  • Loading branch information
euphyy committed Jan 4, 2014
1 parent 2d35b03 commit 97687ca10c209010a2ec6eda97adc85502fb282e
Showing with 627 additions and 569 deletions.
  1. +1 −1 npc/airports/airships.txt
  2. +4 −4 npc/cities/comodo.txt
  3. +13 −13 npc/cities/lighthalzen.txt
  4. +0 −36 npc/custom/battleground/bg_common.txt
  5. +14 −15 npc/custom/etc/bank.txt
  6. +9 −18 npc/custom/quests/hunting_missions.txt
  7. +4 −11 npc/custom/quests/quest_shop.txt
  8. +123 −118 npc/custom/warper.txt
  9. +3 −3 npc/guild2/agit_main_se.txt
  10. +2 −10 npc/instances/EndlessTower.txt
  11. +1 −1 npc/jobs/1-1e/taekwon.txt
  12. +5 −5 npc/jobs/2-1e/StarGladiator.txt
  13. +1 −1 npc/jobs/2-2/alchemist.txt
  14. +2 −2 npc/merchants/ammo_boxes.txt
  15. +4 −4 npc/merchants/ammo_dealer.txt
  16. +187 −63 npc/other/Global_Functions.txt
  17. +9 −5 npc/other/card_trader.txt
  18. +10 −14 npc/other/hugel_bingo.txt
  19. +1 −1 npc/other/marriage.txt
  20. +3 −4 npc/other/mercenary_rent.txt
  21. +1 −1 npc/other/monster_race.txt
  22. +2 −2 npc/pre-re/guides/guides_comodo.txt
  23. +2 −2 npc/quests/bunnyband.txt
  24. +9 −9 npc/quests/dandelion_request.txt
  25. +21 −21 npc/quests/doomed_swords.txt
  26. +2 −2 npc/quests/doomed_swords_quest.txt
  27. +1 −1 npc/quests/partyrelay.txt
  28. +26 −26 npc/quests/quests_comodo.txt
  29. +57 −57 npc/quests/quests_hugel.txt
  30. +15 −15 npc/quests/quests_nameless.txt
  31. +1 −1 npc/quests/quests_veins.txt
  32. +18 −18 npc/quests/skills/alchemist_skills.txt
  33. +8 −8 npc/quests/skills/assassin_skills.txt
  34. +7 −7 npc/quests/skills/bard_skills.txt
  35. +6 −6 npc/quests/skills/blacksmith_skills.txt
  36. +2 −2 npc/quests/skills/crusader_skills.txt
  37. +2 −2 npc/quests/skills/dancer_skills.txt
  38. +4 −4 npc/quests/skills/knight_skills.txt
  39. +5 −5 npc/quests/skills/monk_skills.txt
  40. +3 −3 npc/quests/skills/priest_skills.txt
  41. +8 −8 npc/quests/skills/rogue_skills.txt
  42. +3 −3 npc/quests/skills/sage_skills.txt
  43. +3 −3 npc/quests/skills/wizard_skills.txt
  44. +3 −3 npc/quests/thana_quest.txt
  45. +1 −1 npc/re/cities/brasilis.txt
  46. +3 −10 npc/re/guild/invest_main.txt
  47. +11 −11 npc/re/jobs/novice/supernovice_ex.txt
  48. +1 −3 npc/re/merchants/3rd_trader.txt
  49. +2 −2 npc/re/merchants/blessed_refiner.txt
  50. +1 −1 npc/re/merchants/enchan_upg.txt
  51. +2 −2 npc/re/quests/magic_books.txt
  52. +1 −1 npc/re/quests/quests_eclage.txt
@@ -387,7 +387,7 @@ airplane,221,158,2 script Pilot#airplane 852,{
mes "......";
mes "No one ever really";
mes "comes into this room.";
mes "And the captain IS a reindeer.^FFFFFF ^000000 I could just strip to my boxers.";
mes "And the captain IS a reindeer. I could just strip to my boxers.";

This comment has been minimized.

Copy link
@euphyy

euphyy Jan 4, 2014

Author Contributor

lol, I just read this dialogue... -_-;

next;
emotion e_omg;
mes "[Pilot]";
@@ -132,7 +132,7 @@ cmd_in02,172,105,4 script G . J#cmd 86,{
mes "it seems smarter to make";
mes "money in other ways. Sure,";
mes "working hard is no fun, but";
mes "there are ways to use your^FFFFFF ^000000 money to make more of it, right?";
mes "there are ways to use your money to make more of it, right?";
next;
mes "[G . J]";
mes "There's also the matter of";
@@ -217,7 +217,7 @@ cmd_in02,57,62,4 script Moo#cmd 109,{
mes "manager of the Comodo";
mes "Casino. We pride ourselves in";
mes "serving all of our customers'";
mes "needs, doing all we can so that^FFFFFF ^000000 your visit here is unforgettable.";
mes "needs, doing all we can so that your visit here is unforgettable.";
next;
mes "[Moo]";
mes "All of our guests can enjoy";
@@ -251,7 +251,7 @@ cmd_fild04,188,74,4 script Zyosegirl#cmd 93,{
mes "It's nice to be able to work";
mes "outdoors, but someday, I want";
mes "to save enough money and move";
mes "to the city. I'm still young, you^FFFFFF ^000000 know, and I've got dreams";
mes "to the city. I'm still young, you know, and I've got dreams";
mes "that I want to fulfill~";
close;
}
@@ -408,7 +408,7 @@ moc_fild12,35,303,4 script Serutero#cmd 59,{
mes "guardian of the roads that";
mes "lead to Sandaruman Fortress.";
mes "If you really want to go there,";
mes "I'll permit you to continue, but^FFFFFF ^000000 you must beware of its dangers...";
mes "I'll permit you to continue, but you must beware of its dangers...";
next;
switch(select("I'm going there!:Sandaruman Fortress?:Cancel")) {
case 1:
@@ -333,7 +333,7 @@ lighthalzen,230,182,4 script Klaubis#zen3 866,{
mes "many people stay in their";
mes "hometowns. Even if you do";
mes "leave, though, you can always";
mes "come back. It wouldn't be your^FFFFFF ^000000 hometown if you couldn't, right?";
mes "come back. It wouldn't be your hometown if you couldn't, right?";
close;
case 2:
mes "[Klaubis]";
@@ -461,7 +461,7 @@ lighthalzen,132,103,5 script Sefith#li_01 734,{
mes "Good looks. Intelligence.";
mes "Excellent manners. A strong,";
mes "manly chin and overpowering,";
mes "piercing eyes. Perfectly balanced^FFFFFF ^000000 passion and charimsma. All the";
mes "piercing eyes. Perfectly balanced passion and charimsma. All the";
mes "good things that ladies want.";
next;
mes "[Sefith]";
@@ -1084,8 +1084,8 @@ OnTouch:
mes "[Beggar]";
mes "What you can see and";
mes "understand might not match";
mes "with reality. Like the stars that^FFFFFF ^000000 are always there, but not visible";
mes "during the day, we'll always have^FFFFFF ^000000 hope, even if we can't see it.";
mes "with reality. Like the stars that are always there, but not visible";
mes "during the day, we'll always have hope, even if we can't see it.";
next;
mes "[" + strcharinfo(0) + "]";
emotion e_dots,1;
@@ -1113,7 +1113,7 @@ OnTouch:
mes "sort of don't. Let me explain";
mes "it this way. I take life day by";
mes "day, with each day covering its";
mes "own spectrum with miracle on^FFFFFF ^000000 one end and tragedy on the other.";
mes "own spectrum with miracle on one end and tragedy on the other.";
next;
mes "[Beggar]";
mes "So each day has the capacity";
@@ -1133,7 +1133,7 @@ OnTouch:
next;
mes "[Beggar]";
mes "Stand up when you're down";
mes "and live your life with passion.^FFFFFF ^000000 The capacity for miracles will";
mes "and live your life with passion. The capacity for miracles will";
mes "always be there and know that";
mes "you can be someone else's";
mes "miracle. Isn't that wonderful?";
@@ -1174,14 +1174,14 @@ OnTouch:
mes "isn't so productive. More of";
mes "a frustration that you can let";
mes "go. Someone cut you off on the";
mes "freeway or a friend innocently^FFFFFF ^000000 forgot your birthday? No biggie.";
mes "freeway or a friend innocently forgot your birthday? No biggie.";
next;
mes "[Beggar]";
mes "Don't let this kind of";
mes "anger get to you or you'll";
mes "look like a loser. Think of";
mes "the big picture and if you're";
mes "still upset, vent appropriately.^FFFFFF ^000000 Be honest without hurting anyone.";
mes "still upset, vent appropriately. Be honest without hurting anyone.";
next;
mes "[Beggar]";
mes "The second kind of anger";
@@ -1204,7 +1204,7 @@ OnTouch:
mes "righteous anger, say to protect";
mes "someone dear to you, will make";
mes "you a hero. Fighting with anger";
mes "born of frustration will make you^FFFFFF ^000000 a bully. Know the difference.";
mes "born of frustration will make you a bully. Know the difference.";
next;
mes "[" + strcharinfo(0) + "]";
emotion e_dots,1;
@@ -1383,7 +1383,7 @@ lhz_in01,139,40,7 script Enoz#oz 53,{
mes "[Enoz]";
mes "So, the novel I ordered from";
mes "the Rune-Midgarts Kingdom";
mes "just recently arrived. It's real^FFFFFF ^000000 good, by the guy who wrote";
mes "just recently arrived. It's real good, by the guy who wrote";
mes "''Roda Frog Adventure''";
mes "years ago. Remember?";
next;
@@ -2592,7 +2592,7 @@ lighthalzen,107,107,3 script Kosit#zen1 869,{
mes "these rules is because of all";
mes "the unruly gangsters that can";
mes "sometimes get into the city.";
mes "I mean, it's relatively peaceful^FFFFFF ^000000 and all. But these rules...";
mes "I mean, it's relatively peaceful and all. But these rules...";
next;
mes "[Kosit]";
mes "It's good to be safe,";
@@ -2669,7 +2669,7 @@ lighthalzen,364,282,3 script Bodger#zen5 870,{
mes "I hear that the people";
mes "who live Uptown eat totally";
mes "delicious, gourmet food eight";
mes "times a day! Hopefully it's just^FFFFFF ^000000 an exaggeration. 'Cuz if it";
mes "times a day! Hopefully it's just an exaggeration. 'Cuz if it";
mes "wasn't, I'd be so mad...";
close;
}
@@ -2986,7 +2986,7 @@ lhz_in01,139,48,7 script Leimi#mimir 73,{
mes "[Leimi]";
mes "Oh, you're an Assassin!";
mes "Oh, you boys are soooo cute!";
mes "And so cool and so mysterious^FFFFFF ^000000 all at the same time! I love you!";
mes "And so cool and so mysterious all at the same time! I love you!";
}
else {
next;
@@ -133,42 +133,6 @@ bat_room,160,140,3 script Prince Croix 416,{
end;
}

// Time calculation Function
// *********************************************************************
function script Time2Str {
set .@Time_Left, getarg(0) - gettimetick(2);

set .@Days, .@Time_Left / 86400;
set .@Time_Left, .@Time_Left - (.@Days * 86400);
set .@Hours, .@Time_Left / 3600;
set .@Time_Left, .@Time_Left - (.@Hours * 3600);
set .@Minutes, .@Time_Left / 60;
set .@Time_Left, .@Time_Left - (.@Minutes * 60);

set .@Time$, "";
if( .@Days > 1 )
set .@Time$, .@Time$ + .@Days + " days, ";
else if( .@Days > 0 )
set .@Time$, .@Time$ + .@Days + " day, ";

if( .@Hours > 1 )
set .@Time$, .@Time$ + .@Hours + " hours, ";
else if( .@Hours > 0 )
set .@Time$, .@Time$ + .@Hours + " hour, ";

if( .@Minutes > 1 )
set .@Time$, .@Time$ + .@Minutes + " minutes, ";
else if( .@Minutes > 0 )
set .@Time$, .@Time$ + .@Minutes + " minute, ";

if( .@Time_Left > 1 || .@Time_Left == 0 )
set .@Time$, .@Time$ + .@Time_Left + " seconds.";
else if( .@Time_Left == 1 )
set .@Time$, .@Time$ + .@Time_Left + " second.";

return .@Time$;
}

// Guillaume Knight - Tierra Valley
// *********************************************************************
bat_room,159,178,5 script Guillaume Knight#1 417,{
@@ -16,11 +16,11 @@
//============================================================

prontera,132,217,5 script Banker 109,{
set @cost,500;
mes "[Banker]";
mes "Welcome to the First Bank of Prontera. How can I help you today?";
next;
switch(select("I'd like to make a deposit.:I'd like to make a withdrawl.:What's my current balance?:Cancel")) {
set @cost,500;
mes "[Banker]";
mes "Welcome to the First Bank of Prontera. How can I help you today?";
next;
switch(select("I'd like to make a deposit.:I'd like to make a withdrawl.:What's my current balance?:Cancel")) {
case 1:
mes "[Banker]";
mes "Very well... How much would you like to deposit? The maximum you can deposit at once is 999,999 Zeny.";
@@ -44,14 +44,13 @@ switch(select("I'd like to make a deposit.:I'd like to make a withdrawl.:What's
close;
}
else {
set Zeny,Zeny - @deposit;
set Zeny,Zeny - @cost;
set #bankstorage,#bankstorage + @deposit;
mes "[Banker]";
mes "Thank you very much... Your zeny is in good hands.";
close;
set Zeny,Zeny - @deposit;
set Zeny,Zeny - @cost;
set #bankstorage,#bankstorage + @deposit;
mes "[Banker]";
mes "Thank you very much... Your zeny is in good hands.";
close;
}

case 2:
mes "[Banker]";
mes "Very well... How much would you like to withdraw? The maximum you can withdraw at one time is 999,999 Zeny";
@@ -67,7 +66,7 @@ switch(select("I'd like to make a deposit.:I'd like to make a withdrawl.:What's
close;
}
else if (@withdrawl > #bankstorage) {
mes "I show you only have ^00FF00" + #bankstorage +"^000000 zeny in your account!";
mes "You only have ^00FF00" + callfunc("F_InsertComma",#bankstorage) +"^000000 zeny in your account!";
close;
}
else if ((@cost > Zeny) && ((Zeny + @withdrawl) > @cost)) {
@@ -104,12 +103,12 @@ switch(select("I'd like to make a deposit.:I'd like to make a withdrawl.:What's
}
case 3:
mes "[Banker]";
mes "Hmmmm let me check some paper work.";
mes "Hmmmm... let me check some paper work.";
next;
mes "*Rustle, Rustle*";
next;
mes "[Banker]";
mes "You currently have " + #bankstorage + " Zeny in your account.";
mes "You currently have " + callfunc("F_InsertComma",#bankstorage) + " Zeny in your account.";
close;
case 4:
mes "[Banker]";
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.3a
//= 1.3b
//===== Compatible With: =====================================
//= rAthena SVN
//===== Description: =========================================
@@ -16,10 +16,11 @@
//= SQL query, both thanks to AnnieRuru.
//= 1.3 Re-added a blacklist adapted for the SQL query.
//= 1.3a Added mission reset options.
//= 1.3b Function updates.
//============================================================

prontera,152,187,6 script Hunting Missions 951,{
function Chk; function Cm;
function Chk;
mes "[Hunting Missions]";
mes "Hello, "+strcharinfo(0)+"!";
if (!#Mission_Delay) {
@@ -38,7 +39,7 @@ function Chk; function Cm;
mes "Is there anything I can help";
mes "you with?";
mes " ";
mes "^777777~ You've completed ^0055FF"+Mission_Total+"^777777 mission"+((Mission_Total == 1)?"":"s")+". ~^000000";
mes "^777777~ You've completed ^0055FF"+callfunc("F_InsertPlural",Mission_Total,"mission")+"^777777. ~^000000";
next;
switch(select(((!Mission0)?" ~ New Mission::":": ~ Mission Status: ~ Abandon Mission")+": ~ Information: ~ Mission Shop: ~ View Top Hunters: ~ ^777777Cancel^000000")) {
case 1:
@@ -49,11 +50,7 @@ function Chk; function Cm;
close;
}
if (#Mission_Delay > gettimetick(2) && .Delay) {
set .@i, #Mission_Delay-gettimetick(2);
if (.@i > 3600) set .@j$, (.@i/3600)+" hour"+(((.@i/3600) == 1)?"":"s");
else if (.@i > 60) set .@j$, (.@i/60)+" minute"+(((.@i/60) == 1)?"":"s");
else set .@j$, (.@i)+" second"+((.@i == 1)?"":"s");
mes "I'm afraid you'll have to wait "+.@j$+" before taking another mission.";
mes "I'm afraid you'll have to wait "+callfunc("Time2Str",#Mission_Delay)+" before taking another mission.";
close;
}
mes "You must hunt:";
@@ -82,7 +79,7 @@ function Chk; function Cm;
if (.Reset < 0 && .Delay)
mes "Your delay time will not be reset.";
else if (.Reset > 0)
mes "It will cost "+Cm(.Reset)+" Zeny.";
mes "It will cost "+callfunc("F_InsertComma",.Reset)+" Zeny.";
next;
switch(select(" ~ Abandon...: ~ ^777777Cancel^000000")) {
case 1:
@@ -160,9 +157,9 @@ Mission_Status:
mes "[Hunting Missions]";
mes "Mission rewards:";
mes " > Mission Points: ^0055FF"+.@Mission_Points+"^000000";
mes " > Base Experience: ^0055FF"+Cm(.@Base_Exp)+"^000000";
mes " > Job Experience: ^0055FF"+Cm(.@Job_Exp)+"^000000";
mes " > Zeny: ^0055FF"+Cm(.@Zeny)+"^000000";
mes " > Base Experience: ^0055FF"+callfunc("F_InsertComma",.@Base_Exp)+"^000000";
mes " > Job Experience: ^0055FF"+callfunc("F_InsertComma",.@Job_Exp)+"^000000";
mes " > Zeny: ^0055FF"+callfunc("F_InsertComma",.@Zeny)+"^000000";
if (@f) { set @f,0; return; }
next;
mes "[Hunting Missions]";
@@ -212,12 +209,6 @@ function Chk {
if (getarg(0) < getarg(1)) { set @f,1; return "^FF0000"; }
else return "^00FF00"; }

function Cm {
set .@str$, getarg(0);
for(set .@i,getstrlen(.@str$)-3; .@i>0; set .@i,.@i-3)
set .@str$, insertchar(.@str$,",",.@i);
return .@str$; }

OnBuyItem:
set @cost,0;
for(set .@i,0; .@i<getarraysize(@bought_nameid); set .@i,.@i+1)
@@ -3,7 +3,7 @@
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.6b
//= 1.6c
//===== Compatible With: =====================================
//= rAthena SVN r16862+
//===== Description: =========================================
@@ -19,6 +19,7 @@
//= 1.6 Added support for purchasing stackables.
//= 1.6a Added support for previewing costumes and robes.
//= 1.6b Added 'disable_items' command.
//= 1.6c Replaced function 'A_An' with "F_InsertArticle".
//============================================================

// Shop NPCs -- supplying no argument displays entire menu.
@@ -30,7 +31,7 @@ prontera,164,203,6 script Quest Shop#1 998,{ callfunc "qshop"; }
// Script Core
//============================================================
- script quest_shop -1,{
function Add; function Chk; function Slot; function A_An;
function Add; function Chk; function Slot;
OnInit:
freeloop(1);

@@ -147,7 +148,7 @@ OnBuyItem:
if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2)
delitem .@q[.@i],.@q[.@i+1]*.@q[1];
getitem .@q[0],.@q[2];
if (.Announce) announce strcharinfo(0)+" has created "+((.@q[2] > 1)?.@q[2]+"x "+getitemname(.@q[0]):A_An(getitemname(.@q[0])))+"!",0;
if (.Announce) announce strcharinfo(0)+" has created "+((.@q[2] > 1)?.@q[2]+"x "+getitemname(.@q[0]):callfunc("F_InsertArticle",getitemname(.@q[0])))+"!",0;
specialeffect2 EF_FLOWERLEAF;
close;
case 2:
@@ -206,14 +207,6 @@ function Slot {
default: return .@s$;
}
}

function A_An {
setarray .@A$[0],"a","e","i","o","u";
set .@B$, "_"+getarg(0);
for(set .@i,0; .@i<5; set .@i,.@i+1)
if (compare(.@B$,"_"+.@A$[.@i])) return "an "+getarg(0);
return "a "+getarg(0);
}
}

function script qshop {

0 comments on commit 97687ca

Please sign in to comment.