View Single Post
  #26  
Old 10-20-2016, 08:57 PM
lordnivek1
Sarnak
 
Join Date: Feb 2013
Posts: 65
Default

So I finally got some time to play around with this and here is what I have. I went with having a NPC identifing the item as it fits my server even better then the item just dropping plus by adding a fee it adds a small money sink. And its not hard to just make a dummy (unidentified) item for each item. One thing I could not get to work was aug6. I could only ever get it to work up to aug5. It would leave the slot blank and then eventually just stop working. I also found if i didnt set up a random for each aug it would pick the same number for all 5.

Code:
sub EVENT_ITEM{
  if(plugin::check_handin(\%itemcount, 5001 => 1)) {
        my @add_aug1 = ('1', '9', '25', '33', '41', '49', '65', '81', '89', '97', '105' ,'113', '121', '129', '137');
	my $random1 = quest::ChooseRandom(0..14);
	my @add_aug2 = ('1', '9', '25', '33', '41', '49', '65', '81', '89', '97', '105' ,'113', '121', '129', '137');
	my $random2 = quest::ChooseRandom(0..14);
	my @add_aug3 = ('1', '9', '25', '33', '41', '49', '65', '81', '89', '97', '105' ,'113', '121', '129', '137');
	my $random3 = quest::ChooseRandom(0..14);
	my @add_aug4 = ('1', '9', '25', '33', '41', '49', '65', '81', '89', '97', '105' ,'113', '121', '129', '137');
	my $random4 = quest::ChooseRandom(0..14);
	my @add_aug5 = ('1', '9', '25', '33', '41', '49', '65', '81', '89', '97', '105' ,'113', '121', '129', '137');
	my $random5 = quest::ChooseRandom(0..14);
	$client->SummonItem(5000, 0, 1, $add_aug1[$random1], $add_aug2[$random2], $add_aug3[$random3], $add_aug4[$random4], $add_aug5[$random5])
  }
  plugin::return_items(\%itemcount); 
}

Thanks again for all the input. This works great.
Reply With Quote