LUA Functions Request

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

Moderator: Team Members

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

Post by Scatman » Mon Sep 01, 2008 12:53 pm

Did you ever put in the final params for the spawn function? Is it Spawn(Zone, spawn_id, [private_spawn], x, y, z, [heading])?
I'd look in the source but I'm not sure where to find the source that hasn't been completely tested or whatever :P

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Post by LethalEncounter » Mon Sep 01, 2008 2:06 pm

Yes, that is correct. Note that if it is alone in a particular area it might not show up correctly because it needs a spawn close by to get the correct location_id.

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

Post by Scatman » Mon Sep 01, 2008 2:22 pm

Ok, does it automatically try to find a spawn nearby or must we specify one somehow?

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Post by LethalEncounter » Mon Sep 01, 2008 2:31 pm

It automatically finds the closest one. The reason it has to do so is because of the way that the client handles graphics. They section a zone into many different regions and the client uses these regions via the location_id. If it is off, then NPCs will disappear depending on which angle you look at them. Similarly, if an NPC disappears after fighting it, then the y coord for that NPC is off.

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

Post by Scatman » Mon Sep 01, 2008 2:35 pm

Makes sense! Thanks for the clarification.

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:

Post by John Adams » Tue Sep 02, 2008 6:13 am

Speaking of location_id, and slightly off-topic, how can we determine a location_id of an NPC if we do not have data from the given zone? Take for instance the old boat rides you initially got when creating a new toon and heading TO the islands. Those do not exist anymore (I believe), so we'll never get collects for that data... but I'd like to spawn one anyway.
I spawned a Captain Varlos in zone 26 for some private testing, and he's bobbing all over the place... perhaps because I have no location_id. Ya think?

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Post by LethalEncounter » Tue Sep 02, 2008 1:20 pm

Look for Left Grid %lu and Entered Grid %lu in your console window when your character moves around. It will display the correct location_id for the position that your character is currently located.

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:

Post by John Adams » Tue Sep 02, 2008 4:12 pm

Oh, is that what grid ID mean? hehe. duh, I probably should have put that together. :) thanks!

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:

Post by John Adams » Tue Sep 16, 2008 9:10 am

Doing some noob quests on my Sarnak yesterday, I think I have discovered another LUA function needed. There was a quest where I had to lure "skittering monitors" towards a ravenous plant - like using taunt or something, then training them back into the plant, which then turned them into "filament encapsulated monitor". It was so cool. :)
So basically, the monitor was running at me, got within range of the other NPC, then not only died but despawned and immediately respawned "filament encapsulated monitor" in it's exact x,y,z. I think the function I may be looking for here is to cause one NPC to aggro the range of another, then kill the second, and repop it, then ding a quest step has been completed. Here is a sample of the log around those events:
Right-clicking the plant/NPC shows this:
"This large plant has many tiny roots going within the soil."
When the monitor comes near:
"a filament strangler moves slightly as filaments emerge from the ground, gripping its target."
The demise of the skittering monitor:
"You find \aITEM 1939396535 2117050548:filament encapsulated monitor."
Maybe this can be handled by using our factions? What do you think?

User avatar
ZexisStryfe
Posts: 1026
Joined: Thu Jul 26, 2007 6:39 am
EQ2Emu Server: Sytherian Legends
Location: Connecticut
Contact:

Post by ZexisStryfe » Tue Sep 16, 2008 10:08 am

yeah, Timorous Deep is a great starting zone. :P
~ EQ2 Emulator Project Manager

Image
Image
Image
"Zexis, from this day forth, you shall be known as... '3 of 6'" - John Adams

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:

Post by John Adams » Tue Sep 16, 2008 10:31 am

No kidding. Ask Scat, I have been bitching and moaning for weeks now about how shitty the older villages quest lines are. I am horrified that SOE tossed out so many of those awesome piddly little quests that I loved in 2004-2005, for that assinine generic "Mentor" quest.
I hadn't been a noob in a long time, so when I was about to collect, I thought I'd just do what I used to do, and run through every Village or Hood and get every quest I could. There were like 5. I was pissed, and sad. Why do they continually ruin things?

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

Post by Scatman » Tue Sep 16, 2008 10:39 am

John I believe I have asked for this already in the thread for our requests. Actually I'm not positive so I'll double check after I post this assuming I did. :) Anyhow, is that quest you are talking about familiar to the one on the Queen's Colony where you must attack those ghosts and bring 3 back to the priest and she casts a spell when they get close to turn them back into "living" people?
Edit:
Ok so I kind of did. Number 4 in the priority list thread but that didn't entail another mob interacting with the mobs you were training back.

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:

Post by John Adams » Tue Sep 16, 2008 11:53 am

Yeah I suppose that would be similar, if the priest is supposed to take a spawn you are "training" behind you and depop/repop it as something else. Although, I think my "filament encapsulated monitor" is an "Item" not a spawn.

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:

Post by John Adams » Tue Sep 16, 2008 11:55 am

Ahh I just remembered what the other thing I saw was... Scat, do you have a request in for a LUA that will remove an item from your inventory upon completing a quest/step? I noticed those same monitors and other things (pride feathers, I believe) disappeared from my inventory after I handed in the quest.

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

Post by Scatman » Tue Sep 16, 2008 12:38 pm

Oh I didn't realize those were items. Nope I didn't think of that one. That should be able to be handled with some kind of generic DeleteItem function since it should only happen when a step gets completed right?

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests