Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //===== eAthena Script ======================================================================
- //= Emperium Wars
- //===== Original By =========================================================================
- //= Toxic Aka Hellflaem
- //===== Credit =========================================================================
- //= Hellflaem
- //= ~AnnieRuru~ (Support)
- //= diedlikeahero (poring Ball)
- //= Any one I forgot.
- //===== Current Version: ====================================================================
- //= 1.0
- //===== Compatible With: ====================================================================
- //= Any eAthena
- //===== Description: ========================================================================
- //= This is just a fun little gvg game,
- //= Any one person from 2 different guilds can play it.
- //= First guild to kill the other emp 5 times wins.
- //= Killing your own Emp takes away points.
- //===== Comments================================================================
- //= Edit it to your servers likings.
- //=Own a Server? Add it to http://Top100Ros.com/
- //===========================================================================================
- quiz_02,363,356,4 script Emperium Wars::empwar 722,{
- set $npcname$,"[Gaia Emperium Wars]";
- set $rewarditem, 20011;
- mes $npcname$;
- mes "Hello "+strcharinfo(0)+" what do you want?";
- next;
- menu "^FF0000Sign Up^000000",L_signup,"^996600Enter^000000",L_enter,"^006699Information^000000",L_info,"^00AA00Nothing^000000",bye;
- close;
- L_signup:
- if (($@state_match!=1) && ($@guildID1!=0) && ($@guildID2!=0) && (getguildname($@guildID1)!="null") && (getguildname($@guildID2)!="null")) {
- mes $npcname$;
- mes "Sorry "+strcharinfo(0)+" , Two Guilds are signed up for this event already.";
- close;
- }
- mes $npcname$;
- mes "Hello "+strcharinfo(0)+" , Two Guilds are needed for this event.";
- mes "Would you like to Sign up yours?";
- mes "If so Please do so now.";
- menu "Guild 1",L_guild1,"Guild 2",L_guild2,"None",-;
- next;
- mes $npcname$;
- mes "Bye!";
- close;
- L_guild1:
- // If a match is in play
- if ($@state_match >= 1) {
- mes $npcname$;
- mes "The warpers are currently unavailable because a match is in progress. Don't hesitate to try again in a few minutes!";
- close;
- }
- // Does the player belong to a guild?
- if (getcharid(2)==0) {
- mes $npcname$;
- mes "This Event is for Guilds, and you're not in a Guild. Come back with a Guild!";
- close;
- }
- // Is the group of the player subscribed as the other guild already?
- if (getcharid(2)==$@guildID2) {
- mes $npcname$;
- mes "Hey! A player from the opposing Guild! Get ready to face off one of the best Guilds!";
- mes "The formidable " + GetGuildName($@guildID1) + "";
- close;
- }
- // If a team is already subscribed, and that team still exists
- if (($@guildID1!=0) && (getguildname($@guildID1)!="null")) {
- // if the player belongs to that team that's already subscribed
- if ($@guildID1==getcharid(2)) {
- mes $npcname$;
- mes "Do you wish to unsubscribe your team?";
- next;
- if (select("Yes, we want to stop the match.","No, we're staying.")==2) close;
- // if the player wishes to unsubscribe their team
- announce "Team " + GetGuildName($@guildID1) + " has disbanded. We need another Guild to sign up now!",bc_yellow|bc_map;
- set $@guildID1, 0;
- close;
- }
- mes $npcname$;
- mes "A Guild is already subscribed! It's Team "+getguildname($@guildID1)+".";
- close;
- }
- // if there are no teams subscribed and that the subscriptions are open
- mes $npcname$;
- mes "Do you wish to subscribe your team?";
- next;
- if (select("Yes, we want to subscribe.","No.")==2) close;
- // Team subscription
- if ($@guildID1==0 || (getguildname($@guildID1)=="null")) {
- set $@guildID1, getcharid(2);
- mes $npcname$;
- mes "Your Guild is now subscribed, good luck!";
- announce "" + getguildname($@guildID1) + " Guild has subscribed For the Emperium War!",bc_yellow|bc_map;
- doevent "empwar::OnSubscriptionguild";
- close;
- } else {
- mes $npcname$;
- mes "I'm sorry! Another Guild has subscribed before you...";
- close;
- }
- end;
- L_guild2:
- // If a match is in play
- if ($@state_match >= 1) {
- mes $npcname$;
- mes "The warpers are currently unavailable because a match is in progress. Don't hesitate to try again in a few minutes!";
- close;
- }
- // Does the player belong to a group?
- if (getcharid(2)==0) {
- mes $npcname$;
- mes "This Event is for Guilds, and you're not in a Guild. Come back with a Guild!";
- close;
- }
- // Is the group of the player subscribed as the other guild already?
- if (getcharid(2)==$@guildID1) {
- mes $npcname$;
- mes "Hey! A player from the opposing Guild! Get ready to face off one of the best Guild!";
- mes "The formidable " + GetGuildName($@guildID2) + "";
- close;
- }
- // If a team is already subscribed, and that team still exists
- if (($@guildID2!=0) && (getguildname($@guildID2)!="null")) {
- // if the player belongs to that team that's already subscribed
- if ($@guildID2==getcharid(2)) {
- mes $npcname$;
- mes "Do you wish to unsubscribe your guild?";
- next;
- if (select("Yes, we want to stop the match.","No, we're staying.")==2) close;
- // if the player wishes to unsubscribe their team
- announce "Team "+getguildname($@guildID2)+" has disbanded. We need another Guild to sign up!",bc_yellow|bc_map;
- set $@guildID2, 0;
- close;
- }
- mes $npcname$;
- mes "A Guild is already subscribed! It's Team "+getguildname($@guildID2)+".";
- close;
- }
- // if there are no teams subscribed and that the subscriptions are open
- mes $npcname$;
- mes "Do you wish to subscribe your Guild?";
- next;
- if (select("Yes, we want to subscribe.","No.")==2) close;
- // Team subscription
- if ($@guildID2==0 || (getguildname($@guildID2)=="null")) {
- set $@guildID2, getcharid(2);
- mes $npcname$;
- mes "Your Guild is now subscribed, good luck!";
- announce ""+getguildname($@guildID2)+" Guild has subscribed to the Emperium War!",bc_yellow|bc_map;
- doevent "empwar::OnSubscriptionguild";
- close;
- } else {
- mes $npcname$;
- mes "I'm sorry! Another Guild has subscribed before you...";
- close;
- }
- end;
- L_enter:
- if (($@guildID1!=0) && ($@guildID2!=0) && (getguildname($@guildID1)!="null") && (getguildname($@guildID2)!="null")) {
- if (getcharid(2)==$@guildID1) {
- savepoint "bat_a01",171,340;
- warp "bat_a01.gat", 171, 340; end;
- }
- if (getcharid(2)==$@guildID2) {
- savepoint "bat_a01",155,48;
- warp "bat_a01.gat", 155, 48; end;
- }
- mes $npcname$;
- mes "Your not in one of the Signed up guilds";
- close;
- }
- mes $npcname$;
- mes "There is not any guilds signed up";
- close;
- L_info:
- mes $npcname$;
- mes "This Game is GvG";
- mes "A Guild Must Kill the other Guilds Emperium 5 times";
- mes "Before the other guild does.";
- mes "If your Guild wins the people in your Guild on the";
- mes "map when it ends gets the Prize by talking with one of the Exit npcs.";
- mes "Good Luck.";
- close;
- bye:
- mes $npcname$;
- mes "Bye.";
- close;
- // if the 2 guilds are subscribed
- OnSubscriptionguild:
- if (($@guildID1!=0) && ($@guildID2!=0) && (getguildname($@guildID1)!="null") && (getguildname($@guildID2)!="null")) {
- announce "Gaia Emperium War : We have 2 Guilds signed up now : "+getguildname($@guildID1)+" and "+getguildname($@guildID2)+".",bc_yellow|bc_map;
- announce "Gaia Emperium War : The members of each Guild can come Enter the War now.",bc_yellow|bc_map;
- set $@state_match, 1;
- donpcevent "Ew::OnBegin";
- end;
- }
- }
- //Exit
- bat_a01.gat,149,351,5 script Exit::Ewexit 88,{
- if(getcharid(2) == $Ewgid){
- getitem $rewarditem,rand(1,5);
- savepoint "Jazeera",158,127;
- warp "Jazeera", 158, 127; end;
- }
- savepoint "Jazeera",158,127;
- warp "Jazeera", 158, 127; end;
- }
- // function Ew Start
- - script Ew -1,{
- OnBegin:
- if (.points2 >= 5) {
- Announce "The Gaia Emperium War is over!",8;
- Announce "The Winner of Gaia Emperium War is the [" + GetGuildName($@guildID2) + "] guild.",0;
- set $Ewgid,getcharid(2);
- donpcevent "Ew::OnEnded";
- end;
- }
- if (.points1 >= 5) {
- Announce "The Gaia Emperium War is over!",8;
- Announce "The Winner of Gaia Emperium War is the [" + GetGuildName($@guildID1) + "] guild.",0;
- set $Ewgid,getcharid(2);
- donpcevent "Ew::OnEnded";
- end;
- }
- initnpctimer;
- MapRespawnGuildID "bat_a01",$Ewgid,7;
- monster "bat_a01",173,346,"EMPERIUM",1288,1,"Ew::OnEmpDead1";
- monster "bat_a01",165,50,"EMPERIUM",1288,1,"Ew::OnEmpDead2";
- end;
- OnEmpDead2:
- if ( getcharid(2) == $@guildID2 ) {
- stopnpctimer;
- set .points2, .points2 -1;
- dispbottom "Stop killing your own emp";
- Announce "The [" + GetGuildName($@guildID2) + "] guild has lost a Point for killing there own Emperium and now has [" + .points2 + "] Points!.",0;
- goto OnBegin;
- end;
- } else {
- stopnpctimer;
- set .points1, .points1 +1 ;
- Announce "The [" + GetGuildName($@guildID1) + "] guild has [" + .points1 + "] Points!.",0;
- goto OnBegin;
- end; }
- OnEmpDead1:
- if ( getcharid(2) == $@guildID1 ) {
- stopnpctimer;
- set .points1, .points1 -1;
- dispbottom "Stop killing your own emp";
- Announce "The [" + GetGuildName($@guildID1) + "] guild has lost a Point for killing there own Emperium and now has [" + .points1 + "] Points!.",0;
- goto OnBegin;
- end;
- } else {
- stopnpctimer;
- set .points2, .points2 +1 ;
- Announce "The [" + GetGuildName($@guildID2) + "] guild has [" + .points2 + "] Points!.",0;
- goto OnBegin;
- end; }
- OnEnded:
- stopnpctimer;
- set $@state_match, 0;
- set .points1,0;
- set .points2,0;
- killmonsterall "bat_a01";
- end;
- OnTimer900000:
- Announce "The Emperium War is over, No one was the winner!",8;
- set $Ewgid,0;
- donpcevent "Ew::OnEnded";
- end;
- }
- //duplicates
- bat_a01.gat,363,266,0 duplicate(Ewexit) Ewexit#2 45,1,1
- bat_a01.gat,353,60,0 duplicate(Ewexit) Ewexit#3 45,1,1
- bat_a01.gat,138,57,0 duplicate(Ewexit) Ewexit#4 45,1,1
- bat_a01 mapflag gvg
- bat_a01 mapflag nowarpto
- bat_a01 mapflag nowarp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement