• Hail, we're RedGuides. We want you to play six (yes, 6!) EverQuest characters at once. We have scripts and a friendly community to help, please join our playstyle and say hello! 👋
  • We've added LLM sections to our Terms & Rules and Resource Rules, for everyone's sanity & in-game safety.
    Read more
    a. Do not replace your voice with an LLM. This goes for your posts and your scripts. Drafting and editing with a tool is fine, but don't take you out of what you share.
    b. Do not replace your EQ character's voice with an LLM. We don't want scripts that speak over /ooc, /shout or other public channels. This has been an unwritten rule that's kept casino scripts off the site for decades, but we're now compelled to make it clear: keep automated communication private.

    Why Does RG Review Scripts?
    Nearly every LLM-written Lua script we see is making your character do impossible things, and rarely in a way that's beneficial to you. We've seen heavy server hammering, /target over impossible distances when /nav spawn would passively accomplish the same thing, a spawn search that fires 20+ times per second, and other pointless actions that are likely annoying GMs.

    You are welcome to use LLMs as a tool to structure, draft, and edit your work, but please read critically before hitting /lua run

Question - Why do I get NULL in my event

Soandso2

Well-known member
My event triggers, but the variable in the event sub is NULL. I am doing (as far as I can see) exactly what the documentation says.

First we declare the event:
Declare event
Code:
#Event SkillUp "You have become better at #1#"
Then in my Sub Main (in the eternal loop)
Sub Main
Code:
/doevents
And finally the sub
Sub Event
Code:
Sub Event_SkillUp(Line,skill)
  /echo Skillup: ${skill}
/return

If I echo the Line, I get the full line that triggered the event, but when I use skill as shown, it is NULL. Why? Also, IF I echo Line, this seems to trigger an event again, because it spams the skillup message over and over again.
My idea is to see this echo: "Skillup: disarm (3)"
 
Solution
now that is weird
hmmm
hmm try another word instead of skill, it might be a protected word for mq.
I was thinking that too, but thought I would have got an error or warning if I used a no-go-word. I changed it, let's see what happens.

That was the problem! Now it works! Skill seems to be a protected word!
Thanks a lot for the assistance! :)
I think your line var might not want to be capitalized, i would start there.

This is what i have for skillups:
#event SkillUp "You have become better at #1#! (#2#)"

Trying your suggestion right away. My thought was that my version would have captured the whole string after "at" in the text. Let's see what this does.

Ok, result already.
Sub Event
Code:
Sub Event_SkillUp(line,skill,value)
  /echo ${skill} went up: ${value}
/return

Results in NULL went up: 74
 
now that is weird
hmmm
hmm try another word instead of skill, it might be a protected word for mq.
I was thinking that too, but thought I would have got an error or warning if I used a no-go-word. I changed it, let's see what happens.

That was the problem! Now it works! Skill seems to be a protected word!
Thanks a lot for the assistance! :)
 
Solution
Question - Why do I get NULL in my event

Users who are viewing this thread

Back
Top
Cart