PDA

View Full Version : sub EVENT_ITEM_USE


Kingly_Krab
06-20-2013, 11:49 AM
Is there anyway to create the event in the title? When you use an item this event happens, I can't seem to find one in the current code, would someone care to shed some light on this?

EDIT: I believe this would require the ability to check item ids as well, like below, just an example. An item that when used enables a title.
sub EVENT_ITEM_USE
{
if($itemid == 1)
{
quest::enabletitle(1);
}
}

nenelan
06-20-2013, 12:53 PM
Check out your /quest/items/ directory. In there should be the scripts for Transmute Hammer/Gloves on Vibrating Gauntlets/Hammer of Infuse script_13674.pl (this is attached to both the Gauntlets and the Hammer in the DB). Take a peek at that and see if you can figure out how to leverage it for what you want to do.

Find a "dummy" spell in the DB (Use Ability would be good), attach the click to the item you want to have the click. Figure out a string of numbers that you aren't going to use for anything else (item ID could work grand), make a script_NUMBER.pl in /quests/items/ and go from there.

Hopefully you should be able to figure out how you want to do what you want to do from there. If you still need help, feel free to post some more!

Good luck.

Kingly_Krab
06-20-2013, 01:11 PM
Ah, okay, makes sense as to why I couldn't find it in the wiki, thanks.

wolfwalkereci
06-20-2013, 06:29 PM
It's been a couple months since I touched that however I vaguely remember the id capping at a rather low value.
I have dozens of script_xxxxxx.pl files that I use, nothing higher then 32767, that works, so just keep that in mind if it doesnt work.
You probably already found it but you just modify scriptfileid for the item in question.
IE /quests/items/script_12520.pl --> scriptfileid = 12520