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>
This commit is contained in:
Euphy 2014-02-02 17:35:28 -05:00
parent c9cf2228a3
commit 163a98cbc4
22 changed files with 1528 additions and 20 deletions

View File

@ -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

View File

@ -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

View File

@ -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

188
npc/custom/etc/autopot.txt Normal file
View File

@ -0,0 +1,188 @@
//===== rAthena Script =======================================
//= Auto-Potion
//===== By: ==================================================
//= Euphy
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//= Provides an @autopot command to automatically use potions
//= when hit (i.e. 'autobonus2').
//===== Additional Comments: =================================
//= 1.0 First version. [Euphy]
//============================================================
- script #autopot -1,{
OnInit:
bindatcmd("autopot",strnpcinfo(0)+"::OnCommand");
end;
L_Help:
dispbottom "Available commands:";
dispbottom " @autopot <item id> {<min hp % [1..100]> {<delay [50..1000]>}}";
dispbottom " @autopot <on|off>";
dispbottom " @autopot list";
dispbottom " @autopot info";
dispbottom " @autopot help";
return;
L_Info:
dispbottom "------ Auto-Potion Information ------";
dispbottom "POTION: " + getitemname(@autopot_id) + " (" + @autopot_id + ")";
dispbottom "MIN HP: " + @autopot_min + " %";
dispbottom "DELAY: " + @autopot_delay + " ms";
dispbottom "---------------------------------------------";
return;
L_Start:
.@potion = getarg(0);
.@min = getarg(1);
.@delay = getarg(2);
if (.@min < 1 || .@min > 100) .@min = 90;
if (.@delay < 50 || .@delay > 1000) .@delay = 50; // lower values will increase server strain
switch (.@potion) {
case 501:
case 507:
case 545:
case 569: .@effect = EF_POTION1; break;
case 502: .@effect = EF_POTION2; break;
case 503:
case 508:
case 546:
case 579:
case 11500: .@effect = EF_POTION3; break;
case 504:
case 509:
case 547:
case 11501:
case 11503:
case 11548: .@effect = EF_POTION4; break;
case 512:
case 513:
case 515:
case 516:
case 548:
case 549:
case 550:
case 582:
case 607: .@effect = EF_POTION7; break;
default: .@effect = EF_EXIT; break;
}
if (BaseLevel < getiteminfo(.@potion,12)) {
message strcharinfo(0), "Your base level is too low to use '" + getitemname(.@potion) + "'.";
end;
}
@autopot_id = .@potion;
@autopot_min = .@min;
@autopot_delay = .@delay;
@autopot_eff = .@effect;
@autopot_none = 0;
bonus_script "{ callfunc \"start_autopot\"; }",86400,8,0,SI_INCHEALRATE;
message strcharinfo(0), "Auto-Potion started.";
callsub L_Info;
return;
OnCommand:
if (!getarraysize(.@atcmd_parameters$)) {
message strcharinfo(0), "Invalid syntax.";
callsub L_Help;
end;
}
.@command$ = strtolower(.@atcmd_parameters$[0]);
if (.@command$ == "on") {
if (@autopot_min)
message strcharinfo(0), "Auto-Potion is already on.";
else if (@autopot_min_) {
@autopot_min = @autopot_min_;
@autopot_min_ = 0;
message strcharinfo(0), "Auto-Potion enabled.";
callsub L_Info;
} else {
message strcharinfo(0), "Auto-Potion has not been set.";
callsub L_Help;
}
end;
} else if (.@command$ == "off") {
if (!@autopot_min)
message strcharinfo(0), "Auto-Potion is already off.";
else {
@autopot_min_ = @autopot_min;
@autopot_min = 0;
message strcharinfo(0), "Auto-Potion disabled.";
}
end;
} else if (.@command$ == "list") { // credits to AnnieRuru
getinventorylist;
for (; .@i < @inventorylist_count; .@i++) {
if (getiteminfo(@inventorylist_id[.@i],2) == IT_HEALING) {
.@items[.@count] = @inventorylist_id[.@i];
.@menu$ = .@menu$ + sprintf("~ ^0055FF%s^000000 (%dx):", getitemname(@inventorylist_id[.@i]), countitem(@inventorylist_id[.@i]));
.@count++;
}
}
if (.@count) { // 'mes' window needed if player is hit during selection
mes "[ Auto-Potion ]";
mes "Select a healing item.";
.@select = select(.@menu$ + " ^777777Cancel^000000") - 1;
if (.@select != .@count)
callsub L_Start, .@items[.@select], 0, 0;
close2;
} else
message strcharinfo(0), "There are no healing items in your inventory.";
end;
} else if (.@command$ == "info") {
if (@autopot_min) {
message strcharinfo(0), "Auto-Potion information is displayed below.";
callsub L_Info;
} else
message strcharinfo(0), "Auto-Potion is not enabled.";
end;
} else if (.@command$ == "help") {
message strcharinfo(0), "List of commands is displayed below.";
callsub L_Help;
end;
} else {
.@potion = atoi(.@atcmd_parameters$[0]);
if (getiteminfo(.@potion,2) != IT_HEALING) {
message strcharinfo(0), getitemname(.@potion) + " is not a healing item.";
end;
}
callsub L_Start, .@potion, atoi(.@atcmd_parameters$[1]), atoi(.@atcmd_parameters$[2]);
end;
}
}
function script start_autopot {
if (@autopot_active) end;
@autopot_active = 1;
while (Hp && Hp * 100 / MaxHp < @autopot_min) {
if (!countitem(@autopot_id)) {
if (@autopot_none <= gettimetick(2)) {
@autopot_none = gettimetick(2) + 10;
dispbottom "There are no '" + getitemname(@autopot_id) + "' in your inventory.";
}
break;
}
if (getstatus(SC_BERSERK) || getstatus(SC_SATURDAYNIGHTFEVER) || getstatus(SC_GRAVITATION) ||
getstatus(SC_TRICKDEAD) || getstatus(SC_HIDING) || getstatus(SC__SHADOWFORM) || getstatus(SC__INVISIBILITY) ||
getstatus(SC__MANHOLE) || getstatus(SC_KAGEHUMI) || getstatus(SC_HEAT_BARREL_AFTER))
break;
if (getstatus(SC_STONE) || getstatus(SC_FREEZE) || getstatus(SC_STUN) || getstatus(SC_SLEEP))
;
else {
delitem @autopot_id,1;
consumeitem @autopot_id;
specialeffect2 @autopot_eff;
}
sleep2 @autopot_delay;
}
@autopot_active = 0;
autobonus2 "{}",10000,1,BF_WEAPON|BF_MAGIC;
end;
}

