EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   LUA $name (https://www.eqemulator.org/forums/showthread.php?t=38016)

provocating 04-03-2014 10:09 PM

LUA $name
 
Strange thing my LUA is working, but either $name is not working like I thought or something is off.

Code:

function event_say(e)
                if(e.message:findi("hail")) then
                        e.self:Say("Hello $name. If you possess a Dark Wedding Certificate you may hand it to me when you are ready to begin your wedding. If you are currently in a wedding party you may [" .. eq.say_link("enter the chapel",false,"enter the chapel") .. "] now.");
                end
end

That is actually printing out $name

Uleat 04-03-2014 10:44 PM

I found this in '\quests\freeporteast\Groflah_Steadirt.lua':

e.self:Say(string.format("Greetings, %s! Join in the [celebration]! Have a few drinks. Alas, there are no [Tumpy Tonics].",e.other:GetName()));


I think '$name' is a perl holdover.

Robregen 04-03-2014 11:22 PM

I just did a massive commit on correcting those https://code.google.com/p/projecteqq.../detail?r=1562

provocating 04-03-2014 11:30 PM

Looks like I need to get off my ass and do an update this weekend.

Akkadius 04-03-2014 11:42 PM

Quote:

Originally Posted by provocating (Post 229259)
Looks like I need to get off my ass and do an update this weekend.

http://michelelash.files.wordpress.c...f-your-ass.jpg

sorvani 04-04-2014 12:37 AM

Quote:

Originally Posted by Uleat (Post 229256)
I found this in '\quests\freeporteast\Groflah_Steadirt.lua':

e.self:Say(string.format("Greetings, %s! Join in the [celebration]! Have a few drinks. Alas, there are no [Tumpy Tonics].",e.other:GetName()));


I think '$name' is a perl holdover.

Additionally, this does work, but is horribly unreadable to people not familiar with C++

This is the preferred way to do it.
Quote:

e.self:Emote("begins to furiously work the metal. Sparks fly and a faint magical e.self:Say("Greetings, " .. e.other:GetName() .. "! Join in the [celebration]! Have a few drinks. Alas, there are no [Tumpy Tonics].");

provocating 04-04-2014 08:19 AM

Quote:

Originally Posted by sorvani (Post 229263)
Additionally, this does work, but is horribly unreadable to people not familiar with C++

This is the preferred way to do it.

I also like the second way better. I am familiar with the first way, just from dabbling in C++, but it is not that readable to me.

provocating 04-04-2014 08:20 AM

Good one Akkadius.


All times are GMT -4. The time now is 04:56 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.