Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 10-19-2016, 11:07 AM
lordnivek1
Sarnak
 
Join Date: Feb 2013
Posts: 65
Default

Quote:
Originally Posted by Maze_EQ View Post
Can always add the item using $client->SummonItem though.

Code:
 sub EVENT_LOOT{

if($itemid == x)

$client->NukeItem(itemnum)

$client->SummonItem($item_id, charges, attune, aug1, aug2, aug3, aug4, aug5)
}

Then add an array for each 5 augments with a random chance to apply by passing $aug1, $aug2, $aug3, $aug4, $aug5.


Note: This is just an example, but that's totes how i'd do it.

Or if you really want to make this "Diablo Style"

Add an NPC that will identify magic items and set tyhem from an NPC, and just provide the unidentified item as a shit item.
Awesome info. This may help me make what I am trying possible. Thank you very much
Reply With Quote
  #2  
Old 10-19-2016, 11:29 AM
Maze_EQ
Demi-God
 
Join Date: Mar 2012
Posts: 1,103
Default

In diablo, there were no lore items or lore augments remove lore and gucci.

Except Wirt's leg, but let's be honest, Wirt was a jerkoff.
__________________
"No, thanks, man. I don't want you fucking up my life, too."

Skype:
Comerian1
Reply With Quote
  #3  
Old 10-19-2016, 12:07 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

Quote:
Originally Posted by Maze_EQ View Post
In diablo, there were no lore items or lore augments remove lore and gucci.

Except Wirt's leg, but let's be honest, Wirt was a jerkoff.
Well, the implementation of making the item lore, is to make handling easier (dare I say possible, without source changes/additions). Otherwise, with NukeItem you could quite possibly/easily nuke the unintended item.

The following assumes the item is lore, has not been tested, as I don't have Perl on the computer I'm on atm:

Code:
sub EVENT_LOOT {
	@eligibleitemidarray = (1,4); ## we could iterate through the keys of the hash each time but, technicaly more extensive load
	if ($itemid ~~ @eligibleitemidarray) {
		my %h = (
			1 => [[69,72,81],[69,72,81],[69,72,81],[69,72,81],[91,94,96],[100,142,214]],
			4 => [[45,75,81],[45,75,81],[45,75,81],[45,75,81],[45,75,81],[100,142,214]]
		);
		if (quest::ChooseRandom(1..10) < 10) { 
			$client->NukeItem($itemid);
			$client->SummonItem($itemid, 0, 1, ($h{$itemid}[0][quest::ChooseRandom(0..((scalar @{$h{$itemid}}[0]) - 1 ))]),
			($h{$itemid}[1][quest::ChooseRandom(0..((scalar @{$h{$itemid}}[1]) - 1 ))]),
			($h{$itemid}[2][quest::ChooseRandom(0..((scalar @{$h{$itemid}}[2]) - 1 ))]),
			($h{$itemid}[3][quest::ChooseRandom(0..((scalar @{$h{$itemid}}[3]) - 1 ))]),
			($h{$itemid}[4][quest::ChooseRandom(0..((scalar @{$h{$itemid}}[4]) - 1 ))]),
			($h{$itemid}[5][quest::ChooseRandom(0..((scalar @{$h{$itemid}}[5]) - 1 ))]));
		}
	}
}
Code:
@eligibleitemidarray
I choose to do a smart match on a predefined array/list of applicable item numbers, as iterating through the hash with every looting may be a little more taxing on the server. Who's to say though, and it would definitely depend on how far you may expand things in the future.

It's not clean (i.e. could use some clean up), but, should at the very least give you an idea of how you could go about things.

Now, if:

Code:
quest::addloot()
Could be expanded upon, to include augments, then what you want to do would be possible via scripting and would allow for universal "usage", that is to say, would/could be a useful change for everyone and not just your situation. (hint wink Kingly?)
Reply With Quote
  #4  
Old 10-19-2016, 01:31 PM
lordnivek1
Sarnak
 
Join Date: Feb 2013
Posts: 65
Default

so running with the idea that a generic sword named "unidentified sword" drops and they have to take it to an npc to get it identified. is this how you would set up your array to spit out an item with augments in it. .Hopefully I understood what you were trying to say was possible.

Code:
{
	if($itemid == x)
	{

		$client->NukeItem(itemnum)

		my @add_aug1 = ('1000', '1001', '1005', '1007')

		my @add_aug2 = ('5000', '5001', '5005', '5007')

		my $random = int(rand 4);
 
		my $aug1 = $add_aug1[$random];

		my $aug2 = $add_aug2[$random];

		$client->SummonItem(XXX, 0, 1, $aug1, $aug2)
	}
}
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:36 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3