Log in

View Full Version : Completing Visual Armor makes a buff?


Sinclipse
04-05-2013, 10:14 PM
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?

Kayen
04-05-2013, 10:49 PM
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.

Uleat
04-05-2013, 10:58 PM
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.

nenelan
04-12-2013, 04:31 PM
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.