Charmfile vs Scriptfileid
When using a quest for an item.. is there any reason to use Scriptfileid?
I have yet to see something that the charmfile can't do that the scriptfileid can do... Scriptfileid is restricted to ONE slot -- Meaning if you have two items that need scripts that are similar.. you would need TWO scripts to get them to BOTH work when equipping both items... (I am guessing this is unintended behavior?) Charmfile is not restricted to ONE slot (thank god) .. I can have all my custom gear use the same exact charmfile and they all work well using the same quest to get what I need done. TL;DR ... is scriptfileid useless / broken / or am I missing something... |
I use one scriptfileid for 3 pieces of gear, all of which have their own thing going on and it works for me.
Guess it depends on what your goal is and how you coded it. |
The Charmfile scripts are for scaling items and the scripts are ran automatically on regular intervals. The scriptfileid field is used for scripts that are triggered when right clicking an item similar to a clicky item that would normally cast a spell. I am not sure what you mean by the slot restrictions or by it only being useable by 1 item.
Here is a simple example of a charm script that uses qglobals: Code:
#Aug Scale Code:
# Clicky Item Test Script Code:
# Script for setting a cap on Growth spells http://www.eqemulator.net/wiki/wikka...kka=ItemQuests In short; the different types of scripts are all fully functional. You are probably just not using them correctly. |
Quote:
Now add it to a Helm / Chest / Bracer / ect / ect... Add a debug line of some sort like so... Code:
$DEBUG = 1; I was testing the Charmfile on 2 of the same weapns as well which is why I thought it worked for Charmfile... when I used 2 different weapons.. only of the of scripts would work and the other did not. (when using the same charmfile on both) |
The way item scripts have changed a bit in the past few months Trev, it no longer really works like that and any item event can be triggered by any script.
This is from the Lua documentation but it should work the same for Perl with pl instead of lua extension: Code:
Item Scripts are quest scripts attached to Items. Items will load a script on the first event that triggers them and will load one and only one from the following location. Which ever it finds first in the following order: Though I suspect you may be tripping over the precedence + item_script format unintentionally. |
So KLS lets say script_1.pl is on my bracers I can't use script_1.pl on my boots as well?
Only one of the items can load that script at a time? (because that is how it is working currently) |
In theory no that should work. I'm not seeing that behavior but I'm using Lua. I'll try Perl tomorrow and make sure it's not bugged.
|
Quote:
I figured out the problem actually.. was something I was completely overlooking till now ... I had a hash outside of a sub so that I didn't have to copy paste it into each sub.. but doing that only allowed it to work for a single item with that script file. (doh) I just copied the hash into both ... EVENT_EQUIP_ITEM and EVENT_UNEQUIP_ITEM and now it works for all items with the same exact script... yay! I kinda feel stupid now.. :( |
All times are GMT -4. The time now is 02:37 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.