Jump to content
  • 0

PvP Warper/Locker (Please help me fix my script)


sotf

Question


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  173
  • Reputation:   9
  • Joined:  11/14/12
  • Last Seen:  

Good day again rAthena! Well, I made a pvp warper script, which is just a simple script that warps a player to some various pvp maps. I added a feature where the pvp warper will be disabled and a npc will be enabled which tells the players that the pvp room is locked. Here's my script:

 

celestiaj,73,86,6	script	PVP Warper	497,{

mes "^ff0000[PVP Warper]^000000";
mes "Which PVP room do you want to warp to?";
next;
menu "Normal - No Restrictions",normal,"Trans - 2nd jobs only!",trans,"Non-donate Normal",nodonate,"Non-donate Trans",nodonate2,"Classic PVP - No Customs",classic,"Cancel",canc;

	normal:
		next;
		announce "PVP: "+strcharinfo(0)+" just entered PVP:Normal!",bc_all,0x33FF99;
		warp "pvp_n_1-5",0,0;
		end;
	trans:
		next;
		mes "^ff0000[PVP Warper]^000000";
		mes "WARNING! If you're not a 2nd job trans player, you will be automatically warped out of the map!";
		next;
		mes "What will you do?";
		menu "Proceed",proceed1,"Cancel",out1;
		
		proceed1:
		announce "PVP: "+strcharinfo(0)+" just entered PVP:Trans!",bc_all,0x33FF99;
		warp "pvp_y_1-2",0,0;
		end;
		
		out1:
		next;
		close;
	
	nodonate:
		next;
		mes "^ff0000[PVP Warper]^000000";
		mes "WARNING! If you are equipped with donate equipments upon entering the map, you will be automatically be warped back to your save point!";
		next;
		mes "What will you do?";
		menu "Proceed",proceed,"Cancel",out;
		
		proceed:
		next;
		announce "PVP: "+strcharinfo(0)+" just entered PVP:Non-Donate!",bc_all,0x33FF99;
		warp "pvp_n_4-3",0,0;
		end;
		
		out:
		next;
		close;
	
	nodonate2:
		next;
		mes "Feature not yet impelemented";
		close;
	
	classic:
		next;
		mes "^ff0000[PVP Warper]^000000";
		mes "WARNING! If you are equipped with any custom equipments upon entering the map, you will be automatically be warped back to your save point!";
		next;
		mes "What will you do?";
		menu "Proceed",pro123,"Cancel",out123;
		
		pro123:
		next;
		announce "PVP: "+strcharinfo(0)+" just entered PVP:Classic!",bc_all,0x33FF99;
		warp "5@tower",0,0;
		end;
		
		out123:
		next;
		
	canc:
		close;
	

OnInit:
disablenpc "PVP Locked";
}

celestiaj,73,86,6	script	PVP Locked	497,{

waitingroom "PvP Rooms Locked!",0;

mes "^ff0000[PVP Warper]^000000";
mes "PvP Rooms are not accessible right now, please come back later.";
close;

}

-	script	woenopvp	-1,{

OnClock1450:
announce "WoE is starting soon! PvP Rooms will be inaccessible!",bc_all,0x99FFFF;
disablenpc "PVP Warper";
enablenpc "PVP Locked";
end;

OnClock1601:
announce "WoE has ended! PvP Rooms are now accessible!",bc_all,0x99FFFF;
disablenpc "PVP Locked";
enablenpc "PVP Warper";
end;



OnClock2050:
announce "WoE is starting soon! PvP Rooms will be inaccessible!",bc_all,0x99FFFF;
disablenpc "PVP Warper";
enablenpc "PVP Locked";
end;



OnClock2201:
announce "WoE has ended! PvP Rooms are now accessible!",bc_all,0x99FFFF;
disablenpc "PVP Locked";
enablenpc "PVP Warper";
end;



}

 

It does lock the pvp room, but it doesn't unlock it. what might be wrong on my script? :/
Help anyone? Thanks in advance for those who are going to help

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

I see, though, it'd be easier if you just did this:

celestiaj,73,86,6	script	PVP Warper	497,{
if(.locked){mes "Sorry, PVP Rooms are currently Locked."; close;}
mes "^ff0000[PVP Warper]^000000";
mes "Which PVP room do you want to warp to?";
next;
menu "Normal - No Restrictions",normal,"Trans - 2nd jobs only!",trans,"Non-donate Normal",nodonate,"Non-donate Trans",nodonate2,"Classic PVP - No Customs",classic,"Cancel",canc;

	normal:
		next;
		announce "PVP: "+strcharinfo(0)+" just entered PVP:Normal!",bc_all,0x33FF99;
		warp "pvp_n_1-5",0,0;
		end;
	trans:
		next;
		mes "^ff0000[PVP Warper]^000000";
		mes "WARNING! If you're not a 2nd job trans player, you will be automatically warped out of the map!";
		next;
		mes "What will you do?";
		menu "Proceed",proceed1,"Cancel",out1;
		
		proceed1:
		announce "PVP: "+strcharinfo(0)+" just entered PVP:Trans!",bc_all,0x33FF99;
		warp "pvp_y_1-2",0,0;
		end;
		
		out1:
		next;
		close;
	
	nodonate:
		next;
		mes "^ff0000[PVP Warper]^000000";
		mes "WARNING! If you are equipped with donate equipments upon entering the map, you will be automatically be warped back to your save point!";
		next;
		mes "What will you do?";
		menu "Proceed",proceed,"Cancel",out;
		
		proceed:
		next;
		announce "PVP: "+strcharinfo(0)+" just entered PVP:Non-Donate!",bc_all,0x33FF99;
		warp "pvp_n_4-3",0,0;
		end;
		
		out:
		next;
		close;
	
	nodonate2:
		next;
		mes "Feature not yet impelemented";
		close;
	
	classic:
		next;
		mes "^ff0000[PVP Warper]^000000";
		mes "WARNING! If you are equipped with any custom equipments upon entering the map, you will be automatically be warped back to your save point!";
		next;
		mes "What will you do?";
		menu "Proceed",pro123,"Cancel",out123;
		
		pro123:
		next;
		announce "PVP: "+strcharinfo(0)+" just entered PVP:Classic!",bc_all,0x33FF99;
		warp "5@tower",0,0;
		end;
		
		out123:
		next;
		
	canc:
		close;

OnClock1450:
OnClock2050:
announce "WoE is starting soon! PvP Rooms will be inaccessible!",bc_all,0x99FFFF;
set .locked,1;
end;
OnClock1601:
OnClock2201:
announce "WoE has ended! PvP Rooms are now accessible!",bc_all,0x99FFFF;
set .locked,0;
end;
}

This, eliminate the need to have multiple NPCs, also, gets rid of all the enable/disable NPC commands in there. All this script does, is set a variable to 1 (active) or 0 (inactive). If it's 1 then it'll tell players it's locked, if it's 0 it will act as normal.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  173
  • Reputation:   9
  • Joined:  11/14/12
  • Last Seen:  

Thanks! I'll try it.

I was just trying to improvise on what I knew, this will help me a lot, thanks again!

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...