Skip to content

Commit

Permalink
* Script style standardization.
Browse files Browse the repository at this point in the history
- Standardized cases on constants (Zeny, Sex, BaseLevel, etc.).
- Replaced numerics with constants.
- Standardized parts of script headers.
- Changed some script styles to K&R.
- Added some official script file names as comments.
- Replaced most 'misceffect' commands with 'specialeffect'.

Signed-off-by: Euphy <euphy@rathena.org>
  • Loading branch information
euphyy committed Aug 27, 2013
1 parent 1083475 commit bf68cce
Show file tree
Hide file tree
Showing 248 changed files with 6,726 additions and 8,278 deletions.
8 changes: 4 additions & 4 deletions npc/airports/airships.txt
Expand Up @@ -23,13 +23,13 @@ airplane,243,73,0 script #AirshipWarp-1 45,1,1,{

OnInit:
OnHide:
misceffect 16;
specialeffect EF_BASH;
disablenpc strnpcinfo(0);
end;

OnUnhide:
enablenpc strnpcinfo(0);
misceffect 215;
specialeffect EF_SUMMONSLAVE;
end;

OnTouch:
Expand Down Expand Up @@ -669,13 +669,13 @@ OnTouch:

OnInit:
OnHide:
misceffect 16;
specialeffect EF_BASH;
disablenpc strnpcinfo(0);
end;

OnUnhide:
enablenpc strnpcinfo(0);
misceffect 215;
specialeffect EF_SUMMONSLAVE;
end;
}

