- Completed L0ne's 2007 request for 'waitingroom' to support required zeny and level.

- Updated NPC files which required the waitingroom update.
- Added Poring War script.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14765 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
Kisuka 2011-04-05 06:00:20 +00:00
parent de4683af94
commit bf12d754cc
27 changed files with 1906 additions and 91 deletions

View File

@ -336,3 +336,7 @@ brasilis mapflag nobranch
bra_in01 mapflag nobranch bra_in01 mapflag nobranch
//evt_zombie mapflag nobranch //evt_zombie mapflag nobranch
// Poring War ==================
poring_w01 mapflag nobranch
poring_w02 mapflag nobranch

View File

@ -141,3 +141,7 @@ nguild_prt mapflag noicewall
4@tower mapflag noicewall 4@tower mapflag noicewall
5@tower mapflag noicewall 5@tower mapflag noicewall
6@tower mapflag noicewall 6@tower mapflag noicewall
// Poring War ====================
poring_w01 mapflag noicewall
poring_w02 mapflag noicewall

View File

@ -681,3 +681,7 @@ spl_in01 mapflag nomemo
2@nyd mapflag nomemo 2@nyd mapflag nomemo
//evt_zombie mapflag nomemo //evt_zombie mapflag nomemo
// Poring War ====================
poring_w01 mapflag nomemo
poring_w02 mapflag nomemo

View File

@ -251,3 +251,6 @@ bat_a01 mapflag nopenalty
bat_a02 mapflag nopenalty bat_a02 mapflag nopenalty
//evt_zombie mapflag nopenalty //evt_zombie mapflag nopenalty
// Poring War ==================
poring_w02 mapflag nopenalty

View File

@ -269,3 +269,7 @@ arug_dun01 mapflag nosave SavePoint
schg_dun01 mapflag nosave SavePoint schg_dun01 mapflag nosave SavePoint
//evt_zombie mapflag nosave SavePoint //evt_zombie mapflag nosave SavePoint
// Poring War ====================
poring_w01 mapflag nosave SavePoint
poring_w02 mapflag nosave SavePoint

View File

@ -391,3 +391,8 @@ nyd_dun02 mapflag noteleport
2@nyd mapflag monster_noteleport 2@nyd mapflag monster_noteleport
//evt_zombie mapflag noteleport //evt_zombie mapflag noteleport
// Poring War ====================
poring_w01 mapflag noteleport
poring_w02 mapflag noteleport
poring_w02 mapflag monster_noteleport

View File

@ -65,3 +65,7 @@ bat_b01 mapflag nowarp
bat_b02 mapflag nowarp bat_b02 mapflag nowarp
bat_a01 mapflag nowarp bat_a01 mapflag nowarp
bat_a02 mapflag nowarp bat_a02 mapflag nowarp
// Poring War ==================
poring_w01 mapflag nowarp
poring_w02 mapflag nowarp

View File

@ -139,3 +139,7 @@ spl_in01 mapflag nowarpto
// Nidhoggr's Instance =========== // Nidhoggr's Instance ===========
1@nyd mapflag nowarpto 1@nyd mapflag nowarpto
2@nyd mapflag nowarpto 2@nyd mapflag nowarpto
// Poring War ====================
poring_w01 mapflag nowarpto
poring_w02 mapflag nowarpto

View File

@ -166,6 +166,8 @@
//= Added 'bg_getareausers' and 'bg_get_data' commands. [Ai4rei] //= Added 'bg_getareausers' and 'bg_get_data' commands. [Ai4rei]
//= Updated description of 'waitingroom2bg_single' command. //= Updated description of 'waitingroom2bg_single' command.
//= Documented optional parameter 'npc name' of 'waitingroom2bg' command. //= Documented optional parameter 'npc name' of 'waitingroom2bg' command.
//= 3.40.20110404
//= Updated description of 'waitingroom' command to include required zeny/lvl. [Kisuka]
//========================================================= //=========================================================
This document is a reference manual for all the scripting commands and functions This document is a reference manual for all the scripting commands and functions
@ -5708,7 +5710,7 @@ The function returns 0 if the shop was not found, 1 otherwise.
--------------------------------------- ---------------------------------------
*waitingroom "<chatroom name>",<limit>{,<event label>,<trigger>}; *waitingroom "<chatroom name>",<limit>{,<event label>,<trigger>,<required zeny>,<min lvl>,<max lvl>};
This command will create a chat room, owned by the NPC object running this This command will create a chat room, owned by the NPC object running this
script and displayed above the NPC sprite. script and displayed above the NPC sprite.
@ -5719,9 +5721,6 @@ optional event and trigger parameters are given, the event label
("<NPC object name>::<label name>") will be invoked as if with a 'doevent' upon ("<NPC object name>::<label name>") will be invoked as if with a 'doevent' upon
the number of people in the chat room reaching the given triggering amount. the number of people in the chat room reaching the given triggering amount.
It's funny, but for compatibility with jAthena, you can swap the event label and
the trigger parameters, and it will still work.
// The NPC will just show a box above its head that says "Hello World", clicking // The NPC will just show a box above its head that says "Hello World", clicking
// it will do nothing, since the limit is zero. // it will do nothing, since the limit is zero.
waitingroom "Hello World",0; waitingroom "Hello World",0;
@ -5733,6 +5732,14 @@ the trigger parameters, and it will still work.
waitingroom "Disco - Waiting Room",8,"Bouncer::OnStart",8; waitingroom "Disco - Waiting Room",8,"Bouncer::OnStart",8;
// The NPC will have a box above its head, it will say "Party - Waiting Room"
// and will have 8 waiting slots. Clicking this will allow a player who has
// 5000 zeny and lvl 50~99 to enter the chat room, where the player will be
// able to wait until 8 people accumulate. Once this happens, it will cause
// the NPC "Bouncer" run the label "OnStart"
waitingroom "Party - Waiting Room",5,"Bouncer::OnStart",8,5000,50,99;
Creating a waiting room does not stop the execution of the script and it will Creating a waiting room does not stop the execution of the script and it will
continue to the next line. continue to the next line.

