first spawn script
Posted: Wed Mar 13, 2019 12:06 am
Yesterday I created my first spawn script and the corrsponding quest.
Here it is:
The script is not loaded but also shows no obvious debug errors. Where is the fault ? Do I have to change any other undocumented errors in the database ?
Here it is:
Code: Select all
--[[
Script Name : SpawnScripts/Antonica/FarmerWalcott.lua
Script Purpose : Farmer Walcott
Script Author : geordie0511
Script Date : 2019.03.12
Script Notes : Auto-Generated Conversation from PacketParser Data
--]]
local ThereMite = 458
function spawn(NPC)
ProvidesQuest(NPC, ThereMite)
end
function respawn(NPC)
spawn(NPC)
end
function InRange(NPC, Spawn)
end
function LeaveRange(NPC, Spawn)
end
function hailed(NPC, Spawn)
FaceTarget(NPC, Spawn)
conversation = CreateConversation()
PlayFlavor(NPC, "voiceover/english/farmer_walcott/antonica/farmerwalcott000.mp3", "", "", 1905672247, 2052203858, Spawn)
AddConversationOption(conversation, "Sounds like you need a beetle charmer. ", "dlg_1_1")
AddConversationOption(conversation, "I found this map on a gnoll. ")
AddConversationOption(conversation, "I am sorry I cannot help you. Farewell.")
StartConversation(conversation, NPC, Spawn, "Oh! My poor crops! What will I do with all these ravenous beetles scurrying about?")
end
function dlg_1_1(NPC, Spawn)
FaceTarget(NPC, Spawn)
conversation = CreateConversation()
PlayFlavor(NPC, "voiceover/english/farmer_walcott/antonica/farmerwalcott001.mp3", "", "", 2875116766, 2106137000, Spawn)
AddConversationOption(conversation, "Then today is your lucky day. Here I am! ", "dlg_1_2")
AddConversationOption(conversation, "If I see any I will send them your way. Farewell.")
StartConversation(conversation, NPC, Spawn, "A beetle charmer would be grand -- if there were such a thing. I would be satisfied just hiring an adventurer to stomp a bunch of the beetles. Oh my poor barley!")
end
function dlg_1_2(NPC, Spawn)
FaceTarget(NPC, Spawn)
conversation = CreateConversation()
PlayFlavor(NPC, "voiceover/english/farmer_walcott/antonica/farmerwalcott002.mp3", "", "", 1854564329, 3891746852, Spawn)
AddConversationOption(conversation, "I will end your mite problems.", "Quest1")
StartConversation(conversation, NPC, Spawn, "Thank the lost gods! I know you can't exterminate all these pests, but please do your best. I'll reward you with what I can. Don't worry, little barley ... help is on the way.")
end
function Quest1(NPC, Spawn)
OfferQuest(NPC, Spawn, ThereMite)
end