401
npc/custom/etc/mvp_room.txt Normal file
View File

@ -0,0 +1,401 @@
//===== rAthena Script =======================================
//= Private MVP & Branch Room
//===== By: ==================================================
//= AnnieRuru
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//= Allows players to rent an MVP room for personal use,
//= or for a party or guild.
//===== Additional Comments: =================================
//= 1.0 First version, edited. [Euphy]
//============================================================
prontera,148,174,5 script Private MVP Room 100,{
mes "[Private MVP Room]";
mes "Please select a private MVP room.";
if ( getvariableofnpc( .rentcost, "MVP Summoner" ) )
mes "The cost to rent a room for "+ getvariableofnpc( .timeout, "MVP Summoner" ) +" minutes is "+ callfunc("F_InsertComma", getvariableofnpc( .rentcost, "MVP Summoner" ) ) +" zeny.";
else
mes "You can only use the room for only "+ getvariableofnpc( .timeout, "MVP Summoner" ) +" minutes.";
mes " ";
for ( .@i = 1; .@i <= 8; .@i++ )
if ( getvariableofnpc( .renttime[.@i], "MVP Summoner" ) )
mes "Room #"+ .@i +" = "+ .color$[ .type[.@i] ] + .whoinuse$[.@i] +"^000000";
next;
.@room = select(
"MVP Room 1 ["+ getmapusers("06guild_01") +"]",
"MVP Room 2 ["+ getmapusers("06guild_02") +"]",
"MVP Room 3 ["+ getmapusers("06guild_03") +"]",
"MVP Room 4 ["+ getmapusers("06guild_04") +"]",
"MVP Room 5 ["+ getmapusers("06guild_05") +"]",
"MVP Room 6 ["+ getmapusers("06guild_06") +"]",
"MVP Room 7 ["+ getmapusers("06guild_07") +"]",
"MVP Room 8 ["+ getmapusers("06guild_08") +"]");
if ( getvariableofnpc( .renttime[.@room], "MVP Summoner" ) ) {
if ( .inuseid[.@room] == getcharid( .type[.@room] ) ) {
warp "06guild_0"+ .@room, 0,0;
close;
} else {
mes "[Private MVP Room]";
mes "This room is reserved for ";
mes .color$[ .type[.@room] ] + .whoinuse$[.@room] +"^000000.";
mes "Please select another.";
close;
}
}
mes "[Private MVP Room]";
mes "Reserve this room for...";
next;
set .@type, select( "For my party members", "For my guild members", "For personal account use" );
if ( !getcharid(.@type) ) {
mes "[Private MVP Room]";
mes "You do not own a "+( ( .@type == 1 )? "Party" : "Guild" )+".";
close;
}
else if ( Zeny < getvariableofnpc( .rentcost, "MVP Summoner" ) ) {
mes "You don't have enough zeny to rent a room.";
close;
}
else if ( getvariableofnpc( .renttime[.@room], "MVP Summoner" ) ) {
mes "[Private MVP Room]";
mes "I'm sorry, somebody else has already registered this room faster than you.";
close;
}
for ( .@i = 1; .@i <= 8; .@i++ ) {
if ( ( getvariableofnpc( .renttime[.@i], "MVP Summoner" ) ) && .@type == .type[.@i] && getcharid(.@type) == .inuseid[.@i] ) {
mes "[Private MVP Room]";
mes "You already rented Room#"+ .@i +". Use that room instead.";
close;
}
}
set .type[.@room], .@type;
set .inuseid[.@room], getcharid(.@type);
set .whoinuse$[.@room], strcharinfo( ( .@type == 3 )? 0 : .@type );
Zeny -= getvariableofnpc( .rentcost, "MVP Summoner" );
warp "06guild_0"+ .@room, 0,0;
killmonsterall "06guild_0"+ .@room;
donpcevent "MVP Summoner#"+ .@room +"::OnEnterMap";
close;
OnInit:
.color$[1] = "^EE8800"; // party color
.color$[2] = "^70CC11"; // guild color
.color$[3] = "^0000FF"; // account color
end;
}
- script MVP Summoner -1,{
mes "[MVP Summoner]";
mes "Time left: " + callfunc( "Time2Str", .renttime[ atoi( strnpcinfo(2) ) ] + .timeout * 60 );
mes "Hi, what can I do for you?";
next;
switch ( select(.menu$) ) {
case 1:
mes "[MVP Summoner]";
if ( mobcount( "this", strnpcinfo(3)+"::OnMobDead" ) ) {
mes "I cannot offer heal service when there are monsters around.";
close;
}
sc_end SC_STONE;
sc_end SC_SLOWDOWN;
sc_end SC_FREEZE;
sc_end SC_SLEEP;
sc_end SC_CURSE;
sc_end SC_SILENCE;
sc_end SC_CONFUSION;
sc_end SC_BLIND;
sc_end SC_BLEEDING;
sc_end SC_DECREASEAGI;
sc_end SC_POISON;
sc_end SC_HALLUCINATION;
sc_end SC_STRIPWEAPON;
sc_end SC_STRIPARMOR;
sc_end SC_STRIPHELM;
sc_end SC_STRIPSHIELD;
sc_end SC_CHANGEUNDEAD;
sc_end SC_ORCISH;
sc_end SC_BERSERK;
sc_end SC_SKE;
sc_end SC_SWOO;
sc_end SC_SKA;
percentheal 100,100;
specialeffect2 EF_HEAL;
mes "You are completely healed.";
close;
case 2:
if ( mobcount( "this", strnpcinfo(3)+"::OnMobDead" ) ) {
mes "[MVP Summoner]";
mes "I cannot summon another MVP when there are monsters around.";
close;
} else if ( .mvpcost ) {
mes "[MVP Summoner]";
mes "The cost to summon an MVP is "+ callfunc( "F_InsertComma", .mvpcost ) +" zeny.";
next;
set .@menu, select(.mvpid_menu$) -1;
mes "[MVP Summoner]";
if ( Zeny < .mvpcost ) {
mes "You don't have enough zeny to summon an MVP.";
close;
}
} else {
set .@menu, select(.mvpid_menu$) -1;
mes "[MVP Summoner]";
}
mes "Please get ready.";
close2;
if ( Zeny < .mvpcost ) end;
Zeny -= .mvpcost;
monster "this", 0, 0, "--ja--", .mvpid[.@menu], 1, strnpcinfo(3)+"::OnMobDead";
end;
case 3:
if ( mobcount( "this", strnpcinfo(3)+"::OnMobDead" ) ) {
mes "[MVP Summoner]";
mes "I cannot summon another mini-boss when there are monsters around.";
close;
} else if ( .bosscost ) {
mes "[MVP Summoner]";
mes "The cost to summon a mini-boss is "+ callfunc( "F_InsertComma", .bosscost ) +" zeny.";
next;
set .@menu, select(.bossid_menu$) -1;
mes "[MVP Summoner]";
if ( Zeny < .bosscost ) {
mes "You doesn't have enough zeny to summon a mini-boss.";
close;
}
} else {
set .@menu, select(.bossid_menu$) -1;
mes "[MVP Summoner]";
}
mes "Please get ready.";
close2;
if ( Zeny < .bosscost ) end;
Zeny -= .bosscost;
monster "this", 0, 0, "--ja--", .bossid[.@menu], 1, strnpcinfo(3)+"::OnMobDead";
end;
case 4:
if ( mobcount( "this", strnpcinfo(3)+"::OnMobDead" ) > 0 ) {
mes "[MVP Summoner]";
mes "I cannot offer this service when there are monsters around.";
close;
}
close2;
callshop "MVP room#branch", 1;
end;
case 5:
mes "[MVP Summoner]";
mes "Are you sure you want to leave this room?";
next;
if ( select( "Yes:No") == 1 )
warp .respawnmap$, .respawnx, .respawny;
close;
case 6:
mes "[MVP Summoner]";
if ( getmapusers( strcharinfo(3) ) > 1 ) {
mes "There are still some players in this room. Make sure you are the last member in this room to use this option.";
close;
}
mes "Are you sure you want to give up this room?";
if ( .rentcost )
mes "You will need to pay again to enter this room.";
next;
if ( select( "Yes", "No" ) == 2 ) close;
awake strnpcinfo(0);
end;
}
close;
OnMobDead:
end;
OnEnterMap:
.@id = atoi( strnpcinfo(2) );
.renttime[.@id] = gettimetick(2);
sleep .timeout * 60000;
mapwarp strnpcinfo(4), .respawnmap$, .respawnx, .respawny;
.renttime[.@id] = 0;
killmonsterall strnpcinfo(4);
end;
OnInit:
if ( !getstrlen( strnpcinfo(2) ) ) {
// Config ---------------------------------------------------------------------------------------
// Room rental time, in minutes.
// When time runs out, all players inside the room will be kicked out.
// Do NOT set this to zero!
set .timeout, 60;
set .rentcost, 100000; // Zeny cost for renting a room (0 = free)
set .mvpcost, 100000; // Zeny cost to summon an MVP (0 = free)
set .bosscost, 50000; // Zeny cost to summon a boss monster (0 = free)
// Options setting inside MVP room
set .@menu[1], 1; // Turn Heal option On/Off
set .@menu[2], 1; // Turn MVP Summoning On/Off
set .@menu[3], 1; // Turn Mini boss Summoning On/Off
set .@menu[4], 0; // Sell items (branches) On/Off (see shop below, before the mapflags)
// Respawn point when players leave the room
set .respawnmap$, "prontera";
set .respawnx, 150;
set .respawny, 174;
setarray .mvpid[0],
1511,// Amon Ra
1647,// Assassin Cross Eremes
1785,// Atroce
1630,// Bacsojin
1039,// Baphomet
1874,// Beelzebub
1272,// Dark Lord
1719,// Datale
1046,// Doppelgangger
1389,// Dracula
1112,// Drake
1115,// Eddga
1418,// Evil Snake Lord
1871,// Fallen Bishop
1252,// Garm
1768,// Gloom Under Night
1086,// Golden Thief Bug
1885,// Gopinich
1649,// High Priest Magaleta
1651,// High Wizard Katrinn
1832,// Ifrit
1492,// Incantation Samurai
1734,// Kiel D-01
1251,// Knight of Windstorm
1779,// Ktullanux
1688,// Lady Tanee
1646,// Lord Knight Seyren
1373,// Lord of Death
1147,// Maya
1059,// Mistress
1150,// Moonlight Flower
1087,// Orc Hero
1190,// Orc Lord
1038,// Osiris
1157,// Pharaoh
1159,// Phreeoni
1623,// RSX 0806
1650,// Sniper Shecil
1583,// Tao Gunka
1708,// Thanatos
1312,// Turtle General
1751,// Valkyrie Randgris
1685,// Vesper
1648,// Whitesmith Harword
1917,// Wounded Morroc
1658;// Ygnizem
setarray .bossid[0],
1096,// Angeling
1388,// Archangeling
1795,// Bloody Knight
1830,// Bow Guardian
1839,// Byorgue
1309,// Cat O' Nine Tail
1283,// Chimera
1302,// Dark Illusion
1198,// Dark Priest
1582,// Deviling
1091,// Dragon Fly
1093,// Eclipse
1205,// Executioner
1783,// Galion
1592,// Gangster
1120,// Ghostring
1259,// Gryphon
1720,// Hydro
1090,// Mastering
1289,// Maya Purple
1262,// Mutant Dragon
1203,// Mysteltainn
1870,// Necromancer
1295,// Owl Baron
1829,// Sword Guardian
1204,// Tirfing
1089,// Toad
1092,// Vagabond Wolf
1765;// Valkyrie
// Config Ends ------------------------------------------------------------------------
if ( !.timeout ) set .timeout, 60;
.menu$ = ( .@menu[1] ? "Heal" : "" ) +":" ;
.menu$ = .menu$ + ( .@menu[2] ? "Summon MVP" : "" ) +":";
.menu$ = .menu$ + ( .@menu[3] ? "Summon Mini-boss" : "" ) +":";
.menu$ = .menu$ + ( .@menu[4] ? "Buy branches" : "" ) +":";
.menu$ = .menu$ + "Leave this room:Give up this room";
if ( .@menu[2] ) {
.@size = getarraysize( .mvpid );
for ( .@i = 0; .@i < .@size; .@i++ )
.mvpid_menu$ = .mvpid_menu$ + getmonsterinfo( .mvpid[.@i], MOB_NAME ) +":";
}
if ( .@menu[3] ) {
.@size = getarraysize( .bossid );
for ( .@i = 0; .@i < .@size; .@i++ )
.bossid_menu$ = .bossid_menu$ + getmonsterinfo( .bossid[.@i], MOB_NAME ) +":";
}
}
else {
mapannounce strnpcinfo(4), "An administrator has refreshed the server. Please re-register this room.", bc_map;
mapwarp strnpcinfo(4), .respawnmap$, .respawnx, .respawny;
}
end;
}
- shop MVP room#branch -1,604:100000,12103:1000000
06guild_01,49,49,4 duplicate(MVP Summoner) MVP Summoner#1 116
06guild_02,49,49,4 duplicate(MVP Summoner) MVP Summoner#2 116
06guild_03,49,49,4 duplicate(MVP Summoner) MVP Summoner#3 116
06guild_04,49,49,4 duplicate(MVP Summoner) MVP Summoner#4 116
06guild_05,49,49,4 duplicate(MVP Summoner) MVP Summoner#5 116
06guild_06,49,49,4 duplicate(MVP Summoner) MVP Summoner#6 116
06guild_07,49,49,4 duplicate(MVP Summoner) MVP Summoner#7 116
06guild_08,49,49,4 duplicate(MVP Summoner) MVP Summoner#8 116
06guild_01 mapflag nowarpto
06guild_02 mapflag nowarpto
06guild_03 mapflag nowarpto
06guild_04 mapflag nowarpto
06guild_05 mapflag nowarpto
06guild_06 mapflag nowarpto
06guild_07 mapflag nowarpto
06guild_08 mapflag nowarpto
06guild_01 mapflag nomemo
06guild_02 mapflag nomemo
06guild_03 mapflag nomemo
06guild_04 mapflag nomemo
06guild_05 mapflag nomemo
06guild_06 mapflag nomemo
06guild_07 mapflag nomemo
06guild_08 mapflag nomemo
06guild_01 mapflag noteleport
06guild_02 mapflag noteleport
06guild_03 mapflag noteleport
06guild_04 mapflag noteleport
06guild_05 mapflag noteleport
06guild_06 mapflag noteleport
06guild_07 mapflag noteleport
06guild_08 mapflag noteleport
06guild_01 mapflag nosave SavePoint
06guild_02 mapflag nosave SavePoint
06guild_03 mapflag nosave SavePoint
06guild_04 mapflag nosave SavePoint
06guild_05 mapflag nosave SavePoint
06guild_06 mapflag nosave SavePoint
06guild_07 mapflag nosave SavePoint
06guild_08 mapflag nosave SavePoint
06guild_01 mapflag nopenalty
06guild_02 mapflag nopenalty
06guild_03 mapflag nopenalty
06guild_04 mapflag nopenalty
06guild_05 mapflag nopenalty
06guild_06 mapflag nopenalty
06guild_07 mapflag nopenalty
06guild_08 mapflag nopenalty

