Jump to content
  • 0

PvP Rotative


mrlongshen

Question


  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   79
  • Joined:  12/04/12
  • Last Seen:  

//  ________________________________________________________
// /                                                        \
// |       _           _   _   _                            |
// |      | |__  _ __ / \ | |_| |__   ___ _ __   __ _       |
// |      | '_ \| '__/ _ \| __| '_ \ / _ \ '_ \ / _` |      |
// |      | |_) | | / ___ \ |_| | | |  __/ | | | (_| |      |
// |      |_.__/|_|/_/   \_\__|_| |_|\___|_| |_|\__,_|      |
// |                                                        |
// |                     brAthena Script                    |
// |--------------------------------------------------------|
// | Name of Script: Rotative PVP                           |
// |--------------------------------------------------------|
// | Created by: Neko                                       |
// |--------------------------------------------------------|
// | Version rA/brA: 1.0                                    |
// |--------------------------------------------------------|
// | Description: PVP NPC                                   |
// | - An NPC that alternates the current PVP map from time |
// | to time, the chosen map for rotation are configured by |
// | the administrator in the script. The idea is to have   |
// | multiple pvp rooms, without having to divide the players|
// | of your server among them, this way pvps are more crowded|
// | and funnier.                                           |
// |--------------------------------------------------------|
// | Changelog:               	                            |
// | 1.0 Script Created [Neko]                              |
// |--------------------------------------------------------|
// | - Note:                                                |
// | *There is a temporary global variable named $@lista$ in|
// | this NPC, watch out for global variables with the same |
// | name in other NPCs of yours.                           |
// |--------------------------------------------------------|
// | Any problem with this NPC please report directly to me.|
// \________________________________________________________/

-	script	PvpRotative	-1,{

OnInit:
// ======================================
// Configurations ***********************
// ======================================
// Which map will be on the rotation?
   setarray .lista$[0],"guild_vs1","guild_vs2","guild_vs3","guild_vs4","guild_vs5";
// From how much time to time will the maps change? (Standard value 30 minutes/18000000)
// WARNING, DO NOT SET VALUES HERE SMALLER THAN 60000 (1 Minute).
   set .rotatetime, 18000000;
// ======================================	

	set $@lista$, ""+.lista$[0]+"";
	set .count, getarraysize(.lista$);

	for( set .@i,0; .@i < .count; set .@i, .@i+1 ){
			sleep .rotatetime-60000;
			mapannounce ""+.lista$[.@i]+"","The PVP map will change in 30 seconds.",8;
			sleep 30000;
			mapannounce ""+.lista$[.@i]+"","The PVP map will change in 20 seconds.",8;
			sleep 20000;
			mapannounce ""+.lista$[.@i]+"","The PVP map will change in 10 seconds.",8;
			sleep 10000;
			if(.lista$[.@i] == .lista$[.count-1]){
				mapwarp ""+.lista$[.@i]+"",""+.lista$[0]+"",0,0;
				set $@lista$, ""+.lista$[0]+"";
				set .@i,-1;
			}
			else{
				mapwarp ""+.lista$[.@i]+"",""+.lista$[.@i+1]+"",0,0;
				set $@lista$, ""+.lista$[.@i+1]+"";
			}
		}
}

prontera.gat,145,188,5	script	PvP Keeper	459,{

	mes "[PvP Keeper]";
	mes "Ready for a bloody";
	mes "and glorious battle today?";
	mes "Remember no GTB card allowed in PVP room to be fair :)";
	if (select("Enter PVP. ["+getmapusers(""+$@lista$+"") +"]:I'm out of potions today.") == 1) {
		warp ""+$@lista$+"",0,0;
		announce ""+strcharinfo(0)+" Has Enter PvP Room !! Come on coward! Lets face to face !",bc,0xDF01A5;
		end;
	}
	next;
	mes "[PvP Keeper]";
	mes "Haha!~";
	mes "It's okay to be scared!!";
	mes "HAHAHAHAHAHA!";
	close;
}

OnPCKillEvent:
    if ( strcharinfo(3) == "guild_vs1" )
        announce strcharinfo(0)+ " killed " +rid2name(killedrid);
    end;

 

 

 

 i got this error
 
 
[Error]: npc_parsesrcfile: Unknown syntax in file 'npc/syokro/pvp_rotative.txt', line '91'. Stopping...
 * w1=OnPCKillEvent:
 * w2=
 * w3=
 * w4=
 

 

How to fix it ? 

 

BTW.

how to config this script annouce on all map which i have set in 

setarray .lista$[0],"guild_vs1","guild_vs2","guild_vs3","guild_vs4","guild_vs5"; 

