Thread: Quest help
View Single Post
  #2  
Old 04-06-2015, 11:54 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Odd script.

The item id numbering is nice, with the exception of the 33323 artifact resulting in a 33350 reward and the 33350 as an artifact resulting in a 33348. Anyway.

Not too sure why there is a one value per key hash for the rewards but the artifacts were in an array. I would consider doing either of these two (I tend to stick to arrays when there are only two values, less typing):

Code:
my @artifacts	= (33323,33324,33325,33326,33327,33328,33329,33330,33331,33332,33333,33334,33335,33336,33337,33338,33339,33340,33341,33342,33343,33344,33345,33346,33347,33348,33350);
my @rewards		= (33350,33323,33324,33325,33326,33327,33328,33329,33330,33331,33332,33333,33334,33335,33336,33337,33338,33339,33340,33341,33342,33343,33344,33345,33346,33347,33348);
or toss both values in a hash:

Code:
my %matches = 
	{
		0	=>	{
					artifact	=>	33323,
					reward		=>	33350,
				},
		1	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		2	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		3	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		4	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		5	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		6	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		7	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		8	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		9	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		10	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		11	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		12	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		13	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		14	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		15	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		16	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		17	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		18	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		19	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		20	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		21	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		22	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		23	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		24	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		25	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		26	=>	{
					artifact	=>	130,
					reward		=>	808,
				},
		27	=>	{
					artifact	=>	130,
					reward		=>	808,
				}
	};
Note, I didn't assign the proper values in the hash, more work than I want to do atm having just got in from vacation.

That said, I'm really not entirely sure what this script is supposed to do. I can look at it and tell you what it does, though, the "style" is so unique that, I'm not sure how to approach it.

Could you instead, tell us what is supposed to happen, given what conditions, using item numbers in your examples and such?
Reply With Quote