LUA Script WIKI

Discussions on development of both the EQ2Emulator LUA Script Engine and Script specifications

Moderator: Team Members

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Re: LUA Script WIKI

Post by Scatman » Wed Apr 01, 2009 4:14 pm

I guess wiki automatically sets the title to the URL or something? :/ If there's no way to change it, then I guess we'll just leave it as is since we'll include the parameters in the other places down below. Just checked it out, it actually doesn't look bad at all leaving the params on the main page because wiki puts a nice 1/2 (full?) space in between each link.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: LUA Script WIKI

Post by John Adams » Wed Apr 01, 2009 4:16 pm

Ok, we'll go that route then. Hell if we decide we hate it, we can just change it. :)

Starting to fill some of those in, the easy ones of course. Hahaha. :p

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: LUA Script WIKI

Post by John Adams » Wed Apr 01, 2009 4:19 pm

Ooh! One more thing!

Ok, see all teh functions where LE put something like "GetCurrentHP(Spawn)"?

Can those actually be used on NPCs? Or am I lying in my Wikis that the param could be NPC -or- Spawn?

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Re: LUA Script WIKI

Post by Scatman » Wed Apr 01, 2009 4:22 pm

It can be an NPC or Spawn

Your wiki's are safe :)

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: LUA Script WIKI

Post by John Adams » Wed Apr 01, 2009 4:23 pm

AND! You're gonna get sick of me tonight. ;)

Should we actually have a "type" definition in the scripts? I mean, I know the index has some sections - but can functions be used across script types?

Like, GetCurrentHP() can be in a SpawnScript AND a Spell script. Right?

Thinking of adding

Code: Select all

== Type ==
SpawnScripts
to the template. Thoughts?

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Re: LUA Script WIKI

Post by Scatman » Wed Apr 01, 2009 4:27 pm

I don't think we need it. Any LUA function can be used in any script. The functions are defined for the LUA system as a whole and spell scripts, spawn scripts, zone scripts, <insert future script type here> will all pool, in a sense, from the same pool of LUA functions we define.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: LUA Script WIKI

Post by John Adams » Wed Apr 01, 2009 4:31 pm

So I can use GetCurrentHP(param) in a Quest script? I did not know this.

Here's another example format - adding a ToC and header.

http://eq2emulator.net/wiki/index.php/LUA:GetCurrentHP

Do you think the two Bold Headers will get confusing? That's how I originally did it, but thought they clashed. But we could put all the params right there up top that way.

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Re: LUA Script WIKI

Post by Scatman » Wed Apr 01, 2009 4:35 pm

John Adams wrote:So I can use GetCurrentHP(param) in a Quest script? I did not know this.
Yep, or a zone script, absolutely. That's why scripts are nice because you can do anything we have to offer with the functions provided.

I think that looks good. The title with the parameters sticks out because it's right under the contents (at least to me :))

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: LUA Script WIKI

Post by John Adams » Wed Apr 01, 2009 4:45 pm

Ok I am done asking questions for now :) I will edit the existing, and post the template, so hopefully others will get inspired to fill in a few.

Thanks for the feedback as always.

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: LUA Script WIKI

Post by Jabantiz » Mon Oct 15, 2012 9:05 pm

I have started working on the lua functions wiki, I started at the top and went down skipping those that are not implemented. This is very time consuming but I am trying to do a few a day. If you notice any mistakes let me know so I can fix them.

User avatar
alfa
Team Member
Posts: 550
Joined: Fri Jul 27, 2007 6:24 pm
Location: France
Contact:

Re: LUA Script WIKI

Post by alfa » Tue Oct 16, 2012 5:46 am

Really helpful, thanks
Fight with me... Or die, like the rest.
J.A. say: "I think Xinux tried to tell me this, but I ignore most things he suggests."

Jabantiz
Lead Developer
Posts: 2912
Joined: Wed Jul 25, 2007 2:52 pm
Location: California

Re: LUA Script WIKI

Post by Jabantiz » Thu Sep 12, 2013 3:45 pm

I was bored last night and didn't feel like coding so went through the wiki and documented the lua functions that had nothing, got a lot done last night so just went ahead and finished them off today.

All LUA Functions

All current lua functions should be on that page and documented now, I only did the pages that had nothing, didn't go through to update some of the older pages.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: LUA Script WIKI

Post by John Adams » Fri Sep 13, 2013 10:15 am

I love it when you get bored. Great job.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests