Jump to content
  • 0

Need help with my Arena Script..


Question

Posted (edited)

Hello rAthena, I'm learning how to make a NPC Script but right now I'm still below the amateur level lol  :)) Hope someone will help me..

 

I made this script myself and It's working properly but I just had a few questions and few additions on my script.. thank you

 


//Xerus RO Paulinds
//[Simple] SUPER PVP ROOM

//NPC 1
gonryun,168,210,5	script	Super Deathmatch	451,{

		mes "Looks like you want to participate the Rumble huh!?";
		mes "Before I'll let you in, Do you want to know about information about the Rumble?";
			menu "Sure !",Q_YES,"Just warp me in!",Q_YES1;

	Q_YES:
		mes "You will need the version 3.5 so you can participate in the Arena.";
	next;
		mes "First thing you'll do is you need to ^330000Survive^000000 this rumble";
	next;
		mes "You're original items will be stored instantly from your inventory";
	next;
		mes "You can also choose your equipments once you entered the arena.";
	next;	
		mes "Warping, Teleporting or any @commands are disabled inside the arena.";
	next;
		mes "The equipments available in the arena is only useful in that Rumble";
	next;
		mes "You can't even take that equipment outside the Rumble.";
	next;
		mes "Remember that those equipments are only available inside, you cannot keep as yours forever";
	next;		
		mes "Once you die, there is a chance that those equipment will be dropped and players can gather it as they want";
	next;
		mes "You can quit anytime you want, my partner is always inside the Arena to watch over";
	next;
		mes "Once you left the Arena, the equipments that you choose/gathered will be dropped and items in your inventory will be reset";
	next;
		mes "You can come anytime you want but you'll have to buy time when your choosing your equipments";
	next;
		mes "This can be hosted by a Game Master where you can get a BIG REWARD once hosted.";
	close;

	Q_YES1:
		mes "Looks like your really into it !";
		mes "Goodluck then.";
		atcommand "@storeall";
		warp "evt_coke",23,28;
		
	}


//NPC 2
evt_coke,33,33,5	script	Equipment Giver	452,{

	if(#bonus == 0){
		mes "You can only choose 1 set that gives equal effects to every participants";
	next;
		mes "This set is good for all jobs so everyone will have an equal PKs";
		getitem	30114,1;
		getitem	20037,1;
		getitem	25208,1;
		getitem	30115,2;
		getitem	30116,2;
		getitem	30117,3;
		getitem	30118,2;
	set #bonus,1;
	next;
		mes "There you go..";
	next;
		mes "You can also look for MvP Cards & Weapons over there.";
		mes "Goodluck !";
	close;
	}
	if(#bonus == 1){
		mes "Looks like you're ready to enter the Arena !";
	next;
		mes "Are you ready?";
			menu "Not yet",Q_QWE,"Let me in !",Q_QWER;
	Q_QWE:
		mes "Okay..";
		close;

	Q_QWER:
		mes "Goodluck !";
	announce strcharinfo(0)+" entered the Arena !",0;
	warp "cell_game",0,0;
		close;

}
	}	

//NPC 3
evt_coke,26,36,5	shop	Card Seller	453,4236:90,4425:90,4372:90,4147:90,4145:90,4168:90,4386:90,4142:90,4134:90,4137:90,4123:90,4330:90,4441:90,4324:90,4408:90,4128:90,4430:90,4263:90,4403:90,4318:90,4419:90,4376:90,4276:90,4146:90,4132:90,4131:90,4143:90,4135:90,4144:90,4148:90,4121:90,4342:90,4302:90,4399:90,4305:90,4407:90,4374:90,4352:90,4169:90,4174:90,4047:90,4354:90,4271:90,4278:90,4087:90,4412:90,4311:90,4411:90,4054:90,4114:90,4119:90,4170:90,4173:90,4141:90,4005:90,4092:90,4341:90,4348:90,4349:90,4064:90,4301:90,4051:90,4022:90,4103:90,4044:90,4058:90,4133:90,4334:90,4085:90,4097:90,4160:90,4172:90,4433:90,4416:90

