Page 8 of 9

Posted: Thu Dec 04, 2008 10:48 pm
by Scatman
I believe we have a PrereqRace() function don't we? I'll double check.
Yep we do.

Code: Select all

AddQuestPrereqRace(Quest, race id) 

Posted: Fri Dec 05, 2008 10:52 am
by John Adams
Oh, doh... how'd I miss that one? :D
Thanks Scat. Can we try that out on our village mentors? I'm finishing the level 1 spells for mages/scouts today, or die trying. Can't believe how long it takes to tweak a few spells... and this is just the first 48. Only 3700 more to go!

Posted: Fri Dec 05, 2008 12:59 pm
by Scatman
Sure. I'm pretty sure I already have them included in most of the quest scripts, but commented out, so we could test them even if we weren't the race required to get the quest.

Re: LUA Functions Request

Posted: Thu Jan 01, 2009 6:07 pm
by John Adams
Ok, I think the cheese has officially slid off my cracker... I could have sworn LE posted a message *somewhere* telling us of the ability (via LUA) to have 2 NPCs communicate with one another. In EQEmu, it was called Signalling. Where one NPC's script would be set to monitor for a signal_id to be fired off, and if any other NPC "talked" on that signal_id, that NPC would respond.

Example would be the Schmendrick and the whole fire elemental fight for the cleric epic, for instance. Or simpler, an NPC at one end of a zone would say "MARCO" and an NPC at the other end could reply "POLO"... I think LE may remember that, if not, I can dig up the old EQEmu docs on that Perl function.

At any rate, did we not have this in EQ2Emu, or was I just dreaming it? The latter is very possible... anyway, toss it on the list somewhere if you will. :) We have lots of opportunity to use such interactions between NPCs eventually. For now, we're going to "Time" the responses and hope for zero latency.

Re: LUA Functions Request

Posted: Thu Jan 01, 2009 6:33 pm
by LethalEncounter
John Adams wrote:Ok, I think the cheese has officially slid off my cracker... I could have sworn LE posted a message *somewhere* telling us of the ability (via LUA) to have 2 NPCs communicate with one another. In EQEmu, it was called Signalling. Where one NPC's script would be set to monitor for a signal_id to be fired off, and if any other NPC "talked" on that signal_id, that NPC would respond.

Example would be the Schmendrick and the whole fire elemental fight for the cleric epic, for instance. Or simpler, an NPC at one end of a zone would say "MARCO" and an NPC at the other end could reply "POLO"... I think LE may remember that, if not, I can dig up the old EQEmu docs on that Perl function.

At any rate, did we not have this in EQ2Emu, or was I just dreaming it? The latter is very possible... anyway, toss it on the list somewhere if you will. :) We have lots of opportunity to use such interactions between NPCs eventually. For now, we're going to "Time" the responses and hope for zero latency.
Well you already have the GetSpawn command, so one NPC can easily have another NPC do something:

Example:

Code: Select all

function hailed(NPC, Spawn)
	Spawn2 = GetSpawn(Spawn, 1234)
	Emote(Spawn, "laughs at " .. GetName(Spawn2))
	Say(Spawn2, " Laugh at me again " .. GetName(Spawn) .. " and I will have the last laugh.")
end
Or are you talking about something else?

Re: LUA Functions Request

Posted: Thu Jan 01, 2009 6:47 pm
by John Adams
A specific example we are working on right now... the end of the Outpost of the Overlord main quest line, you zone into Circle of Elders, and you kill Kayl's minions. Once that is done, Kayl mutters something to you as Tayil N'Velex spawns at the door, walks towards Kayl and speaks something. After Tayil speaks, Kayl again speaks, then Tayil... who then attacks and kills Kayl - who's lifeless body falls to teh ground with a final "Nooooo!"

Then I think there is a little convo between you and Tayil and the quest is over.

But getting the two spawns to speak to each other in this manner is one example... Scatman currently is doing it all from one Spawnscript, which is working fine with adequate pauses between dialogs.


But another more intricate example is the Ceremony for the Ogres in their home village. Where you watch two ogre NPCs do all sorts of PlayFlavors and Emotes performing this rite of passage or something. I guess it could be done the same way, from a single spawnscript. We'll have to try it further to see if this is all we'll ever need. It quite possibly is.

Thanks for the reminder (though Scat already knew that answer lol)

Re: LUA Functions Request

Posted: Sat Jan 10, 2009 11:42 am
by John Adams
Here's another quest updater function we need. Right now, we have a quest on the Queen's Island where you have to go out and find "a dead soldier" to see what happened to them. As you approach ANY of the soldiers, it should update the quest and also spawn "a defiled soldier" that attacks the player. Defeating this spawn is unnecessary, but an added surprise. :)

Currently, trying to use AddQuestStepLocation(Quest, 1, "Found a soldier!", 114, -4, 156, 10, "TaskGroupText") does not work when you have 12 possible locations for these dead soldier spawns. For one, every dead soldier does not spawn every time - I believe they are scattered about, randomly, maybe 3-4 pop on each spawn cycle. Regardless of this assumption, I cannot get AddQuestStepLocation() to pop a defiled soldier at any of the spawned dead soldier sites... only at the very first one in the script.

