PDA

View Full Version : Consumable item to Max tradeskill


SirJames
09-29-2016, 10:43 AM
I'm attempting to create an item, that when "right clicked" will consume itself and up that characters tradeskill value.


I've created a simple book item and put it into my database (lets call it db# 12345).

Then i placed a perl file called: script_12345.pl into my quests\items\
folder. I have a sub for EVENT_ITEM_CLICK.


It appears this event never fires, as my code is never run.



Am I going about this wrong? What is the easiest way to create an item, that when right clicked will destory itself and skill up a given skill?


Thanks!

Mortow
09-29-2016, 11:50 AM
I think the script file should be in your \quest\global\items folder. The ID number of the item in your database is irrelevant to the script#. You have to place the script# in the scriptfield column of that item in your database.

N0ctrnl
09-29-2016, 12:02 PM
For items, script IDs are specifically called out. In the database it's the 'scriptfileid' column. If you're using the PEQ editor, look for "Script File ID". So if you put 999 in there, it'd call quests/global/items/script_999.pl

SirJames
09-29-2016, 12:48 PM
For items, script IDs are specifically called out. In the database it's the 'scriptfileid' column. If you're using the PEQ editor, look for "Script File ID". So if you put 999 in there, it'd call quests/global/items/script_999.pl



Ahh, theres my problem. I assumed it would auto pick it up, like for NPCs.


I've added the #2016 to the script file id field on my item in question and placed my script_2016.pl in the "quest/global/items/" folder.

I will try this tonight and let everyone know how it goes.