//NPC 4
evt_coke,22,36,5	shop	Weapon Seller	453,13011:50000,1231:50000,1228:50000,13034:50000,1237:50000,13017:50000,13032:50000,13016:50000,13035:50000,13027:50000,1108:50000,1133:50000,1131:50000,1175:50000,1182:50000,1408:50000,1544:50000,1505:50000,16001:50000,1538:50000,1532:50000,1622:50000,1646:50000,1624:50000,1644:50000,1705:50000,1736:50000,1745:50000,1822:50000,1802:50000,1925:50000,1906:50000,1904:50000,1902:50000,1951:50000,1550:50000,1568:50000,1570:50000,1571:50000,1569:50000,1579:50000,1266:50000,1275:50000,1278:50000,1276:50000,1277:50000,1264:50000,13304:50000,13302:50000,13150:50000,13103:50000,13152:50000,13105:50000,13107:50000

//NPC 5
evt_coke,30,36,5	shop	Usable & Misc Items	453,12257:5000,678:5000,606:5000,645:5000,656:5000,657:5000,1025:5000,12114:5000,12115:5000,12116:5000,12117:5000,7139:5000,7136:5000,7135:5000,7138:5000,7137:5000,717:5000,715:5000,716:5000

//NPC 6
evt_coke,26,25,5	shop	Ammunitions	453,1766:50,1755:20,1750:10,1754:20,1761:20,1752:20,1760:20,1759:20,1772:100,1757:30,1770:20,1769:30,1765:40,1763:30,1762:30,1767:30,1764:30,1751:20,1768:30,1753:30,1756:30,1758:30,1771:1000,13200:50,13202:100,13201:300,13206:500,13203:500,13207:500,13204:500,13205:500,13252:50,13254:500,13251:100,13253:300,13250:50,13256:50,13259:50,13258:50,13255:50,13257:50,7522:500,7521:500,7523:500,7524:500

//NPC 7
cell_game,151,145,5	script	Exit#1	451,{

		mes "Can't handle it anymore?";
	next;
		announce strcharinfo(0)+" left the Arena !",0;
	atcommand "@dropall";
	atcommand "@itemreset";
	set #bonus,0;
		warp "prontera",0,0;
}

//MAPFLAG
cell_game	mapflag	nocommand	99

 

 

 

  • I want to add in my script, A Point System, once they enter the Arena, there will be a dispbottom they Arena Points & there will be an NPC where they can exchange their arena points just like Cash Points..
  • Everytime they kill a player with 3 kills, they will get 1 point.. If they die, it will be reduced by 1. 
  • 3 Kills = 1 Point, 1 Death = -1 Point
  • Once they clicked the Exit NPC, the Arena Points will show their total points. 
Edited by Paulinds

15 answers to this question

Recommended Posts

Posted (edited)

1.

OnPCDieEvent:
if( strcharinfo(3) == "cell_game" ){
sleep2 100;
atcommand "@Alive";
warp strcharinfo(3),0,0;

 

2.

cell_game    mapflag    nocommand    99 // 99 = GM Level to pass this mapflag

Edited by leertaste
Posted

i haven't tested it , but i have done some addition to you script along with things you asked to add.

http://pastebin.com/2fR0BnL9 

 

However i m not known to that kinda mapflag /whisp

So, i didn't touched it ,

I have added AnnieRuru's Dota in it too for pvp fun , just check it , if it gives you error remove it :)

 

Rest , script done small [not in syntax :P] , deathmatch type added,  Rest you can check :)

Posted

i haven't tested it , but i have done some addition to you script along with things you asked to add.

http://pastebin.com/2fR0BnL9 

 

However i m not known to that kinda mapflag /whisp

So, i didn't touched it ,

I have added AnnieRuru's Dota in it too for pvp fun , just check it , if it gives you error remove it :)

 

Rest , script done small [not in syntax :P] , deathmatch type added,  Rest you can check :)

Unknown Paste ID!

Posted

1.

OnPCDieEvent:
if( strcharinfo(3) == "cell_game" ){
sleep2 100;
atcommand "@Alive";
warp strcharinfo(3),0,0;

 

2.

cell_game    mapflag    nocommand    99 // 99 = GM Level to pass this mapflag

Thank you for the reply, I already added this thanks :)

 

 

 

Ohh I see, I have already Dota Script will it have any conflicts If I already have Dota Script and I added another Dota Script to this script?

Posted
	atcommand "@dropall";
	atcommand "@itemreset";

