Completing Visual Armor makes a buff?
This is done on a different server, and I've always wondered how it was done, example; if you get 8/8 of a 'set' armor (Like Chestplate of the Undying and the other 7 items), it'll grant you a buff.... Anyone know how to make a code to do such a thing?
|
Having no idea the mechanism for receiving the buff on the server your talking about.
The simplest way would be to have a scripted click effect, say on on breastplate. When you click it, run a spell script or item script that checks if the player is wearing all the armor in that set. If so grant the player a buff. |
CalcBonuses() is called every time that you add or remove a piece of equipment.
You could probably come up with a method similar to HasItemByLoreGroup() to check for the required pieces..then cast a buff if the last item is added, or remove the buff if one of the items is taken away. Someone else may have a different or better solution..but that is one way. |
Quick brainstorming, but couldn't you attach a charm file to a specific piece of armor that would check all the other vis slots in SUB_EVENT_SCALE_CALC, see if they are the correct items, test if we already have the buff, if not then do a quest::cast or $client->SpellFinished or something along those lines at the end? Also stripping said buff if they do have the buff but no complete set.
Once you get a decent template set up, should be easy enough to add a Charm File script for each set, and replace the numbers/desired spell_id. Also saves the player from remembering to click, but not sure how memory intensive it would be compared to sub EVENT_ITEM_CLICK. |
All times are GMT -4. The time now is 07:56 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.