Jump to content

[Patch] Item changes after duration expires


Guest cmaranec

Recommended Posts

UPDATE:

Works with revision 9600

Complete rewrite:

* revert any previous patch from this thread!

* added script event for "OnItemDurationExpire" called after item duration expire ( :P )

* included SD2 patch and some example code

MaNGOS Core Patch: http://paste2.org/p/722770

SD2 SVN Patch: http://paste2.org/p/722771

SD2 Example Code (mysterious egg and disgusting jar): http://paste2.org/p/722773

(For example code you also need to set ScriptName of those items and set them duration!)

Link to comment
Share on other sites

Here it is:

UPDATE item_template SET ScriptName='item_mysterious_egg', Duration=604800 WHERE entry=39878;
UPDATE item_template SET ScriptName='item_disgusting_jar', Duration=604800 WHERE entry=44717;

This sets the 7 weeks duration and ScriptNames to these items (Mysterious Egg and Disgusting Jar)

Link to comment
Share on other sites

I wouldn't want to speak for the mangos developers, but AFAIK, they will avoid script/code solutions to problems when they can easily be put in the database, and I have yet to see an example of this that happens on official servers that could not be done easily in a loot template with a handler.

Link to comment
Share on other sites

they will avoid script/code solutions to problems when they can easily be put in the database, and I have yet to see an example of this that happens on official servers that could not be done easily in a loot template with a handler.

Agrees with this approach,Impossible to achieve one to add a script, hope the script is more appropriate database management

Link to comment
Share on other sites

  • 3 months later...
  • 11 months later...
  • 2 months later...

I know that this is already an old post, but recently the mysterious egg mysteriously stopped working after a patch on our server.

So I wanted to check out the code mentioned in the paste2 links at the top of page 2 of this topic, but the links don't exist anymore.

Could someone tell me where to find the code and maybe why it all of a sudden stopped working.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use