LUA Functions Request
Moderator: Team Members
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
After getting another similar quest where I am to go out and "harvest" some stuff, I noticed that the spawn items I am to gather were usually already in place on the ground, just marked as targetable=0, show_name=0. We may need a lua function that sets those items as targetable/show_name for the harvest, just for that individual client.
A way around it would be to re-spawn the same spawn type, just with different params.
Another function that I think we talked about but I cannot find now... one NPC "signaling" another to respond. When youa are doing "The Fume and Fire Ceremony" in Big Bend, one NPC leads off in a ritual speech honoring Rallos Zek. When you click his Option to continue, the second NPC near him takes over and continues the speech, back and forth til the ceremony is complete. Cheesey, but effective.
Each Option click needs to send the next step of the conversation back to the partner NPC. Have we requested this complex functionality yet?
A way around it would be to re-spawn the same spawn type, just with different params.
Another function that I think we talked about but I cannot find now... one NPC "signaling" another to respond. When youa are doing "The Fume and Fire Ceremony" in Big Bend, one NPC leads off in a ritual speech honoring Rallos Zek. When you click his Option to continue, the second NPC near him takes over and continues the speech, back and forth til the ceremony is complete. Cheesey, but effective.
Each Option click needs to send the next step of the conversation back to the partner NPC. Have we requested this complex functionality yet?
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
Sounds like you just need a way of getting a reference to an NPC that is already spawned. I'll add GetNPC(Spawn, spawn id) that returns the closest NPC of that spawn id to the given Spawn.
Example:
NPC2 = GetNPC(Spawn, 12345)
Again, as I mentioned before "Spawn" just refers to a Spawn object, so NPC, Player, Spawn, etc will work as the first argument.
Example:
NPC2 = GetNPC(Spawn, 12345)
Again, as I mentioned before "Spawn" just refers to a Spawn object, so NPC, Player, Spawn, etc will work as the first argument.
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Cool.
How do you think we can handle the first one though? I know what John means I've seen those quests before. For example, one quests requires you to go and destroy bushes (not the harvestable ones). Before you have the quest, you can see the bushes, they are clearly spawned but you cannot interact with them. As John said, their show_name and targetable = 0. But once you get the quest, they become targetable and show name just for the player who has the quest.
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
Yah, how about SpawnSet(spawn id, Spawn Set Variable, Spawn Set Value, Player (optional) )
The Spawn Set Variable/Values would be the same arguments you would use in a /spawn set command. The optional Player argument on the end would allow you to only send the changes to the specified Player.
Examples:
SpawnSet(12345, "show_name", 1, Player)
SpawnSet(12345, "targetable", 1, Player)
The Spawn Set Variable/Values would be the same arguments you would use in a /spawn set command. The optional Player argument on the end would allow you to only send the changes to the specified Player.
Examples:
SpawnSet(12345, "show_name", 1, Player)
SpawnSet(12345, "targetable", 1, Player)
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Referring back to GetZone(Spawn) for a moment. I know this creates a "reference" to the Spawn zone, but how can I do a comparison that if I am in zone_id 235, script it different?
Use case: I am in Graystone Yard, and I ring the portal bell to go somewhere else within Qeynos. I obviously do not want to go to Graystone since I am already there... I am trying to use GetZone() to ID that whatever zone_id I am currently in, do not display that option. So far, no luck. I am sure this is not the function of GetZone(). Is there another way?
Btw, this is a short-term solution to the non-working mariner bells, using a Conversation with custom NPCs. It'll do for now, but something to consider down the road.
Use case: I am in Graystone Yard, and I ring the portal bell to go somewhere else within Qeynos. I obviously do not want to go to Graystone since I am already there... I am trying to use GetZone() to ID that whatever zone_id I am currently in, do not display that option. So far, no luck. I am sure this is not the function of GetZone(). Is there another way?
Btw, this is a short-term solution to the non-working mariner bells, using a Conversation with custom NPCs. It'll do for now, but something to consider down the road.
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
I can actually get the mariner bells working without too much trouble. I already have most of the code in place to do it. I'll take a look at it tomorrow if I have time (heading to lake to do boat maintenance). As far as the GetZone() function - yah it only returns a pointer to a Zone. I could add GetZoneID(Zone) and GetZoneName(Zone) functions if you wish. If you think of any others let me know.
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Thinking of another LUA function we could use for initial character creation. Noticed that when you make a new toon, soon as you move a step you are offered a quest "The Great Challenge" or something like that, to reach level 20 in 14 days. So, LUA function based on movement from the current location perhaps.
Also, can we track from the time a player gets a quest til a "timeout" such as this great challenge? in 14 /played days, if you are not yet level 20, the quest expires, etc.
Also, can we track from the time a player gets a quest til a "timeout" such as this great challenge? in 14 /played days, if you are not yet level 20, the quest expires, etc.
- ZexisStryfe
- Posts: 1026
- Joined: Thu Jul 26, 2007 6:39 am
- EQ2Emu Server: Sytherian Legends
- Location: Connecticut
- Contact:
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Right, but I am asking for it nonetheless because Live supports that type of a quest. An example is that a server admin may want to host a special event, where the next time their players log in, they move a step and get a quest offered (once). They either accept or decline, and it is never heard from again. The quest could be a race through Norrath, a Best of the Best competition, finding a particular treasure to gain a title, etc.
Rather than make everyone seek out an NPC to get the special event quest, they just get it upon logging in. That's what I am thinking this Great Challenge quest is like.
Rather than make everyone seek out an NPC to get the special event quest, they just get it upon logging in. That's what I am thinking this Great Challenge quest is like.
Who is online
Users browsing this forum: No registered users and 0 guests


