Ground Spawn - Commands
Moderator: Team Members
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Ground Spawn - Commands
Excellent, thanks LE for the link and the hard work on harvesting. Seems to be working like a champ. Any issues we're running into existed previously, so I'm happy to be gankin nodes!
Before we pass on from "harvesting", there is another type of interaction similar to harvesting we'd probably like to see next. That is interaction with objects like "destroy totem", or "burn tent" - things you do as part of a quest to finish a step. Scatman may have more details, but this is likely what's next on our wish list - since it's sorta similar in action. Do a command, wait for a "cast" timer, change an appearance of an object, get a ding in your journal.
Scat?
Before we pass on from "harvesting", there is another type of interaction similar to harvesting we'd probably like to see next. That is interaction with objects like "destroy totem", or "burn tent" - things you do as part of a quest to finish a step. Scatman may have more details, but this is likely what's next on our wish list - since it's sorta similar in action. Do a command, wait for a "cast" timer, change an appearance of an object, get a ding in your journal.
Scat?
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
You basically covered everything. I figured it'd be a lot like harvesting, since, it is harvesting, just you may or may not receive an item, and sometimes the appearance of the "node", like john said, changes or disappears, and you get a quest update.
If you think it'll be more difficult to implement than that, then we can go somewhere else first but I figured if it isn't, why not while we're here.
If you think it'll be more difficult to implement than that, then we can go somewhere else first but I figured if it isn't, why not while we're here.
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
Unfortunately it isnt going to be that easy. I'll need to create a generic spell that can be cast when the user clicks on an item and then make some LUA functions that allow you to modify objects in the game from the scripts. I'll have to get some packet logs from Live and see how they do it and reproduce it in the Emu. It wont be TOO hard, but it isnt going to be trivial either
I'll try to get that fixed before I move on to collections, but since today was my only day off this week I wont have too much time until Friday.
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Well especially now, thank you for spending your only day off with us. 
But you're in luck! On the DB SVN, in the ./Logs/Good/0_Shattered_Lands/Freeport folder should be a log called "burn_tent" which was my inkie toon doing a quest to go light the Outposts Tunarian tents on fire. There are likely packets to destroy totems in one of our Islands logs too, since we've all done that quest a dozen times. It's just finding it, I suppose
But you're in luck! On the DB SVN, in the ./Logs/Good/0_Shattered_Lands/Freeport folder should be a log called "burn_tent" which was my inkie toon doing a quest to go light the Outposts Tunarian tents on fire. There are likely packets to destroy totems in one of our Islands logs too, since we've all done that quest a dozen times. It's just finding it, I suppose
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
Well it is only a half day so I do have a little bit of time today. Speaking of your burning tent quest. Does it teleport you when you burn a tent? I didn't think so but after your burn tent spell finished the server sent:
Which tells the client to teleport to a location in this case 181.98, -1.15, -211.88
Code: Select all
-- OP_TeleportWithinZoneNoReloadMsg --
8/10/2008 13:00:25
199.108.12.54 -> 192.168.1.100
0000: 00 4B E8 FC 35 43 1C 87 93 BF 73 E3 53 C3 7E 53 .K..5C....s.S.~S
0010 81 42 00 FF FF FF FF .B.....-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
I made some changes to the way the right click menus worked for ground spawns to pave the way for interact-able quest items. This should continue working correctly, but if you see a new problem pop up please let me know. Btw for the quest ground spawns would you guys mind if I forced the creation of a different spell for each one? The player would not have to have the spell in order to use it. For example you would need a spell called burn tent created in the DB before you could use the object. The reason behind this is I don't see a way of having one generic script provide all the possible scenarios for quest objects.
Edit: If you dont have any problems with the above, the code I am about to check in to private SVN will allow you to create a groundspawn object that casts whatever spell is in their entity command as long as that spell exists in the DB. I'll add the LUA functions to modify/destroy objects as soon as I figure it out.
Edit: If you dont have any problems with the above, the code I am about to check in to private SVN will allow you to create a groundspawn object that casts whatever spell is in their entity command as long as that spell exists in the DB. I'll add the LUA functions to modify/destroy objects as soon as I figure it out.
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
What does it look like when the tent catches fire. When you finish casting the spell the server actually changes the visual state of an invisible cube that is sitting on top of the tent. I'm not sure why they don't just change the state directly, but it might look better with the invisible cubes. So the only LUA function I am going to have to make to get this to work is a SetVisualState(Spawn, value) function, although I might as well make one for each of the states while I'm at it. Once this is completed all your script with need is:
BurnSpawn = GetSpawn(Spawn, [Spawn ID of invisible cube here])
SetVisualState(BurnSpawn, 6866)
BurnSpawn = GetSpawn(Spawn, [Spawn ID of invisible cube here])
SetVisualState(BurnSpawn, 6866)
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
OK, I ran across the code I intended to use to allow the sending of updates to only a client or a group of clients like if they were on quests so that only they could click on things. I'm going to have to handle that differently than I had anticipated because I really don't want to juggle two different sets of spawn information unless I redo the way all the spawn information works. That actually is on my todo list, but I dont have the time right now. Would the ability to allow the object to be clicked based on if the player had the quest be good enough for now? I can't think of any quests that require anything else besides that anyways.
Anyways, getting back to the tent burn quest. To do this quest you will need to have a script like the following:
You will also need a spawn script setup for the tent:
That should be all you need to get the burning tent quest working correctly. If you have any problems let me know.
Anyways, getting back to the tent burn quest. To do this quest you will need to have a script like the following:
Code: Select all
function cast(Caster, Target)
BurnSpawn = GetSpawn(Target, 2530187) --get the invisible cube to burn
SpawnSet(BurnSpawn, "visual_state", "6866") -- set the visual state of the cube to bonfire
SpawnSet(Target, "show_command_icon", "0") --dont allow anyone else to click on tent again
AddTimer(Target, 5000, "stop_burning") -- after 5 seconds call spawn script function to stop burning the cube
AddTimer(Target, 60000, "enable_command_icon") --after 60 seconds call spawn script function to enable the command icon for people who have the quest
endCode: Select all
function spawn(NPC)
SetRequiredQuest(NPC, [QUEST ID HERE], [QUEST STEP HERE (optional)]) --only allow people with the quest to click on it
end
function stop_burning(NPC, Player)
BurnSpawn = GetSpawn(Target, 2530187) -- get invisible cube object
SpawnSet(BurnSpawn, "visual_state", "0") --put out fire :)
end
function enable_command_icon(NPC, Player)
SpawnSet(NPC, "show_command_icon", "1") --allow anyone with the quest to click on the tent (called from spell with a timer)
end
Last edited by LethalEncounter on Sun Dec 07, 2008 7:39 pm, edited 1 time in total.
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Sorry LE, I couldn't get back to the website for hours :/ and when I did, my session was ganked. So I lost all new messages, just found this heh. Something is seriously jacked with your host... anyway.
If you create an evil toon, it's one of the first 3 quests from the trainer I believe. If I have time, I'll try and get the quest and FRAPS the actual ignition =)
When the tent burns, it basically catches fire, and all NPCs (and possibly objects) in the area light fire and die immediately too. All the NPCs stationed in and around the tent - so it must be a certain radius. I believe after a minute, the fire subsides, but I don't remember.LethalEncounter wrote:What does it look like when the tent catches fire. When you finish casting the spell the server actually changes the visual state of an invisible cube that is sitting on top of the tent. I'm not sure why they don't just change the state directly, but it might look better with the invisible cubes. So the only LUA function I am going to have to make to get this to work is a SetVisualState(Spawn, value) function, although I might as well make one for each of the states while I'm at it. Once this is completed all your script with need is:
BurnSpawn = GetSpawn(Spawn, [Spawn ID of invisible cube here])
SetVisualState(BurnSpawn, 6866)
If you create an evil toon, it's one of the first 3 quests from the trainer I believe. If I have time, I'll try and get the quest and FRAPS the actual ignition =)
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Yes, this is good for now. Having the SetVisualState() option is awesome for many other reasons as well. We need to be able to get NPCs to wander a certain ways, and do some action (visual state) then return to their state and continue on their way (Paula Marx for example).LethalEncounter wrote:Would the ability to allow the object to be clicked based on if the player had the quest be good enough for now?
Nice work, and thanks for taking the time today. These are all huge steps towards finishing a single zone. We're so close!
Who is online
Users browsing this forum: No registered users and 0 guests