View File

@ -0,0 +1,234 @@
//===== rAthena Script =======================================
//= Devil Square
//===== By: ==================================================
//= Kirlein, Stillhard (translation), AnnieRuru (rewrite)
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//= Devil Square, based on the event in MU Online.
//= Defeat three waves of monsters for treasure.
//===== Additional Comments: =================================
//= 1.0 First version, edited. [Euphy]
//============================================================
prontera,156,185,5 script Devil Square Guardian#1 406,{
set .@gm_level, 99; // GM level required to start/stop the event
mes "[Devil Square Guardian]";
mes "This is the entrance to ^FF0000Devil Square^000000.";
mes "If you fail or die, the door will close and you must wait until the event starts again to re-enter.";
next;
switch(select("Enter.:Information.:" + ((getgmlevel() >= .@gm_level) ? "GM Menu." : "") + ":Cancel.")) {
case 1:
if (.start != 1) { // registration period
mes "[Devil Square Guardian]";
mes "Devil Square is now closed.";
mes "It will open at these times:";
mes "00:00 , 02:00 , 04:00 , 06:00"; // display your times here
mes "08:00 , 10:00 , 12:00 , 14:00";
mes "16:00 , 18:00 , 20:00 , 22:00";
close;
}
if (BaseLevel < 70 || Zeny < 20000) { // requirements
mes "[Devil Square Guardian]";
mes "You do not meet the requirements to enter Devil Square.";
mes " ";
mes "Requirements:";
mes " - Base Level 70";
mes " - Registration fee 20,000z";
close;
}
Zeny -= 20000;
announce strcharinfo(0)+" has entered Devil Square.", bc_npc;
percentheal 100,100;
warp "ordeal_1-1",183,182;
close;
case 2:
mes "[Devil Square Guardian]";
mes "Inside, you will encounter 3 waves of monsters. The monsters will grow stronger with each wave.";
next;
mes "[Devil Square Guardian]";
mes "If you defeat all the enemies, you will be given the opportunity to open 10 Treasure Chests with items, equipment, and rare cards inside!";
close;
case 3:
mes "[Devil Square Guardian]";
switch (.start) { // event states
case 0: mes "Devil Square has not yet started."; break;
case 1: mes "Devil Square is currently accepting participants."; break;
case 2: mes "Devil Square Event is currently running on Round "+ .round +" with "+ .mob +" monsters remaining."; break;
}
next;
switch(select("Start event.:Stop event.:Cancel.")) {
case 1:
mes "[Devil Square Guardian]";
if (.start)
mes "Devil Square has already started.";
else {
mes "Starting Devil Square...";
donpcevent strnpcinfo(0)+"::OnStartEvent";
}
close;
case 2:
mes "[Devil Square Guardian]";
if (!.start)
mes "Devil Square has not yet started.";
else {
mes "Stopping Devil Square...";
donpcevent strnpcinfo(0)+"::OnStopEvent";
}
close;
case 3:
break;
}
break;
case 4:
break;
}
mes "[Devil Square Guardian]";
mes "Farewell.";
close;
OnStartEvent:
OnClock0000:
OnClock0200:
OnClock0400:
OnClock0600:
OnClock0800:
OnClock1000:
OnClock1200:
OnClock1400:
OnClock1600:
OnClock1800:
OnClock2000:
OnClock2200:
.start = 1;
disablenpc "ord11-12"; //from npc/warps/pvp.txt
disablenpc "Devil Square Guardian#2";
mapannounce "ordeal_1-1","Devil Square is now closed.", bc_map;
getmapxy .@map$, .@x, .@y, 1;
mapwarp "ordeal_1-1", .@map$, .@x, .@y;
killmonsterall "ordeal_1-1";
announce "Devil Square is OPEN. The event will begin in 5 minutes.", bc_all;
sleep 60000;
announce "Devil Square will begin in 4 minutes.", bc_all;
sleep 60000;
announce "Devil Square will begin in 3 minutes.", bc_all;
sleep 60000;
announce "Devil Square will begin in 2 minutes.", bc_all;
sleep 60000;
announce "Devil Square will begin in 1 minute.", bc_all;
sleep 60000;
announce "Devil Square has STARTED!", bc_all;
if ( !getmapusers("ordeal_1-1") )
goto OnStopEvent;
.start = 2;
.round = 1;
.mob = 75;
areamonster "ordeal_1-1",183,182,246,244,"[DS] SOLDIER SKELETON",1028,10,strnpcinfo(0)+"::OnDevilDead";
areamonster "ordeal_1-1",183,182,246,244,"[DS] ORC ARCHER",1189,15,strnpcinfo(0)+"::OnDevilDead";
areamonster "ordeal_1-1",183,182,246,244,"[DS] SANDMAN",1165,10,strnpcinfo(0)+"::OnDevilDead";
areamonster "ordeal_1-1",183,182,246,244,"[DS] ARCHER SKELETON",1016,15,strnpcinfo(0)+"::OnDevilDead";
areamonster "ordeal_1-1",183,182,246,244,"[DS] MINOROUS",1149,15,strnpcinfo(0)+"::OnDevilDead";
areamonster "ordeal_1-1",183,182,246,244,"[DS] REQUIEM",1164,10,strnpcinfo(0)+"::OnDevilDead";
end;
OnDevilDead:
.mob--;
if ( .mob == 25 || .mob == 5 )
announce "Devil Square : "+ .mob +" monsters remaining in round 1.", bc_map;
else if ( .mob <= 0 ) {
announce "Devil Square is entering round 2...", bc_map;
goto OnDevil2;
}
end;
OnDevil2:
.round = 2;
.mob = 70;
areamonster "ordeal_1-1",183,182,246,244,"[DS] GARGOYLE",1253,15,strnpcinfo(0)+"::OnDevilDead2";
areamonster "ordeal_1-1",183,182,246,244,"[DS] ALARM",1193,10,strnpcinfo(0)+"::OnDevilDead2";
areamonster "ordeal_1-1",183,182,246,244,"[DS] HIGH ORC",1213,10,strnpcinfo(0)+"::OnDevilDead2";
areamonster "ordeal_1-1",183,182,246,244,"[DS] INJUSTICE",1257,10,strnpcinfo(0)+"::OnDevilDead2";
areamonster "ordeal_1-1",183,182,246,244,"[DS] MIMIC",1191,15,strnpcinfo(0)+"::OnDevilDead2";
areamonster "ordeal_1-1",183,182,246,244,"[DS] WRAITH",1192,10,strnpcinfo(0)+"::OnDevilDead2";
end;
OnDevilDead2:
.mob--;
if ( .mob == 25 || .mob == 5 )
announce "Devil Square : "+ .mob +" monsters remaining in round 2.", bc_map;
else if ( .mob <= 0 ) {
announce "Devil Square is entering round 3...", bc_map;
goto OnDevil3;
}
end;
OnDevil3:
.round = 3;
.mob = 58;
areamonster "ordeal_1-1",183,182,246,244,"[DS] ANOLIAN",1206,15,strnpcinfo(0)+"::OnDevilDead3";
areamonster "ordeal_1-1",183,182,246,244,"[DS] WANDERER",1208,15,strnpcinfo(0)+"::OnDevilDead3";
areamonster "ordeal_1-1",183,182,246,244,"[DS] DEVIRUCHI",1109,10,strnpcinfo(0)+"::OnDevilDead3";
areamonster "ordeal_1-1",183,182,246,244,"[DS] JOKER",1131,15,strnpcinfo(0)+"::OnDevilDead3";
areamonster "ordeal_1-1",183,182,246,244,"[DS] MOONLIGHT",1150,2,strnpcinfo(0)+"::OnDevilDead3";
areamonster "ordeal_1-1",183,182,246,244,"[DS] DARK ILLUSION",1302,1,strnpcinfo(0)+"::OnDevilDead3";
end;
OnDevilDead3:
.mob--;
if ( .mob == 25 || .mob == 5 )
announce "Devil Square : "+ .mob +" monsters remaining in the final round.", bc_map;
else if ( .mob <= 0 ) {
announce "Devil Square : CONGRATULATIONS. These 10 Treasure Chests are yours.", bc_map;
goto OnDevil4;
}
end;
OnDevil4:
.round = 4;
.mob = 10;
monster "ordeal_1-1",231,250,"Treasure Chest",1324,1,strnpcinfo(0)+"::OnTreasureDead";
monster "ordeal_1-1",234,247,"Treasure Chest",1328,1,strnpcinfo(0)+"::OnTreasureDead";
monster "ordeal_1-1",237,244,"Treasure Chest",1332,1,strnpcinfo(0)+"::OnTreasureDead";
monster "ordeal_1-1",240,241,"Treasure Chest",1336,1,strnpcinfo(0)+"::OnTreasureDead";
monster "ordeal_1-1",243,238,"Treasure Chest",1340,1,strnpcinfo(0)+"::OnTreasureDead";
monster "ordeal_1-1",246,235,"Treasure Chest",1344,1,strnpcinfo(0)+"::OnTreasureDead";
monster "ordeal_1-1",249,232,"Treasure Chest",1348,1,strnpcinfo(0)+"::OnTreasureDead";
monster "ordeal_1-1",252,229,"Treasure Chest",1352,1,strnpcinfo(0)+"::OnTreasureDead";
monster "ordeal_1-1",249,241,"Treasure Chest",1356,1,strnpcinfo(0)+"::OnTreasureDead";
monster "ordeal_1-1",240,249,"Treasure Chest",1360,1,strnpcinfo(0)+"::OnTreasureDead";
end;
OnTreasureDead:
.mob--;
announce "Devil Square : "+ strcharinfo(0) +" has opened the Treasure Chest at Devil Square.", bc_all;
if ( .mob <= 0 )
goto OnStopEvent;
end;
OnStopEvent:
killmonsterall "ordeal_1-1";
enablenpc "ord11-12"; //from npc/warps/pvp.txt
enablenpc "Devil Square Guardian#2";
.start = .round = .mob = 0;
end;
}
ordeal_1-1,246,245,7 script Devil Square Guardian#2 406,{
mes "[Exit]";
mes "Farewell.";
close2;
warp "SavePoint",0,0;
end;
}
ordeal_1-1 mapflag nowarp
ordeal_1-1 mapflag nowarpto
ordeal_1-1 mapflag noteleport
ordeal_1-1 mapflag nosave SavePoint
ordeal_1-1 mapflag nomemo
ordeal_1-1 mapflag nobranch
ordeal_1-1 mapflag nopenalty
ordeal_1-1 mapflag noicewall