Code: Select all

	AddQuestStepLocation(Quest, 1, "Found a soldier!", 114, -4, 156, 10, "TaskGroupText")
	AddQuestStepLocation(Quest, 2, "Found a soldier!", 117, -3, 182, 10, "TaskGroupText")
	AddQuestStepLocation(Quest, 3, "Found a soldier!", 123, -4, 193, 10, "TaskGroupText")
	AddQuestStepLocation(Quest, 4, "Found a soldier!", 130, -4, 183, 10, "TaskGroupText")
	AddQuestStepLocation(Quest, 5, "Found a soldier!", 141, -3, 150, 10, "TaskGroupText")
	AddQuestStepLocation(Quest, 6, "Found a soldier!", 152, -4, 213, 10, "TaskGroupText")
	AddQuestStepLocation(Quest, 7, "Found a soldier!", 154, -3, 151, 10, "TaskGroupText")
	AddQuestStepLocation(Quest, 8, "Found a soldier!", 156, -3, 135, 10, "TaskGroupText")
	AddQuestStepLocation(Quest, 9, "Found a soldier!", 171, -3, 186, 10, "TaskGroupText")
This is how they are currently set up - and only the 1st one works. If I am using it wrong, let me know. Else we need a way to update a single quest step using multiple locations. Scatman has a theory on this, so I'll let him explain if he wishes.

Thanks

Re: LUA Functions Request

Posted: Sat Jan 10, 2009 12:22 pm
by John Adams
Shoot. I just remembered the real reason I meant to post here heh... I had a brain fart. So here's the real request.

I am noticing in various areas, NPCs do battle with one another in a seemingly random manner. I realize right now we have a hard-coded aggro radius, so maybe when this becomes more dynamic we can emulate this effect.

Take the Spirocs and sand crabs in the newbie area of Timorous. They seem to wander around each other with no interaction - until all of a sudden a poacher will randomly attack a crab, killing it. The crabs never aggro the poachers from what I saw. And they are not a matter of being KOS to each other, but almost on some random timer as to when to attack.

Same goes for The Ruins, where evil orcs suddenly run from their spawn point and throw themselves into the guards, which dispatch them quickly. It's similar to the gobbies on the Queen's Colony, except for the fact they spawn, stand around or walk around an area, then make a bee-line at the guards seemingly random.

Again, this may all be solved by dynamic aggro radius, or setting the NPCs to not be KOS, but scripting them to randomly attack or not.

There is one more scenario coming up - NPCs that are NOT KOS, suddenly becoming KOS for some reason (like the fish in the water, or the orcs in The Ruins) as they approach the player. I am not sure if this is some leet SOE trick to lure players into getting their asses kicked, but it's no fun to think you are not KOS suddenly to be beaten to death by 20 orcs. :/

How can we emulate "dynamic faction" (the little red line)?

Re: LUA Functions Request

Posted: Sat Jan 10, 2009 1:12 pm
by John Adams
Hey Scat,

I know we have support for a single quest reward, as well as multiple-choice rewards (pick one item out of a few as your reward).

But do we have support for a reward that is 1 guarenteed item AND a set to choose from?
multi-reward.jpg

Re: LUA Functions Request

Posted: Sat Jan 10, 2009 4:01 pm
by Scatman
Yep, I just tested it on my server and it works exactly like it should.

Re: LUA Functions Request

Posted: Wed Mar 18, 2009 6:35 pm
by John Adams
Bumping this for Xan, who was asking me how to set a spawn that is not targetable to targetable during a quest step.

http://eq2emulator.net/phpBB3/viewtopic ... 7317#p7317

Scat, this is probably some of the more complex scripting we do. Can we write a new post in Tutorials or something on how to make one of these interactable object work? It's so complex, I have no idea myself how to do it. :D

Re: LUA Functions Request

Posted: Wed Mar 18, 2009 7:33 pm
by Scatman
Sure :)

Re: LUA Functions Request

Posted: Sun Apr 05, 2009 12:13 am
by John Adams
Couple things, one a Fix, the other a Request.

Request: We need a way to hide the "tooltip" on a Sign / object when you are not on a quest. If the object is a part of the quest. Sabotage objects, for instance. "These must be the books I am to burn" or whatever. We do not want to see those mouse-over tooltips unless we are on a quest where those objects are to be interacted with. Scatman thinks this is something we cannot do now, as we can only disable targetting or show_name. Ideas?

Fix: The bug in SetRequiredQuest() needs to be fixed so spawns that are not to be interacted with, are disabled if not on the quest, or step of the quest. There's a post elsewhere from Scat about this so I won't go into any more detail unless you need me to.

Thanks in advance.

Re: LUA Functions Request

Posted: Sun Apr 05, 2009 1:54 pm
by LethalEncounter
Hmm interesting, I'll have to look into how Live does it. Yah you are right, we probably cannot handle it properly right now :/

Re: LUA Functions Request

Posted: Sun Apr 05, 2009 7:56 pm
by John Adams
Not sure if it helps, but all of our packet collects have these "sabotage" objects in them, but when we're collecting, we get nothing when we mouse over. I do not think any of us have collected doing a sabotage quest line... So the answer may be in the spawning of the object? Dunno. Good luck with that. :)