dream1204 Posted February 15, 2011 Share Posted February 15, 2011 I've redid this 2 times…. but the scripted still doesnt show up in the editor...... Can you help me with this :confused:? thx!!I also tried the scripted item. The same thing happens. There is no "Scripted" in my editor. I did follow all the step closely and when I open frmEditor_Npc, the list do haves "Scripted" in it. However, my editor doesn't show these up..... I like ur tut very much ;) Link to comment Share on other sites More sharing options...
Richy420Rich Posted February 15, 2011 Author Share Posted February 15, 2011 Do you hit enter after typing Scripted in the list? Otherwise it won't be saved in the listbox.I have no other clue as to why it won't show for you.If you got more of a problem with it; You can download a mod release that has the features built in;[http://www.touchofdeathforums.com/smf/index.php/topic,68559.0.html](http://www.touchofdeathforums.com/smf/index.php/topic,68559.0.html) Link to comment Share on other sites More sharing options...
iSKweek Posted February 16, 2011 Share Posted February 16, 2011 Richy, I am adding on a simple graphical part to your quest code, do you mind if I release it with that section of code in a tutorial? You would receive full credit for it of course. Link to comment Share on other sites More sharing options...
Richy420Rich Posted February 16, 2011 Author Share Posted February 16, 2011 Nope don't mind at all. Good luck. Link to comment Share on other sites More sharing options...
iSKweek Posted February 16, 2011 Share Posted February 16, 2011 Thanks :) Still a bit off, only done the accepting of quests, but it is getting there. Link to comment Share on other sites More sharing options...
dream1204 Posted February 16, 2011 Share Posted February 16, 2011 Thanks a lot. This mod helps me a lot!I just wonder that does I miss any step to save the file and load it? Because Whenever I use VB6 to edit my file, the game doesn't change.What can I do for this? thank you soooo auch! Link to comment Share on other sites More sharing options...
iSKweek Posted February 16, 2011 Share Posted February 16, 2011 Are you compiling it? Link to comment Share on other sites More sharing options...
dream1204 Posted February 16, 2011 Share Posted February 16, 2011 haha sorry… I am newb.... What do you mean by compiling it? I just change the text in the file by VB. Then hit ctrl + S to save it. Should I do more step to load it? Compiling? Link to comment Share on other sites More sharing options...
Richy420Rich Posted February 16, 2011 Author Share Posted February 16, 2011 Click File / Click Make… Overwrite existing file. Or if you wish to backup, rename it as another exe.Used to be a VB6 tutorial around but who knows where it went. Perhaps you could google VB6 tutorial to get a basic idea of how the program works. Link to comment Share on other sites More sharing options...
dream1204 Posted February 16, 2011 Share Posted February 16, 2011 OK! I got it! That's why I couldn't see Scripted in list. This help me a lot. Thank you sooooo much! Link to comment Share on other sites More sharing options...
Alatar Posted February 19, 2011 Share Posted February 19, 2011 Nice work on this! Could be really useful for those who are starting to code and want to make their own sourced stuff. Link to comment Share on other sites More sharing options...
ohnoitsbenjii Posted February 25, 2011 Share Posted February 25, 2011 I've tried adding multiple quests on top of one npc, like so:```Option ExplicitPublic Sub QuestScript(attacker, Script)Select Case ScriptCase 1If Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 3 ThenCall PlayerMsg(attacker, "I have nothing more for you.", Green)ElseIf Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 2 ThenIf HasItem(attacker, 4) ThenCall TakeInvItem(attacker, 4, 0)Call PlayerMsg(attacker, "Angel: thanks, dude", Green)Call PlayerMsg(attacker, "You just obtained 200 Gold!", Green)Call GiveInvItem(attacker, 1, 200, True)Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 3ElseCall PlayerMsg(attacker, "Angel: I really don't know where to get one. haha.", Green)End IfIf Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 2 ThenCall PlayerMsg(attacker, "Angel: Now go get the other item", Green)ElseIf Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 1 ThenIf HasItem(attacker, 3) ThenCall TakeInvItem(attacker, 3, 0)Call PlayerMsg(attacker, "Angel: Wow, I needed this. Now I can make a stronger potion! Here's your reward.", Green)Call PlayerMsg(attacker, "You just obtained 100 Gold!", Green)Call GiveInvItem(attacker, 1, 100, True)Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 2ElseCall PlayerMsg(attacker, "Angel: I believe you can get a Weird Potion by cutting down one of these trees, don't know how you obtain a Potion for it though haha.", Green)End IfElseIf Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 0 ThenCall PlayerMsg(attacker, "Angel: Hey.. Maybe you can help me, I like to get a Weird Potion? I'll reward you...", Green)Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 1End IfExit SubCase 2Exit SubCase 3Exit SubCase 4Exit SubCase 5Exit SubCase ElseCall PlayerMsg(attacker, "There is no quest script for NPC Number " & Int(Script) & ". Check the source..", BrightRed)Exit SubEnd SelectEnd Sub```but when compiling, it tells me that case 2 needs a new select case, which doesn't make sense? I'm not sure if I'm doing it wrong, or if piling multiple quests on one NPC is unaccpetable.. but my entire game needs to be based off the quests that one person gives you. Bleh. Link to comment Share on other sites More sharing options...
Guest Posted February 25, 2011 Share Posted February 25, 2011 Because you're putting an exit sub after each case. Link to comment Share on other sites More sharing options...
ohnoitsbenjii Posted February 25, 2011 Share Posted February 25, 2011 The exit subs were already in the code, but I found the problem. I missed an "Else" to put before an if. Now, my only problem is getting the npc to actually activate the quest, because nothing is happening. D: Link to comment Share on other sites More sharing options...
Richy420Rich Posted March 1, 2011 Author Share Posted March 1, 2011 Exit Sub saves the code from scanning all the cases after the initial case. Basically you're trying to call the same quest progress 2 times in your code. Making 1 of them not responding because the other one is being scanned.```Case 1If Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 3 ThenCall PlayerMsg(attacker, "I have nothing more for you.", Green)ElseIf Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 2 ThenIf HasItem(attacker, 4) ThenCall TakeInvItem(attacker, 4, 0)Call PlayerMsg(attacker, "Angel: thanks, dude", Green)Call PlayerMsg(attacker, "You just obtained 200 Gold!", Green)Call GiveInvItem(attacker, 1, 200, True)Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 3ElseCall PlayerMsg(attacker, "Angel: I really don't know where to get one. haha.", Green)End IfElseIf Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 1 ThenIf HasItem(attacker, 3) ThenCall TakeInvItem(attacker, 3, 0)Call PlayerMsg(attacker, "Angel: Wow, I needed this. Now I can make a stronger potion! Here's your reward. Now get me the other item.", Green)Call PlayerMsg(attacker, "You just obtained 100 Gold!", Green)Call GiveInvItem(attacker, 1, 100, True)Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 2ElseCall PlayerMsg(attacker, "Angel: I believe you can get a Weird Potion by cutting down one of these trees, don't know how you obtain a Potion for it though haha.", Green)End IfElseIf Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 0 ThenCall PlayerMsg(attacker, "Angel: Hey.. Maybe you can help me, I like to get a Weird Potion? I'll reward you...", Green)Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 1End IfExit Sub``` Link to comment Share on other sites More sharing options...
ohnoitsbenjii Posted March 2, 2011 Share Posted March 2, 2011 Yeah, regardless of whether I use your original modQuest coding or mine, the npc still refuses to initiate the quest, nor will it call any sort of player message. I've made sure I have every bit of coding needed for the entire quest system, and I do. I don't know what could be the problem. Link to comment Share on other sites More sharing options...
iSKweek Posted March 2, 2011 Share Posted March 2, 2011 Check my quest tutorial, you may need to change the way canattacknpc works, pretty sure I posted it there. I would give it to you directly but I'm on my phone. Link to comment Share on other sites More sharing options...
RyokuHasu Posted March 8, 2011 Share Posted March 8, 2011 Quest System Bug:You CAN NOT add resources to maps that have ScriptedNPCs, remove Scripted NPCs to add Resources then att them back later. Link to comment Share on other sites More sharing options...
Drakiac Posted March 12, 2011 Share Posted March 12, 2011 Thanks so much for this! The scripted tiles are working perfect! The only problem I have with the quest system is that i create the npc, say number 8\. I give him at least one in every stat. i set him to scripted. Then I don't know how to talk to him. I've pressed control next to him yet it does nothing. It should give him case 8 or at least say There is no quest script for NPC Number 8\. Check the source.. but it doesnt… Link to comment Share on other sites More sharing options...
RyokuHasu Posted March 12, 2011 Share Posted March 12, 2011 try reapplying him to the map, i had the same problem, ALSO, try adding more stats, for some reason that helps somties too =D Link to comment Share on other sites More sharing options...
Richy420Rich Posted March 12, 2011 Author Share Posted March 12, 2011 Did you properly add the Call QuestScript(index, npcnum) inside the CanPlayerAttackNPC procedure? Link to comment Share on other sites More sharing options...
RyokuHasu Posted March 12, 2011 Share Posted March 12, 2011 I did, i just mod mine alot XD , i always make spares though =3 Link to comment Share on other sites More sharing options...
Richy420Rich Posted March 12, 2011 Author Share Posted March 12, 2011 EDIT: I did mess up in this tutorial but it should be fixed now, thanks Drakiac for showing me where the part was. I'll leave this open, hopefully there are no more problems.. I still recommend my mod though with this stuff already built in plus some. - http://www.touchofdeathforums.com/smf/index.php/topic,69078.0.html Link to comment Share on other sites More sharing options...
dingleberrys Posted March 18, 2011 Share Posted March 18, 2011 oh so even the script system is hardcoded not sadscript like the old eclipse…...bummer Link to comment Share on other sites More sharing options...
Ruins of Hell Posted March 18, 2011 Share Posted March 18, 2011 @Urimas:> oh so even the script system is hardcoded not sadscript like the old eclipse…...bummerSadScript is terrible. It's slow, limited in use, and undocumented. 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