If the player drop all his equipment, @itemreset is useless

 

 

 

 

 

  • Everytime they kill a player with 3 kills, they will get 1 point.. If they die, it will be reduced by 1. 
  • 3 Kills = 1 Point, 1 Death = -1 Point
OnPCKillEvent:
	if( strcharinfo(3) == "cell_game" ) {
		#Cell_Game_Points = #Cell_Game_Points + 3;
		dispbottom "You get 3 points. Total: "+ #Cell_Game_Points +" points.";
		attachrid( killedrid );
		if( #Cell_Game_Points )
			#Cell_Game_Points = #Cell_Game_Points - 1;
		dispbottom "You lose 1 point. Total: "+ #Cell_Game_Points +" points.";
		warp strcharinfo(3),0,0;
		sleep2 10;
		percentheal 100,100;
	}
	end;

 

Once they clicked the Exit NPC, the Arena Points will show their total points.

Add a dispbottom in the exit npc

dispbottom "Total: "+ #Cell_Game_Points +" points.";

 

there will be a dispbottom they Arena Points

~The same as previously

Posted
	atcommand "@dropall";
	atcommand "@itemreset";

If the player drop all his equipment, @itemreset is useless

 

If incase I have forgot an Item that I listed that is not droppable, @itemreset will remove it.. XD

 

I'll try that script thanks Capuche !

Posted
	atcommand "@dropall";
	atcommand "@itemreset";

If the player drop all his equipment, @itemreset is useless

 

 

 

 

 

 

  • Everytime they kill a player with 3 kills, they will get 1 point.. If they die, it will be reduced by 1. 
  • 3 Kills = 1 Point, 1 Death = -1 Point
OnPCKillEvent:
	if( strcharinfo(3) == "cell_game" ) {
		#Cell_Game_Points = #Cell_Game_Points + 3;
		dispbottom "You get 3 points. Total: "+ #Cell_Game_Points +" points.";
		attachrid( killedrid );
		if( #Cell_Game_Points )
			#Cell_Game_Points = #Cell_Game_Points - 1;
		dispbottom "You lose 1 point. Total: "+ #Cell_Game_Points +" points.";
		warp strcharinfo(3),0,0;
		sleep2 10;
		percentheal 100,100;
	}
	end;

 

>Once they clicked the Exit NPC, the Arena Points will show their total points.

Add a dispbottom in the exit npc

dispbottom "Total: "+ #Cell_Game_Points +" points.";

 

there will be a dispbottom they Arena Points

~The same as previously

 

Hey the script is working but everytime a player is killed or kills, the disp bottom is doubled so the points are also doubled why is that?

Posted

Post your current script

//PAULINDS [Xerus RO]
//[Simple] SUPER PVP ROOM

//NPC 1
prontera,156,169,5	script	Super Deathmatch	451,{

		mes "Looks like you want to participate the Rumble huh!?";
		mes "Before I'll let you in, Do you want to know about information about the Rumble?";
			menu "Sure !",Q_YES,"Enter the Arena",Q_YES1;

	Q_YES:
		mes "You will need the version 3.5 so you can participate well in the Arena.";
	next;
		mes "First thing you'll do is you need to ^330000Survive Long^000000 this rumble";
	next;
		mes "You're original items will be stored instantly from your inventory";
	next;
		mes "You can also choose your equipments once you entered the arena.";
	next;	
		mes "Warping, Teleporting or any @commands are disabled inside the arena.";
	next;
		mes "The equipments available in the arena is only useful in that Rumble";
	next;
		mes "You can't even take that equipment outside the Rumble.";
	next;
		mes "Remember that those equipments are only available inside, you cannot keep as yours forever";
	next;		
		mes "Once you die, there is a chance that those equipment will be dropped and players can gather it as they want";
	next;
		mes "You can quit anytime you want, my partner is always inside the Arena to watch over";
	next;
		mes "Once you left the Arena, the equipments that you choose/gathered will be dropped and items in your inventory will be reset";
	next;
		mes "You can come anytime you want but you'll have to buy time when your choosing your equipments";
	next;
		mes "This can be hosted by a Game Master once hosted.";
	next;
		mes "You can earn Arena Points and can be exchanged outside for Event Tickets, Zeny Coins & More";
	next;
		mes "WARNING : If you caught farming Arena Points, you'll be muted and jailed for 12 hours :)";
	next;
		mes "This is NOT open for 24/7, It's only available once the GM Activates it.";
	next;
		mes "Very well, goodluck on the Arena !";
	close;

	Q_YES1:
		mes "Looks like your really into it !";
		mes "Goodluck then.";
		atcommand "@storeall";
		warp "quiz_02",167,347;
		
	}


//NPC 2
quiz_02,169,340,5	script	Arena Assistant	452,{

	if(#bonus == 0){
		mes "You can only choose 1 set that gives equal effects to every participants";
	next;
		mes "This set is good for all jobs so everyone will have an equal PKs";
		getitem	30114,1;
		getitem	20037,1;
		getitem	25208,1;
		getitem	30115,3;
		getitem	30116,3;
		getitem	30117,3;
		getitem	30118,2;
		getitem	2765,3;
		getitem	7829,30;
	set #bonus,1;
	next;
		mes "There you go..";
	next;
		mes "You can also look for MvP Cards & Weapons over there.";
		mes "Goodluck !";
	close;
	}
	if(#bonus == 1){
		mes "Looks like you're ready to enter the Arena !";
	next;
		mes "Are you ready?";
			menu "Not yet",Q_QWE,"Warp me now",Q_QWER;
	Q_QWE:
		mes "Okay..";
		close;

	Q_QWER:
		mes "Goodluck !";
		atcommand "@repairall";
	announce strcharinfo(0)+" entered the Arena !",0;
	warp "guild_vs1",0,0;
		close;

		}
	}	

//NPC 3
quiz_02,166,337,5	shop	Card Seller	453,4236:90,4425:90,4372:90,4147:90,4145:90,4168:90,4386:90,4142:90,4134:90,4137:90,4123:90,4330:90,4441:90,4324:90,4408:90,4128:90,4430:90,4263:90,4403:90,4318:90,4419:90,4376:90,4276:90,4146:90,4132:90,4131:90,4143:90,4135:90,4144:90,4148:90,4121:90,4342:90,4302:90,4399:90,4305:90,4407:90,4374:90,4352:90,4169:90,4174:90,4047:90,4354:90,4271:90,4278:90,4087:90,4412:90,4311:90,4411:90,4054:90,4114:90,4119:90,4170:90,4173:90,4141:90,4005:90,4092:90,4341:90,4348:90,4349:90,4064:90,4301:90,4051:90,4022:90,4103:90,4044:90,4058:90,4133:90,4334:90,4085:90,4097:90,4160:90,4172:90,4433:90,4416:90,4318:100,4195:100

//NPC 4
quiz_02,164,337,5	shop	Weapon Seller	453,13011:50000,1231:50000,1228:50000,13034:50000,1237:50000,13017:50000,13032:50000,13016:50000,13035:50000,13027:50000,1108:50000,1133:50000,1131:50000,1175:50000,1182:50000,1408:50000,1544:50000,1505:50000,16001:50000,1538:50000,1532:50000,1622:50000,1646:50000,1624:50000,1644:50000,1705:50000,1736:50000,1745:50000,1822:50000,1802:50000,1925:50000,1906:50000,1904:50000,1902:50000,1951:50000,1550:50000,1568:50000,1570:50000,1571:50000,1569:50000,1579:50000,1266:50000,1275:50000,1278:50000,1276:50000,1277:50000,1264:50000,13304:50000,13302:50000,13150:50000,13103:50000,13152:50000,13105:50000,13107:50000

//NPC 5
quiz_02,162,337,5	shop	Usable & Misc Items	453,12257:5000,678:1000000,523:1000,606:5000,645:1000,656:3000,657:5000,1025:5000,12114:15000,12115:15000,12116:15000,12117:15000,7139:5000,7136:5000,7135:5000,7138:5000,7137:5000,717:5000,715:500,716:700

//NPC 6
quiz_02,168,337,5	shop	Ammunitions	453,1766:50,1755:20,1750:10,1754:20,1761:20,1752:20,1760:20,1759:20,1772:100,1757:30,1770:20,1769:30,1765:40,1763:30,1762:30,1767:30,1764:30,1751:20,1768:30,1753:30,1756:30,1758:30,1771:1000,13200:50,13202:100,13201:300,13206:500,13203:500,13207:500,13204:500,13205:500,13252:50,13254:500,13251:100,13253:300,13250:50,13256:50,13259:50,13258:50,13255:50,13257:50,7522:500,7521:500,7523:500,7524:500

//NPC 7
guild_vs1,53,43,5	script	Exit#1	451,{

		mes "Can't handle it anymore?";
	next;
	menu "Later",Q_YES5,"Warp me back!",Q_YES66,"Equipment Room",Q_YES77;

	Q_YES5:
		mes "Great ! Give it a shot !";
	close;


	Q_YES66:
		mes "Bye !";
		announce strcharinfo(0)+" left the Arena !",0;
	atcommand "@dropall";
	atcommand "@itemreset";
	atcommand "@cleanmap";
	set #bonus,0;
	dispbottom "Total: "+ #Cell_Game_Points +" Arena Points.";
		warp "prontera",0,0;
	
	Q_YES77:
		mes "Going back to Equipment Room";
	next;
		mes "...";
	next;
		mes "...";
	next;
		mes "...";
	next;
		mes "...";
	next;
		mes "Any minute now...";
	next;
		mes "...";
	next;
		mes "Warping..";
	next;
		warp "quiz_02",167,347;
	close;

	OnPCKillEvent:
	if( strcharinfo(3) == "guild_vs1" ) {
		#Cell_Game_Points = #Cell_Game_Points + 3;
		dispbottom "You get 3 Arena Points. Total: "+ #Cell_Game_Points +" Arena Points.";
		attachrid( killedrid );
		if( #Cell_Game_Points )
			#Cell_Game_Points = #Cell_Game_Points - 2;
		dispbottom "You lose 2 Arena Points. Total: "+ #Cell_Game_Points +" Arena Points.";
		sleep2 2000;
		warp strcharinfo(3),0,0;
		percentheal 100,100;
			}
	}

//MAPFLAG
quiz_02	mapflag	nocommand	99
quiz_02	mapflag	noteleport
quiz_02	mapflag	noreturn
quiz_02	mapflag	nomemo
quiz_02	mapflag	nowarp
quiz_02	mapflag	nowarpto
quiz_02	mapflag	nobranch
quiz_02	mapflag	noskill
guild_vs1	mapflag	nocommand	99
guild_vs1	mapflag	noteleport
guild_vs1	mapflag	noreturn
guild_vs1	mapflag	nomemo
guild_vs1	mapflag	nowarp
guild_vs1	mapflag	nowarpto
guild_vs1	mapflag	nobranch

//DUPLICATE
quiz_02,171,343,5	duplicate(Exit#1)	Exit#02	451

Posted
quiz_02,171,343,5	duplicate(Exit#1)	Exit#02	451

You made a duplicate of the npc where you put

OnPCKillEvent:
	if( strcharinfo(3) == "cell_game" ) {
		#Cell_Game_Points = #Cell_Game_Points + 3;
		dispbottom "You get 3 points. Total: "+ #Cell_Game_Points +" points.";
		attachrid( killedrid );
		if( #Cell_Game_Points )
			#Cell_Game_Points = #Cell_Game_Points - 1;
		dispbottom "You lose 1 point. Total: "+ #Cell_Game_Points +" points.";
		warp strcharinfo(3),0,0;
		sleep2 10;
		percentheal 100,100;
	}
	end;

 

So the points are duplicated too

 

Put it in another npc

Posted
quiz_02,171,343,5	duplicate(Exit#1)	Exit#02	451

You made a duplicate of the npc where you put

OnPCKillEvent:
	if( strcharinfo(3) == "cell_game" ) {
		#Cell_Game_Points = #Cell_Game_Points + 3;
		dispbottom "You get 3 points. Total: "+ #Cell_Game_Points +" points.";
		attachrid( killedrid );
		if( #Cell_Game_Points )
			#Cell_Game_Points = #Cell_Game_Points - 1;
		dispbottom "You lose 1 point. Total: "+ #Cell_Game_Points +" points.";
		warp strcharinfo(3),0,0;
		sleep2 10;
		percentheal 100,100;
	}
	end;

 

So the points are duplicated too

 

Put it in another npc

Oh ! I forgot, my bad.. thanks Capuche !

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...