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
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Hehe, seems I'm a little bi-polar.
Ok once Tess is updated I'll test it out. I've got another question for ya though.
Do we have a LUA function to check if a specific quest step is completed? In a lot of cases I can use GetQuestStep(spawn, step_id) to see what step I'm on but for this quest I have 3 steps under one grouptasktext so 3 steps are showing at once and I can do them in any order. I have to basically insult each NPC and so there is no specific order I have to talk to them. Well if I talk to the 3rd NPC and complete the 3rd step first, then GetQuestStep would return 1, because it returns the first queststep not completed yet. So I'd only want that 3rd NPC to react to my insult once. Let me know if you need more clarification. I looked for a function in LuaFunctions.cpp but I didn't see one.
Do we have a LUA function to check if a specific quest step is completed? In a lot of cases I can use GetQuestStep(spawn, step_id) to see what step I'm on but for this quest I have 3 steps under one grouptasktext so 3 steps are showing at once and I can do them in any order. I have to basically insult each NPC and so there is no specific order I have to talk to them. Well if I talk to the 3rd NPC and complete the 3rd step first, then GetQuestStep would return 1, because it returns the first queststep not completed yet. So I'd only want that 3rd NPC to react to my insult once. Let me know if you need more clarification. I looked for a function in LuaFunctions.cpp but I didn't see one.
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
OK, my changes are checked in. I added the following LUA commands:
AddQuestPrereqRace(Quest, race id)
AddQuestPrereqClass(Quest, class id)
AddQuestPrereqTradeskillLevel (not used yet)
AddQuestPrereqTradeskillClass (not used yet)
AddQuestSelectableRewardItem(Quest, item id, quantity)
Quests should now allow you to choose an item when you complete it if you use the AddQuestSelectableRewardItem function. You can mix and match with AddQuestRewardItem if you want. Note that you can call the AddQuestPrereqRace and AddQuestPrereqClass more than once with multiple race/classes. If the player is any of the races in the prereq races then the quest is shown (assuming it passes all other prereqs). The same for classes.
Oh and btw, the server should prevent you from having any items in your overflow slot by checking the items in a quest reward before you accept them.
AddQuestPrereqRace(Quest, race id)
AddQuestPrereqClass(Quest, class id)
AddQuestPrereqTradeskillLevel (not used yet)
AddQuestPrereqTradeskillClass (not used yet)
AddQuestSelectableRewardItem(Quest, item id, quantity)
Quests should now allow you to choose an item when you complete it if you use the AddQuestSelectableRewardItem function. You can mix and match with AddQuestRewardItem if you want. Note that you can call the AddQuestPrereqRace and AddQuestPrereqClass more than once with multiple race/classes. If the player is any of the races in the prereq races then the quest is shown (assuming it passes all other prereqs). The same for classes.
Oh and btw, the server should prevent you from having any items in your overflow slot by checking the items in a quest reward before you accept them.
- 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
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Scatman, we got a LUA to cover this? haha.
Interesting quest, the High Elf mentor. The planter by the merchants spawns a couple of mobs that I also took video of. I'm sure it's not hard to code, but I hadn't seen a quest do what this one did (planting something that appears magically - then stays?)
Interesting quest, the High Elf mentor. The planter by the merchants spawns a couple of mobs that I also took video of. I'm sure it's not hard to code, but I hadn't seen a quest do what this one did (planting something that appears magically - then stays?)
You do not have the required permissions to view the files attached to this post.
Who is online
Users browsing this forum: No registered users and 0 guests