PDA

View Full Version : LUA $name


provocating
04-03-2014, 10:09 PM
Strange thing my LUA is working, but either $name is not working like I thought or something is off.

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/projecteqquests/source/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
Looks like I need to get off my ass and do an update this weekend.

http://michelelash.files.wordpress.com/2012/09/getting-off-your-ass.jpg

sorvani
04-04-2014, 12:37 AM
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.
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
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.