Expand Down
2 changes: 1 addition & 1 deletion npc/battleground/bg_common.txt
Expand Up @@ -507,7 +507,7 @@ bat_room,160,150,3 script Erundek 109,{
mes "[Erundek]";
mes "We have many items, so please take a look and purchase deliberately.";
close2;
ReadBook 11010,1;
readbook 11010,1;
end;
}
set .@menu$,"";
Expand Down
8 changes: 4 additions & 4 deletions npc/battleground/flavius/flavius_enter.txt
Expand Up @@ -29,7 +29,7 @@ bat_room,133,178,5 script Flavius Officer#01a 418,{
next;
switch(select("I want to join your army!:End Conversation")) {
case 1:
if ((Class == job_Novice) || (BaseClass == Job_Supernovice)) {
if ((Class == Job_Novice) || (BaseClass == Job_Supernovice)) {
mes "[Guillaume Army Officer]";
mes "I'm very pleased that you want to join us and fight the Croix Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
}
Expand Down Expand Up @@ -96,7 +96,7 @@ bat_room,133,121,1 script Flavius Officer#01b 414,{
next;
switch(select("I want to join your army!:End Conversation")) {
case 1:
if ((Class == job_Novice) || (BaseClass == Job_Supernovice)) {
if ((Class == Job_Novice) || (BaseClass == Job_Supernovice)) {
mes "[Croix Army Officer]";
mes "I'm very pleased that you want to join us and fight the Guillaume Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
}
Expand Down Expand Up @@ -253,7 +253,7 @@ bat_room,148,178,5 script Flavius Officer#02a 418,{
next;
switch(select("I want to join your army!:End Conversation")) {
case 1:
if ((Class == job_Novice) || (BaseClass == Job_Supernovice)) {
if ((Class == Job_Novice) || (BaseClass == Job_Supernovice)) {
mes "[Guillaume Army Officer]";
mes "I'm very pleased that you want to join us and fight the Croix Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
}
Expand Down Expand Up @@ -320,7 +320,7 @@ bat_room,148,121,1 script Flavius Officer#02b 414,{
next;
switch(select("I want to join your army!:End Conversation")) {
case 1:
if ((Class == job_Novice) || (BaseClass == Job_Supernovice)) {
if ((Class == Job_Novice) || (BaseClass == Job_Supernovice)) {
mes "[Croix Army Officer]";
mes "I'm very pleased that you want to join us and fight the Guillaume Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
}
Expand Down
4 changes: 2 additions & 2 deletions npc/battleground/kvm/kvm01.txt
Expand Up @@ -55,11 +55,11 @@ bat_room,169,211,0 warp #kvm802 2,2,bat_room,154,150
end;

OnKvM01One:
misceffect EF_CHANGECOLD;
specialeffect EF_CHANGECOLD;
end;

OnKvM01Two:
misceffect EF_CHANGEPOISON;
specialeffect EF_CHANGEPOISON;
end;
}

Expand Down
4 changes: 2 additions & 2 deletions npc/battleground/kvm/kvm02.txt
Expand Up @@ -57,11 +57,11 @@ bat_room,197,211,0 warp #kvm602 2,2,bat_room,154,150
end;

OnKvM02One:
misceffect EF_CHANGECOLD;
specialeffect EF_CHANGECOLD;
end;

OnKvM02Two:
misceffect EF_CHANGEPOISON;
specialeffect EF_CHANGEPOISON;
end;
}

Expand Down
4 changes: 2 additions & 2 deletions npc/battleground/kvm/kvm03.txt
Expand Up @@ -56,11 +56,11 @@ bat_room,225,211,0 warp #kvm702 2,2,bat_room,154,150
end;

OnKvM03One:
misceffect EF_CHANGECOLD;
specialeffect EF_CHANGECOLD;
end;

OnKvM03Two:
misceffect EF_CHANGEPOISON;
specialeffect EF_CHANGEPOISON;
end;
}

Expand Down
2 changes: 1 addition & 1 deletion npc/battleground/kvm/kvm_item_pay.txt
Expand Up @@ -57,7 +57,7 @@ bat_room,151,144,3 script KVM Logistic Officer#a 734,{
mes "points. So, be carefull when";
mes "selecting a reward.";
close2;
ReadBook 11017,1;
readbook 11017,1;
end;
case 2:
mes "[Logistics]";
Expand Down
8 changes: 4 additions & 4 deletions npc/battleground/tierra/tierra_enter.txt
Expand Up @@ -30,7 +30,7 @@ bat_room,124,178,5 script Tierra Gorge Officer#01a 418,{
next;
switch(select("I want to join your army!:End Conversation")) {
case 1:
if ((Class == job_Novice) || (BaseClass == Job_Supernovice)) {
if ((Class == Job_Novice) || (BaseClass == Job_Supernovice)) {
mes "[Guillaume Army Officer]";
mes "I'm very pleased that you want to join us and fight the Croix Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
}
Expand Down Expand Up @@ -97,7 +97,7 @@ bat_room,140,178,5 script Tierra Gorge Officer#02a 418,{
next;
switch(select("I want to join your army!:End Conversation")) {
case 1:
if ((Class == job_Novice) || (BaseClass == Job_Supernovice)) {
if ((Class == Job_Novice) || (BaseClass == Job_Supernovice)) {
mes "[Guillaume Army Officer]";
mes "I'm very pleased that you want to join us and fight the Croix Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
}
Expand Down Expand Up @@ -262,7 +262,7 @@ bat_room,125,121,1 script Tierra Gorge Officer#01b 414,{
next;
switch(select("I want to join your army!:End Conversation")) {
case 1:
if ((Class == job_Novice) || (BaseClass == Job_Supernovice)) {
if ((Class == Job_Novice) || (BaseClass == Job_Supernovice)) {
mes "[Croix Army Officer]";
mes "I'm very pleased that you want to join us and fight the Guillaume Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
}
Expand Down Expand Up @@ -329,7 +329,7 @@ bat_room,140,121,1 script Tierra Gorge Officer#02b 414,{
next;
switch(select("I want to join your army!:End Conversation")) {
case 1:
if ((Class == job_Novice) || (BaseClass == Job_Supernovice)) {
if ((Class == Job_Novice) || (BaseClass == Job_Supernovice)) {
mes "[Croix Army Officer]";
mes "I'm very pleased that you want to join us and fight the Guillaume Army, but I'm sorry: I can't send a rookie like you to die on the cruel battlefield.";
}
Expand Down
12 changes: 6 additions & 6 deletions npc/cities/aldebaran.txt
@@ -1,7 +1,7 @@
//===== rAthena Script =======================================
//= Al De Baran Town
//===== By: ==================================================
//= rAthena dev team; L0ne_W0lf
//= rAthena Dev Team; L0ne_W0lf
//===== Current Version: =====================================
//= 2.3
//===== Compatible With: =====================================
Expand All @@ -10,8 +10,8 @@
//= [Official Conversion]
//= Al De Baran Town NPCs
//===== Additional Comments: =================================
//= v1.1 Added RS125 NPC. Added another Kafra Reserve points agent.
//= The 2nd reserve points agent is not complete yet.
//= 1.1 Added RS125 NPC. Added another Kafra Reserve points agent.
//= The 2nd reserve points agent is not complete yet.
//= 1.2 Lottery input number fix [Lupus], 1.2a - label typo fixed
//= 1.3 Gatekeeper's bug fixed (wrong check and wrong item ID
//= for underground), fixed some typos [Lupus]
Expand All @@ -23,8 +23,8 @@
//= 1.7 Fixed exploits [Lupus] 1.8 Removed Duplicates [Silent]
//= 1.9 Fixed a bunch of typos with information from Crono/Hollengrhen [Evera]
//= 1.9a Now Pavianne doesn't sell Kafra Passes. She refunds them [Lupus]
//= 2.0 Re-made all the dialog-only NPCs with official dialogs.
//= Kafra and Clock Tower NPCs pending remake. [DZeroX]
//= 2.0 Re-made all the dialog-only NPCs with official dialogs.
//= Kafra and Clock Tower NPCs pending remake. [DZeroX]
//= 2.01 removed all .GATs [Lupus]
//= 2.1 Rescripted most NPCs to Aegis 10.3 standards. [L0ne_W0lf]
//= 2.2 Corrected NPC names to fall within proper resctrictions. [L0ne_W0lf]
Expand Down Expand Up @@ -687,7 +687,7 @@ aldeba_in,156,179,4 script Master#alde 61,{
mes "Who's your";
mes "favorite Kafra girl?";
next;
if (sex == 0) {
if (Sex == 0) {
mes "[Master]";
mes "Oh, and don't worry. I know that girls have some kind of opinion about how pretty other girls are.";
next;
Expand Down
4 changes: 2 additions & 2 deletions npc/cities/amatsu.txt
Expand Up @@ -11,7 +11,7 @@
//= Amatsu Town Script
//===== Additional Comments: =================================
//= 1.3 Rescripted to Aegis 10.3 Standards. [L0ne_W0lf]
//= Moved elemental stone trader to 'elemental_trader.txt'
//= Moved elemental stone trader to 'elemental_trader.txt'
//= 1.4 Moved Alberta NPC to pre-re/re paths. [Euphy]
//============================================================

Expand Down Expand Up @@ -98,7 +98,7 @@
mes "[Walter Moers]";
mes "Alright, I will start the engine!";
close2;
set zeny,zeny-10000;
set Zeny, Zeny-10000;
warp "amatsu",197,83;
end;
}
Expand Down
6 changes: 3 additions & 3 deletions npc/cities/ayothaya.txt
Expand Up @@ -58,7 +58,7 @@
mes "Let us be off! Back to my";
mes "beautiful Ayotaya!";
close2;
set zeny,zeny-10000;
set Zeny, Zeny-10000;
warp "ayothaya",149,71;
end;
}
Expand Down Expand Up @@ -304,8 +304,8 @@ ayothaya,241,264,5 script Young Man#5ayothaya2 843,{
//= 0.1 Added a Sailor NPC to get back to Alberta [ZoDIaC]
//= 0.2 fixed coords, dialogues
//= 0.3 Fixed Warp name, ayotaya doesn't exist, even though iRO
//= decided to call it Ayotaya, it really is Ayothaya, like
//= that Yuno/Juno thing
//= decided to call it Ayotaya, it really is Ayothaya, like
//= that Yuno/Juno thing
//= 0.4 Added the official warp npc for Ayothaya. [MasterOfMuppets]
//= 1.0 Added most of the official npcs. The following quests were added: [MasterOfMuppets]
//= Tom Yum Goong quest, Holy Threads quest and Holier threads quest.
Expand Down
4 changes: 2 additions & 2 deletions npc/cities/comodo.txt
Expand Up @@ -351,12 +351,12 @@ cmd_fild07,299,83,4 script Zain#cmd 100,{
switch(select("Alberta - 600 Zeny:Izlude - 800 Zeny:Cancel")) {
case 1:
if (Zeny < 600) break;
set zeny,zeny-600;
set Zeny, Zeny-600;
warp "alberta",192,169;
end;
case 2:
if (Zeny < 800) break;
set zeny,zeny-800;
set Zeny, Zeny-800;
if(checkre(0))
warp "izlude",195,212;
else
Expand Down
6 changes: 3 additions & 3 deletions npc/cities/einbech.txt
Expand Up @@ -18,7 +18,7 @@
//= 1.0 Added the last of the town npcs, [MasterOfMuppets]
//= all credits to muad_dib for scripting them.
//= 1.1 Made some changes according to the Shinokas quest, [MasterOfMuppets]
//= thanks to Dj-Yhn for scripting them.
//= thanks to Dj-Yhn for scripting them.
//= 1.2 Removed Duplicates [Silent]
//= 1.3 Implemented the Lover's quest. [MasterOfMuppets]
//= 1.4 Moved quests to quests/quests_ein.txt [Evera]
Expand Down Expand Up @@ -214,7 +214,7 @@ einbech,39,215,5 script Train Station Staff#ein3 852,{
mes "we hope you enjoy";
mes "the ride. All aboard!";
close2;
set zeny,zeny-200;
set Zeny, Zeny-200;
warp "einbroch",226,276;
end;
}
Expand Down Expand Up @@ -989,7 +989,7 @@ einbech,148,246,5 script Franz#ein 851,{
mes "Now those aggressive teddy";
mes "bears are scattered all over";
mes "the place and the government";
mes " has classified them as monsters. Kill with extreme prejudice!";
mes "has classified them as monsters. Kill with extreme prejudice!";
next;
mes "[Franz]";
mes "According to adventurers";
Expand Down
14 changes: 7 additions & 7 deletions npc/cities/einbroch.txt
Expand Up @@ -15,14 +15,14 @@
//= 0.4a Added exp bonus for the factory quest, borrowed from a Korean fansite.
//= 0.4b Added missing close [Komurka]
//= 0.5 Added Temporal Locations of Gunslinger Job Change map.
//= Info provided by RockmanEXE [erKURITA]
//= Info provided by RockmanEXE [erKURITA]
//= 0.6 Implemented a crap quest [MasterOfMuppets]
//= 0.7 Implemented an inn NPC [MasterOfMuppets]
//= 0.8 Implemented the Shinokas quest, thanks to [MasterOfMuppets]
//= Dj-Yhn for scripting it.
//= Dj-Yhn for scripting it.
//= 0.9 Removed Duplicates [Silent]
//= 1.0 Implemented the Lover's quest. [MasterOfMuppets]
//= 1.1 Split quests into quests/cities_einbroch.txt [Evera]
//= 1.1 Split quests into quests/cities_einbroch.txt [Evera]
//= 1.2 Split more quests into above file [Evera]
//= 1.3 Added (finally) the Garrison quest npc [erKURITA]
//= 1.4 Implemented the polution script. [MasterOfMuppets]
Expand Down Expand Up @@ -130,7 +130,7 @@ function script EinTower {
mes "using our services.";
mes "Let me guide you to";
mes "the tower right away.";
set zeny,zeny-10;
set Zeny, Zeny-10;
close2;
warp "einbroch",181,196;
end;
Expand All @@ -157,7 +157,7 @@ function script EinTower {
mes "using our services.";
mes "Let me guide you to";
mes "the tower right away.";
set zeny,zeny-20;
set Zeny, Zeny-20;
getitem 512,1; //Apple
close2;
warp "einbroch",174,204;
Expand Down Expand Up @@ -205,7 +205,7 @@ einbroch,232,272,3 script Train Station Staff#ein1::EinbrochTrain 852,{
mes "Have a safe trip.";
mes "^333333*Ahem*^000000 All aboard!";
close2;
set zeny,zeny-200;
set Zeny, Zeny-200;
warp "einbech",43,215;
end;
}
Expand Down Expand Up @@ -836,7 +836,7 @@ ein_in01,206,224,3 script Hotel Employee#ein 855,{
mes "Please enjoy";
mes "your rest~";
close2;
set zeny,zeny-5000;
set Zeny, Zeny-5000;
percentheal 100,100;
warp "ein_in01",272,167;
end;
Expand Down

0 comments on commit bf68cce

Please sign in to comment.