Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Major custom folder update!
These scripts have been chosen for being unique and useful, yet structurally simple. In this way, they can serve as usable reference material for future user scripts. Contents: * Battleground: bg_emp (Emperium breaker), bg_pvp (PVP match) * Event: mvp_ladder (kill every MVP to win), devil_square (3-round monster summoning event) * Utility: card_seller (sells all monster cards), mvp_room (private MVP summoning room), autopot (automatically use potions when hit) Credits to AnnieRuru for offering up her scripts and modifying them for use. Other changes: * Moved previous custom battleground scripts into 'battleground/unofficial/'. * Moved custom holiday event scripts into 'event/holiday/'. Signed-off-by: Euphy <euphy.raliel@rathena.org>
- Loading branch information
Showing
with
1,528 additions
and 20 deletions.
- +148 −0 npc/custom/battleground/bg_emp.txt
- +127 −0 npc/custom/battleground/bg_pvp.txt
- 0 npc/custom/battleground/{ → unofficial}/bg_common.txt
- 0 npc/custom/battleground/{ → unofficial}/bg_flavius_01.txt
- 0 npc/custom/battleground/{ → unofficial}/bg_flavius_02.txt
- 0 npc/custom/battleground/{ → unofficial}/bg_kvm01.txt
- 0 npc/custom/battleground/{ → unofficial}/bg_kvm02.txt
- 0 npc/custom/battleground/{ → unofficial}/bg_kvm03.txt
- 0 npc/custom/battleground/{ → unofficial}/bg_tierra_01.txt
- 0 npc/custom/battleground/{ → unofficial}/bg_tierra_02.txt
- +72 −0 npc/custom/card_seller.txt
- +188 −0 npc/custom/etc/autopot.txt
- +401 −0 npc/custom/etc/mvp_room.txt
- +234 −0 npc/custom/events/devil_square.txt
- +6 −3 npc/custom/events/disguise.txt
- 0 npc/custom/events/{ → holiday}/hallow06.txt
- 0 npc/custom/events/{ → holiday}/uneasy_cemetery.txt
- 0 npc/custom/events/{ → holiday}/valentinesdayexp.txt
- 0 npc/custom/events/{ → holiday}/xmas_rings_event.txt
- +319 −0 npc/custom/events/mvp_ladder.txt
- +5 −1 npc/custom/quests/hunting_missions.txt
- +28 −16 npc/scripts_custom.conf
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -0,0 +1,148 @@ | ||
| //===== rAthena Script ======================================= | ||
| //= Battleground: Emperium | ||
| //===== By: ================================================== | ||
| //= AnnieRuru | ||
| //===== Current Version: ===================================== | ||
| //= 1.0 | ||
| //===== Compatible With: ===================================== | ||
| //= rAthena Project | ||
| //===== Description: ========================================= | ||
| //= A simple battleground script: | ||
| //= Destroy the opponent's Emperium to win the match. | ||
| //===== Additional Comments: ================================= | ||
| //= 1.0 First version, edited. [Euphy] | ||
| //============================================================ | ||
|
|
||
| - script bg_emp#control -1,{ | ||
| OnInit: | ||
| .minplayer2start = 1; // minimum players to start (ex. if 3vs3, set to 3) | ||
| .eventlasting = 20*60; // event duration before auto-reset (20 minutes * seconds) | ||
| setarray .rewarditem[0], // rewards for the winning team: <item>,<amount>,... | ||
| 501, 10; | ||
|
|
||
| .team1name$ = "Red"; | ||
| .team2name$ = "Blue"; | ||
| end; | ||
| OnStart: | ||
| if ( getwaitingroomstate( 0, .rednpcname$ ) < .minplayer2start || getwaitingroomstate( 0, .bluenpcname$ ) < .minplayer2start ) | ||
| end; | ||
|
|
||
| // create Battleground and teams | ||
| .red = waitingroom2bg( "bat_a01", 157,347, strnpcinfo(0)+"::OnRedQuit", strnpcinfo(0)+"::OnRedDead", .rednpcname$ ); | ||
| copyarray .team1aid, $@arenamembers, $@arenamembersnum; | ||
| .team1count = .minplayer2start; | ||
| .blue = waitingroom2bg( "bat_a01", 142,51, strnpcinfo(0)+"::OnBlueQuit", strnpcinfo(0)+"::OnBlueDead", .bluenpcname$ ); | ||
| copyarray .team2aid, $@arenamembers, $@arenamembersnum; | ||
| .team2count = .minplayer2start; | ||
| delwaitingroom .rednpcname$; | ||
| delwaitingroom .bluenpcname$; | ||
| disablenpc .rednpcname$; | ||
| disablenpc .bluenpcname$; | ||
| setwall "bat_a01", 164,347, 6, 4, 0, "bg_emp_town_red"; | ||
| setwall "bat_a01", 154,51, 6, 4, 0, "bg_emp_town_blue"; | ||
| bg_warp .red, "bat_a01", 171,346; | ||
| bg_warp .blue, "bat_a01", 162,50; | ||
| bg_updatescore "bat_a01", 0, 0; | ||
|
|
||
| // delay before match begins | ||
| sleep 6000; | ||
| mapannounce "bat_a01", "The rules are simple. The first team to break the opponent's Emperium wins!", bc_map; | ||
| sleep 3000; | ||
| for ( .@i = 5; .@i > 0; .@i-- ) { | ||
| mapannounce "bat_a01", "["+ .@i +"]", bc_map; | ||
| sleep 1000; | ||
| } | ||
| mapannounce "bat_a01", "Start!", bc_map; | ||
|
|
||
| // spawn Emperiums | ||
| bg_monster .red,"bat_a01",171,346, "--ja--",1915, strnpcinfo(3)+"::OnRedDown"; | ||
| bg_monster .blue,"bat_a01",162,50, "--ja--",1914, strnpcinfo(3)+"::OnBlueDown"; | ||
| delwall "bg_emp_town_red"; | ||
| delwall "bg_emp_town_blue"; | ||
|
|
||
| // match duration | ||
| sleep .eventlasting * 1000; | ||
|
|
||
| // end match, destroy Battleground, reset NPCs | ||
| killmonster "bat_a01", strnpcinfo(3)+"::OnRedDown"; | ||
| killmonster "bat_a01", strnpcinfo(3)+"::OnBlueDown"; | ||
| if ( .winside ) { | ||
| mapannounce "bat_a01", "- "+ getd( ".team"+ .winside +"name$" ) +" Team is victorious! -", bc_map; | ||
| for ( .@i = 0; .@i < getd(".team"+ .winside +"count"); .@i++ ) | ||
| getitem .rewarditem[0], .rewarditem[1], getd(".team"+ .winside +"aid["+ .@i +"]" ); | ||
| } else | ||
| mapannounce "bat_a01", "- The match has ended in a draw! -", bc_map; | ||
| sleep 5000; | ||
| bg_warp .red, "prontera", 155,182; | ||
| bg_warp .blue, "prontera", 158,182; | ||
| bg_destroy .red; | ||
| bg_destroy .blue; | ||
| delwall "bg_emp_town_red"; | ||
| delwall "bg_emp_town_blue"; | ||
| deletearray .team1aid; | ||
| deletearray .team2aid; | ||
| .winside = .team1count = .team2count = 0; | ||
| enablenpc .rednpcname$; | ||
| enablenpc .bluenpcname$; | ||
| donpcevent .rednpcname$ +"::OnStart"; | ||
| donpcevent .bluenpcname$ +"::OnStart"; | ||
| end; | ||
|
|
||
| // Emperium destroyed | ||
| OnRedDown: callsub L_EmpDown, 1, 2; | ||
| OnBlueDown: callsub L_EmpDown, 2, 1; | ||
| L_EmpDown: | ||
| mapannounce "bat_a01", strcharinfo(0) +" has destroyed "+ getd( ".team"+ getarg(0) +"name$" ) +" Team's Emperium.", bc_map; | ||
| .winside = getarg(1); | ||
| awake strnpcinfo(0); | ||
| end; | ||
|
|
||
| // "OnDeath" event | ||
| OnRedDead: | ||
| OnBlueDead: | ||
| sleep2 1250; | ||
| percentheal 100,100; | ||
| end; | ||
|
|
||
| // "OnQuit" event | ||
| OnRedQuit: callsub L_Quit, 1, 2; | ||
| OnBlueQuit: callsub L_Quit, 2, 1; | ||
| L_Quit: | ||
| percentheal 100, 100; | ||
| while ( getd( ".team"+ getarg(0) +"aid["+ .@i +"]" ) != getcharid(3) && .@i < getd(".team"+ getarg(0) +"count") ) .@i++; | ||
| deletearray getd( ".team"+ getarg(0) +"aid["+ .@i +"]" ), 1; | ||
| setd ".team"+ getarg(0) +"count", getd(".team"+ getarg(0) +"count") -1; | ||
| if ( getd(".team"+ getarg(0) +"count") ) end; | ||
| mapannounce "bat_a01", "All "+ getd( ".team"+ getarg(0) +"name$" ) +" team members have quit!", bc_map, 0xff3333; | ||
| end; | ||
| } | ||
|
|
||
| prontera,155,182,5 script Red Team#bg_emp 733,{ | ||
| end; | ||
| OnInit: | ||
| sleep 1; | ||
| set getvariableofnpc( .rednpcname$, "bg_emp#control" ), strnpcinfo(0); | ||
| OnStart: | ||
| waitingroom "Red Team", getvariableofnpc( .minplayer2start, "bg_emp#control" ) +1, "bg_emp#control::OnStart", getvariableofnpc( .minplayer2start, "bg_emp#control" ); | ||
| end; | ||
| } | ||
|
|
||
| prontera,158,182,5 script Blue Team#bg_emp 734,{ | ||
| end; | ||
| OnInit: | ||
| sleep 1; | ||
| set getvariableofnpc( .bluenpcname$, "bg_emp#control" ), strnpcinfo(0); | ||
| OnStart: | ||
| waitingroom "Blue Team", getvariableofnpc( .minplayer2start, "bg_emp#control" ) +1, "bg_emp#control::OnStart", getvariableofnpc( .minplayer2start, "bg_emp#control" ); | ||
| end; | ||
| } | ||
|
|
||
| bat_a01 mapflag battleground | ||
| bat_a01 mapflag nosave SavePoint | ||
| bat_a01 mapflag nowarp | ||
| bat_a01 mapflag nowarpto | ||
| bat_a01 mapflag noteleport | ||
| bat_a01 mapflag nomemo | ||
| bat_a01 mapflag nopenalty | ||
| bat_a01 mapflag nobranch | ||
| bat_a01 mapflag noicewall |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -0,0 +1,127 @@ | ||
| //===== rAthena Script ======================================= | ||
| //= Battleground: PVP | ||
| //===== By: ================================================== | ||
| //= AnnieRuru | ||
| //===== Current Version: ===================================== | ||
| //= 1.0 | ||
| //===== Compatible With: ===================================== | ||
| //= rAthena Project | ||
| //===== Description: ========================================= | ||
| //= A simple battleground script: | ||
| //= Kill players from the other team. | ||
| //===== Additional Comments: ================================= | ||
| //= 1.0 First version, edited. [Euphy] | ||
| //============================================================ | ||
|
|
||
| - script bg_pvp#control -1,{ | ||
| OnInit: | ||
| .minplayer2start = 2; // minimum players to start (ex. if 3vs3, set to 3) | ||
| .eventlasting = 20*60; // event duration before auto-reset (20 minutes * seconds) | ||
| setarray .rewarditem[0], // rewards for the winning team: <item>,<amount>,... | ||
| 501, 10; | ||
| end; | ||
| OnStart: | ||
| if ( getwaitingroomstate( 0, .rednpcname$ ) < .minplayer2start || getwaitingroomstate( 0, .bluenpcname$ ) < .minplayer2start ) | ||
| end; | ||
|
|
||
| // create Battleground and teams | ||
| .red = waitingroom2bg( "guild_vs3", 13,50, strnpcinfo(0)+"::OnRedQuit", strnpcinfo(0)+"::OnRedDead", .rednpcname$ ); | ||
| copyarray .team1aid, $@arenamembers, $@arenamembersnum; | ||
| .team1count = .minplayer2start; | ||
| .blue = waitingroom2bg( "guild_vs3", 86,50, strnpcinfo(0)+"::OnBlueQuit", strnpcinfo(0)+"::OnBlueDead", .bluenpcname$ ); | ||
| copyarray .team2aid, $@arenamembers, $@arenamembersnum; | ||
| .team2count = .minplayer2start; | ||
| delwaitingroom .rednpcname$; | ||
| delwaitingroom .bluenpcname$; | ||
| bg_warp .red, "guild_vs3", 13,50; | ||
| bg_warp .blue, "guild_vs3", 86,50; | ||
| .score[1] = .score[2] = .minplayer2start; | ||
| bg_updatescore "guild_vs3", .score[1], .score[2]; | ||
|
|
||
| // match duration | ||
| sleep .eventlasting * 1000; | ||
|
|
||
| // end match, destroy Battleground, reset NPCs | ||
| if ( .score[1] > .score[2] ) { | ||
| mapannounce "guild_vs3", "- Red Team is victorious! -", bc_map; | ||
| callsub L_Reward, 1; | ||
| } | ||
| else if ( .score[1] < .score[2] ) { | ||
| mapannounce "guild_vs3", "- Blue Team is victorious! -", bc_map; | ||
| callsub L_Reward, 2; | ||
| } | ||
| else | ||
| mapannounce "guild_vs3", "- The match has ended in a draw! -", bc_map; | ||
| bg_warp .red, "prontera",152,178; | ||
| bg_warp .blue, "prontera",154,178; | ||
| bg_destroy .red; | ||
| bg_destroy .blue; | ||
| donpcevent .rednpcname$ +"::OnStart"; | ||
| donpcevent .bluenpcname$ +"::OnStart"; | ||
| end; | ||
|
|
||
| L_Reward: | ||
| for ( .@i = 0; .@i < getd(".team"+ getarg(0) +"count"); .@i++ ) | ||
| getitem .rewarditem[0], .rewarditem[1], getd(".team"+ getarg(0) +"aid["+ .@i +"]" ); | ||
| return; | ||
|
|
||
| // "OnDeath" event | ||
| OnRedDead: callsub L_Dead, 1; | ||
| OnBlueDead: callsub L_Dead, 2; | ||
| L_Dead: | ||
| .score[ getarg(0) ]--; | ||
| bg_updatescore "guild_vs3", .score[1], .score[2]; | ||
| while ( getd( ".team"+ getarg(0) +"aid["+ .@i +"]" ) != getcharid(3) && .@i < getd(".team"+ getarg(0) +"count") ) .@i++; | ||
| deletearray getd( ".team"+ getarg(0) +"aid["+ .@i +"]" ), 1; | ||
| setd ".team"+ getarg(0) +"count", getd(".team"+ getarg(0) +"count") -1; | ||
| bg_leave; | ||
| if ( !.score[ getarg(0) ] ) | ||
| awake strnpcinfo(0); | ||
| sleep2 1250; | ||
| percentheal 100,100; | ||
| end; | ||
|
|
||
| // "OnQuit" event | ||
| OnRedQuit: callsub L_Quit, 1; | ||
| OnBlueQuit: callsub L_Quit, 2; | ||
| L_Quit: | ||
| .score[ getarg(0) ]--; | ||
| bg_updatescore "guild_vs3", .score[1], .score[2]; | ||
| percentheal 100, 100; | ||
| while ( getd( ".team"+ getarg(0) +"aid["+ .@i +"]" ) != getcharid(3) && .@i < getd(".team"+ getarg(0) +"count") ) .@i++; | ||
| deletearray getd( ".team"+ getarg(0) +"aid["+ .@i +"]" ), 1; | ||
| setd ".team"+ getarg(0) +"count", getd(".team"+ getarg(0) +"count") -1; | ||
| if ( !.score[ getarg(0) ] ) | ||
| awake strnpcinfo(0); | ||
| end; | ||
| } | ||
|
|
||
| prontera,152,178,5 script Red Team#bg_pvp 733,{ | ||
| end; | ||
| OnInit: | ||
| sleep 1; | ||
| set getvariableofnpc( .rednpcname$, "bg_pvp#control" ), strnpcinfo(0); | ||
| OnStart: | ||
| waitingroom "Red Team", getvariableofnpc( .minplayer2start, "bg_pvp#control" ) +1, "bg_pvp#control::OnStart", getvariableofnpc( .minplayer2start, "bg_pvp#control" ); | ||
| end; | ||
| } | ||
|
|
||
| prontera,154,178,5 script Blue Team#bg_pvp 734,{ | ||
| end; | ||
| OnInit: | ||
| sleep 1; | ||
| set getvariableofnpc( .bluenpcname$, "bg_pvp#control" ), strnpcinfo(0); | ||
| OnStart: | ||
| waitingroom "Blue Team", getvariableofnpc( .minplayer2start, "bg_pvp#control" ) +1, "bg_pvp#control::OnStart", getvariableofnpc( .minplayer2start, "bg_pvp#control" ); | ||
| end; | ||
| } | ||
|
|
||
| guild_vs3 mapflag battleground 2 | ||
| guild_vs3 mapflag nosave SavePoint | ||
| guild_vs3 mapflag nowarp | ||
| guild_vs3 mapflag nowarpto | ||
| guild_vs3 mapflag noteleport | ||
| guild_vs3 mapflag nomemo | ||
| guild_vs3 mapflag nopenalty | ||
| guild_vs3 mapflag nobranch | ||
| guild_vs3 mapflag noicewall |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -0,0 +1,72 @@ | ||
| //===== rAthena Script ======================================= | ||
| //= Card Seller A-Z | ||
| //===== By: ================================================== | ||
| //= AnnieRuru | ||
| //===== Current Version: ===================================== | ||
| //= 1.0 | ||
| //===== Compatible With: ===================================== | ||
| //= rAthena Project | ||
| //===== Description: ========================================= | ||
| //= Sells all cards dropped by mobs, grouped alphabetically. | ||
| //= MVP cards are excluded from the list. | ||
| //= | ||
| //= NOTE: Requires SQL item and mob databases. | ||
| //===== Additional Comments: ================================= | ||
| //= 1.0 First version, edited. [Euphy] | ||
| //============================================================ | ||
|
|
||
| prontera,155,177,5 script Card Seller 100,{ | ||
| mes "[Card Seller]"; | ||
| mes "Welcome!"; | ||
| mes "I can sell you any normal monster card in the game. Would you like to have a look?"; | ||
| next; | ||
| .@s = select( .alphabet_menu$ ) -1; | ||
| close2; | ||
| callshop "card_mob#"+ .alphabet$[.@s], 1; | ||
| end; | ||
| OnInit: | ||
| if (checkre(0)) { | ||
| .@mob_db$ = "mob_db_re"; | ||
| .@item_db$ = "item_db_re"; | ||
| } else { | ||
| .@mob_db$ = "mob_db"; | ||
| .@item_db$ = "item_db"; | ||
| } | ||
| freeloop 1; | ||
| .@total = query_sql( "SELECT DISTINCT LEFT( `name_japanese`, 1 ) AS alphabets FROM `"+ .@item_db$ +"` RIGHT JOIN `"+ .@mob_db$ +"` ON `"+ .@item_db$ +"`.`id` = `"+ .@mob_db$ +"`.`dropcardid` WHERE ~(`MODE`) & 32 AND `type` = 6 GROUP BY `name_japanese` ORDER BY alphabets;", .alphabet$ ); | ||
| for ( .@i = 0; .@i < .@total; .@i++ ) { | ||
| .alphabet_menu$ = .alphabet_menu$ + .alphabet$[.@i] +" Cards:"; | ||
| .@nb = query_sql( "SELECT `"+ .@item_db$ +"`.`id` FROM `"+ .@item_db$ +"` RIGHT JOIN `"+ .@mob_db$ +"` ON `"+ .@item_db$ +"`.`id` = `"+ .@mob_db$ +"`.`dropcardid` WHERE ~(`MODE`) & 32 AND `type` = 6 AND LEFT( `name_japanese`, 1 ) = '"+ .alphabet$[.@i] +"' GROUP BY `name_japanese` ORDER BY `name_japanese` LIMIT 128;", .@id ); | ||
| npcshopdelitem "card_mob#"+ .alphabet$[.@i], 501; | ||
| for ( .@j = 0; .@j < .@nb; .@j++ ) | ||
| npcshopadditem "card_mob#"+ .alphabet$[.@i], .@id[.@j], 1000000; | ||
| } | ||
| freeloop 0; | ||
| end; | ||
| } | ||
| - shop card_mob#A -1,501:1000 | ||
| - shop card_mob#B -1,501:1000 | ||
| - shop card_mob#C -1,501:1000 | ||
| - shop card_mob#D -1,501:1000 | ||
| - shop card_mob#E -1,501:1000 | ||
| - shop card_mob#F -1,501:1000 | ||
| - shop card_mob#G -1,501:1000 | ||
| - shop card_mob#H -1,501:1000 | ||
| - shop card_mob#I -1,501:1000 | ||
| - shop card_mob#J -1,501:1000 | ||
| - shop card_mob#K -1,501:1000 | ||
| - shop card_mob#L -1,501:1000 | ||
| - shop card_mob#M -1,501:1000 | ||
| - shop card_mob#N -1,501:1000 | ||
| - shop card_mob#O -1,501:1000 | ||
| - shop card_mob#P -1,501:1000 | ||
| - shop card_mob#Q -1,501:1000 | ||
| - shop card_mob#R -1,501:1000 | ||
| - shop card_mob#S -1,501:1000 | ||
| - shop card_mob#T -1,501:1000 | ||
| - shop card_mob#U -1,501:1000 | ||
| - shop card_mob#V -1,501:1000 | ||
| - shop card_mob#W -1,501:1000 | ||
| - shop card_mob#X -1,501:1000 | ||
| - shop card_mob#Y -1,501:1000 | ||
| - shop card_mob#Z -1,501:1000 |
Oops, something went wrong.