• 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

Macro help

armysoldier

Well-known member
Rich (BB code):
Sub Main
    /declare CombItemName string outer
    /declare ItemTo string outer

    /varset CombItemName "FPB"
    /varset ItemTo "Fine Plate Breastplate"

/echo ${ItemTo}

/echo ${ItemTo.Equal["Fine Plate Breastplate"]}

/echo ${ItemTo.Equal[Fine Plate Breastplate]}

    /if (${ItemTo.Equal[Fine Plate Breastplate]}) /echo FPB

    /if (${ItemTo.NotEqual[Fine Plate Breastplate]}) /echo  not FPB

/return


This should

echo "Fine Plate Breastplate"
echo true
echo false
echo FPB


But instead i get


echo "Fine Plate Breastplate"
echo false
echo false
echo not FPB

Can someone tell me WTF i am doing wrong.. i am fustrated as hell ..

and with out a string comparison ... i am Foooked


thanks

ARMY
 
What happens when you do /varset ItemTo Fine Plate Breastplate
?

I've been doing a lot of these types of comparisons in my macros, but with mob types/names, etc. and I definitely feel your pain. Sometimes it takes a while to figure out what will parse correctly.

My guess is that the first echo always does it right because ItemTo is "Fine Plate Breastplate" in your example. That would explain why the third echo returns the correct value also and the /if statements are parsing normally as well, you have ItemTo set to "Fine Plate Breastplate" not Fine Plate Breastplate.

What I do not understand is why the second echo is returning false, it should be true. My guess is the quotes are f'n it up. I'd try your variable setting line with no quotes around the value and see what happens.

Good luck!
 
yeah thats my problem .. one of those should return True.. and neither one is ..

and i don't understand why?

anyone have an idea?

its making my brain really hurt!!!

ARMY
 
i posted on MQ forum .. and DKAA told me to take the "" out of the variale declares...

so i will go back and mod my codes to remove those and put them in else where if "" are needed

like for buy or sell functions

8-)

ARMY
 
try this
Rich (BB code):
Sub Main
	/declare CombItemName string outer
	/declare ItemTo string outer
 
	/varset CombItemName "FPB"
	/varset ItemTo "Fine Plate Breastplate"
 
/echo ${ItemTo}
 
/echo ${FindItem[${ItemTo}]}
 
/echo !${FindItem[${ItemTo}]}
 
 
 
/if (${FindItem[${ItemTo}].ID}) /echo FPB
 
/if (!${FindItem[${ItemTo}].ID}) /echo not FPB
 
/if (${FindItem[Fine Plate Breastplate].ID}) /echo FPB
 
/if (!${FindItem[Fine Plate Breastplate].ID}) /echo not FPB
 
/return
 
Macro help

Users who are viewing this thread

Back
Top
Cart