which can, delete a party if you have one, and joins you into the new party.
2. Hmm, inside the battleground, i like to have a Dota announcement everytime a player kills a player, announce "player1 has pawned player2..." like that. hope for someone to help! THX in advance!
//--Originally from battleground scripts--------------------------//
//--Simplified to fewer npcs for easy registration------------//
Question
Santino
So I mixed some bg scripts to 1 script
for easy and fast registrations.
It is working. Just like KVM BG
1. What I want is, an additional script
when team Sentinel / Scourge enters the battleground.
That it will auto-make a party,
& I think it is possible thru Xantara's PartyInvite Script Command Patch
which can, delete a party if you have one, and joins you into the new party.
2. Hmm, inside the battleground, i like to have a Dota announcement everytime a player kills a player, announce "player1 has pawned player2..." like that. hope for someone to help! THX in advance!
//--Originally from battleground scripts--------------------------//
//--Simplified to fewer npcs for easy registration------------//
//--Waiting rooms, Sentinel & Scourge Battle Stations--//
//--Currently 3v3 Battle map----------------------------------------//
//GAME
lunette,126,84,6 script Sentinel#2::Sentinel_Reg#2 436,{ // Sentinel Registration
close;
OnInit:
waitingroom "3 v 3 Sentinel Battle Station",3,"Dota_BG2::OnSentinelJoin",1;
end;
OnEnterBG:
set $@Dota_id1, waitingroom2bg("bat_c02",53,128,"Dota_BG2::OnSentinelQuit","Dota_BG2::OnSentinelDie");
end;
}
lunette,131,84,2 script Scourge#2::Scourge_Reg#2 443,{ // Scourge Registration
close;
OnInit:
waitingroom "3 v 3 Scourge Battle Station",3,"Dota_BG2::OnScourgeJoin",1;
end;
OnEnterBG:
set $@Dota_id2, waitingroom2bg("bat_c02",146,55,"Dota_BG2::OnScourgeQuit","Dota_BG2::OnScourgeDie");
end;
}
// Dota_BG2 SCRIPT
// *********************************************************************
- script Dota_BG2 -1,{
end;
OnInit:
setwall "bat_c02",54,122,6,7,0,"batc01wall_a";
setwall "bat_c02",55,122,5,7,0,"batc01wall_b";
setwall "bat_c02",140,56,6,7,0,"batc01wall_c";
setwall "bat_c02",140,57,5,7,0,"batc01wall_d";
disablenpc "Fountain_Healer_c";
disablenpc "Fountain_Healer_d";
disablenpc "Reward_NPC_c";
disablenpc "Reward_NPC_d";
end;
OnSentinelJoin:
OnScourgeJoin:
donpcevent "Dota_BG2::OnReadyCheck";
end;
OnSentinelQuit:
if( $@Dota_war == 2 )
{
set .Sentinel_Count, .Sentinel_Count - 1;
set .Scourge_Score, .Scourge_Score + 1;
bg_updatescore "bat_c02",.Sentinel_Score,.Scourge_Score;
if( .Sentinel_Count < 1 ) donpcevent "Dota_BG2::OnScourgeWin";
}
end;
OnSentinelDie:
if( $@Dota_war == 2 )
{
set .Sentinel_Count, .Sentinel_Count - 1;
set .Scourge_Score, .Scourge_Score + 1;
bg_updatescore "bat_c02",.Sentinel_Score,.Scourge_Score;
if( .Sentinel_Count < 1 ) donpcevent "Dota_BG2::OnScourgeWin";
}
end;
OnScourgeQuit:
if( $@Dota_war == 2 )
{
set .Scourge_Count, .Scourge_Count - 1;
set .Sentinel_Score, .Sentinel_Score + 1;
bg_updatescore "bat_c02",.Sentinel_Score,.Scourge_Score;
if( .Scourge_Count < 1 ) donpcevent "Dota_BG2::OnSentinelWin";
}
end;
OnScourgeDie:
if( $@Dota_war == 2 )
{
set .Scourge_Count, .Scourge_Count - 1;
set .Sentinel_Score, .Sentinel_Score + 1;
bg_updatescore "bat_c02",.Sentinel_Score,.Scourge_Score;
if( .Scourge_Count < 1 ) donpcevent "Dota_BG2::OnSentinelWin";
}
end;
OnReadyCheck:
if( $@Dota_war )
end;
set .@Sentinel, getwaitingroomstate(0,"Sentinel_Reg#2");
set .@Scourge, getwaitingroomstate(0,"Scourge_Reg#2");
if( .@Sentinel < 3 || .@Scourge < 3 )
{
if( .@Sentinel > 1 && .@Scourge > 1 && !agitcheck() && !agitcheck2() && $@KvM_Flood < gettimetick(2) )
{
announce "Defense of the Ancients -- 3 v 3 -- Sentinel: " + .@Sentinel + "/3, Scourge: " + .@Scourge + "/3",0,0xD0D0D0;
set $@KvM_Flood, gettimetick(2) + 15;
}
else
areaannounce "lunette",101,107,132,73,"Defense of the Ancients -- 3 v 3 -- Sentinel: " + .@Sentinel + "/3, Scourge: " + .@Scourge + "/3",1,0xD0D0D0;
end;
}
set $@Dota_war, 1; // Starting
donpcevent "Scourge_Reg#2::OnEnterBG";
donpcevent "Sentinel_Reg#2::OnEnterBG";
donpcevent "Dota_BG2::OnStart";
end;
OnStart:
announce "The war between the Sentinel and Scourge has initiated!",0,0xD0D0D0;
enablenpc "Fountain_Healer_c";
enablenpc "Fountain_Healer_d";
disablenpc "Reward_NPC_c";
disablenpc "Reward_NPC_d";
set $@Dota_Victory, 0;
sleep 2000;
// Warp Teams
bg_warp $@Dota_id1,"bat_c02",53,128;
bg_warp $@Dota_id2,"bat_c02",146,55;
// ScoreBoard
set .Sentinel_Score, 0;
set .Scourge_Score, 0;
initnpctimer;
end;
OnTimer5000:
areapercentheal "bat_c02",50,123,58,131,100,100;
areapercentheal "bat_c02",141,52,149,60,100,100;
mapannounce "bat_c02","The Battle will start in 25 seconds!!",1,0xD0D0D0;
end;
OnTimer26000:
mapannounce "bat_c02","The Battle will start in 4 seconds!!",1,0xD0D0D0;
end;
OnTimer27000:
donpcevent "::OnDota01LightA";
end;
OnTimer28000:
donpcevent "::OnDota01LightB";
end;
OnTimer29000:
donpcevent "::OnDota01LightC";
end;
OnTimer30000:
// Team Members
disablenpc "Fountain_Healer_c";
disablenpc "Fountain_Healer_d";
set .Sentinel_Count, bg_get_data($@Dota_id1, 0);
set .Scourge_Count, bg_get_data($@Dota_id2, 0);
if( .Sentinel_Count < 3 || .Scourge_Count < 3 )
{
set $@Dota_Victory, 3;
set $@Dota_war, 3;
mapannounce "bat_c02","There are not enough players to start the battle",1,0xD0D0D0;
stopnpctimer;
sleep 2000;
donpcevent "Dota_BG2::OnStop";
end;
}
set $@Dota_war, 2; // Playing
areapercentheal "bat_c02",50,123,58,131,100,100;
bg_warp $@Dota_id1,"bat_c02",62,119;
areapercentheal "bat_c02",141,52,149,60,100,100;
bg_warp $@Dota_id2,"bat_c02",137,64;
end;
OnTimer32000:
mapannounce "bat_c02","You only got 5mins to to win the battle!!",1,0xD0D0D0;
end;
OnTimer300000:
mapannounce "bat_c02","The Battle will end in 30 seconds!!",1,0xD0D0D0;
end;
OnTimer330000:
if( .Scourge_Count > .Sentinel_Count )
donpcevent "Dota_BG2::OnScourgeWin";
else if( .Scourge_Count < .Sentinel_Count )
donpcevent "Dota_BG2::OnSentinelWin";
else
{ // Draw Game
set $@Dota_war, 3;
set $@Dota_Victory, 3;
stopnpctimer;
sleep 2000;
mapannounce "bat_c02","The time is out! This is a Tie...",1,0xD0D0D0;
donpcevent "Dota_BG2::OnStop";
}
end;
OnSentinelWin:
set $@Dota_war, 3;
set $@Dota_Victory, 1;
stopnpctimer;
sleep 2000;
announce "Sentinel has won the Defense of the Ancients",0,0x0000FF;
donpcevent "Dota_BG2::OnStop";
end;
OnScourgeWin:
set $@Dota_war, 3;
set $@Dota_Victory, 2;
stopnpctimer;
sleep 2000;
announce "Scourge has won the Defense of the Ancients",0,0xFF0000;
donpcevent "Dota_BG2::OnStop";
end;
OnStop:
enablenpc "Reward_NPC_c";
enablenpc "Reward_NPC_d";
// Warp Teams
bg_warp $@Dota_id1,"bat_c02",53,128;
bg_warp $@Dota_id2,"bat_c02",146,55;
announce "Dota will be active in the next minute! Have a little rest dear players!",0,0xD0D0D0;
donpcevent "Dota_BG2_Out2::OnBegin";
end;
OnReset:
stopnpctimer;
stopnpctimer "Dota_BG2_Out2";
set .Scourge_Count, 0;
set .Sentinel_Count, 0;
set .Scourge_Score, 0;
set .Sentinel_Score, 0;
set $@Dota_Victory, 0;
if( $@Dota_id1 ) { bg_destroy $@Dota_id1; set $@Dota_id1, 0; }
if( $@Dota_id2 ) { bg_destroy $@Dota_id2; set $@Dota_id2, 0; }
disablenpc "Fountain_Healer_c";
disablenpc "Fountain_Healer_d";
disablenpc "Reward_NPC_c";
disablenpc "Reward_NPC_d";
sleep 1000;
mapwarp "bat_c02","lunette",73,99;
sleep 2000;
maprespawnguildid "bat_c02",0,3; // Just in case someone else
bg_updatescore "bat_c02",0,0;
sleep 2000;
set $@Dota_war, 0;
donpcevent "Dota_BG2::OnReadyCheck"; // Maybe a game is ready to start
end;
}
- script Dota_BG2_Out2 -1,{
end;
OnBegin:
initnpctimer;
end;
OnTimer3000:
mapannounce "bat_c02","Defense of the Ancients will close in 1 minute!",1,0xD0D0D0;
end;
OnTimer30000:
mapannounce "bat_c02","Defense of the Ancients will close in 30 seconds!",1,0xD0D0D0;
end;
OnTimer50000:
mapannounce "bat_c02","Defense of the Ancients will close in 10 seconds!",1,0xD0D0D0;
end;
OnTimer60000:
donpcevent "Dota_BG2::OnReset";
end;
}
// Battleground Therapist
// *********************************************************************
bat_c02,51,130,5 script Fountain NPC#3::Fountain_Healer_c 95,{
skilleffect 383,0; sc_start SC_WINDWALK,360000,5;
skilleffect 45,0; sc_start SC_CONCENTRATE,360000,10;
skilleffect 74,0; sc_start SC_MAGNIFICAT,360000,5;
skilleffect 75,0; sc_start SC_GLORIA,360000,5;
skilleffect 34,0; sc_start SC_BLESSING,360000,10;
skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10;
skilleffect 357,0; sc_start SC_CONCENTRATION,360000,5;
switch ( basejob ) {
case Job_Alchemist: set .@spirit, 445; break;
case Job_Monk: set .@spirit, 447; break;
case Job_Star_Gladiator: set .@spirit, 448; break;
case Job_Sage: set .@spirit, 449; break;
case Job_Crusader: set .@spirit, 450; break;
case Job_SuperNovice: set .@spirit, 451; break;
case Job_Knight: set .@spirit, 452; break;
case Job_Wizard: set .@spirit, 453; break;
case Job_Priest: set .@spirit, 454; break;
case Job_Bard: case Job_Dancer: set .@spirit, 455; break;
case Job_Rogue: set .@spirit, 456; break;
case Job_Assassin: set .@spirit, 457; break;
case Job_Blacksmith: set .@spirit, 458; break;
case Job_Hunter: set .@spirit, 460; break;
case Job_Soul_Linker: set .@spirit, 461; break;
default:
if ( upper == 1 && baselevel < 70 )
set .@spirit, 494;
}
if ( .@spirit ) {
sc_start4 sc_spirit, .@time, 5, .@spirit,0,0;
skilleffect .@spirit, 5;
}
if ( isequippedcnt(4128) >= 1 ) // if your server needs 2 GTB to immune, set to 2 instead of 1
dispbottom "[Healer] Please unequip your Golden Thief Bug card to get full buff.";
percentheal 100,100;
repair(1);
skilleffect 28, maxhp;
skilleffect 9, maxsp;
close;
}
bat_c02,148,53,1 script Fountain NPC#4::Fountain_Healer_d 95,{
skilleffect 383,0; sc_start SC_WINDWALK,360000,5;
skilleffect 45,0; sc_start SC_CONCENTRATE,360000,10;
skilleffect 74,0; sc_start SC_MAGNIFICAT,360000,5;
skilleffect 75,0; sc_start SC_GLORIA,360000,5;
skilleffect 34,0; sc_start SC_BLESSING,360000,10;
skilleffect 29,0; sc_start SC_INCREASEAGI,360000,10;
skilleffect 357,0; sc_start SC_CONCENTRATION,360000,5;
switch ( basejob ) {
case Job_Alchemist: set .@spirit, 445; break;
case Job_Monk: set .@spirit, 447; break;
case Job_Star_Gladiator: set .@spirit, 448; break;
case Job_Sage: set .@spirit, 449; break;
case Job_Crusader: set .@spirit, 450; break;
case Job_SuperNovice: set .@spirit, 451; break;
case Job_Knight: set .@spirit, 452; break;
case Job_Wizard: set .@spirit, 453; break;
case Job_Priest: set .@spirit, 454; break;
case Job_Bard: case Job_Dancer: set .@spirit, 455; break;
case Job_Rogue: set .@spirit, 456; break;
case Job_Assassin: set .@spirit, 457; break;
case Job_Blacksmith: set .@spirit, 458; break;
case Job_Hunter: set .@spirit, 460; break;
case Job_Soul_Linker: set .@spirit, 461; break;
default:
if ( upper == 1 && baselevel < 70 )
set .@spirit, 494;
}
if ( .@spirit ) {
sc_start4 sc_spirit, .@time, 5, .@spirit,0,0;
skilleffect .@spirit, 5;
}
if ( isequippedcnt(4128) >= 1 ) // if your server needs 2 GTB to immune, set to 2 instead of 1
dispbottom "[Healer] Please unequip your Golden Thief Bug card to get full buff.";
percentheal 100,100;
repair(1);
skilleffect 28, maxhp;
skilleffect 9, maxsp;
close;
}
//REWARDS
// *********************************************************************
bat_c02,51,130,5 script Reward#3::Reward_NPC_c 419,{
if( $@Dota_Victory )
{
if( $@Dota_Victory == 3 )
{
bg_leave;
warp "lunette",73,100;
end;
}
else if( $@Dota_Victory == 1 )
{ // Victory
set .@Reward, 5;
mes "[swandery]";
mes "Blessed Guillaume!!";
mes "Let's enjoy our glorious victory!";
mes "" + strcharinfo(0) + ", its a sign reflecting victory";
close2;
}
else
{ //
set .@Reward, 1;
mes "[swandery]";
mes "You lost, but you're dedicated to this battle.";
mes "This is a reward for your great dedication by Guillaume Marollo!";
mes "Just take this defeat a lesson, and later you would definitely learn.";
close2;
}
getitem 674, .@Reward;
bg_leave;
warp "lunette",73,100;
end;
}
end;
}
bat_c02,148,53,1 script Reward#4::Reward_NPC_d 415,{
if( $@Dota_Victory )
{
if( $@Dota_Victory == 3 )
{
bg_leave;
warp "lunette",73,100;
end;
}
else if( $@Dota_Victory == 1 )
{ // Victory
set .@Reward, 5;
mes "[swandery]";
mes "Blessed Guillaume!!";
mes "Let's enjoy our glorious victory!";
mes "" + strcharinfo(0) + ", its a sign reflecting victory";
close2;
}
else
{ //
set .@Reward, 1;
mes "[swandery]";
mes "You lost, but you're dedicated to this battle.";
mes "This is a reward for your great dedication by Guillaume Marollo!";
mes "Just take this defeat a lesson, and later you would definitely learn.";
close2;
}
getitem 674, .@Reward;
bg_leave;
warp "lunette",73,100;
end;
}
end;
}
// Light Effects
// *********************************************************************
bat_c02,54,123,0 script #bat_c02a3 111,{
end;
OnDota01LightA: misceffect 54; end;
OnDota01LightB: misceffect 55; end;
OnDota01LightC: misceffect 56; end;
}
Link to comment
Share on other sites
0 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.