Athagekin Posted September 29, 2011 Share Posted September 29, 2011 Yes, I've converted all quests and NPCs with the converter, and also added Ryoku's snippet a page back. It still wouldn't work. Link to comment Share on other sites More sharing options...
RyokuHasu Posted September 29, 2011 Share Posted September 29, 2011 well alatar I tested your ? and ! and it works just fine.however i made a custom version that works with using CSDE convo system as INFO>.< it was hard coming up with a way to make "Info" go away only when something else was there XD``` Dim i As Long For i = 1 To MAX_QUESTS + 1 'check if the npc is the next task to any quest: [?] symbol If i <= MAX_QUESTS Then If Player(MyIndex).PlayerQuest(i).Status = QUEST_STARTED Then If Quest(i).Task(Player(MyIndex).PlayerQuest(i).ActualTask).NPC = NPCNum Then Name = "Quest[?]" TextX = ConvertMapX(MapNpc(Index).x * PIC_X) + MapNpc(Index).XOffset + (PIC_X \ 2) - getWidth(TexthDC, (Trim$(Name))) If NPC(NPCNum).Sprite < 1 Or NPC(NPCNum).Sprite > NumCharacters Then TextY = ConvertMapY(MapNpc(Index).y * PIC_Y) + MapNpc(Index).YOffset - 16 Else TextY = ConvertMapY(MapNpc(Index).y * PIC_Y) + MapNpc(Index).YOffset - (DDSD_Character(NPC(NPCNum).Sprite).lHeight / 4) - 8 End If Call DrawText(TexthDC, TextX, TextY, Name, QBColor(Yellow)) Exit For End If End If 'check if the npc is the starter to any quest: [!] symbol 'can accept the quest as a new one? If Player(MyIndex).PlayerQuest(i).Status = QUEST_NOT_STARTED Or Player(MyIndex).PlayerQuest(i).Status = QUEST_COMPLETED_BUT Then 'the npc gives this quest? If NPC(NPCNum).QuestNum = i Then Name = "Quest[!]" TextX = ConvertMapX(MapNpc(Index).x * PIC_X) + MapNpc(Index).XOffset + (PIC_X \ 2) - getWidth(TexthDC, (Trim$(Name))) If NPC(NPCNum).Sprite < 1 Or NPC(NPCNum).Sprite > NumCharacters Then TextY = ConvertMapY(MapNpc(Index).y * PIC_Y) + MapNpc(Index).YOffset - 16 Else TextY = ConvertMapY(MapNpc(Index).y * PIC_Y) + MapNpc(Index).YOffset - (DDSD_Character(NPC(NPCNum).Sprite).lHeight / 4) - 8 End If Call DrawText(TexthDC, TextX, TextY, Name, QBColor(Yellow)) Exit For End If End If End If If i > MAX_QUESTS Then If NPC(NPCNum).Convo = True Then Name = "Info" TextX = ConvertMapX(MapNpc(Index).x * PIC_X) + MapNpc(Index).XOffset + (PIC_X \ 2) - getWidth(TexthDC, (Trim$(Name))) If NPC(NPCNum).Sprite < 1 Or NPC(NPCNum).Sprite > NumCharacters Then TextY = ConvertMapY(MapNpc(Index).y * PIC_Y) + MapNpc(Index).YOffset - 16 Else ' Determine location for text TextY = ConvertMapY(MapNpc(Index).y * PIC_Y) + MapNpc(Index).YOffset - (DDSD_Character(NPC(NPCNum).Sprite).lHeight / 4) - 8 End If ' Draw name Call DrawText(TexthDC, TextX, TextY, Name, color) Exit For End If End If Next``` Link to comment Share on other sites More sharing options...
Alatar Posted September 29, 2011 Author Share Posted September 29, 2011 Athagekin in that case I think it's because the quest giver "talks" with QuestMessage procedure, instead of PlayerMsg. Haven't checked the conversation system yet but I think that maybe it's that the problem.Ryoku what's that for? xDA INFO message over every single friendly npc's head that has a conversation to do? Link to comment Share on other sites More sharing options...
RyokuHasu Posted September 29, 2011 Share Posted September 29, 2011 ;D its for my game lolI don't use the convo activated things so I just use it for giving important info to players =3;D besides I use several different NPC chat methods =3 so everything that doesnt have a convo will still have a chat box =D Link to comment Share on other sites More sharing options...
Kevvin Posted September 29, 2011 Share Posted September 29, 2011 ALATAR I LOVE YOU !!! :D Link to comment Share on other sites More sharing options...
Chukillz Posted September 29, 2011 Share Posted September 29, 2011 alatar about your ? and ! code, Thank youi was looking at ryokus code and the first thing i noticed right from looking at the code is that it only showed the ? :Pi am still working on getting this in to my game (i am having some help for the obvious reason that im not very good at vb6) but all in all i want to say thanksOn another note, do you think there will be a future version that will allow NPCs to be used for more then one quest? because the way i see it, (and tell me if i am wrong please) if i set up a NPC as a quest giver and then that NPCs quest is finished, then for the remainder of the game, that NPC is useless and it will just be there in the game with no future purpose. Link to comment Share on other sites More sharing options...
Justn Posted September 29, 2011 Share Posted September 29, 2011 Of course it only showed the '?' because that's all it was meant to do. Link to comment Share on other sites More sharing options...
Chukillz Posted September 29, 2011 Share Posted September 29, 2011 no justn your wrong, the ! should show up if there is a new quest, the ? should show if there is a quest in progress. Link to comment Share on other sites More sharing options...
Justn Posted September 29, 2011 Share Posted September 29, 2011 Ryoku posted that to either use "?" or "!" for npcs that give quest not the way altar did it like you have have described. If you read Ryokus code it shows > Name = "?" 'or ! < meaning u can change it to whatever you want not that it will change depending on the quest status :P Link to comment Share on other sites More sharing options...
RyokuHasu Posted September 30, 2011 Share Posted September 30, 2011 ya XD i just made a quicky version just a few hours befor he posted his version, then I reposted a custom version that was ment only for HOA Link to comment Share on other sites More sharing options...
Alatar Posted September 30, 2011 Author Share Posted September 30, 2011 @Chukillz:> On another note, do you think there will be a future version that will allow NPCs to be used for more then one quest? because the way i see it, (and tell me if i am wrong please) if i set up a NPC as a quest giver and then that NPCs quest is finished, then for the remainder of the game, that NPC is useless and it will just be there in the game with no future purpose.It will stay there just as another friendly npc…I don't know if that would change for now maybe in a distant future :P Link to comment Share on other sites More sharing options...
RyokuHasu Posted September 30, 2011 Share Posted September 30, 2011 I have mine set up so they go back to what they where before the questIf it was a friendly Info NPC i would go back to giving important info, if it was a Plane talking NPC it would go back to chatting ;D Link to comment Share on other sites More sharing options...
Chukillz Posted September 30, 2011 Share Posted September 30, 2011 ok another question then, if i was to set up a quest giver on map1 and the player finishes the quest, and then i set up the same npc on map2 as a quest giver, would it still count as the same quest for the NPC on the different map? (i hope that wasnt confusing for you :P ) Link to comment Share on other sites More sharing options...
Alatar Posted September 30, 2011 Author Share Posted September 30, 2011 @Chukillz:> ok another question then, if i was to set up a quest giver on map1 and the player finishes the quest, and then i set up the same npc on map2 as a quest giver, would it still count as the same quest for the NPC on the different map? (i hope that wasnt confusing for you :P )*confused*Err… the quest that one npc gives is setted on the NPC editor, so if you create an npc called let's say "Bob" that gives a quest called "Bob Quest", and you set this "Bob" in maps 1, 2, 4 and 114 for example, and you do it, every single Bob npc will have the "Bob Quest" finished.If that was your question :P Link to comment Share on other sites More sharing options...
Taegan Posted September 30, 2011 Share Posted September 30, 2011 EDIT: Okay, so I found the problem, and now I feel dumb.EDIT3: Fixed it again. Sorry, it was my first time using VB6 so it took me a while to figure everything out. Link to comment Share on other sites More sharing options...
zakariasan Posted September 30, 2011 Share Posted September 30, 2011 is there any way to stop ppl asking the npc to do the quests over and over again? Link to comment Share on other sites More sharing options...
zakariasan Posted September 30, 2011 Share Posted September 30, 2011 because i dont want them to it over and over again aand get heaps of exp and items Link to comment Share on other sites More sharing options...
RyokuHasu Posted September 30, 2011 Share Posted September 30, 2011 you dont pay attention to whats on the form do you?Look at the quest editor XD the option is in there. Link to comment Share on other sites More sharing options...
Justn Posted September 30, 2011 Share Posted September 30, 2011 Ok I'm not sure where I should be posting this but since the topic was started here I will ask here..Ryoku gave me a code to use to make the "sub CanPlayerAttackNpc" work with both the Quest system and the Conversation system.This is what I originally had in place and it was wrong as Only the **conversation system** works and the quest system was not working:```If NpcX = GetPlayerX(attacker) Then If NpcY = GetPlayerY(attacker) Then If NPC(npcNum).Behaviour = NPC_BEHAVIOUR_FRIENDLY Then If NPC(npcNum).Convo = True Then InitChat attacker, mapNum, mapNpcNum End If Exit Function End If If NPC(npcNum).Behaviour <> NPC_BEHAVIOUR_FRIENDLY And NPC(npcNum).Behaviour <> NPC_BEHAVIOUR_SHOPKEEPER Then CanPlayerAttackNpc = True Else If NPC(npcNum).Behaviour = NPC_BEHAVIOUR_FRIENDLY Then Call CheckTasks(attacker, QUEST_TYPE_GOTALK, npcNum) Call CheckTasks(attacker, QUEST_TYPE_GOGIVE, npcNum) Call CheckTasks(attacker, QUEST_TYPE_GOGET, npcNum) If NPC(npcNum).Quest = YES Then If CanStartQuest(attacker, NPC(npcNum).QuestNum) Then 'if can start show the request message (chat1) QuestMessage attacker, NPC(npcNum).QuestNum, Trim$(Quest(NPC(npcNum).QuestNum).Chat(1)), NPC(npcNum).QuestNum Exit Function End If If QuestInProgress(attacker, NPC(npcNum).QuestNum) Then 'if the quest is in progress show the meanwhile message (chat2) PlayerMsg attacker, Trim$(NPC(npcNum).Name) + ": " + Trim$(Quest(NPC(npcNum).QuestNum).Chat(2)), BrightGreen 'QuestMessage attacker, NPC(npcNum).QuestNum, Trim$(Quest(NPC(npcNum).QuestNum).Chat(2)), 0 Exit Function End If End If End If If Len(Trim$(NPC(npcNum).AttackSay)) > 0 Then PlayerMsg attacker, Trim$(NPC(npcNum).Name) & ": " & Trim$(NPC(npcNum).AttackSay), White End If End If End If End If End If End IfEnd Function```So I replaced it with the code Ryoku suggested and it made the **quest** giver work but now the conversation npc doesn't respond when attacked what is wrong with this code?```If NpcX = GetPlayerX(attacker) Then If NpcY = GetPlayerY(attacker) Then If NPC(npcNum).Behaviour = NPC_BEHAVIOUR_FRIENDLY Then Call CheckTasks(attacker, QUEST_TYPE_GOTALK, npcNum) Call CheckTasks(attacker, QUEST_TYPE_GOGIVE, npcNum) Call CheckTasks(attacker, QUEST_TYPE_GOGET, npcNum) If NPC(npcNum).Quest = YES Then If CanStartQuest(attacker, NPC(npcNum).QuestNum) Then 'if can start show the request message (chat1) QuestMessage attacker, NPC(npcNum).QuestNum, Trim$(Quest(NPC(npcNum).QuestNum).Chat(1)), NPC(npcNum).QuestNum Exit Function End If If QuestInProgress(attacker, NPC(npcNum).QuestNum) Then 'if the quest is in progress show the meanwhile message (chat2) PlayerMsg attacker, Trim$(NPC(npcNum).Name) + ": " + Trim$(Quest(NPC(npcNum).QuestNum).Chat(2)), BrightGreen 'QuestMessage attacker, NPC(npcNum).QuestNum, Trim$(Quest(NPC(npcNum).QuestNum).Chat(2)), 0 Exit Function End If End If If NPC(npcNum).Quest = NO Then If NPC(npcNum).Convo = False Then If Len(Trim$(NPC(npcNum).AttackSay)) > 0 Then PlayerMsg attacker, Trim$(NPC(npcNum).Name) & ": " & Trim$(NPC(npcNum).AttackSay), White Else InitChat attacker, mapNum, mapNpcNum End If Exit Function End If End If End If End If End If End If End IfEnd Function``` Link to comment Share on other sites More sharing options...
Alatar Posted September 30, 2011 Author Share Posted September 30, 2011 Are you making an NPC that has a quest and a conversation? Link to comment Share on other sites More sharing options...
Justn Posted September 30, 2011 Share Posted September 30, 2011 nope was just trying to make a npc that is just using a conversation Link to comment Share on other sites More sharing options...
Beanie93 Posted September 30, 2011 Share Posted September 30, 2011 I think he's trying to link the conversation system with the quest system, so you can initialise a quest through a conversation. Link to comment Share on other sites More sharing options...
Justn Posted September 30, 2011 Share Posted September 30, 2011 @Bean:> I think he's trying to link the conversation system with the quest system, so you can initialize a quest through a conversation.not really i was just trying to get the conversation system to work in the same project as the quest system.the first code above makes it so only the conversation system works and the quest system does not AND the second code above makes the quest system work and the conversation system not work…Does it make any sense? Im not trying to do anything with linking them together just wanna have them both working =) Link to comment Share on other sites More sharing options...
Alatar Posted September 30, 2011 Author Share Posted September 30, 2011 Hmmm, try with the first one something like``` If NPC(npcNum).Behaviour = NPC_BEHAVIOUR_FRIENDLY Then If NPC(npcNum).Convo = True Then InitChat attacker, mapNum, mapNpcNum Exit Function End If End If```EDIT: or with the second one something like this:``` If NPC(npcNum).Quest = NO Then If NPC(npcNum).Convo = False Then If Len(Trim$(NPC(npcNum).AttackSay)) > 0 Then PlayerMsg attacker, Trim$(NPC(npcNum).Name) & ": " & Trim$(NPC(npcNum).AttackSay), White End If Else InitChat attacker, mapNum, mapNpcNum End If Exit Function End If``` Link to comment Share on other sites More sharing options...
Justn Posted September 30, 2011 Share Posted September 30, 2011 I tried the second one and it worked perfectly! Sorry i should have figured that out on my own… Thanks for still giving support Alatar even though you said you weren't :embarrassed: 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