Code: Select all
function Main()
Player = Actor()
PlayerName = Name(Player)
Target = ContextActor()
TargetName = Name(Target)
.Template
Persistent(1)
QuestName = "my quest name"
QuestResults = QuestStatus(Player, QuestName)
QuestReturn = "Return to " $+ TargetName $+ " to complete this quest."
// Objective Variables for Quest completion
WaitSpeakName = "the npcs name to speak to seeing that this is a speak quest"
WaitSpeakID = FindActor(WaitSpeakName, 2)
// Variables for Rewards
RewardMoney = 0
RewardXp = 0
RewardItem = "item-name to give to player once quest is completed"
RewardItemQuantity = 1
RewardFaction = "faction name"
RewardFactionValue = 0
QuestStatusText = "this is the detail i will say about the new quest for others such as the in" $+ CHR(45) $+ "game players to read"
D = OpenDialog(Player, Target, TargetName)
// Player Greeting to NPC:
DialogOutput(Player, D, "Hail " $+ TargetName $+ "", 255, 255, 255)
DoEvents (1000)
// NPC Greeting to Player:
DialogOutput(Player, D, "Hail " $+ PlayerName $+ "", 255, 255, 255)
DoEvents (1000)
If (QuestResults $= "")
// The quest needs to be started
.start
DialogOutput(Player, D, "this is where they will ask if you accept my quest or decline my quest", 255, 255, 255)
Result = DialogInput(Player, D, "Accept Quest", "Refuse Quest")
If (Result == 1)
// Create the new quest
NewQuest(Player, QuestName, QuestStatusText, 255, 255, 255)
QuestTemp = QuestName $+ ": " $+ QuestStatusText
Output(Player, QuestTemp, 255, 255, 255)
CloseDialog(Player, D)
.wait
// Wait to speak to NPC
WaitSpeak(Player, WaitSpeakID)
D = OpenDialog(Player, WaitSpeakID, WaitSpeakName)
Goto(Rewards)
Else
CloseDialog(Player, D)
EndIf
ElseIf (QuestResults $= QuestReturn)
// The quest has been almost completed, assign rewards
.Rewards
DialogOutput(Player, D, "You have completed " $+ QuestName $+ "" $+ CHR(44) $+ " great job !", 255, 255, 255)
DialogResult = DialogInput(Player, D, "Goodbye")
CompleteQuest(Player, QuestName)
// Item reward for Step/Quest
GiveItem(Player, RewardItem, RewardItemQuantity)
// XP reward for Step/Quest
GiveXp(Player, RewardXp)
// Money reward for Step/Quest
ChangeGold(Player, RewardMoney)
// Faction change
ChangeFactionRating(Player, RewardFaction, RewardFactionValue)
Output(Player, "You take " $+ RewardItemQuantity $+ " " $+ RewardItem $+ " and " $+ RewardMoney $+ "gp and " $+ RewardXp $+ "xp you have earnt it!")
CloseDialog(Player, D)
ElseIf (QuestComplete(Player, QuestName) == 1)
// The quest has been completed
.Completed
DialogOutput(Player, D, "Thanks for helping me out with " $+ QuestName $+ "" $+ CHR(44) $+ " I have no other quests for you at this time ... good day !", 255, 255, 255)
DoEvents (1000)
CloseDialog(Player, D)
Else
// The quest has been started but not completed
.Incomplete
DialogOutput(Player, D, "You have not yet completed the " $+ QuestName $+ " quest for me!", 255, 255, 255)
DialogOutput(Player, D, "You will need to begin your last task again" $+ CHR(44) $+ " " $+ QuestStatusText, 255, 255, 255)
DialogResult = DialogInput(Player, D, "Goodbye")
CloseDialog(Player, D)
GoTo(wait)
EndIf
Return()
End Function
now you see how ezy all of that stuff looks i mean a 5 minute person that says hey i want to be a game programer could understand that.
but the whole purpose of this topic is is that is this engine really worth it?
i found this engine and will be installing it in the next couple of days after doing some research on it.
But is the terrain editor good can we implement our own Terrain editor withing the program. The servers are they good will they produce alot of lag i will be having my server hosted on a dedicated server.
also if you have any other qustions out there that will help me understand the full potential of this engine plz tell me