All pastes #590825 Raw Edit

Mine

public text v1 · immutable
#590825 ·published 2007-06-26 20:08 UTC
rendered paste body
objectdef oQuest inherits oBase 

	variable string ConfigDir = "${Script.CurrentDirectory}/Quest/"
	variable string ConfigFile = "Quest.xml"
	{
		set States
		{
			Idle
			FindQuest
			InQuest
			CompletedQuest
			TurninQuest
		}
		
		Idle
		{
			/* find something to do */
		}
		
		FindQuest
		{
			/* find a Quest */
		}
		
		InQuest
		{
			/* go do the selected Quest */
		}
		
		CompletedQuest
		{
			/* did we finish the Quest? if so move on to turning it in! */
		}
		
		TurninQuest
		{
			/* where should we go to turn it in? */
		}
		
		
		
		
		set NPCStates
		{
			NPCHasQuest
			NPCHascompletedQuest
		}
		
		NPCHasQuest
		{
			GetQuest
		}
		
		NPCHasCompletedQuest
		{
			if NPCHasRewards
			{
				select reward by class?
				{
					equip reward - mark old to be sold/de'd
				}
			}
			then
			{
				TurnInQuest
			}
			else
			{
				TurnInQuest
			}
		}

		
		
		
		other NPC stuff
		{
			NPCHasDialog
			NPCHasRewards
		}
		
		NPCHasDialog
		{
			WoWScript SelectGossipOption(1-w/e)    /* just for my sake of remembering */
		}
		
		NPCHasRewards
		{
			/* check if the NPC has some goodies for us */
		}
		
		
		PickQuestToDo
		{
			/* check my config file to find what Quests we have or can pick up (based on level, also include Quest #'s to fix any confusion with Quest names) */
			{
			/* if i have a Quest then lets pick one at random and do it! */
				{
					/* go to where i need to go to do these Quests (call DoQuest) */
						{
							/* check Quest State */
						}
				}
			}
			else
			{
			This:Output["Noob! You have no Quests to do! Go find some!"]
		}
		
		DoQuest
		{
			/* pick the right QuestSet (same as locationset?) and move there */
			{
			if killmobs or findobjects = true
			}
			then
			{
				member QuestSet
				{
					/* pick the right QuestSet from the config file! */
				}
				
				member ClickGo
				{
					/* lets get moving already damnit! */
				}
			}
			else
			{
				GoToNPC
			}
		}
	}
				
/* extra stuff */

/* check the objective of the Quest (do we kill mobs? or find objects? or just go to another NPC?) */
				
		member KillMobs
		{
			if QuesTobjective = kill x of typeofmobs = true
		
			then set killmobs true
		
			else set false
		}
					
		member FindObjects
		{
			if QuesTobjective = find x of typeofobject = true
			
			then set finDobjects true
			
			else set false
		}	
		
		member GoToNPC
		{
			if QuestObjective = go to specified NPC
			
			then set GoToNPC true and call completedQuest
			
			else set false
		}
		
		
/* check if the NPC Has Rewards or dialog and let it be used globally */

		NPCHasdialog
		{
			WoWScript SelectGossipOption(1-w/e)    /* just for my sake of remembering */
		}
		
		NPCHasRewards
		{
			select reward by class?
			{
				equip reward - mark old to be sold/de'd
			}
		}
		
		
	method Social
	{
		Unit[-nearest 1, -quest]:Use
	}
		

/* general GUI shit and ways of making it collect data for the Quest */

fill this in later

basically breaks down to;

pickupQuest and log info (Quest#)
was the Quest from an item?
Questlocation
NPClocation
mappedareaforQuest
Questfinish
save to a config file in /Quest/Quest.xml

if Questing is turned off, then lets quit this fucker and go back to grinding mindlessly like a silly boob!