View File

@ -3,7 +3,7 @@
//===== By: ================================================== //===== By: ==================================================
//= L0ne_W0lf //= L0ne_W0lf
//===== Current Version: ===================================== //===== Current Version: =====================================
//= 1.1 //= 1.2
//===== Compatible With: ===================================== //===== Compatible With: =====================================
//= eAthena 1.0 //= eAthena 1.0
//===== Description: ========================================= //===== Description: =========================================
@ -14,6 +14,7 @@
//===== Additional Comments: ================================= //===== Additional Comments: =================================
//= 1.0 First Version. //= 1.0 First Version.
//= 1.1 Fixed pink crystal spawning as blue. [L0ne_W0lf] //= 1.1 Fixed pink crystal spawning as blue. [L0ne_W0lf]
//= 1.2 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
//============================================================ //============================================================
// Waiting Room NPCs // Waiting Room NPCs
@ -21,7 +22,7 @@
bat_room,86,227,4 script Lieutenant Ator 418,{ bat_room,86,227,4 script Lieutenant Ator 418,{
end; end;
OnInit: OnInit:
waitingroom "Battle Station",10,"start#bat_b01::OnReadyCheck",1; waitingroom "Battle Station",10,"start#bat_b01::OnReadyCheck",1,0,80,99;
end; end;
OnEnterBG: OnEnterBG:
set $@FlaviusBG1_id1, waitingroom2bg("bat_b01",10,290,"start#bat_b01::OnGuillaumeQuit",""); set $@FlaviusBG1_id1, waitingroom2bg("bat_b01",10,290,"start#bat_b01::OnGuillaumeQuit","");
@ -31,7 +32,7 @@ OnEnterBG:
bat_room,85,204,0 script Lieutenant Thelokus 414,{ bat_room,85,204,0 script Lieutenant Thelokus 414,{
end; end;
OnInit: OnInit:
waitingroom "Battle Station",10,"start#bat_b01::OnReadyCheck",1; waitingroom "Battle Station",10,"start#bat_b01::OnReadyCheck",1,0,80,99;
end; end;
OnEnterBG: OnEnterBG:
set $@FlaviusBG1_id2, waitingroom2bg("bat_b01",390,10,"start#bat_b01::OnCroixQuit",""); set $@FlaviusBG1_id2, waitingroom2bg("bat_b01",390,10,"start#bat_b01::OnCroixQuit","");

View File

@ -3,7 +3,7 @@
//===== By: ================================================== //===== By: ==================================================
//= L0ne_W0lf //= L0ne_W0lf
//===== Current Version: ===================================== //===== Current Version: =====================================
//= 1.2 //= 1.3
//===== Compatible With: ===================================== //===== Compatible With: =====================================
//= eAthena 1.0 //= eAthena 1.0
//===== Description: ========================================= //===== Description: =========================================
@ -15,6 +15,7 @@
//= 1.0 First Version. //= 1.0 First Version.
//= 1.1 Fixed NPCs being called for waiting rooms. (bugreport:4395) //= 1.1 Fixed NPCs being called for waiting rooms. (bugreport:4395)
//= 1.2 Fixed pink crystal spawning as blue. [L0ne_W0lf] //= 1.2 Fixed pink crystal spawning as blue. [L0ne_W0lf]
//= 1.3 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
//============================================================ //============================================================
// Waiting Room NPCs // Waiting Room NPCs
@ -22,7 +23,7 @@
bat_room,142,227,4 script Lieutenant Huvas 418,{ bat_room,142,227,4 script Lieutenant Huvas 418,{
end; end;
OnInit: OnInit:
waitingroom "Battle Station",10,"start#bat_b02::OnReadyCheck",1; waitingroom "Battle Station",10,"start#bat_b02::OnReadyCheck",1,0,80,99;
end; end;
OnEnterBG: OnEnterBG:
set $@FlaviusBG2_id1, waitingroom2bg("bat_b02",10,290,"start#bat_b02::OnGuillaumeQuit",""); set $@FlaviusBG2_id1, waitingroom2bg("bat_b02",10,290,"start#bat_b02::OnGuillaumeQuit","");
@ -32,7 +33,7 @@ OnEnterBG:
bat_room,142,204,0 script Lieutenant Yukon 414,{ bat_room,142,204,0 script Lieutenant Yukon 414,{
end; end;
OnInit: OnInit:
waitingroom "Battle Station",10,"start#bat_b02::OnReadyCheck",1; waitingroom "Battle Station",10,"start#bat_b02::OnReadyCheck",1,0,80,99;
end; end;
OnEnterBG: OnEnterBG:
set $@FlaviusBG2_id2, waitingroom2bg("bat_b02",390,10,"start#bat_b02::OnCroixQuit",""); set $@FlaviusBG2_id2, waitingroom2bg("bat_b02",390,10,"start#bat_b02::OnCroixQuit","");

View File

@ -3,7 +3,7 @@
//===== By: ================================================== //===== By: ==================================================
//= L0ne_W0lf //= L0ne_W0lf
//===== Current Version: ===================================== //===== Current Version: =====================================
//= 1.1 //= 1.2
//===== Compatible With: ===================================== //===== Compatible With: =====================================
//= eAthena 1.0 //= eAthena 1.0
//===== Description: ========================================= //===== Description: =========================================
@ -14,6 +14,7 @@
//===== Additional Comments: ================================= //===== Additional Comments: =================================
//= 1.0 First Version. //= 1.0 First Version.
//= 1.1 Corrected setwalls for barricades. [L0ne_W0lf] //= 1.1 Corrected setwalls for barricades. [L0ne_W0lf]
//= 1.2 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
//============================================================ //============================================================
// Waiting Room NPCs // Waiting Room NPCs
@ -22,7 +23,7 @@ bat_room,57,227,5 script Lieutenant Kalos 418,{
end; end;
OnInit: OnInit:
waitingroom "Battle Station",10,"start#bat_a01::OnReadyCheck",1; waitingroom "Battle Station",10,"start#bat_a01::OnReadyCheck",1,0,80,99;
end; end;
OnEnterBG: OnEnterBG:
@ -34,7 +35,7 @@ bat_room,58,204,1 script Lieutenant Eyor 414,{
end; end;
OnInit: OnInit:
waitingroom "Battle Station",10,"start#bat_a01::OnReadyCheck",1; waitingroom "Battle Station",10,"start#bat_a01::OnReadyCheck",1,0,80,99;
end; end;
OnEnterBG: OnEnterBG:

View File

@ -3,7 +3,7 @@
//===== By: ================================================== //===== By: ==================================================
//= L0ne_W0lf //= L0ne_W0lf
//===== Current Version: ===================================== //===== Current Version: =====================================
//= 1.0 //= 1.1
//===== Compatible With: ===================================== //===== Compatible With: =====================================
//= eAthena 1.0 //= eAthena 1.0
//===== Description: ========================================= //===== Description: =========================================
@ -13,6 +13,7 @@
//= - Losing Team: 1 badge //= - Losing Team: 1 badge
//===== Additional Comments: ================================= //===== Additional Comments: =================================
//= 1.0 First Version. //= 1.0 First Version.
//= 1.1 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
//============================================================ //============================================================
// Waiting Room NPCs // Waiting Room NPCs
@ -21,7 +22,7 @@ bat_room,114,227,5 script Lieutenant Rundel 418,{
end; end;
OnInit: OnInit:
waitingroom "Battle Station",10,"start#bat_a02::OnReadyCheck",1; waitingroom "Battle Station",10,"start#bat_a02::OnReadyCheck",1,0,80,99;
end; end;
OnEnterBG: OnEnterBG:
@ -33,7 +34,7 @@ bat_room,114,204,1 script Lieutenant Guerrit 414,{
end; end;
OnInit: OnInit:
waitingroom "Battle Station",10,"start#bat_a02::OnReadyCheck",1; waitingroom "Battle Station",10,"start#bat_a02::OnReadyCheck",1,0,80,99;
end; end;
OnEnterBG: OnEnterBG:

View File

@ -3,7 +3,7 @@
//===== By: ================================================== //===== By: ==================================================
//= L0ne_W0lf //= L0ne_W0lf
//===== Current Version: ===================================== //===== Current Version: =====================================
//= 1.1 //= 1.2
//===== Compatible With: ===================================== //===== Compatible With: =====================================
//= Any Athena Version //= Any Athena Version
//===== Description: ========================================= //===== Description: =========================================
@ -11,6 +11,7 @@
//===== Additional Comments: ================================= //===== Additional Comments: =================================
//= 1.0 First version. //= 1.0 First version.
//= 1.1 Corrected variable typos. (bugreport:4374) [L0ne_w0lf] //= 1.1 Corrected variable typos. (bugreport:4374) [L0ne_w0lf]
//= 1.2 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
//============================================================ //============================================================
arena_room,114,102,0 script onlyaco#arena 45,1,1,{ arena_room,114,102,0 script onlyaco#arena 45,1,1,{
@ -31,10 +32,7 @@ arena_room,136,138,3 script Acolyte Waiting Room 124,{
end; end;
OnInit: OnInit:
//setarenaeventsize 1 waitingroom "Personal Force, Acolyte Class",50,"Acolyte Waiting Room::OnStartArena",1,1000,10,99;
waitingroom "Personal Force, Acolyte Class",50,"Acolyte Waiting Room::OnStartArena",1;
//SetReqLevel 10 99
//SetFeeZeny 1000
enablewaitingroomevent; enablewaitingroomevent;
end; end;

View File

@ -3,7 +3,7 @@
//===== By: ================================================== //===== By: ==================================================
//= SinSloth //= SinSloth
//===== Current Version: ===================================== //===== Current Version: =====================================
//= 1.7 //= 1.8
//===== Compatible With: ===================================== //===== Compatible With: =====================================
//= Any eAthena Version //= Any eAthena Version
//===== Description: ========================================= //===== Description: =========================================
@ -18,6 +18,7 @@
//= 1.5 - Applied a fix to players locations which were not rotating properly. [SinSloth] //= 1.5 - Applied a fix to players locations which were not rotating properly. [SinSloth]
//= 1.6 - Removed nescesity to win to proceed with quest [Yommy] //= 1.6 - Removed nescesity to win to proceed with quest [Yommy]
//= 1.7 - Replaced effect numerics with constants. [Samuray22] //= 1.7 - Replaced effect numerics with constants. [Samuray22]
//= 1.8 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
//============================================================ //============================================================
que_bingo,48,84,5 script Bingo Waiting Room 124,{ que_bingo,48,84,5 script Bingo Waiting Room 124,{
@ -26,7 +27,7 @@ que_bingo,48,84,5 script Bingo Waiting Room 124,{
OnInit: OnInit:
set $hu_bingoa,0; set $hu_bingoa,0;
set $hu_bingob,0; set $hu_bingob,0;
waitingroom "Bingo Waiting Room - 5 People",50,"Bingo Waiting Room::OnWarp",5; waitingroom "Bingo Waiting Room - 5 People",50,"Bingo Waiting Room::OnWarp",5,1000;
end; end;
OnWarp: OnWarp:

1767
npc/other/poring_war.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
//===== By: ================================================== //===== By: ==================================================
//= L0ne_W0lf //= L0ne_W0lf
//===== Current Version: ===================================== //===== Current Version: =====================================
//= 1.3 //= 1.4
//===== Compatible With: ===================================== //===== Compatible With: =====================================
//= eAthena SVN //= eAthena SVN
//===== Description: ========================================= //===== Description: =========================================
@ -14,14 +14,14 @@
//= 1.1 Fixed small official bug. [L0ne_W0lf] //= 1.1 Fixed small official bug. [L0ne_W0lf]
//= 1.2 Fixed a little mistake [akrus] //= 1.2 Fixed a little mistake [akrus]
//= 1.3 Corrected issue with top record setting. [L0ne_W0lf] //= 1.3 Corrected issue with top record setting. [L0ne_W0lf]
//= 1.4 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
//============================================================ //============================================================
turbo_room,124,135,3 script Expert mode - 16 person 124,{ turbo_room,124,135,3 script Expert mode - 16 person 124,{
end; end;
OnInit: OnInit:
waitingroom "Expert mode - 16 person",60,"Expert mode - 16 person::OnStartArena",16; waitingroom "Expert mode - 16 person",60,"Expert mode - 16 person::OnStartArena",16,1000,10,99;
//SetFeeZeny 1000
enablewaitingroomevent "Expert mode - 16 person"; enablewaitingroomevent "Expert mode - 16 person";
end; end;

View File

@ -3,7 +3,7 @@
//===== By: ================================================== //===== By: ==================================================
//= L0ne_W0lf //= L0ne_W0lf
//===== Current Version: ===================================== //===== Current Version: =====================================
//= 1.3 //= 1.4
//===== Compatible With: ===================================== //===== Compatible With: =====================================
//= eAthena SVN //= eAthena SVN
//===== Description: ========================================= //===== Description: =========================================
@ -14,14 +14,14 @@
//= 1.1 Fixed small official bug. [L0ne_W0lf] //= 1.1 Fixed small official bug. [L0ne_W0lf]
//= 1.2 Fixed a little mistake [akrus] //= 1.2 Fixed a little mistake [akrus]
//= 1.3 Corrected issue with top record setting. [L0ne_W0lf] //= 1.3 Corrected issue with top record setting. [L0ne_W0lf]
//= 1.4 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
//============================================================ //============================================================
turbo_room,110,135,3 script Expert mode - 4 person 124,{ turbo_room,110,135,3 script Expert mode - 4 person 124,{
end; end;
OnInit: OnInit:
waitingroom "Expert mode - 4 person",60,"Expert mode - 4 person::OnStartArena",4; waitingroom "Expert mode - 4 person",60,"Expert mode - 4 person::OnStartArena",4,1000,10,99;
//SetFeeZeny 1000
enablewaitingroomevent "Expert mode - 4 person"; enablewaitingroomevent "Expert mode - 4 person";
end; end;

View File

@ -3,7 +3,7 @@
//===== By: ================================================== //===== By: ==================================================
//= L0ne_W0lf //= L0ne_W0lf
//===== Current Version: ===================================== //===== Current Version: =====================================
//= 1.3 //= 1.4
//===== Compatible With: ===================================== //===== Compatible With: =====================================
//= eAthena SVN //= eAthena SVN
//===== Description: ========================================= //===== Description: =========================================
@ -14,14 +14,14 @@
//= 1.1 Fixed small official bug. [L0ne_W0lf] //= 1.1 Fixed small official bug. [L0ne_W0lf]
//= 1.2 Fixed a little mistake [akrus] //= 1.2 Fixed a little mistake [akrus]
//= 1.3 Corrected issue with top record setting. [L0ne_W0lf] //= 1.3 Corrected issue with top record setting. [L0ne_W0lf]
//= 1.4 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
//============================================================ //============================================================
turbo_room,117,135,3 script Expert mode - 8 person 124,{ turbo_room,117,135,3 script Expert mode - 8 person 124,{
end; end;
OnInit: OnInit:
waitingroom "Expert mode - 8 person",60,"Expert mode - 8 person::OnStartArena",8; waitingroom "Expert mode - 8 person",60,"Expert mode - 8 person::OnStartArena",8,1000,10,99;
//SetFeeZeny 1000
enablewaitingroomevent "Expert mode - 8 person"; enablewaitingroomevent "Expert mode - 8 person";
end; end;

View File

@ -3,7 +3,7 @@
//===== By: ================================================== //===== By: ==================================================
//= L0ne_W0lf //= L0ne_W0lf
//===== Current Version: ===================================== //===== Current Version: =====================================
//= 1.5 //= 1.6
//===== Compatible With: ===================================== //===== Compatible With: =====================================
//= eAthena SVN //= eAthena SVN
//===== Description: ========================================= //===== Description: =========================================
@ -16,14 +16,14 @@
//= 1.3 Fixed a little mistake [akrus] //= 1.3 Fixed a little mistake [akrus]
//= 1.4 Corrected issue with top record setting. [L0ne_W0lf] //= 1.4 Corrected issue with top record setting. [L0ne_W0lf]
//= 1.5 Fixed name being saved under expert mode. (bugreport:4433) [L0ne_W0lf] //= 1.5 Fixed name being saved under expert mode. (bugreport:4433) [L0ne_W0lf]
//= 1.6 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
//============================================================ //============================================================
turbo_room,91,135,3 script Normal mode - 16 person 124,{ turbo_room,91,135,3 script Normal mode - 16 person 124,{
end; end;
OnInit: OnInit:
waitingroom "Normal mode - 16 person",60,"Normal mode - 16 person::OnStartArena",16; waitingroom "Normal mode - 16 person",60,"Normal mode - 16 person::OnStartArena",16,1000,10,99;
//SetFeeZeny 1000
enablewaitingroomevent "Normal mode - 16 person"; enablewaitingroomevent "Normal mode - 16 person";
end; end;

View File

@ -3,7 +3,7 @@
//===== By: ================================================== //===== By: ==================================================
//= L0ne_W0lf //= L0ne_W0lf
//===== Current Version: ===================================== //===== Current Version: =====================================
//= 1.4 //= 1.5
//===== Compatible With: ===================================== //===== Compatible With: =====================================
//= eAthena SVN //= eAthena SVN
//===== Description: ========================================= //===== Description: =========================================
@ -15,14 +15,14 @@
//= 1.2 Replaced effect numerics with constants. [L0ne_W0lf] //= 1.2 Replaced effect numerics with constants. [L0ne_W0lf]
//= 1.3 Fixed a little mistake [akrus] //= 1.3 Fixed a little mistake [akrus]
//= 1.4 Corrected issue with top record setting. [L0ne_W0lf] //= 1.4 Corrected issue with top record setting. [L0ne_W0lf]
//= 1.5 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
//============================================================ //============================================================
turbo_room,77,135,3 script Normal mode - 4 person 124,{ turbo_room,77,135,3 script Normal mode - 4 person 124,{
end; end;
OnInit: OnInit:
waitingroom "Normal mode - 4 person",60,"Normal mode - 4 person::OnStartArena",4; waitingroom "Normal mode - 4 person",60,"Normal mode - 4 person::OnStartArena",4,1000,10,99;
//SetFeeZeny 1000
enablewaitingroomevent "Normal mode - 4 person"; enablewaitingroomevent "Normal mode - 4 person";
end; end;

View File

@ -3,7 +3,7 @@
//===== By: ================================================== //===== By: ==================================================
//= L0ne_W0lf //= L0ne_W0lf
//===== Current Version: ===================================== //===== Current Version: =====================================
//= 1.5 //= 1.6
//===== Compatible With: ===================================== //===== Compatible With: =====================================
//= eAthena SVN //= eAthena SVN
//===== Description: ========================================= //===== Description: =========================================
@ -16,14 +16,14 @@
//= 1.3 Fixed a little mistake [akrus] //= 1.3 Fixed a little mistake [akrus]
//= 1.4 Corrected issue with top record setting. [L0ne_W0lf] //= 1.4 Corrected issue with top record setting. [L0ne_W0lf]
//= 1.5 Fixed name being saved under expert mode. (bugreport:4433) [L0ne_W0lf] //= 1.5 Fixed name being saved under expert mode. (bugreport:4433) [L0ne_W0lf]
//= 1.6 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
//============================================================ //============================================================
turbo_room,84,135,3 script Normal mode - 8 person 124,{ turbo_room,84,135,3 script Normal mode - 8 person 124,{
end; end;
OnInit: OnInit:
waitingroom "Normal mode - 8 person",60,"Normal mode - 8 person::OnStartArena",8; waitingroom "Normal mode - 8 person",60,"Normal mode - 8 person::OnStartArena",8,1000,10,99;
//SetFeeZeny 1000
enablewaitingroomevent "Normal mode - 8 person"; enablewaitingroomevent "Normal mode - 8 person";
end; end;

View File

@ -3,7 +3,7 @@
//===== By: ================================================== //===== By: ==================================================
//= SinSloth(Most of the NPCs), MasterOfMuppets(Some of the NPCs + bug fixes) & Kargha(The quiz NPCs) //= SinSloth(Most of the NPCs), MasterOfMuppets(Some of the NPCs + bug fixes) & Kargha(The quiz NPCs)
//===== Current Version: ===================================== //===== Current Version: =====================================
//= 3.2 //= 3.4
//===== Compatible With: ===================================== //===== Compatible With: =====================================
//= eAthena SVN //= eAthena SVN
//===== Description: ========================================= //===== Description: =========================================
@ -20,6 +20,7 @@
//= 3.2 Removed mapannounce used while debugging. [L0ne_W0lf] //= 3.2 Removed mapannounce used while debugging. [L0ne_W0lf]
//= Moved the disablewaitingroomevent in dancing portion. //= Moved the disablewaitingroomevent in dancing portion.
//= 3.3 Applied Kazukin's fix for the dancing portion. (bugreport:3966) [L0ne_W0lf] //= 3.3 Applied Kazukin's fix for the dancing portion. (bugreport:3966) [L0ne_W0lf]
//= 3.4 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
//============================================================ //============================================================
//============================================================ //============================================================
@ -5216,8 +5217,7 @@ cmd_in01,33,33,1 script Standby Room#sign 66,{
end; end;
OnInit: OnInit:
waitingroom "DANCE~ DANCE~",20,"Standby Room#sign::OnStartArena",1; waitingroom "DANCE~ DANCE~",20,"Standby Room#sign::OnStartArena",1,0,44,99;
//SetReqLevel 44 99
enablewaitingroomevent; enablewaitingroomevent;
end; end;

View File

@ -288,6 +288,7 @@ npc: npc/other/mail.txt
npc: npc/other/marriage.txt npc: npc/other/marriage.txt
npc: npc/other/monster_museum.txt npc: npc/other/monster_museum.txt
//npc: npc/other/msg_boards.txt //npc: npc/other/msg_boards.txt
npc: npc/other/poring_war.txt
npc: npc/other/powernpc.txt npc: npc/other/powernpc.txt
npc: npc/other/pvp.txt npc: npc/other/pvp.txt
npc: npc/other/resetskill.txt npc: npc/other/resetskill.txt

View File

@ -23,7 +23,7 @@ int chat_triggerevent(struct chat_data *cd); // forward declaration
/// Initializes a chatroom object (common functionality for both pc and npc chatrooms). /// Initializes a chatroom object (common functionality for both pc and npc chatrooms).
/// Returns a chatroom object on success, or NULL on failure. /// Returns a chatroom object on success, or NULL on failure.
static struct chat_data* chat_createchat(struct block_list* bl, const char* title, const char* pass, int limit, bool pub, int trigger, const char* ev) static struct chat_data* chat_createchat(struct block_list* bl, const char* title, const char* pass, int limit, bool pub, int trigger, const char* ev, int zeny, int minLvl, int maxLvl)
{ {
struct chat_data* cd; struct chat_data* cd;
nullpo_retr(NULL, bl); nullpo_retr(NULL, bl);
@ -36,6 +36,9 @@ static struct chat_data* chat_createchat(struct block_list* bl, const char* titl
cd->users = 0; cd->users = 0;
cd->limit = min(limit, ARRAYLENGTH(cd->usersd)); cd->limit = min(limit, ARRAYLENGTH(cd->usersd));
cd->trigger = trigger; cd->trigger = trigger;
cd->zeny = zeny;
cd->minLvl = minLvl;
cd->maxLvl = maxLvl;
memset(cd->usersd, 0, sizeof(cd->usersd)); memset(cd->usersd, 0, sizeof(cd->usersd));
cd->owner = bl; cd->owner = bl;
safestrncpy(cd->npc_event, ev, sizeof(cd->npc_event)); safestrncpy(cd->npc_event, ev, sizeof(cd->npc_event));
@ -88,7 +91,7 @@ int chat_createpcchat(struct map_session_data* sd, const char* title, const char
pc_stop_walking(sd,1); pc_stop_walking(sd,1);
cd = chat_createchat(&sd->bl, title, pass, limit, pub, 0, ""); cd = chat_createchat(&sd->bl, title, pass, limit, pub, 0, "", 0, 1, MAX_LEVEL);
if( cd ) if( cd )
{ {
cd->users = 1; cd->users = 1;
@ -125,6 +128,22 @@ int chat_joinchat(struct map_session_data* sd, int chatid, const char* pass)
return 0; return 0;
} }
if( sd->status.base_level < cd->minLvl || sd->status.base_level > cd->maxLvl )
{
if(sd->status.base_level < cd->minLvl)
clif_joinchatfail(sd,5);
else
clif_joinchatfail(sd,6);
return 0;
}
if( sd->status.zeny < cd->zeny )
{
clif_joinchatfail(sd,4);
return 0;
}
pc_stop_walking(sd,1); pc_stop_walking(sd,1);
cd->usersd[cd->users] = sd; cd->usersd[cd->users] = sd;
cd->users++; cd->users++;
@ -299,7 +318,7 @@ int chat_kickchat(struct map_session_data* sd, const char* kickusername)
} }
/// Creates a chat room for the npc. /// Creates a chat room for the npc.
int chat_createnpcchat(struct npc_data* nd, const char* title, int limit, bool pub, int trigger, const char* ev) int chat_createnpcchat(struct npc_data* nd, const char* title, int limit, bool pub, int trigger, const char* ev, int zeny, int minLvl, int maxLvl)
{ {
struct chat_data* cd; struct chat_data* cd;
nullpo_ret(nd); nullpo_ret(nd);
@ -310,7 +329,14 @@ int chat_createnpcchat(struct npc_data* nd, const char* title, int limit, bool p
return 0; return 0;
} }
cd = chat_createchat(&nd->bl, title, "", limit, pub, trigger, ev); if( zeny > MAX_ZENY || maxLvl > MAX_LEVEL )
{
ShowError("chat_createnpcchat: npc '%s' has a required lvl or amount of zeny over the max limit!\n", nd->exname);
return 0;
}
cd = chat_createchat(&nd->bl, title, "", limit, pub, trigger, ev, zeny, minLvl, maxLvl);
if( cd ) if( cd )
{ {
nd->chat_id = cd->bl.id; nd->chat_id = cd->bl.id;

View File

@ -17,6 +17,9 @@ struct chat_data {
uint8 users; // current user count uint8 users; // current user count
uint8 limit; // join limit uint8 limit; // join limit
uint8 trigger; // number of users needed to trigger event uint8 trigger; // number of users needed to trigger event
uint32 zeny; // required zeny to join
uint32 minLvl; // minimum base level to join
uint32 maxLvl; // maximum base level allowed to join
struct map_session_data* usersd[20]; struct map_session_data* usersd[20];
struct block_list* owner; struct block_list* owner;
char npc_event[50]; char npc_event[50];
@ -30,7 +33,7 @@ int chat_changechatowner(struct map_session_data* sd, const char* nextownername)
int chat_changechatstatus(struct map_session_data* sd, const char* title, const char* pass, int limit, bool pub); int chat_changechatstatus(struct map_session_data* sd, const char* title, const char* pass, int limit, bool pub);
int chat_kickchat(struct map_session_data* sd, const char* kickusername); int chat_kickchat(struct map_session_data* sd, const char* kickusername);
int chat_createnpcchat(struct npc_data* nd, const char* title, int limit, bool pub, int trigger, const char* ev); int chat_createnpcchat(struct npc_data* nd, const char* title, int limit, bool pub, int trigger, const char* ev, int zeny, int minLvl, int maxLvl);
int chat_deletenpcchat(struct npc_data* nd); int chat_deletenpcchat(struct npc_data* nd);
int chat_enableevent(struct chat_data* cd); int chat_enableevent(struct chat_data* cd);
int chat_disableevent(struct chat_data* cd); int chat_disableevent(struct chat_data* cd);

View File

@ -9262,52 +9262,24 @@ BUILDIN_FUNC(globalmes)
return 0; return 0;
} }
///////////////////////////////////////////////////////////////////// /*==========================================
// NPC waiting room (chat room) * Creates a waiting room (chat room)
// *------------------------------------------*/
/// Creates a waiting room (chat room) for this npc.
///
/// waitingroom "<title>",<limit>,<trigger>,"<event>";
/// waitingroom "<title>",<limit>,"<event>",<trigger>;
/// waitingroom "<title>",<limit>,"<event>";
/// waitingroom "<title>",<limit>;
BUILDIN_FUNC(waitingroom) BUILDIN_FUNC(waitingroom)
{ {
struct npc_data* nd; struct npc_data* nd;
const char* title;
const char* ev = "";
int limit;
int trigger = 0;
int pub = 1; int pub = 1;
const char* title = script_getstr(st, 2);
title = script_getstr(st, 2); int limit = script_getnum(st, 3);
limit = script_getnum(st, 3); const char* ev = script_hasdata(st,4) ? script_getstr(st,4) : "";
int trigger = script_hasdata(st,5) ? script_getnum(st,5) : limit;
if( script_hasdata(st,5) ) int zeny = script_hasdata(st,6) ? script_getnum(st,6) : 0;
{ int minLvl = script_hasdata(st,7) ? script_getnum(st,7) : 1;
struct script_data* last = script_getdata(st, 5); int maxLvl = script_hasdata(st,8) ? script_getnum(st,8) : MAX_LEVEL;
get_val(st, last);
if( data_isstring(last) )
{// ,<trigger>,"<event>"
trigger = script_getnum(st, 4);
ev = script_getstr(st, 5);
}
else
{// ,"<event>",<trigger>
ev = script_getstr(st, 4);
trigger = script_getnum(st,5);
}
}
else if( script_hasdata(st,4) )
{// ,"<event>"
ev = script_getstr(st, 4);
trigger = limit;
}
nd = (struct npc_data *)map_id2bl(st->oid); nd = (struct npc_data *)map_id2bl(st->oid);
if( nd != NULL ) if( nd != NULL )
chat_createnpcchat(nd, title, limit, pub, trigger, ev); chat_createnpcchat(nd, title, limit, pub, trigger, ev, zeny, minLvl, maxLvl);
return 0; return 0;
} }
@ -9488,9 +9460,13 @@ BUILDIN_FUNC(warpwaitingpc)
return 0;// can't teleport on this map return 0;// can't teleport on this map
pc_setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, CLR_TELEPORT); pc_setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, CLR_TELEPORT);
if( cd->zeny )
pc_payzeny(sd, cd->zeny);
} }
else else
pc_setpos(sd, mapindex_name2id(map_name), x, y, CLR_OUTSIGHT); pc_setpos(sd, mapindex_name2id(map_name), x, y, CLR_OUTSIGHT);
if( cd->zeny )
pc_payzeny(sd, cd->zeny);
} }
mapreg_setreg(add_str("$@warpwaitingpcnum"), i); mapreg_setreg(add_str("$@warpwaitingpcnum"), i);
return 0; return 0;
@ -15029,7 +15005,7 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(skillpointcount,""), BUILDIN_DEF(skillpointcount,""),
BUILDIN_DEF(changebase,"i?"), BUILDIN_DEF(changebase,"i?"),
BUILDIN_DEF(changesex,""), BUILDIN_DEF(changesex,""),
BUILDIN_DEF(waitingroom,"si??"), BUILDIN_DEF(waitingroom,"si?????"),
BUILDIN_DEF(delwaitingroom,"?"), BUILDIN_DEF(delwaitingroom,"?"),
BUILDIN_DEF2(waitingroomkickall,"kickwaitingroomall","?"), BUILDIN_DEF2(waitingroomkickall,"kickwaitingroomall","?"),
BUILDIN_DEF(enablewaitingroomevent,"?"), BUILDIN_DEF(enablewaitingroomevent,"?"),