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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #12  
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
 


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 01:34 PM.


 

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