Page 1 of 1

PVP arenas with handicap.

Posted: 11 May 2009, 12:13
by nescient
Current PVP script is just too "basic".
PVP would be more enjoyable if we could select arena with specific rules (no potions, no armor, no knifes, no bows, barehand fight, no vitality stat etc).

Below is simple test script (replace contents of file located in /npc/001-2_Tulimshar/phaet.txt), with 4 arenas to choose (I've replaced Phaet NPC script).

Code: Select all

001-2.gat,24,23,0	script	Phaet	125,{
	mes "[Phaet the Royal Guard]";
	mes "\"Hello wanderer!\"";
	next;
	goto L_menu;

L_menu:
	menu 
		"Available arenas", L_arenas,
		"Test 01", L_test1, // chars with certain items cannot enter arena
		"Test 02", L_test2, // chars with vit=1 and without item id 639 can enter
		"Test 03", L_test3, // chars up to lvl 50 can enter arena
		"Test 04", L_test4, // No rules
		"I don't want to fight!", L_loser;

L_arenas:
	mes "[Phaet the Royal Guard]";
	mes "Description of available arenas";
	next;
	goto L_menu;

L_test1:

	if (countitem(501) >=1 || countitem(502) >=1 || countitem(503) >=1) goto L_end;
	mes "[Phaet the Royal Guard]";
	mes "\"test warp arena1!\"";
	next;

	warp "001-2.gat", 28, 30;
	close;	 	

L_test2:

	if (countitem(639) >=1 || readparam(bVit) >1) goto L_end; //item with id 639 or vit>1
	mes "[Phaet the Royal Guard]";
	mes "\"test warp arena2!\"";
	next;

	warp "001-2.gat", 25, 30;
	close;
L_test3:

	if (readparam(11) >70) goto L_end; //level <70
	mes "[Phaet the Royal Guard]";
	mes "\"test warp arena3!\"";
	next;

	warp "001-2.gat", 28, 27;
	close;
L_test4:

mes "[Phaet the Royal Guard]";
	mes "\"test warp arena4!\"";
	next;

	warp "001-2.gat", 27, 26;
	close;
L_end:
	mes "\"conditions didn't met to enter the arena\"";
	close;
L_loser:
	mes "\Losers go home\"";
	close;
}
}

Re: PVP arenas with handicap.

Posted: 11 May 2009, 12:40
by Crush
The idea is good, but the "no weapon" part will be really hard to maintain because you have to remember to update it whenever a new weapon is released.

Is the script tested?

Re: PVP arenas with handicap.

Posted: 11 May 2009, 13:32
by Cotillion
{Reset Stats}
Go and Enter Arena while vit = 1
Then Raise Stats, vit = 99

I like the idea, but script will need some more logic.

Re: PVP arenas with handicap.

Posted: 11 May 2009, 17:12
by nescient
Crush wrote:The idea is good, but the "no weapon" part will be really hard to maintain because you have to remember to update it whenever a new weapon is released.
Function which would return item type value would be useful. I haven't found one, so modification of script.c would be necessary.
Crush wrote:Is the script tested?
Yes , but it was suggestion, script was included just to show idea of new pvp script. There's no description of each arena, names are just random, warps lead to same map.
Cotillion wrote:{Reset Stats}
Go and Enter Arena while vit = 1
Then Raise Stats, vit = 99

I like the idea, but script will need some more logic.
Good point. readparam(9) check how many statpoints were used, so script would look like this:
(readparam(9) > 11 || readparam(bVit) >1)