| Mirage Source http://miragesource.net/forums/ |
|
| Quest help http://miragesource.net/forums/viewtopic.php?f=201&t=1789 |
Page 1 of 2 |
| Author: | DarkX [ Wed May 09, 2007 6:15 pm ] |
| Post subject: | Quest help |
Ok I found this tutorial for programming a quest system on a MS based forum, can't remember the name and it went out of buisness so anyway. This is server side. Code: ' ::::::::::::::::::::::::::::::: ' :: Request a quest packet :: ' ::::::::::::::::::::::::::::::: If Left(LCase(Parse(0)), 12) = "requestquest" Then If Player(index).Char(Player(index).CharNum).CurrentQuest > 0 Then Select Case Player(index).Char(Player(index).CharNum).QuestStatus Case Is = 1 Call SendDataTo(index, "questmsg" & SEP_CHAR & procQuestMsg(index, Quests(Player(index).Char(Player(index).CharNum).CurrentQuest).StartQuestMsg) & END_CHAR) Case Is = 2 Debug.Print Quests(Player(index).Char(Player(index).CharNum).CurrentQuest).GetItemQuestMsg Call SendDataTo(index, "questmsg" & SEP_CHAR & procQuestMsg(index, Quests(Player(index).Char(Player(index).CharNum).CurrentQuest).GetItemQuestMsg) & END_CHAR) Case Is = 3 Call SendDataTo(index, "questmsg" & SEP_CHAR & procQuestMsg(index, Quests(Player(index).Char(Player(index).CharNum).CurrentQuest).FinishQuestMessage) & END_CHAR) Case Else Call PlayerMsg(index, "You have no quest", White) End Select Else Call SendDataTo(index, "questmsg" & SEP_CHAR & "You currently have no quest" & END_CHAR) End If End If It highlights the Quests of Code: (index, Quests(Player(index).Char(Player this part and says sub or function not defined, no matter what I do, including creating another quest sub with all the needed info in it; any idea's?
|
|
| Author: | Ramsey [ Wed May 09, 2007 8:11 pm ] |
| Post subject: | |
Did you make a QuestRec? Is procQuestMsg defined? Like, is there a Sub procQuestMsg or Function procQuestMsg? |
|
| Author: | Boo [ Wed May 09, 2007 11:15 pm ] |
| Post subject: | |
Ya I think your missing the QuestRec. |
|
| Author: | DarkX [ Thu May 10, 2007 2:35 am ] |
| Post subject: | |
Nah I have it on both sides, I figured out what the error was. Code: Public Quests(1 To MAX_QUESTS) As QuestRec This was what was wrong, I typed in Code: public Quest(1 to MAX_QUEST) as QuestRec on the server side.
|
|
| Author: | Boo [ Thu May 10, 2007 2:35 am ] |
| Post subject: | |
Alright cool |
|
| Author: | Ramsey [ Thu May 10, 2007 2:45 am ] |
| Post subject: | |
It's always the small problems that are hard to find. |
|
| Author: | Boo [ Thu May 10, 2007 3:18 am ] |
| Post subject: | |
Ya like 1 small letter can ruin all. I always think that the reason its not super fast is because of a mis-spell :p. Like if 1 letter was missing and you added it, it would be like a super mirage and run super fast xD. |
|
| Author: | DarkX [ Thu May 10, 2007 2:29 pm ] |
| Post subject: | |
Yeah missspelling screwed up my Vis inv several times, and the npc, and the PickP system(though that's still not working correctly.) It's really annoying, the tut doesn't explain any way to use the npc's to give the quests so I'm in the middle of figuring that out. |
|
| Author: | DarkX [ Mon May 14, 2007 5:17 pm ] |
| Post subject: | |
Sorry about double posting but I have another issue Code: ' Make sure they are on the same map it highlights if Chkquest.value and says variable not defined and I've tried about everything I know and still no luck any clues?
If IsPlaying(Attacker) Then If NpcNum > 0 And GetTickCount > Player(Attacker).AttackTimer + 950 Then ' Check if at same coordinates Select Case GetPlayerDir(Attacker) Case DIR_UP If (MapNpc(MapNum, MapNpcNum).y + 1 = GetPlayerY(Attacker)) And (MapNpc(MapNum, MapNpcNum).x = GetPlayerX(Attacker)) Then If Npc(NpcNum).Behavior <> NPC_BEHAVIOR_FRIENDLY And Npc(NpcNum).Behavior <> NPC_BEHAVIOR_SHOPKEEPER Then CanAttackNpc = True Else If chkQuest.Value = True Then Call SetCurrentQuest Call StartQuestMsg Else Call PlayerMsg(Attacker, Trim(Npc(NpcNum).Name) & " says: '" & Trim(Npc(NpcNum).AttackSay) & "'", BrightBlue) End If End If End If |
|
| Author: | Ramsey [ Mon May 14, 2007 7:49 pm ] |
| Post subject: | |
Where is this code located? If in a mod you have to state the form. Code: frmBlah.Chkquest.Value If it it's in the form... you never made the Chkquest. And isn't it supposed to be Code: Chkquest.checked
or something like that? |
|
| Author: | DarkX [ Thu May 24, 2007 5:02 pm ] |
| Post subject: | |
The check box is on the npcform and I think I set a quest code on the npcform; but all the quest codes like start finish and checkquestprogression are all in modQuests. So make 'em all like Code: If frmNpcEditor.chkQuest.Checked = True Then
Call SetCurrentQuest Call StartQuestMsg Is that what your talking about? |
|
| Author: | Ramsey [ Thu May 24, 2007 7:32 pm ] |
| Post subject: | |
Yes. |
|
| Author: | genusis [ Sat Jun 09, 2007 10:11 pm ] |
| Post subject: | Re: Quest help |
there is a tutorial for making a quest editor an stuff on elysium it works once you fix the errors. |
|
| Author: | Matt [ Sat Jun 09, 2007 10:16 pm ] |
| Post subject: | Re: Quest help |
Necro posting. xD Anything at ES is useless. |
|
| Author: | DarkX [ Tue Jul 10, 2007 4:23 am ] |
| Post subject: | Re: Quest help |
I still can't get this stupid thing to let players aquire a quest from a npc, I am actually getting very annoyed with it. |
|
| Author: | Kousaten [ Mon Aug 13, 2007 3:19 am ] |
| Post subject: | Re: Quest help |
Necro-post again, but if you haven't fixed it by now there's always the option of hard-coding in the quests. Takes a lot work and isn't as efficient, but at least it gets the job done. |
|
| Page 1 of 2 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|