- after checking if party and job met - warp to waiting room team A and team B have designated rooms..
NPC B - a NPC w/ pub maximum of 7 members Only..
Ability:
- if teams can complete the 7/7 of the NPC B they will warp automatically in the pvp room.
- this will also prevent team from getting +1 member in the party.
- this is like in battle ground script.
NPC C - a NPC / Script inside the pvp room.
Ability:
- check the number of party
- count down if the count down ends the party w/ high number of player alive will win.
- party that is dead 2x will go outside the pvp room. - i think if its pvp map it will automatically allowed this. [no need for this]
NPC A:
team leader
if ( getpartyleader(getcharid(1),2) != getcharid(0) )
{
mes "Only party leader have the right to sign up / out from the game with me..";
close;
}
mes "Choose your team to register.";
switch(select("Red Team - [" + GetPartyName($@TeamID1) + "] :Blue Team - [" + GetPartyName($@TeamID2) + "]"))
NPC A:
party number checker
if ( callfunc("party_has_duplicate_job") ) {
mes "It seems that someone in the party has the same class than another member. Please check again the requirements...";
close;
}
if ( $@partymembercount != 7 ) {
mes "You have to be 7 on the team.";
close;
}
mes "OK, no problem with your party, let's go !";
function script party_has_duplicate_job {
set .@party_id, getarg( 0, getcharid(1) );
// Need to have a party.
if ( !.@party_id )
{
return -1;
}
// Loading party members variables
getpartymember .@party_id, 1;
getpartymember .@party_id, 2;
// Keep rid attached.
set .@rid, playerattached();
// Check all members
for ( set .@i,0; .@i<$@partymembercount; set .@i, .@i+1 )
{
// Online user
if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i]) )
{
// Attach the member to access "Class"
attachrid( $@partymemberaid[.@i] );
if ( compare( .@tmp_class$ + "|", "|" + Class + "|" ) )
{
if ( .@rid )
attachrid(.@rid);
else
detachrid;
return 1;
}
set .@tmp_class$, .@tmp_class$ + "|" + Class;
}
// Offline user (use sql)
else
{
set .@sql$, .@sql$ + ( .@sql_i ? "OR " : "" ) + "`char_id`='" + $@partymembercid[.@i] + "' ";
set .@sql_i, .@sql_i + 1;
}
}
// SQL for offline users
if ( getstrlen(.@sql$) )
{
// get class from offline members
set .@count, query_sql("SELECT `class` FROM `char` WHERE " + .@sql$, .@class );
// Check the class.
for ( set .@i, 0; .@i<.@count; set .@i, .@i+1 )
{
if ( compare( .@tmp_class$ + "|", "|" + .@class[.@i] + "|" ) )
{
if ( .@rid )
attachrid(.@rid);
else
detachrid;
return 1;
}
set .@tmp_class$, .@tmp_class$ + "|" + .@class[.@i];
}
}
// Restore RID.
if ( .@rid )
attachrid(.@rid);
else
detachrid;
return 0;
}
NPC A:
- party choosing team [ red team | blue team ]
- a checker if someone already register to both team.
NPC A:
- warping team A and team B to a waiting room or to NPC B
Question
GM Takumirai
- Automated Script:
NPC A:
team leader
NPC A:
party number checker
NPC A:
- party choosing team [ red team | blue team ]
- a checker if someone already register to both team.
NPC A:
- warping team A and team B to a waiting room or to NPC B
NPC B:
- example of waiting room [ script from BG ]
Edited by GM Takumirai3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.