??

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  398
  • Reputation:   131
  • Joined:  11/10/12
  • Last Seen:  

//  ________________________________________________________
// /                                                        \
// |       _           _   _   _                            |
// |      | |__  _ __ / \ | |_| |__   ___ _ __   __ _       |
// |      | '_ \| '__/ _ \| __| '_ \ / _ \ '_ \ / _` |      |
// |      | |_) | | / ___ \ |_| | | |  __/ | | | (_| |      |
// |      |_.__/|_|/_/   \_\__|_| |_|\___|_| |_|\__,_|      |
// |                                                        |
// |                     brAthena Script                    |
// |--------------------------------------------------------|
// | Name of Script: Rotative PVP                           |
// |--------------------------------------------------------|
// | Created by: Neko                                       |
// |--------------------------------------------------------|
// | Version rA/brA: 1.0                                    |
// |--------------------------------------------------------|
// | Description: PVP NPC                                   |
// | - An NPC that alternates the current PVP map from time |
// | to time, the chosen map for rotation are configured by |
// | the administrator in the script. The idea is to have   |
// | multiple pvp rooms, without having to divide the players|
// | of your server among them, this way pvps are more crowded|
// | and funnier.                                           |
// |--------------------------------------------------------|
// | Changelog:               	                            |
// | 1.0 Script Created [Neko]                              |
// |--------------------------------------------------------|
// | - Note:                                                |
// | *There is a temporary global variable named $@lista$ in|
// | this NPC, watch out for global variables with the same |
// | name in other NPCs of yours.                           |
// |--------------------------------------------------------|
// | Any problem with this NPC please report directly to me.|
// \________________________________________________________/

-	script	PvpRotative	-1,{

OnInit:
// ======================================
// Configurations ***********************
// ======================================
// Which map will be on the rotation?
   setarray .lista$[0],"guild_vs1","guild_vs2","guild_vs3","guild_vs4","guild_vs5";
// From how much time to time will the maps change? (Standard value 30 minutes/18000000)
// WARNING, DO NOT SET VALUES HERE SMALLER THAN 60000 (1 Minute).
   set .rotatetime, 18000000;
// ======================================	

	set $@lista$, ""+.lista$[0]+"";
	set .count, getarraysize(.lista$);

	for( set .@i,0; .@i < .count; set .@i, .@i+1 ){
			sleep .rotatetime-60000;
			mapannounce ""+.lista$[.@i]+"","The PVP map will change in 30 seconds.",8;
			sleep 30000;
			mapannounce ""+.lista$[.@i]+"","The PVP map will change in 20 seconds.",8;
			sleep 20000;
			mapannounce ""+.lista$[.@i]+"","The PVP map will change in 10 seconds.",8;
			sleep 10000;
			if(.lista$[.@i] == .lista$[.count-1]){
				mapwarp ""+.lista$[.@i]+"",""+.lista$[0]+"",0,0;
				set $@lista$, ""+.lista$[0]+"";
				set .@i,-1;
			}
			else{
				mapwarp ""+.lista$[.@i]+"",""+.lista$[.@i+1]+"",0,0;
				set $@lista$, ""+.lista$[.@i+1]+"";
			}
		}
}

prontera.gat,145,188,5	script	PvP Keeper	459,{

	mes "[PvP Keeper]";
	mes "Ready for a bloody";
	mes "and glorious battle today?";
	mes "Remember no GTB card allowed in PVP room to be fair :)";
	if (select("Enter PVP. ["+getmapusers(""+$@lista$+"") +"]:I'm out of potions today.") == 1) {
		warp ""+$@lista$+"",0,0;
		announce ""+strcharinfo(0)+" Has Enter PvP Room !! Come on coward! Lets face to face !",bc,0xDF01A5;
		end;
	}
	next;
	mes "[PvP Keeper]";
	mes "Haha!~";
	mes "It's okay to be scared!!";
	mes "HAHAHAHAHAHA!";
	close;

OnPCKillEvent:
    if ( strcharinfo(3) == "guild_vs1" )
        announce strcharinfo(0)+ " killed " +rid2name(killedrid);
    end;

} //HERE

i think you misplaced the curly }

 

BTW.

how to config this script annouce on all map which i have set in 

setarray .lista$[0],"guild_vs1","guild_vs2","guild_vs3","guild_vs4","guild_vs5"; 

??

it uses mapannouce. i think it will annouce on the map that is currently being used and not on all maps at the same time

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   79
  • Joined:  12/04/12
  • Last Seen:  

