crzyone9584 Posted October 6, 2010 Author Share Posted October 6, 2010 I've been looking at a few quest scripts and source edits to see how they manage to count how many mobs you have killed. They are all through the OnNPCDeath sub. That would require me to add a new If statement every-time I have a new quest and that means server downtime to update the server. Is there any other way of checking and inserting mob kills in [EO]? Link to comment Share on other sites More sharing options...
Robin Posted October 6, 2010 Share Posted October 6, 2010 For Origins I'd personally create a centralised quest flag system and universal handler for the same quest types.I'd have a loop to go through all the quests in the PlayerAttackNpc procedure (the bit where they're killed) and have it change the quest flag accordingly if the quest is the type where you need an npc kill count. Link to comment Share on other sites More sharing options...
crzyone9584 Posted October 7, 2010 Author Share Posted October 7, 2010 With that method should I make an ini file? I was adding the info to the npc. How I'm understanding it I'd have it loop through all the files for the players that are in the quest folder, see if the quest status is set to 1 for active then update the the number of npc killed from that loop? Did i understand you correctly robin? Link to comment Share on other sites More sharing options...
Robin Posted October 7, 2010 Share Posted October 7, 2010 Stop using ini files. That's the kind of shit you do for Stable and EE.Store the data in the player UDT like you're supposed to. Link to comment Share on other sites More sharing options...
crzyone9584 Posted October 7, 2010 Author Share Posted October 7, 2010 Sorry, I'm still trying to learn [EO]. Is the UDT the player file? I know I'm smart enough for this but only way to learn is to ask. Link to comment Share on other sites More sharing options...
Robin Posted October 7, 2010 Share Posted October 7, 2010 UDT is user defined type. It's the PlayerRec. Link to comment Share on other sites More sharing options...
crzyone9584 Posted October 7, 2010 Author Share Posted October 7, 2010 Ah ok, I'm able to store things in the PlayerRec. If i stored it there wouldn't it limit it to 1 quest at a time? Or is there a way to hold details on multiple types of quests using just something defined like this under the player rec?```QuestNum as Long ' number of the questQuestName as String ' name of the questKillNPCNum as Long ' number of npc you need to killNpcKills as Long ' how many times you need to kill it```Again thanks for the help. Link to comment Share on other sites More sharing options...
Robin Posted October 7, 2010 Share Posted October 7, 2010 Store the in a new UDT and create an array in the player UDT. Link to comment Share on other sites More sharing options...
crzyone9584 Posted October 7, 2010 Author Share Posted October 7, 2010 Okay so here is the Quest UDTSo far here is what I've added. I hope its correct so far.In modConstants I've added this under the comment general constants```Public Const MAX_QUEST As Byte = 100```At the top of modTypes I've added```Public Quest(1 To MAX_QUESTS) As QuestRec```Here is the QuestRec code```Private Type QuestRec  QuestNPCnum As Long ' number of npc code will check to see if they have a quest attached to them  PlayerLevel As Byte ' required level the player has to be for them to be able to accept the quest  QuestName As String ' quest name  TalkToNPCNum As Long ' How many NPCs a user must talk to  FinishMsg As String * 250 'last message the npc will say after you complete the quest  RewardExp As Long ' how much exp a player will get after completion  QuestStartSay As String * 250 ' what the starting npc will say to start the quest  RecItem1 As Long ' 1st required item  RecItem1Amt As Long ' how many you need of the 1st item  RecItem2 As Long ' 2nd required item  RecItem2Amt As Long 'how many you need of the 2nd item  RecItem3 As Long ' 3rd required item  RecItem3Amt As Long ' how many you need of the 3rd item  TalkNpc1 As Long ' number of npc you need to talk to  TalkNpc1Say As String * 250 ' what they will say  TalkNpc2 As Long ' number of the 2nd npc you need to talk to  TalkNpc2Say As String * 250 ' what 2nd npc will say  TalkNpc3 As Long ' number of the 3rd npc you need to talk to  TalkNpcSay3 As String * 250 ' what the 3rd npc will say  SlayNpc1 As Long ' number of the 1st monster you want them to slay  SlayNpc1Amt As Long ' how many of the 1st monster you want them to slay  SlayNpc2 As Long ' number of the 2nd monster you want them to slay  SlayNpc2Amt As Long ' how many of the 2nd monster you want them to slay  SlayNpc3 As Long ' number of npc of the 3rd monster you want them to slay  SlayNpc3Amt As Long ' how many of the 3rd monster you want them to slay  Reward1 As Long ' what the user gets after quest is completed.  RewardAmt As Long ' how many of that item  Reward2 As Long 'what the user gets after quest is completed.  Reward2Amt As Long ' how many of that item  Reward3 As Long 'what the user gets after quest is completed.  Reward3Amt As Long ' how many of that itemEnd Type```I'm hoping I'm doing this correctly. I'm still working on the array to add to the users UDT. Reading up on arrays. They don't seem to be that hard. Link to comment Share on other sites More sharing options...
DshWinchester Posted October 7, 2010 Share Posted October 7, 2010 ohhplayerRecI never tought that and even know wtf is UDTgood luck crazyone :icon_music:–-------~~dont work here ;DI set Up NpcToKill to 20 and playermsgthe msg show 20after that the NpcToKill comeback to 0I need send to the client and comeback x_x~~work nowyou will need add the new thing on PlayerData >.> Link to comment Share on other sites More sharing options...
crzyone9584 Posted October 8, 2010 Author Share Posted October 8, 2010 What are you talking about? All i wanted to know if i set it up correctly for the quest file. Link to comment Share on other sites More sharing options...
ÃËœÂÃËœÂØ Posted October 8, 2010 Share Posted October 8, 2010 Is that already in EO? Link to comment Share on other sites More sharing options...
crzyone9584 Posted October 8, 2010 Author Share Posted October 8, 2010 No its not already in [EO]. I'm adding it in. thats why I'm asking if i'm doing it correctly. Link to comment Share on other sites More sharing options...
Skillzalot Posted October 8, 2010 Share Posted October 8, 2010 why not shorten things like Public Const MAX_QUEST_NEEDS As Long = 3ThenQuestNeeds(1 to MAX_QUEST_NEEDS) Link to comment Share on other sites More sharing options...
crzyone9584 Posted October 8, 2010 Author Share Posted October 8, 2010 If you do it that way, how would you separate the needs, such as killing mobs, items and who you need to talk to. Link to comment Share on other sites More sharing options...
Skillzalot Posted October 8, 2010 Share Posted October 8, 2010 you could do it in data 1 and data 2Data one being what you need to doand data two being how many times or whatever Link to comment Share on other sites More sharing options...
crzyone9584 Posted October 8, 2010 Author Share Posted October 8, 2010 thats just confusing to me. For me the way im doing it is easier for me. Not to mention it will have there own file. It will be the same type of the npc file. Link to comment Share on other sites More sharing options...
Skillzalot Posted October 8, 2010 Share Posted October 8, 2010 im just suggesting the way its done in MRDE to keep things organised Link to comment Share on other sites More sharing options...
crzyone9584 Posted October 8, 2010 Author Share Posted October 8, 2010 1\. Whats MRDE?2\. How i have it set up now seems to me to be organized to me.Thanks for the suggestion though. Link to comment Share on other sites More sharing options...
dugor Posted October 8, 2010 Share Posted October 8, 2010 MRDE = Mirage Realms source. I have a full quest system that you can take a look at. Link to comment Share on other sites More sharing options...
crzyone9584 Posted October 8, 2010 Author Share Posted October 8, 2010 That would be great. What kind of features does it have already coded in? Link to comment Share on other sites More sharing options...
Skillzalot Posted October 9, 2010 Share Posted October 9, 2010 It is prolly one of the best Quests systems out there. You can have select only rewards,Multiple rewards, Multiple quests all kinds of things Link to comment Share on other sites More sharing options...
crzyone9584 Posted October 9, 2010 Author Share Posted October 9, 2010 Thats pretty nice. Where would I find that to look at? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now