Posted: Mon Aug 04, 2008 4:30 pm
Ah hah, that's why it didn't work for me then. I inserted KillCrabs.lua, and the autoincrement put it as a 2.
oops.
http://oldforums.eq2classic.com/
Code: Select all
function spawn(NPC)
ProvidesQuest(NPC, 1)
end
function hailed(NPC, Spawn)
FaceTarget(NPC, Spawn)
conversation = CreateConversation()
if HasQuest(Spawn, 1) then
if QuestIsComplete(Spawn, 1) then
AddConversationOption(conversation, "Yup. Got my money, or am I gonna have to get physical with you?", "QuestComplete")
StartConversation(conversation, NPC, Spawn, "Hello again " .. GetName(Spawn) .. ". Did you kill all the crabs as I requested?")
else
AddConversationOption(conversation, "No problem")
StartConversation(conversation, NPC, Spawn, "Hello again " .. GetName(Spawn) .. ". Thank you for accepting my task.")
end
else
if HasCompletedQuest(Spawn, 1) then
AddConversationOption(conversation, "Anytime")
StartConversation(conversation, NPC, Spawn, "Hello again " .. GetName(Spawn) .. ". Thank you for killing those crabs.")
else
AddConversationOption(conversation, "Why can't you kill them?", "KillThemYourself")
AddConversationOption(conversation, "Why should I help you?", "WhyHelpYou")
StartConversation(conversation, NPC, Spawn, "Greetings " .. GetName(Spawn) .. "! Thank you for coming. Could you please kill some of the crabs on the shore for me? I haven't liked them ever since I was pinched as a child.")
end
end
end
function KillThemYourself(NPC, Spawn)
conversation = CreateConversation()
AddConversationOption(conversation, "A dragon? Right.... Anyways, I want a good pair of leggings for this favor.", "GiveMeQuest")
AddConversationOption(conversation, "I'll need 12 bottles of Rum, 3 pints of Ale, and 12 gold pieces. I'm not risking my life for nothing!", "TooGreedy")
StartConversation(conversation, NPC, Spawn, "I could kill them myself, but my sword was recently damaged while I was battling a dragon.")
end
function TooGreedy(NPC, Spawn)
conversation = CreateConversation()
AddConversationOption(conversation, "Have Fun.")
StartConversation(conversation, NPC, Spawn, "Forget it, you are too greedy. I'll get another adventurer to do it for me.")
Emote(NPC, " makes a rude gesture at you.", Spawn)
end
function GiveMeQuest(NPC, Spawn)
OfferQuest(NPC, Spawn, 1)
conversation = CreateConversation()
AddConversationOption(conversation, "Bye")
StartConversation(conversation, NPC, Spawn, "Well you drive a hard bargain, but very well. I agree to your terms.")
end
function WhyHelpYou(NPC, Spawn)
conversation = CreateConversation()
AddConversationOption(conversation, "Give me some coins and some of those leggings the merchant is selling.", "GiveMeQuest")
AddConversationOption(conversation, "Hmm, how much do you have? I don't know if you have enough to pay me what I want...", "TooGreedy")
StartConversation(conversation, NPC, Spawn, "I will pay you if you are that greedy...")
end
function QuestComplete(NPC, Spawn)
conversation = CreateConversation()
AddConversationOption(conversation, "I'll let it go... THIS TIME.")
StartConversation(conversation, NPC, Spawn, "I have it right here, please don't hurt me.")
Quest = GetQuest(Spawn, 1)
if Quest ~= nil then
GiveQuestReward(Quest, Spawn)
end
endCode: Select all
--[[
This is the EQ2Emu example LUA Quest.
These functions are shared, so don't save any character data in them.
If you have any questions be sure to read the Quest Functions.txt in the Quests directory or the wiki site location on the eq2emulator.net website.
--]]
function Init(Quest)
RegisterQuest(Quest, "Kill Crabs", "Hallmark", "Queen's Colony", 1, "Murrar Shar is deathly afraid of crabs and wants you to kill some of them for him.")
AddQuestRewardItem(Quest, 1001)
AddQuestRewardCoin(Quest, 78)
SetQuestRewardExp(Quest, 200)
SetQuestPrereqLevel(Quest, 1)
AddQuestStepKill(Quest, 1, "Kill 5 of the crabs on the nearby shore", 5, "Kill Crabs for Murrar Shar", 28, 546, 568, 569)
AddQuestStepCompleteAction(Quest, 1, "KilledAllCrabs")
SetCompletedDescription(Quest, "This is the description that is displayed when the quest is completed and shown in the completed quest list.")
QuestReturnNPC(Quest, 547)
end
function Accepted(Quest, QuestGiver, Player)
if QuestGiver ~= nil then
if GetDistance(Player, QuestGiver) < 30 then
FaceTarget(QuestGiver, Player)
Say(QuestGiver, "Thank you for accepting this task " .. GetName(Player) .. ". Please return to me when you have completed it.")
Emote(QuestGiver, " thanks you warmly.", Player)
end
end
end
function Declined(Quest, QuestGiver, Player)
if QuestGiver ~= nil then
if GetDistance(Player, QuestGiver) < 30 then
FaceTarget(QuestGiver, Player)
Say(QuestGiver, "If you change your mind " .. GetName(Player) .. ", you know where to find me.")
Emote(QuestGiver, " glares at you.", Player)
end
end
end
function KilledAllCrabs(Quest, QuestGiver, Player)
UpdateQuestStepDescription(Quest, 1, "I killed the crabs as Murrar requested.")
UpdateQuestDescription(Quest, "I killed some of the crabs on the beach. Return to Murrar Shar for your reward.")
end
Yes, use Quests/KillCrabs.lua.John Adams wrote: Is my slash wrong? hehe.
Make sure that your console window displays:John Adams wrote:That didn't work either... tried it right after, and resolved to just stop asking about it and maybe like magic it will just start working for me.
I am about 2 mins from giving you an RDP connection to my server (LOL)
I'll get this stuff added the next time I update quests.Jabantiz wrote:I might be missing something here so if I am I apologize.
While scripting a few quests on the island I noticed the task group text changes on live and I can't figure out how to script that, I saw an update for the step description as well as the quest description. Is there no way to update the task group text as of now?
This may be getting ahead of myself right now but some quests are given by walking over a certain location, and others have client side spawns only where only the person on the right step can see the spawns. Is this stuff supported yet or should I ignore those quests for now?
And how about book quests, or other quests spawned from drops within a zone? I hope you guys didn't forget about those =DJabantiz wrote: This may be getting ahead of myself right now but some quests are given by walking over a certain location, and others have client side spawns only where only the person on the right step can see the spawns. Is this stuff supported yet or should I ignore those quests for now?
Those are not my crabs!AddQuestStepKill(Quest, 1, "Kill 1 of the crabs on the nearby shore", 1, "Kill Crabs for Murrar Shar", 28, 546, 568, 569)