View File

@ -4,10 +4,13 @@
//= GmOcean
//===== Current Version: =====================================
//= 5.1
//===== Compatible With: =====================================
//===== Compatible With: =====================================
//= rAthena Project
//===== Additional Comments: =================================
//= Note: This script requires PCRE to run properly.
//===== Description: =========================================
//= Guess a monster name correctly for prizes.
//=
//= NOTE: Requires PCRE library installed.
//===== Additional Comments: =================================
//= 5.0 Last update by GmOcean.
//= 5.1 Cleaned and standardized, mostly. [Euphy]
//============================================================

View File

@ -0,0 +1,319 @@
//===== rAthena Script =======================================
//= MVP Ladder Game
//===== By: ==================================================
//= aftermath, AnnieRuru (rewrite)
//===== Current Version: =====================================
//= 1.0
//===== Compatible With: =====================================
//= rAthena Project
//===== Description: =========================================
//= Gather a party and kill every MVP in ascending order.
//===== Additional Comments: =================================
//= 1.0 First version, edited. [Euphy]
//============================================================
prontera,164,171,3 script MvP Ladder Warper 56,{
mes "[MvP Ladder Warper]";
mes "Say... do you want to play the MvP Ladder game?";
next;
switch(select("Yes, let's get it on!:Information.:Show me the best record.:No.")) {
case 1:
break;
case 2:
mes "[MvP Ladder Warper]";
mes "In this game, your party has to kill every single MvP monster in ascending order, from the weakest to strongest.";
if ( .finish_item_amount )
mes "If your party can finish the MVP ladder game, each member will earn "+ callfunc("F_InsertPlural", .finish_item_amount, getitemname( .finish_item_id )) +".";
if ( .register_cost )
mes "But the entrance fee is "+ callfunc( "F_InsertComma", .register_cost ) +" zeny.";
next;
mes "[MvP Ladder Warper]";
mes "You lose the game if you can't finish in "+ .timeout +" minutes, or if your entire party is killed.";
mes "Good luck!";
close;
case 3:
mes "[MvP Ladder Warper]";
if ( !$mvpladdderparty_time ) {
mes "Nobody has finished this game yet.";
close;
}
mes "The best record is";
mes "[ "+( $mvpladdderparty_time / 60 )+" min "+( $mvpladdderparty_time % 60 )+" sec ]";
mes "By the party ^FF0000"+ $mvpladdderparty_name$ +"^000000.";
.@size = getarraysize( $mvpladderparty_member$ );
for ( .@i = 0; .@i < .@size; .@i++ )
mes "^000000"+ ( .@i +1 ) +". ^0000FF"+ $mvpladderparty_member$[.@i];
if ( getgmlevel() < .gmlvlreset ) close;
next;
if ( select( "Close.", "Reset the record." ) == 1 ) close;
if ( select( "Never mind.", "I really want to reset it." ) == 1 ) close;
$mvpladdderparty_time = 0;
$mvpladdderparty_name$ = "";
deletearray $mvpladderparty_member$[.@i];
mes "[MvP Ladder Warper]";
mes "Record reset successfully.";
close;
case 4:
mes "[MvP Ladder Warper]";
mes "When you are strong enough to complete the game, please come back.";
close;
}
if ( !getcharid(1) ) {
mes "[MvP Ladder Warper]";
mes "You have to form a party to play.";
close;
}
if ( getpartyleader( getcharid(1), 2 ) != getcharid(0) ) {
mes "[MvP Ladder Warper]";
mes "Only the party leader can register.";
close;
}
.@origin = getcharid(3);
getpartymember getcharid(1), 1;
getpartymember getcharid(1), 2;
for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
attachrid $@partymemberaid[.@i];
if ( strcharinfo(3) == strnpcinfo(4) )
.@online++;
}
}
attachrid .@origin;
if ( $@partymembercount != .register_min ) {
mes "[MvP Ladder Warper]";
mes "You have to form a party with exactly "+ .register_min +" members to play.";
close;
}
else if ( .@online != .register_min ) {
mes "[MvP Ladder Warper]";
mes "Your party must have "+ .register_min +" members online on map '"+ strnpcinfo(4) +"'.";
close;
}
else if ( .register_cost && Zeny < .register_cost ) {
mes "[MvP Ladder Warper]";
mes "You don't have enough zeny. Please come back when you do.";
close;
}
else if ( .party_id ) {
mes "[MvP Ladder Warper]";
mes "I'm sorry, but a party is currently playing the game. Please standby until the party is finished.";
mes "Thank you.";
close;
}
Zeny -= .register_cost;
announce "The party ["+ strcharinfo(1) +"] has started the MvP ladder game.", bc_all;
set .party_id, getcharid(1);
set .@time_enter, gettimetick(2);
for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
attachrid $@partymemberaid[.@i];
if ( strcharinfo(3) == strnpcinfo(4) ) {
announce "You have "+ .timeout +" minutes to complete "+ .totalround +" rounds.", bc_self;
.@name$[.@c] = strcharinfo(0);
.@c++;
}
}
}
cleanmap .eventmap$;
warpparty .eventmap$, 0,0, .party_id, strnpcinfo(4);
donpcevent strnpcinfo(0)+"::OnMvpDead";
sleep .timeout * 60000;
if ( .round == .totalround +1 ) {
getpartymember .party_id, 1;
getpartymember .party_id, 2;
mapannounce .eventmap$, "Congratulations... You were able to defeat all the MVPs!", bc_map;
for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
attachrid $@partymemberaid[.@i];
if ( strcharinfo(3) == .eventmap$ )
getitem .finish_item_id, .finish_item_amount;
}
}
set .@timeused, gettimetick(2) - .@time_enter;
if ( .bonus_item_amount && .@timeused < .bonus_time * 60 ) {
mapannounce .eventmap$, "You are rewarded a bonus item for completing the ladder within "+ .bonus_time +" minutes.", bc_map;
for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
attachrid $@partymemberaid[.@i];
if ( strcharinfo(3) == .eventmap$ )
getitem .bonus_item_id, .bonus_item_amount;
}
}
}
if ( !$mvpladdderparty_time || .@timeused < $mvpladdderparty_time ) {
mapannounce .eventmap$, "And you broke the record! [ "+( .@timeused / 60 )+" min "+( .@timeused % 60 )+" sec ]", bc_map;
set $mvpladdderparty_time, .@timeused;
set $mvpladdderparty_name$, getpartyname( .party_id );
copyarray $mvpladderparty_member$, .@name$, .register_min;
}
else
mapannounce .eventmap$, "Time used [ "+( .@timeused / 60 )+" min "+( .@timeused % 60 )+" sec ]", bc_map;
sleep 10000;
announce "The party ["+ getpartyname( .party_id ) +"] has finished the MvP ladder game!", bc_all;
}
else
announce "The party ["+ getpartyname( .party_id ) +"] has failed to finish the MvP ladder game.", bc_all;
mapwarp .eventmap$, .map$, .x, .y;
killmonsterall .eventmap$;
.party_id = .round = 0;
end;
OnMvpDead:
.round++;
if ( .round >= 2 && .round != .totalround +1 && .round_item_amount ) {
for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
attachrid $@partymemberaid[.@i];
if ( strcharinfo(3) == .eventmap$ )
getitem .round_item_id, .round_item_amount;
}
}
}
if ( .round == .totalround +1 ) {
awake strnpcinfo(0);
end;
}
else if ( .round == .totalround )
mapannounce .eventmap$, "The final Round will begin in "+ .delay +" seconds...", bc_map;
else
mapannounce .eventmap$, "Starting round "+ .round +" in "+ .delay +" seconds...", bc_map;
sleep .delay * 1000;
if ( .mvpid[.round] == 1646 ) // pick random Bio3 MVP
.mvpid[.round] = rand(1646,1651);
monster .eventmap$,0,0, "--ja--", .mvpid[.round], 1, strnpcinfo(0)+"::OnMvpDead";
mapannounce .eventmap$, getmonsterinfo( .mvpid[.round], MOB_NAME ) +" has spawned!", bc_map|bc_blue;
end;
OnPCLogoutEvent:
if ( hp > 0 )
.@less_one = 1;
else
end;
OnPCDieEvent:
if ( strcharinfo(3) != .eventmap$ || !getcharid(1) ) end;
if ( getcharid(1) != .party_id ) end;
getpartymember .party_id, 1;
getpartymember .party_id, 2;
for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
attachrid $@partymemberaid[.@i];
if ( strcharinfo(3) == .eventmap$ && hp > 0 )
.@alive++;
}
}
if ( .@less_one )
.@alive--;
if ( !.@alive ) {
mapannounce .eventmap$, "Party wiped!", bc_map;
sleep 10000;
awake strnpcinfo(0);
}
end;
OnInit:
// Configurations -----------------------------------------------------
// Time limit (in minutes)
// When time runs out, all players inside the room will be kicked out.
// Do NOT set this to zero!
set .timeout, 60;
// entrance fee (in Zeny)
set .register_cost, 100000;
// exact amount of party members needed to start the game
set .register_min, 2;
// id of each mvp. you can add more
setarray .mvpid[1],
1086,// Golden Thief Bug 64
1115,// Eddga 65
1150,// Moonlight Flower 67
1159,// Phreeoni 69
1112,// Drake 70
1583,// Tao Gunka 70
1492,// Incantation Samurai 71
1046,// Doppelgangger 72
1252,// Garm 73
1418,// Evil Snake Lord 73
1059,// Mistress 74
1190,// Orc Lord 74
1087,// Orc Hero 77
1251,// Knight of Windstorm 77
1038,// Osiris 78
1658,// Ygnizem 79
1272,// Dark Lord 80
1871,// Fallen Bishop 80
1039,// Baphomet 81
1147,// Maya 81
1785,// Atroce 82
1389,// Dracula 85
1630,// Bacsojin 85
1885,// Gorynych 85
1623,// RSX 0806 86
1511,// Amon Ra 88
1688,// Lady Tanee 89
1768,// Gloom Under Night 89
1719,// Datale 90
1734,// Kiel D-01 90
1157,// Pharaoh 93
1373,// Lord of Death 94
1312,// Turtle General 97
1779,// Ktullanux 98
1874,// Beelzebub 98
1646,// Bio3 placeholder 99
1708,// Thanatos 99
1751,// Valkyrie Randgris 99
1832;// Ifrit 99
// number of rounds (default: 39)
set .totalround, getarraysize(.mvpid) -1;
// item reward for completing each round
set .round_item_id, 512;
set .round_item_amount, 1;
// item reward for completing the entire ladder
set .finish_item_id, 501;
set .finish_item_amount, 10;
// bonus reward if ladder completed within a certain time (in minutes)
set .bonus_time, 45; // if completed within 45 minutes, this reward is given
set .bonus_item_id, 504;
set .bonus_item_amount, 10;
// time delay between rounds, in seconds (default: 3)
set .delay, 5;
// minimum GM level to reset the best record
set .gmlvlreset, 99;
// event map
set .eventmap$, "guild_vs2-2";
// mapflag configuration
setarray .@mapflag,
mf_nowarp,
mf_nowarpto,
mf_nosave,
mf_nomemo,
mf_noteleport,
// mf_nopenalty, // disable exp loss
// mf_noreturn,
// mf_nobranch,
// mf_nomobloot, // disable monster drop loots,
// mf_nomvploot, // 2 of these
mf_partylock;
// Config Ends --------------------------------------------------------------
mapannounce .eventmap$, "An administrator has refreshed the server. Please re-register. We apologize for the inconvenience.", bc_map;
getmapxy .map$, .x, .y, 1;
mapwarp .eventmap$, .map$, .x, .y;
killmonsterall .eventmap$;
.@size = getarraysize( .@mapflag );
for ( .@i = 0; .@i < .@size; .@i++ )
setmapflag .eventmap$, .@mapflag[.@i];
end;
}

