Test script for basic soulbinding that removes the cost and items directly from the player so you can make extremely complex turnins or very simple turnins. Players will no longer have to hand items to NPCS so all NPCs can just return items!
Code:
plugin::collect_quest($client, 1001 => 5, 1002 => 2, "platinum" => 1, "gold" => 5, "silver" => 5, "copper" => 5); #can have a 20 item turn in if you wish
plugin::DiaWind2(); #Added button responses look at original diawind for other options
plugin::summon_into_inventory($client, 1001, 10); #Example summon 10 items of ID 1001 directly into the players inventory
Code:
sub EVENT_SAY {
if ($text=~/hail/i) {
plugin::DiaWind2("Would you like to donate one {orange}Stone of Binding~ and {orange}10 platinum~ to have your soul bound to this area? popupid:69 popupid:70 wintype:1", "Donate", "No thanks");
}
}
sub EVENT_POPUPRESPONSE {
if ($popupid == 69) {
if (plugin::collect_quest($client, 1001 => 1, "platinum" => 10)) { #Takes 1 item and 10 platinum directly from player no turn in required
plugin::DiaWind("Thank you for the donation! Have some fresh water!");
$client->SetBindPoint($zoneid, 0, -49, 513, 2); $client->Message(15, "You are now bound to this plane.");
plugin::summon_into_inventory($client,1028,20); #20 waters.. (custom item)
} else {
#Failed turnin missing items or money
plugin::DiaWind2("You seem to be missing the requirements for me to cast this spell.");
}
} elsif($popupid == 70) {
plugin::DiaWind("Farewell, maybe next time sir!");
}
}
sub EVENT_ITEM {
plugin::return_items(\%itemcount);
}
If you are looking for more examples I can post more later on how its used, or just message me on the EQEMU discord.
Required plugins for this to work.. is a modified DiaWind... just added DiaWind2 to make it have multiple options for popupid.
Summon Into Inventory
https://pastebin.com/VRun4NX1
Collect Quest
https://pastebin.com/jLyLkTtg
DiaWind2