@lulu so its will annouce only on map guild_vs1 ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  398
  • Reputation:   131
  • Joined:  11/10/12
  • Last Seen:  

yes

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   79
  • Joined:  12/04/12
  • Last Seen:  

how to add many maps ? 

i have try your script

//  ________________________________________________________
// /                                                        \
// |       _           _   _   _                            |
// |      | |__  _ __ / \ | |_| |__   ___ _ __   __ _       |
// |      | '_ \| '__/ _ \| __| '_ \ / _ \ '_ \ / _` |      |
// |      | |_) | | / ___ \ |_| | | |  __/ | | | (_| |      |
// |      |_.__/|_|/_/   \_\__|_| |_|\___|_| |_|\__,_|      |
// |                                                        |
// |                     brAthena Script                    |
// |--------------------------------------------------------|
// | Name of Script: Rotative PVP                           |
// |--------------------------------------------------------|
// | Created by: Neko                                       |
// |--------------------------------------------------------|
// | Version rA/brA: 1.0                                    |
// |--------------------------------------------------------|
// | Description: PVP NPC                                   |
// | - An NPC that alternates the current PVP map from time |
// | to time, the chosen map for rotation are configured by |
// | the administrator in the script. The idea is to have   |
// | multiple pvp rooms, without having to divide the players|
// | of your server among them, this way pvps are more crowded|
// | and funnier.                                           |
// |--------------------------------------------------------|
// | Changelog:               	                            |
// | 1.0 Script Created [Neko]                              |
// |--------------------------------------------------------|
// | - Note:                                                |
// | *There is a temporary global variable named $@lista$ in|
// | this NPC, watch out for global variables with the same |
// | name in other NPCs of yours.                           |
// |--------------------------------------------------------|
// | Any problem with this NPC please report directly to me.|
// \________________________________________________________/

-	script	PvpRotative	-1,{

OnInit:
// ======================================
// Configurations ***********************
// ======================================
// Which map will be on the rotation?
   setarray .lista$[0],"guild_vs1","guild_vs2","guild_vs3","guild_vs4","guild_vs5";
// From how much time to time will the maps change? (Standard value 30 minutes/18000000)
// WARNING, DO NOT SET VALUES HERE SMALLER THAN 60000 (1 Minute).
   set .rotatetime, 18000000;
// ======================================	

	set $@lista$, ""+.lista$[0]+"";
	set .count, getarraysize(.lista$);

	for( set .@i,0; .@i < .count; set .@i, .@i+1 ){
			sleep .rotatetime-60000;
			mapannounce ""+.lista$[.@i]+"","The PVP map will change in 30 seconds.",8;
			sleep 30000;
			mapannounce ""+.lista$[.@i]+"","The PVP map will change in 20 seconds.",8;
			sleep 20000;
			mapannounce ""+.lista$[.@i]+"","The PVP map will change in 10 seconds.",8;
			sleep 10000;
			if(.lista$[.@i] == .lista$[.count-1]){
				mapwarp ""+.lista$[.@i]+"",""+.lista$[0]+"",0,0;
				set $@lista$, ""+.lista$[0]+"";
				set .@i,-1;
			}
			else{
				mapwarp ""+.lista$[.@i]+"",""+.lista$[.@i+1]+"",0,0;
				set $@lista$, ""+.lista$[.@i+1]+"";
			}
		}
}

prontera.gat,145,188,5	script	PvP Keeper	459,{

	mes "[PvP Keeper]";
	mes "Ready for a bloody";
	mes "and glorious battle today?";
	mes "Remember no GTB card allowed in PVP room to be fair :)";
	if (select("Enter PVP. ["+getmapusers(""+$@lista$+"") +"]:I'm out of potions today.") == 1) {
		warp ""+$@lista$+"",0,0;
		announce ""+strcharinfo(0)+" Has Enter PvP Room !! Come on coward! Lets face to face !",bc,0xDF01A5;
		end;
	}
	next;
	mes "[PvP Keeper]";
	mes "Haha!~";
	mes "It's okay to be scared!!";
	mes "HAHAHAHAHAHA!";
	close;

OnPCKillEvent:
    if ( strcharinfo(3) == "guild_vs1" )
        announce strcharinfo(0)+ " killed " +rid2name(killedrid);
    end;

} //HERE

its not working ! :(

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  398
  • Reputation:   131
  • Joined:  11/10/12
  • Last Seen:  

I never tried that. i just edited what you posted. whay error does it gives?

 

// Which map will be on the rotation?
   setarray .lista$[0],"guild_vs1","guild_vs2","guild_vs3","guild_vs4","guild_vs5";

ADD map here.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...