View Single Post
  #7  
Old 10-19-2016, 10:42 AM
lordnivek1
Sarnak
 
Join Date: Feb 2013
Posts: 65
Default

Quote:
Originally Posted by ghanja View Post
Source change would be necessary (from what I recall from the last time I looked at the source which is currently unavailable to me) to accomplish what you want in the way that you want.

However, if you wanted to handle this at EVENT_LOOT level, then yes, it should be very well possible using Perl. The only immediate downside I can think of it, is, it may cause a "blip" of the item while on cursor, where it temporarily disappears, but then reappears. Hell it may not even be noticeable.

Basically, it would entail allowing the player to loot the item (and it would need to be LORE, more on this later), which kicks off EVENT_LOOT (player.pl in the zone this special circumstance belongs, or global_player.pl if it could be multiple zones for simplicity of code management), logical comparison of item looted, if qualifying item, nuke it, then
Code:
$client->SummonItem(item_id, charges, attune, aug1, aug2, aug3, aug4, aug5)
With the applicable augment itemid(s) being passed. However, the "tricky" part or at least involving more Perl code is, if they DONT loot with a "left click", thus placing it directly into their inventory. This is why I say, the item would need to be LORE, at least with currently available exported Perl commands. I -suppose- there is a way around that as well, handling the "LORE" type of features through Perl as well. That would involve looking at the players inventory (carried, bank, shared bank) for the item, then essentially checking to see if they already have that item, with the augment the randomization code (in Perl) wishes to place on the item, exists. Then, what do you do from there? Nuke it altogether and say "Sorry you already have that item." or have another go at the randomization until it settles on an augmentation scheme that doesn't already exist in inventory.

TBH, I think most would likely settle on simply modifying the loot tables, so that the NPC has the item (100%), then handle the randomization of the augment through the loot table as well. Then just let the player add the augments. If you want to force stats, then just create an item with those stats from the get go.

I know Kingly recently added (I think it was him, my apologies to the dev if it wasnt him that did it) IsAugment() or maybe it was IsAugmented() which the latter making a little more sense imo. However, I'm not sure a Perl/LUA export exists to find just WHICH augments are on an item. I'd have to look at the source, as http://wiki.eqemulator.org/p?Ultimate_Perl_Reference hasn't received an update in awhile.

TL;DR - With source code changes, yes. With just Perl, perhaps.
I was afraid it would lean more toward source code. I probably should have figured this part out before I made 2,000 unique augments for a Diablo style loot server lol. Got excited before understanding how augments work. I assumed if there was code to make #augmentitem work then you could just some how make that fire in a perl quest. Which probably just shows my ignorance with the whole process as I try and learn and piece stuff together. Thank you very much for the reply and back to the drawing board.
Reply With Quote