Jump to content

Dark Theme was set as default for all members. Please report any issues here.

Lyka

Members
  • Content Count

    12
  • Joined

  • Last visited

3 Followers

About Lyka

  • Rank
    Member

Profile Information

  • Gender
    Female
  • Location:
    Maryland
  • Emulator
    Hercules
  1. Sir is there any detailed reference which i could use to downgrade episodes?
  2. Hi guys, Just wondering how will i know my current episode? im on pre renewal default. Thanks in advance!
  3. any english translation on the external link website? seems to be in korean, i cant translate the page. thanks in advance
  4. Lyka

    Configure reward

    - script init -1,{ OnInit: //== CONFIG START ==// set [email protected]$,"#"; // Set the symbol of your char command ex. # set [email protected]$,"^009966War Organizer^000000"; // Set NPC name set [email protected]_mem,7; // Set minimum members per party, if a party has 6 members below including the leader, leader can't register his/her party set [email protected]_map$,"guild_vs3"; // Set where you want the players to battle set [email protected]_arena_mapX,15; // Set the starting X position of Team 1 set [email protected]_arena_mapY,49; // Set the starting Y position of Team 1 set [email protected]_arena_mapX,85; // Set the starting X position of Team 2 set [email protected]_arena_mapY,49; // Set the starting Y position of Team 2 set [email protected]_map$,"quiz_02"; // Set where you want the players to be warped after the player was killed. set [email protected]_mapX,350; set [email protected]_mapY,379; //== Set Winning Party Rewards ==// set [email protected]_winitem_qnty,1; // Important, set to how many reward items you set below for the winning party setarray [email protected]_itemid[0],501; // Set the item id of the reward item setarray [email protected]_itemname$[0],"Red Potion"; // Set the name of the reward item setarray [email protected]_itemnum[0],1; // Set the quantity of the reward //== Set Losing Party Rewards ==// set [email protected]_loseitem_qnty,0; // Important, set to how many reward items you set below for losing party setarray [email protected]_itemid[0],0; // Set the item id of the reward item setarray [email protected]_itemname$[0],"Red Potion", // Set the name of the reward item "Orange Potion"; setarray [email protected]_itemnum[0],0; // Set the quantity of the reward //== Set Draw Rewards ==// set [email protected]_drawitem_qnty,0; // Important, set to how many reward items you set below for draw result setarray [email protected]_itemid[0],0; // Set the item id of the reward item setarray [email protected]_itemname$[0],"Yellow Potion", // Set the name of the reward item "White Potion"; setarray [email protected]_itemnum[0],0; // Set the quantity of the reward //== CONFIG END ==// // Do not change configs below, this will reset in case the server unexpectedly shuts down set [email protected]_Start,0; set [email protected]_team,0; set [email protected]_team1,0; set [email protected]_team2,0; set $team1_mem,0; set $team2_mem,0; // RWC 3 enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; // Now let's check if the event is on going or not (checks current server's time) // if the event is on going, Enable NPC and sends a message to the player upon logging in for(set [email protected],0; [email protected]<=22; set [email protected],[email protected]+2) { set [email protected],[email protected]+1; if(gettime(3)>[email protected] && gettime(3)<[email protected]) { set [email protected]_start,1; enablenpc "PartyReg"; } set [email protected],[email protected]+1; } end; } // Party Registration NPC quiz_02,350,389,3 script Party Registration::PartyReg 89,{ mes "["[email protected]$+"]"; if(([email protected]_Start && getcharid(1)[email protected]_team1) || ([email protected]_Start && getcharid(1)[email protected]_team2) ) { mes "Hmm... Too bad for you, you didn't make it to win for your party. Cheer them up instead."; close; } if([email protected]_Start || [email protected]_team>=2) { mes "Battle is currently on"; mes "going. Party registration is"; mes "close during this time."; next; if(select("> Check current battle info.:> Leave") == 2){ mes "["[email protected]$+"]"; mes "Come back to me and register your party after the battle between "+getpartyname([email protected]_team1)+" and "+getpartyname([email protected]_team2)+" has ended."; close; } mes "["[email protected]$+"]"; if([email protected]_Start) { mes "The Battle already ended."; close; } set @standing_mem1,[email protected]_mem-$team2_mem; set @standing_mem2,[email protected]_mem-$team1_mem; mes "Battle Information"; mes "---"; mes "- " + getpartyname([email protected]_team1) + " Party : "; mes "Standing Members Left : " + @standing_mem1; mes "---"; mes "- " + getpartyname([email protected]_team2) + " Party : "; mes "Standing Members Left : " + @standing_mem2; next; mes "["[email protected]$+"]"; if($team1_mem>$team2_mem) { mes "Current leading party is "+getpartyname([email protected]_team1); close; } else if($team1_mem<$team2_mem) { mes "Current leading party is "+getpartyname([email protected]_team2); close; } else { mes "Both Party has the same number of members that are still alive."; close; } } if(getcharid(1)==0) goto L_ContinueMain; if(getcharid(1)[email protected]_team1 || getcharid(1)[email protected]_team2) { mes getpartyleader(getcharid(1)) + ", your party leader already registered your party, please wait for the other team to register."; close; } L_ContinueMain: mes "Welcome "+strcharinfo(0)+"!"; mes "I am the War Arena Organizer"; next; switch(select("> Register")) { case 1: callsub R_Party; } R_Party: mes "["[email protected]$+"]"; 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 ( [email protected] != 7 ) { mes "You have to be 7 on the team."; close; } if(getcharid(1)==0) { mes "I see that you have no party yet. Please form your party first before registering."; close; } mes "Party Name : "+strcharinfo(1); if(getpartyleader(getcharid(1),2)==getcharid(0)) { mes "Party Leader : You"; } else { mes "Party Leader : "+getpartyleader(getcharid(1)); } mes "-"; getpartymember(getcharid(1)); set @partymembercount,[email protected]; copyarray @partymembername$[0],[email protected]$[0],@partymembercount; set @countmem,0; L_DisplayMem: if(@countmem == @partymembercount) goto L_Continue; set @countmem,@countmem+1; goto L_DisplayMem; L_Continue: mes "Party Members ("+(@countmem)+"/"[email protected]_mem+")"; set @count,0; L_DisplayMember: if(@count == @partymembercount) goto L_Continue2; mes (@count + 1) + ". ^0000FF" + @partymembername$[@count] + "^000000"; set @count,@count+1; goto L_DisplayMember; L_Continue2: if([email protected]_Start || [email protected]_team>=2) { next; mes "Sorry but party registration is now close. Please re-register after the current battle progress has ended."; close; } if(getpartyleader(getcharid(1),2)!=getcharid(0)) { next; mes strcharinfo(0)+", If you have time, please find your Party Leader "+getpartyleader(getcharid(1))+" and let him/her register your party"; close; } if(@countmem>[email protected]_mem) { next; mes "This event requires you to form a party with only "[email protected]_mem+" members including you. I'm sorry to say but you need to expel ^FF0000"+(@[email protected]_mem)+"^000000 more member(s)."; close; } if(@countmem<[email protected]_mem) { next; mes "This event requires you to form a party with "[email protected]_mem+" members including you. You still need to recruit ^FF0000"+([email protected][email protected])+"^000000 more member(s)."; close; } set [email protected]_team,[email protected]_team+1; if([email protected]_team==1) { set [email protected]_team1,getcharid(1); setarray [email protected]_name1$[0],@partymembername$[0],@partymembername$[1],@partymembername$[2],@partymembername$[3],@partymembername$[4]; announce "Team "+getpartyname([email protected]_team1)+" registered on Team "[email protected]_team+".",bc_all; goto L_Continue3; } if([email protected]_team==2) { set [email protected]_team2,getcharid(1); announce "Team "+getpartyname([email protected]_team2)+" registered on Team "[email protected]_team+".",bc_all; setarray [email protected]_name2$[0],@partymembername$[0],@partymembername$[1],@partymembername$[2],@partymembername$[3],@partymembername$[4]; goto L_Continue3; } L_Continue3: close2; if([email protected]_team==2) donpcevent "PvP_Func::OnStart"; end; OnPCDieEvent: getmapxy @map$,@x,@y,0; if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team1) { set $team2_mem,$team2_mem+1; warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam2Win2"; } end; } if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team2) { set $team1_mem,$team1_mem+1; warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam1Win2"; } end; } OnPCLogoutEvent: getmapxy @map$,@x,@y,0; if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team1) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team2_mem,$team2_mem+1; mapannounce [email protected]_map$,"User "+strcharinfo(0)+" of "+getpartyname([email protected]_team1)+" Team logged out of the game.",bc_all; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam2Win2"; } end; } if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team2) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team1_mem,$team1_mem+1; mapannounce [email protected]_map$,"User "+strcharinfo(0)+" of "+getpartyname([email protected]_team2)+" Team logged out of the game.",bc_all; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam1Win2"; } end; } OnPCLoadMapEvent: getmapxy @map$,@x,@y,0; if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team1) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team2_mem,$team2_mem+1; mapannounce [email protected]_map$,""+strcharinfo(0)+" of "+getpartyname([email protected]_team1)+" party warped out of the battle arena.",bc_blue; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam2Win2"; } end; } if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team2) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team1_mem,$team1_mem+1; mapannounce [email protected]_map$,""+strcharinfo(0)+" of "+getpartyname([email protected]_team2)+" party warped out of the battle arena.",bc_blue; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam1Win2"; } end; } } // Script where all functions are stored - script PvP_Func -1,{ OnStart: initnpctimer; set [email protected]_Start,1; setcell [email protected]_map$,80,55,80,44,cell_walkable,0; setcell [email protected]_map$,19,55,19,44,cell_walkable,0; announce "The Battle between "+getpartyname([email protected]_team1)+" and "+getpartyname([email protected]_team2)+" Party has engaged. Registered Party along with its members will be automatically warped to the arena after 10 seconds.",bc_all; gvgoff [email protected]_map$; setnpctimer 0; startnpctimer; end; OnTimer5000: warpparty [email protected]_map$,[email protected]_arena_mapX,[email protected]_arena_mapY,[email protected]_team1; warpparty [email protected]_map$,[email protected]_arena_mapX,[email protected]_arena_mapY,[email protected]_team2; end; OnTimer30000: mapannounce [email protected]_map$,"Players, you only have 30 seconds left to prepare for the Battle.",bc_all; end; OnTimer50000: mapannounce [email protected]_map$,"The Battle will begin in 5 seconds.",bc_all; end; OnTimer51000: mapannounce [email protected]_map$,"The Battle will begin in 4 seconds.",bc_all; end; OnTimer52000: mapannounce [email protected]_map$,"The Battle will begin in 3 seconds.",bc_all; end; OnTimer53000: mapannounce $[email protected]_map$,"The Battle will begin in 2 seconds.",bc_all; end; OnTimer54000: mapannounce [email protected]_map$,"The Battle will begin in 1 second.",bc_all; end; OnTimer55000: gvgon [email protected]_map$; setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; disablenpc "WALL#41"; disablenpc "WALL#42"; disablenpc "WALL#43"; disablenpc "WALL#44"; disablenpc "WALL#45"; disablenpc "WALL#46"; disablenpc "WALL#47"; disablenpc "WALL#48"; disablenpc "WALL#49"; disablenpc "WALL#50"; disablenpc "WALL#51"; disablenpc "WALL#52"; disablenpc "WALL#53"; disablenpc "WALL#54"; disablenpc "WALL#55"; disablenpc "WALL#56"; disablenpc "WALL#57"; disablenpc "WALL#58"; disablenpc "WALL#59"; disablenpc "WALL#60"; disablenpc "WALL#61"; disablenpc "WALL#62"; disablenpc "WALL#63"; disablenpc "WALL#64"; announce "The team "+getpartyname([email protected]_team1)+" vs "+getpartyname([email protected]_team2)+" battle has begun!",bc_all; mapannounce [email protected]_map$,"You only have 5 minutes to eliminate all opponent's party members. Be quick!!!",bc_all; end; // After 5 Minutes, system will check the party who has the most number of member and will declare that party as a winner. // All variables will be resetted. OnTimer420000: if($team2_mem<$team1_mem) { donpcevent "PvP_Func::OnTeam1Win"; } else if ($team2_mem<$team1_mem) { donpcevent "PvP_Func::OnTeam2Win"; } else if ($team2_mem==$team1_mem || $team1_mem==$team2_mem) { donpcevent "PvP_Func::OnDraw"; } else { donpcevent "PvP_Func::OnNoWin"; } end; // This label will be called after the event has ended without registered parties OnNoWin: announce "The Battle has ended.",bc_all; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndNoWin: announce "The Battle has ended.",bc_all; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnDraw: announce "Team "+getpartyname([email protected]_team1)+" and Team "+getpartyname([email protected]_team2)+" has the same number of members standing in the arena, the battle result is a draw.",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } stopnpctimer; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndDraw: announce "Team "+getpartyname([email protected]_team1)+" and Team "+getpartyname([email protected]_team2)+" has the same number of members standing in the arena, the battle result is a draw.",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } stopnpctimer; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam1Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team1)+" party member survives more than "+getpartyname([email protected]_team2)+" party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndTeam1Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team1)+" party member survives more than "+getpartyname([email protected]_team2)+" party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam2Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team2)+" party member survives more than "+getpartyname([email protected]_team1)+" party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndTeam2Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team2)+" party member survives more than "+getpartyname([email protected]_team1)+"'s Party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; disablenpc "PartyReg"; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam1Win2: announce "Team "+getpartyname([email protected]_team1)+" smashed all the member of Team "+getpartyname([email protected]_team2)+" and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam2Win2: announce "Team "+getpartyname([email protected]_team2)+" smashed all the member of Team "+getpartyname([email protected]_team1)+"and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; } function script StartEvent { enablenpc "PartyReg"; set [email protected]_start,1; announce "The Battle has begun.",bc_all; return; } function script EndEvent { if ([email protected]_Start && [email protected]_team<2) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndNoWin"; } else if ($team2_mem<$team1_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndTeam1Win"; } else if ($team2_mem<$team1_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndTeam2Win"; } else if ($team2_mem==$team1_mem || $team1_mem==$team2_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndDraw"; } else { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndNoWin"; } end; } //////////////////////////////////////////////////////////////////////////// ////RWC 3/////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// guild_vs3,19,55,0 script WALL#41 1905,{ } guild_vs3,19,54,0 duplicate(WALL#41) WALL#42 1905 guild_vs3,19,53,0 duplicate(WALL#41) WALL#43 1905 guild_vs3,19,52,0 duplicate(WALL#41) WALL#44 1905 guild_vs3,19,51,0 duplicate(WALL#41) WALL#45 1905 guild_vs3,19,50,0 duplicate(WALL#41) WALL#46 1905 guild_vs3,19,49,0 duplicate(WALL#41) WALL#47 1905 guild_vs3,19,48,0 duplicate(WALL#41) WALL#48 1905 guild_vs3,19,47,0 duplicate(WALL#41) WALL#49 1905 guild_vs3,19,46,0 duplicate(WALL#41) WALL#50 1905 guild_vs3,19,45,0 duplicate(WALL#41) WALL#51 1905 guild_vs3,19,44,0 duplicate(WALL#41) WALL#52 1905 guild_vs3,80,55,0 duplicate(WALL#41) WALL#53 1905 guild_vs3,80,54,0 duplicate(WALL#41) WALL#54 1905 guild_vs3,80,53,0 duplicate(WALL#41) WALL#55 1905 guild_vs3,80,52,0 duplicate(WALL#41) WALL#56 1905 guild_vs3,80,51,0 duplicate(WALL#41) WALL#57 1905 guild_vs3,80,50,0 duplicate(WALL#41) WALL#58 1905 guild_vs3,80,49,0 duplicate(WALL#41) WALL#59 1905 guild_vs3,80,48,0 duplicate(WALL#41) WALL#60 1905 guild_vs3,80,47,0 duplicate(WALL#41) WALL#61 1905 guild_vs3,80,46,0 duplicate(WALL#41) WALL#62 1905 guild_vs3,80,45,0 duplicate(WALL#41) WALL#63 1905 guild_vs3,80,44,0 duplicate(WALL#41) WALL#64 1905 function script party_has_duplicate_job { set [email protected]_id, getarg( 0, getcharid(1) ); // Need to have a party. if ( [email protected]_id ) { return -1; } // Loading party members variables getpartymember [email protected]_id, 1; getpartymember [email protected]_id, 2; // Keep rid attached. set [email protected], playerattached(); // Check all members for ( set [email protected],0; [email protected]<[email protected]; set [email protected], [email protected]+1 ) { // Online user if ( isloggedin( [email protected][[email protected]], [email protected][[email protected]]) ) { // Attach the member to access "Class" attachrid( [email protected][[email protected]] ); if ( compare( [email protected]_class$ + "|", "|" + Class + "|" ) ) { if ( [email protected] ) attachrid([email protected]); else detachrid; return 1; } set [email protected]_class$, [email protected]_class$ + "|" + Class; } // Offline user (use sql) else { set [email protected]$, [email protected]$ + ( [email protected]_i ? "OR " : "" ) + "`char_id`='" + [email protected][[email protected]] + "' "; set [email protected]_i, [email protected]_i + 1; } } // SQL for offline users if ( getstrlen([email protected]$) ) { // get class from offline members set [email protected], query_sql("SELECT `class` FROM `char` WHERE " + [email protected]$, [email protected] ); // Check the class. for ( set [email protected], 0; [email protected]<[email protected]; set [email protected], [email protected]+1 ) { if ( compare( [email protected]_class$ + "|", "|" + [email protected][[email protected]] + "|" ) ) { if ( [email protected] ) attachrid([email protected]); else detachrid; return 1; } set [email protected]_class$, [email protected]_class$ + "|" + [email protected][[email protected]]; } } // Restore RID. if ( [email protected] ) attachrid([email protected]); else detachrid; return 0; } - script RWC -1,{ // Settings // GM LVL Allowed set .gmlvl,99; OnWhisperGlobal: if(getgmlevel() <= .gmlvl) goto N_Authority; switch(select("Reset:")) { case 1: stopnpctimer; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; dispbottom "Reset OK."; close; N_Authority: dispbottom "You cannot use this commands anymore."; close; } } Here's the whole script sir :> thank you in advance
  5. Lyka

    Configure reward

    Hi! Is it okay sir if you could set and example of a correct reward configuration? For example the winning party is composed of 4 players and each of them will receive 1 red potion. Thanks in advance! ;>
  6. Lyka

    Reward System

    Hiii ! the problem is that no reward item is given to the winning team the configuration might be wrong?
  7. Lyka

    Reward System

    Heeello! uhmm i configured the reward system on the winning team but it still doesnt work? i don't know whats wrong, can someone please help me out? thank you very much!! :> - script init -1,{ OnInit: //== CONFIG START ==// set [email protected]$,"#"; // Set the symbol of your char command ex. # set [email protected]$,"^009966War Organizer^000000"; // Set NPC name set [email protected]_mem,7; // Set minimum members per party, if a party has 6 members below including the leader, leader can't register his/her party set [email protected]_map$,"guild_vs3"; // Set where you want the players to battle set [email protected]_arena_mapX,15; // Set the starting X position of Team 1 set [email protected]_arena_mapY,49; // Set the starting Y position of Team 1 set [email protected]_arena_mapX,85; // Set the starting X position of Team 2 set [email protected]_arena_mapY,49; // Set the starting Y position of Team 2 set [email protected]_map$,"quiz_02"; // Set where you want the players to be warped after the player was killed. set [email protected]_mapX,350; set [email protected]_mapY,379; //== Set Winning Party Rewards ==// set [email protected]_winitem_qnty,1; // Important, set to how many reward items you set below for the winning party setarray [email protected]_itemid[0],501; // Set the item id of the reward item setarray [email protected]_itemname$[0],"Red Potion"; // Set the name of the reward item setarray [email protected]_itemnum[0],1; // Set the quantity of the reward //== Set Losing Party Rewards ==// set [email protected]_loseitem_qnty,0; // Important, set to how many reward items you set below for losing party setarray [email protected]_itemid[0],0; // Set the item id of the reward item setarray [email protected]_itemname$[0],"Red Potion", // Set the name of the reward item "Orange Potion"; setarray [email protected]_itemnum[0],0; // Set the quantity of the reward //== Set Draw Rewards ==// set [email protected]_drawitem_qnty,0; // Important, set to how many reward items you set below for draw result setarray [email protected]_itemid[0],0; // Set the item id of the reward item setarray [email protected]_itemname$[0],"Yellow Potion", // Set the name of the reward item "White Potion"; setarray [email protected]_itemnum[0],0; // Set the quantity of the reward //== CONFIG END ==// // Do not change configs below, this will reset in case the server unexpectedly shuts down set [email protected]_Start,0; set [email protected]_team,0; set [email protected]_team1,0; set [email protected]_team2,0; set $team1_mem,0; set $team2_mem,0; // RWC 3 enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; // Now let's check if the event is on going or not (checks current server's time) // if the event is on going, Enable NPC and sends a message to the player upon logging in for(set [email protected],0; [email protected]<=22; set [email protected],[email protected]+2) { set [email protected],[email protected]+1; if(gettime(3)>[email protected] && gettime(3)<[email protected]) { set [email protected]_start,1; enablenpc "PartyReg"; } set [email protected],[email protected]+1; } end; } // Party Registration NPC quiz_02,350,389,3 script Party Registration::PartyReg 89,{ mes "["[email protected]$+"]"; if(([email protected]_Start && getcharid(1)[email protected]_team1) || ([email protected]_Start && getcharid(1)[email protected]_team2) ) { mes "Hmm... Too bad for you, you didn't make it to win for your party. Cheer them up instead."; close; } if([email protected]_Start || [email protected]_team>=2) { mes "Battle is currently on"; mes "going. Party registration is"; mes "close during this time."; next; if(select("> Check current battle info.:> Leave") == 2){ mes "["[email protected]$+"]"; mes "Come back to me and register your party after the battle between "+getpartyname([email protected]_team1)+" and "+getpartyname([email protected]_team2)+" has ended."; close; } mes "["[email protected]$+"]"; if([email protected]_Start) { mes "The Battle already ended."; close; } set @standing_mem1,[email protected]_mem-$team2_mem; set @standing_mem2,[email protected]_mem-$team1_mem; mes "Battle Information"; mes "---"; mes "- " + getpartyname([email protected]_team1) + " Party : "; mes "Standing Members Left : " + @standing_mem1; mes "---"; mes "- " + getpartyname([email protected]_team2) + " Party : "; mes "Standing Members Left : " + @standing_mem2; next; mes "["[email protected]$+"]"; if($team1_mem>$team2_mem) { mes "Current leading party is "+getpartyname([email protected]_team1); close; } else if($team1_mem<$team2_mem) { mes "Current leading party is "+getpartyname([email protected]_team2); close; } else { mes "Both Party has the same number of members that are still alive."; close; } } if(getcharid(1)==0) goto L_ContinueMain; if(getcharid(1)[email protected]_team1 || getcharid(1)[email protected]_team2) { mes getpartyleader(getcharid(1)) + ", your party leader already registered your party, please wait for the other team to register."; close; } L_ContinueMain: mes "Welcome "+strcharinfo(0)+"!"; mes "I am the War Arena Organizer"; next; switch(select("> Register")) { case 1: callsub R_Party; } R_Party: mes "["[email protected]$+"]"; 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 ( [email protected] != 7 ) { mes "You have to be 7 on the team."; close; } if(getcharid(1)==0) { mes "I see that you have no party yet. Please form your party first before registering."; close; } mes "Party Name : "+strcharinfo(1); if(getpartyleader(getcharid(1),2)==getcharid(0)) { mes "Party Leader : You"; } else { mes "Party Leader : "+getpartyleader(getcharid(1)); } mes "-"; getpartymember(getcharid(1)); set @partymembercount,[email protected]; copyarray @partymembername$[0],[email protected]$[0],@partymembercount; set @countmem,0; L_DisplayMem: if(@countmem == @partymembercount) goto L_Continue; set @countmem,@countmem+1; goto L_DisplayMem; L_Continue: mes "Party Members ("+(@countmem)+"/"[email protected]_mem+")"; set @count,0; L_DisplayMember: if(@count == @partymembercount) goto L_Continue2; mes (@count + 1) + ". ^0000FF" + @partymembername$[@count] + "^000000"; set @count,@count+1; goto L_DisplayMember; L_Continue2: if([email protected]_Start || [email protected]_team>=2) { next; mes "Sorry but party registration is now close. Please re-register after the current battle progress has ended."; close; } if(getpartyleader(getcharid(1),2)!=getcharid(0)) { next; mes strcharinfo(0)+", If you have time, please find your Party Leader "+getpartyleader(getcharid(1))+" and let him/her register your party"; close; } if(@countmem>[email protected]_mem) { next; mes "This event requires you to form a party with only "[email protected]_mem+" members including you. I'm sorry to say but you need to expel ^FF0000"+(@[email protected]_mem)+"^000000 more member(s)."; close; } if(@countmem<[email protected]_mem) { next; mes "This event requires you to form a party with "[email protected]_mem+" members including you. You still need to recruit ^FF0000"+([email protected][email protected])+"^000000 more member(s)."; close; } set [email protected]_team,[email protected]_team+1; if([email protected]_team==1) { set [email protected]_team1,getcharid(1); setarray [email protected]_name1$[0],@partymembername$[0],@partymembername$[1],@partymembername$[2],@partymembername$[3],@partymembername$[4]; announce "Team "+getpartyname([email protected]_team1)+" registered on Team "[email protected]_team+".",bc_all; goto L_Continue3; } if([email protected]_team==2) { set [email protected]_team2,getcharid(1); announce "Team "+getpartyname([email protected]_team2)+" registered on Team "[email protected]_team+".",bc_all; setarray [email protected]_name2$[0],@partymembername$[0],@partymembername$[1],@partymembername$[2],@partymembername$[3],@partymembername$[4]; goto L_Continue3; } L_Continue3: close2; if([email protected]_team==2) donpcevent "PvP_Func::OnStart"; end; OnPCDieEvent: getmapxy @map$,@x,@y,0; if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team1) { set $team2_mem,$team2_mem+1; warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam2Win2"; } end; } if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team2) { set $team1_mem,$team1_mem+1; warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam1Win2"; } end; } OnPCLogoutEvent: getmapxy @map$,@x,@y,0; if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team1) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team2_mem,$team2_mem+1; mapannounce [email protected]_map$,"User "+strcharinfo(0)+" of "+getpartyname([email protected]_team1)+" Team logged out of the game.",bc_all; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam2Win2"; } end; } if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team2) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team1_mem,$team1_mem+1; mapannounce [email protected]_map$,"User "+strcharinfo(0)+" of "+getpartyname([email protected]_team2)+" Team logged out of the game.",bc_all; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam1Win2"; } end; } OnPCLoadMapEvent: getmapxy @map$,@x,@y,0; if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team1) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team2_mem,$team2_mem+1; mapannounce [email protected]_map$,""+strcharinfo(0)+" of "+getpartyname([email protected]_team1)+" party warped out of the battle arena.",bc_blue; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam2Win2"; } end; } if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team2) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team1_mem,$team1_mem+1; mapannounce [email protected]_map$,""+strcharinfo(0)+" of "+getpartyname([email protected]_team2)+" party warped out of the battle arena.",bc_blue; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam1Win2"; } end; } } // Script where all functions are stored - script PvP_Func -1,{ OnStart: initnpctimer; set [email protected]_Start,1; setcell [email protected]_map$,80,55,80,44,cell_walkable,0; setcell [email protected]_map$,19,55,19,44,cell_walkable,0; announce "The Battle between "+getpartyname([email protected]_team1)+" and "+getpartyname([email protected]_team2)+" Party has engaged. Registered Party along with its members will be automatically warped to the arena after 10 seconds.",bc_all; gvgoff [email protected]_map$; setnpctimer 0; startnpctimer; end; OnTimer5000: warpparty [email protected]_map$,[email protected]_arena_mapX,[email protected]_arena_mapY,[email protected]_team1; warpparty [email protected]_map$,[email protected]_arena_mapX,[email protected]_arena_mapY,[email protected]_team2; end; OnTimer30000: mapannounce [email protected]_map$,"Players, you only have 30 seconds left to prepare for the Battle.",bc_all; end; OnTimer50000: mapannounce [email protected]_map$,"The Battle will begin in 5 seconds.",bc_all; end; OnTimer51000: mapannounce [email protected]_map$,"The Battle will begin in 4 seconds.",bc_all; end; OnTimer52000: mapannounce [email protected]_map$,"The Battle will begin in 3 seconds.",bc_all; end; OnTimer53000: mapannounce [email protected]_map$,"The Battle will begin in 2 seconds.",bc_all; end; OnTimer54000: mapannounce [email protected]_map$,"The Battle will begin in 1 second.",bc_all; end; OnTimer55000: gvgon [email protected]_map$; setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; disablenpc "WALL#41"; disablenpc "WALL#42"; disablenpc "WALL#43"; disablenpc "WALL#44"; disablenpc "WALL#45"; disablenpc "WALL#46"; disablenpc "WALL#47"; disablenpc "WALL#48"; disablenpc "WALL#49"; disablenpc "WALL#50"; disablenpc "WALL#51"; disablenpc "WALL#52"; disablenpc "WALL#53"; disablenpc "WALL#54"; disablenpc "WALL#55"; disablenpc "WALL#56"; disablenpc "WALL#57"; disablenpc "WALL#58"; disablenpc "WALL#59"; disablenpc "WALL#60"; disablenpc "WALL#61"; disablenpc "WALL#62"; disablenpc "WALL#63"; disablenpc "WALL#64"; announce "The team "+getpartyname([email protected]_team1)+" vs "+getpartyname([email protected]_team2)+" battle has begun!",bc_all; mapannounce [email protected]_map$,"You only have 5 minutes to eliminate all opponent's party members. Be quick!!!",bc_all; end; // After 5 Minutes, system will check the party who has the most number of member and will declare that party as a winner. // All variables will be resetted. OnTimer420000: if($team2_mem<$team1_mem) { donpcevent "PvP_Func::OnTeam1Win"; } else if ($team2_mem<$team1_mem) { donpcevent "PvP_Func::OnTeam2Win"; } else if ($team2_mem==$team1_mem || $team1_mem==$team2_mem) { donpcevent "PvP_Func::OnDraw"; } else { donpcevent "PvP_Func::OnNoWin"; } end; // This label will be called after the event has ended without registered parties OnNoWin: announce "The Battle has ended.",bc_all; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndNoWin: announce "The Battle has ended.",bc_all; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnDraw: announce "Team "+getpartyname([email protected]_team1)+" and Team "+getpartyname([email protected]_team2)+" has the same number of members standing in the arena, the battle result is a draw.",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } stopnpctimer; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndDraw: announce "Team "+getpartyname([email protected]_team1)+" and Team "+getpartyname([email protected]_team2)+" has the same number of members standing in the arena, the battle result is a draw.",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } stopnpctimer; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam1Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team1)+" party member survives more than "+getpartyname([email protected]_team2)+" party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndTeam1Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team1)+" party member survives more than "+getpartyname([email protected]_team2)+" party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam2Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team2)+" party member survives more than "+getpartyname([email protected]_team1)+" party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndTeam2Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team2)+" party member survives more than "+getpartyname([email protected]_team1)+"'s Party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; disablenpc "PartyReg"; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam1Win2: announce "Team "+getpartyname([email protected]_team1)+" smashed all the member of Team "+getpartyname([email protected]_team2)+" and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam2Win2: announce "Team "+getpartyname([email protected]_team2)+" smashed all the member of Team "+getpartyname([email protected]_team1)+"and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; } function script StartEvent { enablenpc "PartyReg"; set [email protected]_start,1; announce "The Battle has begun.",bc_all; return; } function script EndEvent { if ([email protected]_Start && [email protected]_team<2) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndNoWin"; } else if ($team2_mem<$team1_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndTeam1Win"; } else if ($team2_mem<$team1_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndTeam2Win"; } else if ($team2_mem==$team1_mem || $team1_mem==$team2_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndDraw"; } else { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndNoWin"; } end; } //////////////////////////////////////////////////////////////////////////// ////RWC 3/////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// guild_vs3,19,55,0 script WALL#41 1905,{ } guild_vs3,19,54,0 duplicate(WALL#41) WALL#42 1905 guild_vs3,19,53,0 duplicate(WALL#41) WALL#43 1905 guild_vs3,19,52,0 duplicate(WALL#41) WALL#44 1905 guild_vs3,19,51,0 duplicate(WALL#41) WALL#45 1905 guild_vs3,19,50,0 duplicate(WALL#41) WALL#46 1905 guild_vs3,19,49,0 duplicate(WALL#41) WALL#47 1905 guild_vs3,19,48,0 duplicate(WALL#41) WALL#48 1905 guild_vs3,19,47,0 duplicate(WALL#41) WALL#49 1905 guild_vs3,19,46,0 duplicate(WALL#41) WALL#50 1905 guild_vs3,19,45,0 duplicate(WALL#41) WALL#51 1905 guild_vs3,19,44,0 duplicate(WALL#41) WALL#52 1905 guild_vs3,80,55,0 duplicate(WALL#41) WALL#53 1905 guild_vs3,80,54,0 duplicate(WALL#41) WALL#54 1905 guild_vs3,80,53,0 duplicate(WALL#41) WALL#55 1905 guild_vs3,80,52,0 duplicate(WALL#41) WALL#56 1905 guild_vs3,80,51,0 duplicate(WALL#41) WALL#57 1905 guild_vs3,80,50,0 duplicate(WALL#41) WALL#58 1905 guild_vs3,80,49,0 duplicate(WALL#41) WALL#59 1905 guild_vs3,80,48,0 duplicate(WALL#41) WALL#60 1905 guild_vs3,80,47,0 duplicate(WALL#41) WALL#61 1905 guild_vs3,80,46,0 duplicate(WALL#41) WALL#62 1905 guild_vs3,80,45,0 duplicate(WALL#41) WALL#63 1905 guild_vs3,80,44,0 duplicate(WALL#41) WALL#64 1905 function script party_has_duplicate_job { set [email protected]_id, getarg( 0, getcharid(1) ); // Need to have a party. if ( [email protected]_id ) { return -1; } // Loading party members variables getpartymember [email protected]_id, 1; getpartymember [email protected]_id, 2; // Keep rid attached. set [email protected], playerattached(); // Check all members for ( set [email protected],0; [email protected]<[email protected]; set [email protected], [email protected]+1 ) { // Online user if ( isloggedin( [email protected][[email protected]], [email protected][[email protected]]) ) { // Attach the member to access "Class" attachrid( [email protected][[email protected]] ); if ( compare( [email protected]_class$ + "|", "|" + Class + "|" ) ) { if ( [email protected] ) attachrid([email protected]); else detachrid; return 1; } set [email protected]_class$, [email protected]_class$ + "|" + Class; } // Offline user (use sql) else { set [email protected]$, [email protected]$ + ( [email protected]_i ? "OR " : "" ) + "`char_id`='" + [email protected][[email protected]] + "' "; set [email protected]_i, [email protected]_i + 1; } } // SQL for offline users if ( getstrlen([email protected]$) ) { // get class from offline members set [email protected], query_sql("SELECT `class` FROM `char` WHERE " + [email protected]$, [email protected] ); // Check the class. for ( set [email protected], 0; [email protected]<[email protected]; set [email protected], [email protected]+1 ) { if ( compare( [email protected]_class$ + "|", "|" + [email protected][[email protected]] + "|" ) ) { if ( [email protected] ) attachrid([email protected]); else detachrid; return 1; } set [email protected]_class$, [email protected]_class$ + "|" + [email protected][[email protected]]; } } // Restore RID. if ( [email protected] ) attachrid([email protected]); else detachrid; return 0; } - script RWC -1,{ // Settings // GM LVL Allowed set .gmlvl,99; OnWhisperGlobal: if(getgmlevel() <= .gmlvl) goto N_Authority; switch(select("Reset:")) { case 1: stopnpctimer; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; dispbottom "Reset OK."; close; N_Authority: dispbottom "You cannot use this commands anymore."; close; } }
  8. Lyka

    Configure reward

    Hello i'm having a hard time figuring on how to configure this, i'm sorry just a newbie here. For example i want to configure that the winning party will win just a red potion each, lets say there 4 members inside that party that will receive red potion each? please and thank you! //== Set Winning Party Rewards ==// set [email protected]_winitem_qnty,0; // Important, set to how many reward items you set below for the winning party setarray [email protected]_itemid[0],0; // Set the item id of the reward item setarray [email protected]_itemname$[0],"Red Potion", // Set the name of the reward item "Orange Potion", "Yellow Potion", "White Potion", "Blue Potion"; setarray [email protected]_itemnum[0],0;
  9. Thank you very much! i'll go try it out.
  10. Heeey guys I have this party versus party script and i wanted to add an announcement after the match has ended like "The match has ended, party leaders can now register again" something like that? Thank you in advance :> - script init -1,{ OnInit: //== CONFIG START ==// set [email protected]$,"#"; // Set the symbol of your char command ex. # set [email protected]$,"^009966War Organizer^000000"; // Set NPC name set [email protected]_mem,7; // Set minimum members per party, if a party has 6 members below including the leader, leader can't register his/her party set [email protected]_map$,"guild_vs3"; // Set where you want the players to battle set [email protected]_arena_mapX,15; // Set the starting X position of Team 1 set [email protected]_arena_mapY,49; // Set the starting Y position of Team 1 set [email protected]_arena_mapX,85; // Set the starting X position of Team 2 set [email protected]_arena_mapY,49; // Set the starting Y position of Team 2 set [email protected]_map$,"quiz_02"; // Set where you want the players to be warped after the player was killed. set [email protected]_mapX,350; set [email protected]_mapY,379; //== Set Winning Party Rewards ==// set [email protected]_winitem_qnty,0; // Important, set to how many reward items you set below for the winning party setarray [email protected]_itemid[0],0; // Set the item id of the reward item setarray [email protected]_itemname$[0],"Red Potion", // Set the name of the reward item "Orange Potion", "Yellow Potion", "White Potion", "Blue Potion"; setarray [email protected]_itemnum[0],0; // Set the quantity of the reward //== Set Losing Party Rewards ==// set [email protected]_loseitem_qnty,0; // Important, set to how many reward items you set below for losing party setarray [email protected]_itemid[0],0; // Set the item id of the reward item setarray [email protected]_itemname$[0],"Red Potion", // Set the name of the reward item "Orange Potion"; setarray [email protected]_itemnum[0],0; // Set the quantity of the reward //== Set Draw Rewards ==// set [email protected]_drawitem_qnty,0; // Important, set to how many reward items you set below for draw result setarray [email protected]_itemid[0],0; // Set the item id of the reward item setarray [email protected]_itemname$[0],"Yellow Potion", // Set the name of the reward item "White Potion"; setarray [email protected]_itemnum[0],0; // Set the quantity of the reward //== CONFIG END ==// // Do not change configs below, this will reset in case the server unexpectedly shuts down set [email protected]_Start,0; set [email protected]_team,0; set [email protected]_team1,0; set [email protected]_team2,0; set $team1_mem,0; set $team2_mem,0; // RWC 3 enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; // Now let's check if the event is on going or not (checks current server's time) // if the event is on going, Enable NPC and sends a message to the player upon logging in for(set [email protected],0; [email protected]<=22; set [email protected],[email protected]+2) { set [email protected],[email protected]+1; if(gettime(3)>[email protected] && gettime(3)<[email protected]) { set [email protected]_start,1; enablenpc "PartyReg"; } set [email protected],[email protected]+1; } end; } // Party Registration NPC quiz_02,350,389,3 script Party Registration::PartyReg 89,{ mes "["[email protected]$+"]"; if(([email protected]_Start && getcharid(1)[email protected]_team1) || ([email protected]_Start && getcharid(1)[email protected]_team2) ) { mes "Hmm... Too bad for you, you didn't make it to win for your party. Cheer them up instead."; close; } if([email protected]_Start || [email protected]ty_team>=2) { mes "Battle is currently on"; mes "going. Party registration is"; mes "close during this time."; next; if(select("> Check current battle info.:> Leave") == 2){ mes "["[email protected]$+"]"; mes "Come back to me and register your party after the battle between "+getpartyname([email protected]_team1)+" and "+getpartyname([email protected]_team2)+" has ended."; close; } mes "["[email protected]$+"]"; if([email protected]_Start) { mes "The Battle already ended."; close; } set @standing_mem1,[email protected]_mem-$team2_mem; set @standing_mem2,[email protected]_mem-$team1_mem; mes "Battle Information"; mes "---"; mes "- " + getpartyname([email protected]_team1) + " Party : "; mes "Standing Members Left : " + @standing_mem1; mes "---"; mes "- " + getpartyname([email protected]_team2) + " Party : "; mes "Standing Members Left : " + @standing_mem2; next; mes "["[email protected]$+"]"; if($team1_mem>$team2_mem) { mes "Current leading party is "+getpartyname([email protected]_team1); close; } else if($team1_mem<$team2_mem) { mes "Current leading party is "+getpartyname([email protected]_team2); close; } else { mes "Both Party has the same number of members that are still alive."; close; } } if(getcharid(1)==0) goto L_ContinueMain; if(getcharid(1)[email protected]_team1 || getcharid(1)[email protected]_team2) { mes getpartyleader(getcharid(1)) + ", your party leader already registered your party, please wait for the other team to register."; close; } L_ContinueMain: mes "Welcome "+strcharinfo(0)+"!"; mes "I am the War Arena Organizer"; next; switch(select("> Register")) { case 1: callsub R_Party; } R_Party: mes "["[email protected]$+"]"; 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 ( [email protected] != 7 ) { mes "You have to be 7 on the team."; close; } if(getcharid(1)==0) { mes "I see that you have no party yet. Please form your party first before registering."; close; } mes "Party Name : "+strcharinfo(1); if(getpartyleader(getcharid(1),2)==getcharid(0)) { mes "Party Leader : You"; } else { mes "Party Leader : "+getpartyleader(getcharid(1)); } mes "-"; getpartymember(getcharid(1)); set @partymembercount,[email protected]; copyarray @partymembername$[0],[email protected]$[0],@partymembercount; set @countmem,0; L_DisplayMem: if(@countmem == @partymembercount) goto L_Continue; set @countmem,@countmem+1; goto L_DisplayMem; L_Continue: mes "Party Members ("+(@countmem)+"/"[email protected]_mem+")"; set @count,0; L_DisplayMember: if(@count == @partymembercount) goto L_Continue2; mes (@count + 1) + ". ^0000FF" + @partymembername$[@count] + "^000000"; set @count,@count+1; goto L_DisplayMember; L_Continue2: if([email protected]_Start || [email protected]_team>=2) { next; mes "Sorry but party registration is now close. Please re-register after the current battle progress has ended."; close; } if(getpartyleader(getcharid(1),2)!=getcharid(0)) { next; mes strcharinfo(0)+", If you have time, please find your Party Leader "+getpartyleader(getcharid(1))+" and let him/her register your party"; close; } if(@countmem>[email protected]_mem) { next; mes "This event requires you to form a party with only "[email protected]_mem+" members including you. I'm sorry to say but you need to expel ^FF0000"+(@[email protected]_mem)+"^000000 more member(s)."; close; } if(@countmem<[email protected]_mem) { next; mes "This event requires you to form a party with "[email protected]_mem+" members including you. You still need to recruit ^FF0000"+([email protected][email protected])+"^000000 more member(s)."; close; } set [email protected]_team,[email protected]_team+1; if([email protected]_team==1) { set [email protected]_team1,getcharid(1); setarray [email protected]_name1$[0],@partymembername$[0],@partymembername$[1],@partymembername$[2],@partymembername$[3],@partymembername$[4]; announce "Team "+getpartyname([email protected]_team1)+" registered on Team "[email protected]_team+".",bc_all; goto L_Continue3; } if([email protected]_team==2) { set [email protected]_team2,getcharid(1); announce "Team "+getpartyname([email protected]_team2)+" registered on Team "[email protected]_team+".",bc_all; setarray [email protected]_name2$[0],@partymembername$[0],@partymembername$[1],@partymembername$[2],@partymembername$[3],@partymembername$[4]; goto L_Continue3; } L_Continue3: close2; if([email protected]_team==2) donpcevent "PvP_Func::OnStart"; end; OnPCDieEvent: getmapxy @map$,@x,@y,0; if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team1) { set $team2_mem,$team2_mem+1; warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam2Win2"; } end; } if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team2) { set $team1_mem,$team1_mem+1; warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam1Win2"; } end; } OnPCLogoutEvent: getmapxy @map$,@x,@y,0; if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team1) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team2_mem,$team2_mem+1; mapannounce [email protected]_map$,"User "+strcharinfo(0)+" of "+getpartyname([email protected]_team1)+" Team logged out of the game.",bc_all; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam2Win2"; } end; } if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team2) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team1_mem,$team1_mem+1; mapannounce [email protected]_map$,"User "+strcharinfo(0)+" of "+getpartyname([email protected]_team2)+" Team logged out of the game.",bc_all; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam1Win2"; } end; } OnPCLoadMapEvent: getmapxy @map$,@x,@y,0; if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team1) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team2_mem,$team2_mem+1; mapannounce [email protected]_map$,""+strcharinfo(0)+" of "+getpartyname([email protected]_team1)+" party warped out of the battle arena.",bc_blue; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam2Win2"; } end; } if([email protected]_Start && @[email protected]_map$ && getcharid(1)[email protected]_team2) { warp [email protected]_map$,[email protected]_mapX,[email protected]_mapY; set $team1_mem,$team1_mem+1; mapannounce [email protected]_map$,""+strcharinfo(0)+" of "+getpartyname([email protected]_team2)+" party warped out of the battle arena.",bc_blue; if([email protected]_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnTeam1Win2"; } end; } } // Script where all functions are stored - script PvP_Func -1,{ OnStart: initnpctimer; set [email protected]_Start,1; setcell [email protected]_map$,80,55,80,44,cell_walkable,0; setcell [email protected]_map$,19,55,19,44,cell_walkable,0; announce "The Battle between "+getpartyname([email protected]_team1)+" and "+getpartyname([email protected]_team2)+" Party has engaged. Registered Party along with its members will be automatically warped to the arena after 10 seconds.",bc_all; gvgoff [email protected]_map$; setnpctimer 0; startnpctimer; end; OnTimer5000: warpparty [email protected]_map$,[email protected]_arena_mapX,[email protected]_arena_mapY,[email protected]_team1; warpparty [email protected]_map$,[email protected]_arena_mapX,[email protected]_arena_mapY,[email protected]_team2; end; OnTimer30000: mapannounce [email protected]_map$,"Players, you only have 30 seconds left to prepare for the Battle.",bc_all; end; OnTimer50000: mapannounce [email protected]_map$,"The Battle will begin in 5 seconds.",bc_all; end; OnTimer51000: mapannounce [email protected]_map$,"The Battle will begin in 4 seconds.",bc_all; end; OnTimer52000: mapannounce [email protected]_map$,"The Battle will begin in 3 seconds.",bc_all; end; OnTimer53000: mapannounce [email protected]_map$,"The Battle will begin in 2 seconds.",bc_all; end; OnTimer54000: mapannounce [email protected]_map$,"The Battle will begin in 1 second.",bc_all; end; OnTimer55000: gvgon [email protected]_map$; setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; disablenpc "WALL#41"; disablenpc "WALL#42"; disablenpc "WALL#43"; disablenpc "WALL#44"; disablenpc "WALL#45"; disablenpc "WALL#46"; disablenpc "WALL#47"; disablenpc "WALL#48"; disablenpc "WALL#49"; disablenpc "WALL#50"; disablenpc "WALL#51"; disablenpc "WALL#52"; disablenpc "WALL#53"; disablenpc "WALL#54"; disablenpc "WALL#55"; disablenpc "WALL#56"; disablenpc "WALL#57"; disablenpc "WALL#58"; disablenpc "WALL#59"; disablenpc "WALL#60"; disablenpc "WALL#61"; disablenpc "WALL#62"; disablenpc "WALL#63"; disablenpc "WALL#64"; announce "The team "+getpartyname([email protected]_team1)+" vs "+getpartyname([email protected]_team2)+" battle has begun!",bc_all; mapannounce [email protected]_map$,"You only have 5 minutes to eliminate all opponent's party members. Be quick!!!",bc_all; end; // After 5 Minutes, system will check the party who has the most number of member and will declare that party as a winner. // All variables will be resetted. OnTimer420000: if($team2_mem<$team1_mem) { donpcevent "PvP_Func::OnTeam1Win"; } else if ($team2_mem<$team1_mem) { donpcevent "PvP_Func::OnTeam2Win"; } else if ($team2_mem==$team1_mem || $team1_mem==$team2_mem) { donpcevent "PvP_Func::OnDraw"; } else { donpcevent "PvP_Func::OnNoWin"; } end; // This label will be called after the event has ended without registered parties OnNoWin: announce "The Battle has ended.",bc_all; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndNoWin: announce "The Battle has ended.",bc_all; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnDraw: announce "Team "+getpartyname([email protected]_team1)+" and Team "+getpartyname([email protected]_team2)+" has the same number of members standing in the arena, the battle result is a draw.",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } stopnpctimer; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndDraw: announce "Team "+getpartyname([email protected]_team1)+" and Team "+getpartyname([email protected]_team2)+" has the same number of members standing in the arena, the battle result is a draw.",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_drawitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } stopnpctimer; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam1Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team1)+" party member survives more than "+getpartyname([email protected]_team2)+" party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]charsymbol$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndTeam1Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team1)+" party member survives more than "+getpartyname([email protected]_team2)+" party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam2Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team2)+" party member survives more than "+getpartyname([email protected]_team1)+" party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnEndTeam2Win: announce "After 5 minutes of battle, "+getpartyname([email protected]_team2)+" party member survives more than "+getpartyname([email protected]_team1)+"'s Party member and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; disablenpc "PartyReg"; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam1Win2: announce "Team "+getpartyname([email protected]_team1)+" smashed all the member of Team "+getpartyname([email protected]_team2)+" and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; OnTeam2Win2: announce "Team "+getpartyname([email protected]_team2)+" smashed all the member of Team "+getpartyname([email protected]_team1)+"and won the Battle!",bc_all; for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_winitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name2$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } for(set [email protected],0; [email protected]<[email protected]_mem; set [email protected],[email protected]+1) { for(set [email protected],0; [email protected]<[email protected]_loseitem_qnty; set [email protected],[email protected]+1) { charcommand ""[email protected]$+"item "[email protected]_name1$[[email protected]]+" "[email protected]_itemid[[email protected]]+" "[email protected]_itemnum[[email protected]]+""; } } set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; gvgoff [email protected]_map$; setcell "guild_vs3",19,55,19,44,cell_walkable,0; setcell "guild_vs3",80,55,80,44,cell_walkable,0; enablenpc "WALL#41"; enablenpc "WALL#42"; enablenpc "WALL#43"; enablenpc "WALL#44"; enablenpc "WALL#45"; enablenpc "WALL#46"; enablenpc "WALL#47"; enablenpc "WALL#48"; enablenpc "WALL#49"; enablenpc "WALL#50"; enablenpc "WALL#51"; enablenpc "WALL#52"; enablenpc "WALL#53"; enablenpc "WALL#54"; enablenpc "WALL#55"; enablenpc "WALL#56"; enablenpc "WALL#57"; enablenpc "WALL#58"; enablenpc "WALL#59"; enablenpc "WALL#60"; enablenpc "WALL#61"; enablenpc "WALL#62"; enablenpc "WALL#63"; enablenpc "WALL#64"; stopnpctimer; sleep2 10000; areawarp [email protected]_map$,12,87,87,12,[email protected]_map$,[email protected]_mapX,[email protected]_mapY; end; } function script StartEvent { enablenpc "PartyReg"; set [email protected]_start,1; announce "The Battle has begun.",bc_all; return; } function script EndEvent { if ([email protected]_Start && [email protected]_team<2) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndNoWin"; } else if ($team2_mem<$team1_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndTeam1Win"; } else if ($team2_mem<$team1_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndTeam2Win"; } else if ($team2_mem==$team1_mem || $team1_mem==$team2_mem) { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndDraw"; } else { setcell [email protected]_map$,80,55,80,44,cell_walkable,1; setcell [email protected]_map$,19,55,19,44,cell_walkable,1; donpcevent "PvP_Func::OnEndNoWin"; } end; } //////////////////////////////////////////////////////////////////////////// ////RWC 3/////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// guild_vs3,19,55,0 script WALL#41 1905,{ } guild_vs3,19,54,0 duplicate(WALL#41) WALL#42 1905 guild_vs3,19,53,0 duplicate(WALL#41) WALL#43 1905 guild_vs3,19,52,0 duplicate(WALL#41) WALL#44 1905 guild_vs3,19,51,0 duplicate(WALL#41) WALL#45 1905 guild_vs3,19,50,0 duplicate(WALL#41) WALL#46 1905 guild_vs3,19,49,0 duplicate(WALL#41) WALL#47 1905 guild_vs3,19,48,0 duplicate(WALL#41) WALL#48 1905 guild_vs3,19,47,0 duplicate(WALL#41) WALL#49 1905 guild_vs3,19,46,0 duplicate(WALL#41) WALL#50 1905 guild_vs3,19,45,0 duplicate(WALL#41) WALL#51 1905 guild_vs3,19,44,0 duplicate(WALL#41) WALL#52 1905 guild_vs3,80,55,0 duplicate(WALL#41) WALL#53 1905 guild_vs3,80,54,0 duplicate(WALL#41) WALL#54 1905 guild_vs3,80,53,0 duplicate(WALL#41) WALL#55 1905 guild_vs3,80,52,0 duplicate(WALL#41) WALL#56 1905 guild_vs3,80,51,0 duplicate(WALL#41) WALL#57 1905 guild_vs3,80,50,0 duplicate(WALL#41) WALL#58 1905 guild_vs3,80,49,0 duplicate(WALL#41) WALL#59 1905 guild_vs3,80,48,0 duplicate(WALL#41) WALL#60 1905 guild_vs3,80,47,0 duplicate(WALL#41) WALL#61 1905 guild_vs3,80,46,0 duplicate(WALL#41) WALL#62 1905 guild_vs3,80,45,0 duplicate(WALL#41) WALL#63 1905 guild_vs3,80,44,0 duplicate(WALL#41) WALL#64 1905 function script party_has_duplicate_job { set [email protected]_id, getarg( 0, getcharid(1) ); // Need to have a party. if ( [email protected]_id ) { return -1; } // Loading party members variables getpartymember [email protected]_id, 1; getpartymember [email protected]_id, 2; // Keep rid attached. set [email protected], playerattached(); // Check all members for ( set [email protected],0; [email protected]<[email protected]; set [email protected], [email protected]+1 ) { // Online user if ( isloggedin( [email protected][[email protected]], [email protected][[email protected]]) ) { // Attach the member to access "Class" attachrid( [email protected][[email protected]] ); if ( compare( [email protected]_class$ + "|", "|" + Class + "|" ) ) { if ( [email protected] ) attachrid([email protected]); else detachrid; return 1; } set [email protected]_class$, [email protected]_class$ + "|" + Class; } // Offline user (use sql) else { set [email protected]$, [email protected]$ + ( [email protected]_i ? "OR " : "" ) + "`char_id`='" + [email protected][[email protected]] + "' "; set [email protected]_i, [email protected]_i + 1; } } // SQL for offline users if ( getstrlen([email protected]$) ) { // get class from offline members set [email protected], query_sql("SELECT `class` FROM `char` WHERE " + [email protected]$, [email protected] ); // Check the class. for ( set [email protected], 0; [email protected]<[email protected]; set [email protected], [email protected]+1 ) { if ( compare( [email protected]_class$ + "|", "|" + [email protected][[email protected]] + "|" ) ) { if ( [email protected] ) attachrid([email protected]); else detachrid; return 1; } set [email protected]_class$, [email protected]_class$ + "|" + [email protected][[email protected]]; } } // Restore RID. if ( [email protected] ) attachrid([email protected]); else detachrid; return 0; } - script RWC -1,{ // Settings // GM LVL Allowed set .gmlvl,99; OnWhisperGlobal: if(getgmlevel() <= .gmlvl) goto N_Authority; switch(select("Reset:")) { case 1: stopnpctimer; gvgoff [email protected]_map$; set [email protected]_team,0; set [email protected]_Start,0; set $team1_mem,0; set $team2_mem,0; set [email protected]_team1,0; set [email protected]_team2,0; set [email protected]_start,0; dispbottom "Reset OK."; close; N_Authority: dispbottom "You cannot use this commands anymore."; close; } }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.