EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::General Support (https://www.eqemulator.org/forums/forumdisplay.php?f=598)
-   -   Merchant (https://www.eqemulator.org/forums/showthread.php?t=42750)

woton 12-16-2019 09:30 PM

Merchant
 
Was wanting to make a merchant that will take a common item like a diamond and give the player an xp potion. Any idea on how to do this?

Huppy 12-17-2019 03:53 PM

This just an example, with item trade, (this will trade a breadcake for a skin of milk.) I use this simple one for various npc's I have. (with different items)

Code:

sub EVENT_ITEM {

        if(plugin::check_handin(\%itemcount, 13005 => 1)) {
                quest::say("Thank you $name, here is the item you traded for.");
                quest::summonitem(13006);
        }
        else {
        #quest::say("I have no use for this, $name. You can have it back");
        plugin::return_items(\%itemcount);
    }
}


woton 12-17-2019 08:28 PM

Quote:

Originally Posted by Huppy (Post 264220)
This just an example, with item trade, (this will trade a breadcake for a skin of milk.) I use this simple one for various npc's I have. (with different items)

Code:

sub EVENT_ITEM {

        if(plugin::check_handin(\%itemcount, 13005 => 1)) {
                quest::say("Thank you $name, here is the item you traded for.");
                quest::summonitem(13006);
        }
        else {
        #quest::say("I have no use for this, $name. You can have it back");
        plugin::return_items(\%itemcount);
    }
}



Really appreciate the help man, cant say thank you all enough. Hate to constantly ask questions on the forums, but we are so new to this.


All times are GMT -4. The time now is 09:53 AM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.