PDA

View Full Version : [SOLVED] Hooking into an 'item purchase' event



therealdudelee
08-01-2016, 12:37 AM
Hey guys. I have a custom reputation system, and i want to be able to add semi-blizzlike rep vendors into my server. Basically i want to be able to hook into an event for the purchase of an item, compare two numbers (current rep to min rep) and if the conditions are not met, the item purchade is cancelled (whether that be retracting the item or simply ending the purchase)

Thanks for amy help you can offer. Much love.

Foereaper
08-01-2016, 01:31 AM
http://emudevs.com/showthread.php/5647-CustomExtendedCosts

Read this, it pretty much covers what you want to do, except it handles extended costs instead of reputation. Logic is the same though.

therealdudelee
08-01-2016, 01:54 AM
Hey man thanks for your reply. I want to avoid using custom patches for my project, and i need to be able to retain gold costs on vendor items so i dont think this is the ideal solution for me. But thanks for your help regardless, im sure this reaource will come in handy anyway.

Jpp
08-01-2016, 02:42 AM
Hey man thanks for your reply. I want to avoid using custom patches for my project, and i need to be able to retain gold costs on vendor items so i dont think this is the ideal solution for me. But thanks for your help regardless, im sure this reaource will come in handy anyway.

The link he gave you does not require a custom patch.

therealdudelee
08-01-2016, 02:54 AM
Yes but it doesn't let you retain a gold cost as far as im aware. I could be wrong though.

slp13at420
08-01-2016, 04:15 AM
it doesn't mess with anything dealing with costs in gold or customextended.
rather it just sits on the sidelines and lets you know in detail what custom extended costs are required in detail and all at once rather than one at a time. the player doesn't need anything downloaded to enjoy this handy mod its all server-side.

the tutorial I posted --> http://emudevs.com/showthread.php/5670-Patchless-Item-Extended-Costs

slp13at420
08-01-2016, 04:25 AM
lol !omg! just relized I could add a check for VIP/Premium ranks in the custom cost check there lol then vendors will check if players are Premium or VIP rank x or higher lol

and yea you could get the players honor point count in there then cross check it with required minimum and error if needed.

therealdudelee
08-01-2016, 04:26 AM
Ohh, I see. Sorry for being ignorant, I only looked at it rather quickly as school has been keeping me very busy today. Thanks everyone for your help with this, it is very much appreciated.