View File

@ -9,6 +9,8 @@
//===== Description: =========================================
//= Random hunting missions.
//= Rewards are based on quest difficulty.
//=
//= NOTE: Requires SQL mob database.
//===== Additional Comments: =================================
//= 1.0 Initial script.
//= 1.1 Small improvements and fixes.
@ -54,7 +56,7 @@ function Chk;
close;
}
mes "You must hunt:";
query_sql("SELECT ID FROM `mob_db` WHERE left(Sprite, 4) != 'meta' AND left(Sprite, 2) != 'E_' AND ~Mode & 32 AND EXP > 0 AND MVP1id = 0 AND DropCardid > 4000 AND DropCardid < 5000 AND ID < 2000 AND instr('"+.Blacklist$+"',ID) = 0 ORDER BY rand() LIMIT "+.Quests, .@mob);
query_sql("SELECT ID FROM `" + .mob_db$ + "` WHERE left(Sprite, 4) != 'meta' AND left(Sprite, 2) != 'E_' AND ~Mode & 32 AND EXP > 0 AND MVP1id = 0 AND DropCardid > 4000 AND DropCardid < 5000 AND ID < 2000 AND instr('"+.Blacklist$+"',ID) = 0 ORDER BY rand() LIMIT "+.Quests, .@mob);
for (set .@i,0; .@i<.Quests; set .@i,.@i+1) {
setd "Mission"+.@i, .@mob[.@i];
setd "Mission"+.@i +"_",0;
@ -279,6 +281,8 @@ OnInit:
40,70;
setarray .Modifier[0], // Multipliers for Base Exp, Job Exp, and Zeny rewards.
getbattleflag("base_exp_rate")/100,getbattleflag("job_exp_rate")/100,60;
set .mob_db$, // Table name of SQL mob database
(checkre(0))?"mob_db_re":"mob_db";
setarray .Shop[0], // Reward items: <ID>,<point cost> (about 10~20 points per hunt).
512,1,513,1,514,1,538,5,539,5,558,10,561,10;
set .Blacklist$, // Blacklisted mob IDs.

View File

@ -12,6 +12,7 @@
//npc: npc/custom/platinum_skills.txt
//npc: npc/custom/healer.txt
//npc: npc/custom/breeder.txt
//npc: npc/custom/card_seller.txt
//npc: npc/custom/itemmall.txt
//npc: npc/custom/stylist.txt
//npc: npc/custom/resetnpc.txt
@ -20,6 +21,8 @@
//npc: npc/custom/woe_controller.txt
// ----------------------- Other Scripts -----------------------
// -- Private MVP & Branch Room
//npc: npc/custom/etc/mvp_room.txt
// -- MVP Arena
//npc: npc/custom/etc/mvp_arena.txt
// -- Penal Servitude (Jails Quest)
@ -47,6 +50,8 @@
//npc: npc/custom/etc/marriage.txt
// -- Warper that works only after locations are unlocked
//npc: npc/custom/etc/quest_warper.txt
// -- Auto-Potion command
//npc: npc/custom/etc/autopot.txt
// ----------------------- Quest Scripts -----------------------
// -- Dynamic Quest Scripts
@ -76,17 +81,33 @@
//npc: npc/custom/quests/kahohorn.txt
// ----------------------- Event Scripts -----------------------
// -- Daily Events
// -- Mini-Game Events
//npc: npc/custom/events/cluckers.txt
//npc: npc/custom/events/devil_square.txt
//npc: npc/custom/events/disguise.txt
//npc: npc/custom/events/mushroom_event.txt
//npc: npc/custom/events/cluckers.txt
//npc: npc/custom/events/mvp_ladder.txt
// -- Holiday Events
//npc: npc/custom/events/xmas_rings_event.txt
//npc: npc/custom/events/valentinesdayexp.txt
//npc: npc/custom/events/hallow06.txt
//npc: npc/custom/events/uneasy_cemetery.txt
//npc: npc/custom/events/holiday/xmas_rings_event.txt
//npc: npc/custom/events/holiday/valentinesdayexp.txt
//npc: npc/custom/events/holiday/hallow06.txt
//npc: npc/custom/events/holiday/uneasy_cemetery.txt
// ----------------------- Unofficial Scripts -----------------------
// -------------------- Battleround Scripts --------------------
// -- Custom Battleground Scripts
//npc: npc/custom/battleground/bg_emp.txt
//npc: npc/custom/battleground/bg_pvp.txt
// -- Unofficial Battlegrounds (custom version of official scripts)
//npc: npc/custom/battleground/unofficial/bg_common.txt
//npc: npc/custom/battleground/unofficial/bg_tierra_01.txt
//npc: npc/custom/battleground/unofficial/bg_tierra_02.txt
//npc: npc/custom/battleground/unofficial/bg_flavius_01.txt
//npc: npc/custom/battleground/unofficial/bg_flavius_02.txt
//npc: npc/custom/battleground/unofficial/bg_kvm01.txt
//npc: npc/custom/battleground/unofficial/bg_kvm02.txt
//npc: npc/custom/battleground/unofficial/bg_kvm03.txt
// --------------------- Unofficial Scripts --------------------
// -- Unofficial Airplane script
//npc: npc/custom/etc/airplane.txt
// -- Thanatos Tower Statues Quest
@ -94,12 +115,3 @@
// -- Custom quests from official Umbalian Quests
//npc: npc/custom/quests/sphinx_mask.txt
//npc: npc/custom/quests/umbalian_language.txt
// -- Unofficial Battlegrounds
//npc: npc/custom/battleground/bg_common.txt
//npc: npc/custom/battleground/bg_tierra_01.txt
//npc: npc/custom/battleground/bg_tierra_02.txt
//npc: npc/custom/battleground/bg_flavius_01.txt
//npc: npc/custom/battleground/bg_flavius_02.txt
//npc: npc/custom/battleground/bg_kvm01.txt
//npc: npc/custom/battleground/bg_kvm02.txt
//npc: npc/custom/battleground/bg_kvm03.txt