Can you access quest::setglobal from a plugin?
So I've been working on plugins and discovered that I can't access $qglobals{variable_name_here} from inside the plugin. Am I correct? Is there a work around?
So I passed $qglobals{variable_name_here} into the plugin to a var just called $qglobals and that was working until I wanted to set/save a value. I found Code:
quest::setglobal("variable_name_here", 1, 5, "F"); Just a couple more points, it was all working fine in a regular .pl file in the "quests" folder (so I got the $qglobal created in the db just fine, and the flag in the "npc_types" table set already too), just when I tried to get it in a plugin where I am running into trouble. |
Quote:
http://code.google.com/p/eqemuplugin...k/Instances.pl In order for this to work you need to make a change to globals.pl, you can source the plugins SVN for the file or check out the whole thing in general. That should help you achieve your goals. |
I can't figure it out
That info Akkadius was very helpful, thanks.
I can't get this to work, here's my plugin: Code:
sub NewbieBot_say { Code:
TEST 1 |
Quote:
Did you source the plugins SVN first? Because it has a line commit global.pl that allows the parsing of $qglobals from within plugins. |
Thanks for looking at that. It must be my global.pl file, which I know you've mentioned twice, but I am not following you.
Quote:
(Sorry, I am not trying to be daft, just kinda new and still learning the lingo.) I did "SVN Update" with Tortoise on the plugins folder, but that did not help, so you must mean something else. |
Quote:
http://www.eqemulator.org/forums/showthread.php?t=32608 |
I know it takes me a long time to reply, I got a busy RL.
Anyway, I just want to say a thorough thanks. I got it. Akkadius, I really, really appreciate you taking the time to answer my questions. In case anyone else ever reads the thread here's some more details: I followed the link in the previous post, and then the two links there. The first link took me to a list of plugins, and I copied the "globals.pl" one. It looks the same as the one I already had, but on closer inspection it is different, and once I replaced it, my code works like a charm--in other words, the $qglobals variable can be accessed from inside a plugin. As an aside: I found lots of other useful plugins in those links. Gonna take me months to look through it because I am so busy, but it should be fun (that's why we do this right?). |
Quote:
|
All times are GMT -4. The time now is 04:13 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.