Thread: Vanguard Emu
View Single Post
  #37  
Old 11-04-2014, 06:21 PM
xinu
Sarnak
 
Join Date: Jan 2008
Posts: 67
Default

Thanks to Volt's hard work, we have some basic NPC Dialogs working -- so well in fact, my cheeks hurt from smiling at being able to write a LUA script and click the options Bravo, Volt!

Everyone should come to Isle of Dawn on New Telon, and speak to Tan Fen Greatcloud. He has an interesting story to tell you!




and the code to go along with it.

Code:
function spawn()
end

function opening_dialog(NPC, PC)
   OpeningDialog = GetDialog(NPC, PC)
   SetDialogGreeting(OpeningDialog, "Tan Fen Greatcloud says, \"Ahh! Thank you so much for answering our call for aid. I am Tan Fen Greatcloud, and I humbly welcome you to the Isle of Dawn.\"")
   AddDialogOption(OpeningDialog, "Can you tell me about the VGOEmulator Project?", "VGOAbout")
   AddDialogOption(OpeningDialog, "No, I am busy.", "DialogPCDeclined")
   CommitDialog(OpeningDialog, PC)
end

function VGOAbout(NPC, PC)
   CustomDialog = GetDialog(NPC, PC)
   SetDialogGreeting(CustomDialog, "Tan Fen Greatcloud tells you, \"There has been no greater adventure known in all the world than trying to reconstruct a world from our fleeting memories! Those involved in this project are true heroes, indeed.\"")
   AddDialogOption(CustomDialog, "Who are these heroes?", "VGOHeroes")
   CommitDialog(CustomDialog, PC)
end

function VGOHeroes(NPC, PC)
   CustomDialog = GetDialog(NPC, PC)
   SetDialogGreeting(CustomDialog, "Tan Fen Greatcloud smiles and says, \"You have not heard of the great and powerful Volt? Who has brought you these amazing dialogs so you can speak with me? Surely you have.\"")
   AddDialogOption(CustomDialog, "What about the others? They must have done something too!", "VGOOthers")
   CommitDialog(CustomDialog, PC)
end

function VGOOthers(NPC, PC)
   CustomDialog = GetDialog(NPC, PC)
   SetDialogGreeting(CustomDialog, "Tan Fen Greatcloud exclaims, \"Of course! John, Xinux and Scatman brought the world into being. Xen unraveled the mysteries of my very existence. Ratief determined your titles and whether or not I even like you with Factions! Not to mention those seekers of data who risked their very lives to bring you the world you see before you.\"")
   AddDialogOption(CustomDialog, "Tell me about the Data Collectors!", "VGOCollectors")
   AddDialogOption(CustomDialog, "Okay, I am bored now. Bye.", "DialogPCDeclined")
   CommitDialog(CustomDialog, PC)
end

function VGOCollectors(NPC, PC)
   CustomDialog = GetDialog(NPC, PC)
   SetDialogGreeting(CustomDialog, "Tan Fen Greatcloud holds his head in reverence, \"Ah, the Collectors! They were sent out into the world to discover all of Telon's secrets and return them to John, who used their discoveries to resurrect the world you know as New Telon!\"")
   AddDialogOption(CustomDialog, "Tell me about VGOEmulator again!", "VGOAbout")
   AddDialogOption(CustomDialog, "Tell me about those Heroes again!", "VGOHeroes")
   AddDialogOption(CustomDialog, "Tell me about those Others again!", "VGOOthers")
   AddDialogOption(CustomDialog, "Okay, I am bored now. Bye.", "DialogPCDeclined")
   CommitDialog(CustomDialog, PC)
end

function DialogPCDeclined(NPC, PC)
   CustomDialog = GetDialog(NPC, PC)
   SetDialogGreeting(CustomDialog, "Tan Fen Greatcloud tells you, \"I'll be right here when you wish to speak again. Farewell.\"")
   CommitDialog(CustomDialog, PC)
end

function DialogNPCDeclined(NPC, PC)
   NpcSay(PC, "Tan Fen Greatcloud says, \"Come back when you have gained more experience.\"")
   CloseDialogWindow(PC)
end

And while we are posting progress, here is some more!

It needs a little more work and then I have to clean out some stuff that doesn't belong in the starting abilities, implement the subclasses.

__________________
Xinux
VGSOH Dev
EQ2 Dev
Still alive and looking for more Developers

EverQuest 2 Emulator
Vanguard SoH Emulator
Reply With Quote