Zamin Posted September 7, 2009 Author Share Posted September 7, 2009 Hello,Welcome to my quest script. First of all, thank you for coming to the topic and giving me a chance to contribute something back to the community.I apologize for any spelling mistakes and pretty much any other mistake I am about to make.Click the following link for Eclipse Stable version of this Quest System with a compelte installation guide:http://www.touchofdeathforums.com/smf/index.php/topic,51512.msg613417.html#msg613417A few pics of what your about to get:[Quest Picture](http://i6.photobucket.com/albums/y220/Zamin/Quest.jpg)[Quest Log Picture](http://i6.photobucket.com/albums/y220/Zamin/QuestLog.jpg)This is my second script. The first one I made was also a quest script. I got a little criticism that the script isn't really a quest 'system'. So I decided to make one. Hence, this is the next version of my past quest system.I'll won't give many explanations here, because you'll won't need any. This is simply becasue you do not need any Sad scripting knowledge to make your quests, as long as you have this script with you.Difficulty for adding this script is: 1/5**About the Quest**-No need of any sad scripting knowledge, in fact, you do not need to touch coding at all-Very Newb friendly-Everything edited via one (1) '.ini' file-Option to turn on/off quests without deleting them-Option to skip from 1 quest to another-Comes with built-in Quest Log (auto updates, no work required)-No 'joingame' check; if you edit/add/delete any quest at any point, you do not need the players to re-enter the game. The system will check for any change as soon as they are made.-Delete one/all quest of a person at any point using one command in game -Player name and quest number recognition -Player access recognition-NPC recognition; the system recognises which NPC is assigned to which quest.-No limit; you can assign as many quests to a NPC and as many NPCs you like, there is pretty much no limit to what you can add (as far as I checked) -The only limit is the image of the Quest Log. If you make more than 7-8 quests, you will have to make your Quest Log image bigger, more on this in ReadMe.txtThe reason why this is in the source forum is because you need to edit both the client and the sevrer source for this script (I asked Owen =p).**Some Source Edits****Edit 1:** OK, before you even continue, you need to add the following edit:http://www.touchofdeathforums.com/smf/index.php/topic,51259.0.htmlIf not, you will get so many custom menu errors, you'll go crazy and jump off a building. No point even reading further if you have not installed this edit. This is a very simple, client side edit. I can give a client upon request for you to download in which I have already installed this edit for you to use.**Edit 2:** This is a small one, credit goes to Balliztik1 again:Open Server Source and go to **modGameLogic**Find:```MyScript.ExecuteStatement "Scripts\Main.txt", "ScriptedNPC " & Attacker & "," & NPC(NPCnum).SpawnSecs```And replace it with:```MyScript.ExecuteStatement "Scripts\Main.txt", "ScriptedNPC " & Attacker & "," & NPC(NPCnum).SpawnSecs & "," & MapNpcNum```You will have to do this for a total of '8' times. Just use the CTRL+F (find) command, replace the line as many time as you see it; there should be 8 of them in total.Now go to your Main.txt, find:```Sub ScriptedNPC(Index, Script)```And replace it with:```Sub ScriptedNPC(index, script, npcSlot)```**Edit 3:** This is short and simple. This is necessary for the admin command, done by me btw:Open Server Source and go do **clsCommands**Put the following function anywhere in the code:```Public Function QuestReset(ByVal Index As Long, ByVal PlayerName As String) Dim S() As String Dim Length As Integer Dim Count As Integer Length = 0 Count = 0 Open App.Path & "\Accounts\CharList.txt" For Input As #1 S = Split(Input(LOF(1), 1), vbCrLf) Close #1 Do While Count >= 0 Length = Len(S(Count)) If Length = 0 Then QuestReset = "EndOfFile" Exit Do ElseIf S(Count) = PlayerName Then QuestReset = S(Count) Exit Do End If Count = Count + 1 LoopEnd Function```**Start of Quest Script**Open **Main.txt**, put the following on very top of the file:```#include ```More explanaion on this below.Find: **Sub JoinGame(Index)**Under the line: Call SendWhosOnline(Index)Put the following:```'***********************Begin Initiate Quest***********************Call InitiateQuest(Index)'***********************End Initiate Quest***********************```Find: **Sub MenuScripts(Index, Clicked_Index, Menu_Type)**Under the select case: End SelectPut the following:```'***********************Begin Quest***********************Dim QuestCountDim IndexCountDim QuestQuestCount = 1IndexCount = 1Do While QuestCount <= Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUESTS", "Amount")) If Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "Switch")) = 1 Then If Int(GetVar("\Scripts\Quests\QuestDatabase\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest" & QuestCount)) < 2 Then Quest = GetVar("Scripts\Quests\QuestDatabase\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest" & QuestCount) If Clicked_Index = 0 Then Call CustomMenuClose(Index) Exit Do ElseIf MenuTitle = "QuestExtra" And Clicked_Index = IndexCount+1 And Quest = 0 Then Call PutVar("\Scripts\Quests\QuestDatabase\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest" & QuestCount, 1) Call PlayerMsg(Index, GetVar("Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "AcceptMessage"), RED) Exit Do ElseIf MenuTitle = "QuestExtra" And Clicked_Index = IndexCount+2 And Quest = 0 Then Call PlayerMsg(Index, GetVar("Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "DenyMessage"), RED) Exit Do ElseIf MenuTitle = "QuestExtra" And Clicked_Index = IndexCount+4 And Quest = 1 Then Call QuestExtra(Index) Exit Do ElseIf MenuTitle = "QuestExtra" And Clicked_Index = IndexCount+5 And Quest = 1 Then Call PlayerMsg(Index, GetVar("Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "DontHaveItem"), RED) Exit Do End If End If End If IndexCount = IndexCount + 6 QuestCount = QuestCount + 1LoopIf (MenuTitle = "QuestExtra" OR MenuTitle = "QuestLog") And (Clicked_Index = 0 OR Clicked_Index = IndexCount+1 OR Clicked_Index = IndexCount+2 OR Clicked_Index = IndexCount+4 OR Clicked_Index = IndexCount+5) Then Call CustomMenuClose(Index)End If'***********************End Quest***********************```Find: **Sub ScriptedNPC(index, script, npcSlot)**Under (in my case, change if you must): Case 2Put the following:```'***********************Begin Quest***********************Dim NPCnumDim QuestCountDim IndexCountDim AmountQuestCount = 1IndexCount = 1Amount = Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUESTS", "Amount"))NpcNum = GetMapNPCNumber(GetPlayerMap(index), npcSlot)'***********************Begin Initiate Quest***********************Call InitiateQuest(Index)'***********************End Initiate Quest***********************Call CustomMenuClose(Index)Call CustomMenuShow(Index, "QuestExtra", "\GUI\CUSTOM\QuestExtra\Menu.gif", 1)Call CustomMenuLabel(Index, 0, "Close!", 150, 280, 8, 4, 0, 40, 15)Do While QuestCount <= Amount If Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "NPC")) = Int(NPCnum) Then If Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "Switch")) = 1 Then If Int(GetVar("\Scripts\Quests\QuestDatabase\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest" & QuestCount)) = 0 Then Call CustomMenuLabel(Index, IndexCount, GetVar("Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "Description"), 3, 50, 8, 0, 0, 190, 200) Call CustomMenuLabel(Index, IndexCount+1, "Accept Quest!", 3, 260, 8, 5, 0, 78, 15) Call CustomMenuLabel(Index, IndexCount+2, "Deny Quest!", 3, 280, 8, 5, 0, 70, 15) Exit Do ElseIf Int(GetVar("\Scripts\Quests\QuestDatabase\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest" & QuestCount)) = 1 Then Call CustomMenuLabel(Index, IndexCount+3, GetVar("Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "Description2"), 3, 50, 8, 0, 0, 190, 200) Call CustomMenuLabel(Index, IndexCount+4, "Yes!", 3, 260, 8, 5, 0, 25, 15) Call CustomMenuLabel(Index, IndexCount+5, "Not Yet!", 3, 280, 8, 5, 0, 50, 15) Exit Do End If End If End If IndexCount = IndexCount + 6 QuestCount = QuestCount + 1LoopIf Amount = QuestCount - 1 Then Call CustomMenuLabel(Index, 4, GetVar("Scripts\Quests\QuestSystem.ini", "QUESTS", "EndOfQuests"), 3, 50, 8, 0, 0, 190, 200)End IfExit Sub'***********************End Quest***********************```Find: **Sub Commands(Index)**Under (in default main.txt): Case "/warpto"Put the following:```'***********************Begin Quest***********************Case "/QuestReset" If GetPlayerAccess(Index) >= 5 Then Dim QuestCount Dim PlayerName Dim QuestName Dim CheckName QuestCount = 1 PlayerName = TextSay(1) QuestName = Lcase(TextSay(2)) CheckName = QuestReset(index, PlayerName) If CheckName = "EndOfFile" Then Call PlayerMsg(Index, "The player '" & PlayerName & "' does not exit!", RED) Exit Sub ElseIf QuestName = "all" Then Do While QuestCount <= Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUESTS", "Amount")) Call PutVar("\Scripts\Quests\QuestDatabase\" & PlayerName & ".ini", "QUESTS", "Quest" & QuestCount, 0) QuestCount = QuestCount + 1 Loop Call PlayerMsg(Index, "All quests for player " & PlayerName & " has been reset.", BLACK) ElseIf Int(QuestName) > Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUESTS", "Amount")) OR Int(QuestName) = 0 Then Call PlayerMsg(Index, "Quest" & QuestName & " does not exist. Perhaps check the 'Amount' of your total quests set in QuestSystem.ini", RED) Else Call PutVar("\Scripts\Quests\QuestDatabase\" & PlayerName & ".ini", "QUESTS", "Quest" & QuestName, 0) Call PlayerMsg(Index, "Quest" & QuestName & " for player " & PlayerName & " has been reset.", BLACK) End If Else Call PlayerMsg(Index, "You do not have enough access to use this command.", BRIGHTGREEN) End IfExit Sub'***********************End Quest***********************```Find: **Sub HotScript(Index, KeyID)**Under (in my case, change if you must): Case 4Put the following:```'***********************Begin Quest Log***********************Dim QuestCountDim QuestYCoordDim IndexCountDim QuestQuestCount = 1QuestYCoord = 50IndexCount = 1Call CustomMenuClose(Index)Call CustomMenuShow(Index, "QuestLog", "\GUI\CUSTOM\QuestExtra\QuestLog.gif", 1)Call CustomMenuLabel(Index, 0, "Close!", 150, 280, 8, 4, 0, 40, 15) Do While QuestCount <= Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUESTS", "Amount")) Quest = GetVar("Scripts\Quests\QuestDatabase\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest" & QuestCount) If Quest = 1 Then Call CustomMenuPicture(Index, IndexCount, "\GUI\CUSTOM\QuestExtra\Quest" & QuestCount & "Accepted.gif", 3, QuestYCoord) QuestYCoord = QuestYCoord + 25 ElseIf Quest = 2 Then Call CustomMenuPicture(Index, IndexCount+1, "\GUI\CUSTOM\QuestExtra\Quest" & QuestCount & "Completed.gif", 3, QuestYCoord) QuestYCoord = QuestYCoord + 25 End If IndexCount = IndexCount + 2 QuestCount = QuestCount + 1 LoopExit Sub'***********************End Quest Log***********************```Finally, add the following at the end of **Main.txt**:```'***********************Begin Initiate Quest***********************Sub InitiateQuest(Index) Dim QuestCount QuestCount = 1 Do While QuestCount <= Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUESTS", "Amount")) If Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "Switch")) = 1 Then If GetVar("Scripts\Quests\QuestDatabase\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest" & QuestCount) = "" Then Call PutVar("\Scripts\Quests\QuestDatabase\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest" & QuestCount, 0) End If End If QuestCount = QuestCount + 1 LoopEnd Sub'***********************End Initiate Quest*********************** '***********************Begin Quest***********************Sub QuestExtra(Index) Dim QuestCount Dim RequiredItemNumber Dim RequiredItemQuantity Dim Stackable Dim RewardItemNumber Dim RewardItemQuantity Dim RewardItemDurability QuestCount = 1 Call CustomMenuClose(Index) Do While QuestCount <= Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUESTS", "Amount")) If Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "Switch")) = 1 Then If GetVar("Scripts\Quests\QuestDatabase\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest" & QuestCount) = 1 Then RequiredItemNumber = Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "RequiredItemNumber")) RequiredItemQuantity = Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "RequiredItemQuantity")) RewardItemNumber = Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "RewardItemNumber")) RewardItemQuantity = Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "RewardItemQuantity")) RewardItemDurability = Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "RewardItemDurability")) Stackable = Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "Stackable")) If CheckTake(Index, RequiredItemNumber, RequiredItemQuantity) = false Then Call PlayerMsg(Index, GetVar("\Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "ItemNotInInventory"), RED) Exit Do Else If CanGive(Index, RewardItemNumber, RewardItemQuantity, Stackable) = False Then Call PlayerMsg(Index, GetVar("Scripts\Quests\QuestSystem.ini", "QUESTS", "NotEnoughSpace"), RED) Else Call TakeItems(index, RequiredItemNumber, RequiredItemQuantity) If Stackable = 0 Then Call GiveNonStackableItem(index, RewardItemNumber, RewardItemQuantity, RewardItemDurability) ElseIf Stackable = 1 Then Call GiveCurrency(index, RewardItemNumber, RewardItemQuantity) End If Call PlayerMsg(Index, GetVar("\Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "ThankYou"), RED) Call PutVar("\Scripts\Quests\QuestDatabase\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest" & QuestCount, 2) End If Exit Do End If End If End If QuestCount = QuestCount + 1 LoopEnd Sub '***********************End Quest***********************```**End of Quest Script**Almost done, just a bit more:-Download **QuestExtra.rar**, unzip it and put the entire folder in the following directory: **\Client\GUI\CUSTOM**-Make a folder called **Quests** in the following directory: **\Server\Scripts**-Make another folder called **QuestDatabase** in the following directory: **\Server\Scripts\Quests**-Download **CQS.txt** and place it where your Main.txt is located: **\Server\Scripts**-Download **QuestSystem.ini** and place it in the following directory: **\Server\Scripts\Quests**-Download the **ReadMe.txt** file to learn how to use the systemMake sure you get these steps right. If the script isn't working, make sure you didn't make a mistake somewhere copying-pasting it, otherwise the script works 100% for me.The 'CQS.txt' is very similar to 'GIS.txt'. I had to implement a couple of functions in GIS to make it work for this script. Had to add/change a few lines but the rest looks like GIS. I decided to change the name of the functions in case if someone who is already using GIS and also wanted to use this quest. CQS.txt is spicifically desined for this script, should not be tempered with unless you know scripting. Most credit still goes to Godlord since I didn't had to change much.An explanation on how to function the Quest System is in the ReadMe.txt file. Please do read it before running the script.If you would like to make the script better, pelase go ahead. I actually wanted to make a whole admin panel for this quest, but failed; tried for a week. I don't really know much VB and don't have the time to learn because university is starting soon. So ya, if you can make this script better, no need to ask.As for credits, all credits of the script go to me. Some credits, if any, go to the people who have answered my questions in the shoutbox, especially AR and Balliztik1\. xDGive credits if you want to, i'll won't beg. If you do want to give credits, put it where people can actually see it. No point putting my name in Main.txt.-Thanks for reading. Link to comment Share on other sites More sharing options...
Patrick Posted September 7, 2009 Share Posted September 7, 2009 By reading this I think I saw that there wasn't a personal file for every user? Link to comment Share on other sites More sharing options...
Zamin Posted September 7, 2009 Author Share Posted September 7, 2009 @üÑÂøчġġÑâ€Ã‘‚:> By reading this I think I saw that there wasn't a personal file for every user?There is a seperate file created for every user, I dunno if thats bad. lolIts created in 'QuestDatabase'.-Thanks Link to comment Share on other sites More sharing options...
Vengeous Posted September 8, 2009 Share Posted September 8, 2009 OMG!!!THIS IS FULLY SICK!!!! XD:icon_alabanza: I Bow Down To You… Link to comment Share on other sites More sharing options...
balliztik1 Posted September 8, 2009 Share Posted September 8, 2009 Quite nice. Very nice addition to the repertoire of quest systems out there. Looks to have a lot of good things going for it. :) Link to comment Share on other sites More sharing options...
evilbunnie Posted September 8, 2009 Share Posted September 8, 2009 When i click a label nothing happens? Link to comment Share on other sites More sharing options...
Zamin Posted September 8, 2009 Author Share Posted September 8, 2009 @evilbunnie:> When i click a label nothing happens?Did you put the code where it belongs? If the menu opens and you are not able to click the labels, then make sure you have this sub: MenuScriptsI am sure the script works, at least for me. If you need my Main.txt, I can put it on here.-Thanks Link to comment Share on other sites More sharing options...
evilbunnie Posted September 8, 2009 Share Posted September 8, 2009 im ill send you mine? how do you put it in those code: things. Sorry i am a really newbie to forumsEDIT:Heres the link to my mainhttp://www.mediafire.com/download.php?momy2jkoz30 Link to comment Share on other sites More sharing options...
Zamin Posted September 9, 2009 Author Share Posted September 9, 2009 @evilbunnie:> im ill send you mine? how do you put it in those code: things. Sorry i am a really newbie to forums> > EDIT:> Heres the link to my main> http://www.mediafire.com/download.php?momy2jkoz30OK, i am looking at it. You have a loooooot of code in Sub Menuscript, lol. And thats whats causing the problem. I took out everything in your menuscript sub and ran the quest system, it works. Now i'll look at your code and fix whatevers wrong, or whatever's causing the problem. I'll fix it up and then give it to you.This is gonna take some time though, give me a few hours. I'll be up all night so i'll work on your main for some time. I did make a back up of what you sent me, just incase if you forgot to make on. ya so, give me some time and i'll do my best.-Thanks Link to comment Share on other sites More sharing options...
VitinhooxD Posted September 9, 2009 Share Posted September 9, 2009 Woo. Its REALLY like to my new quest system.Awesome job.Its a great core. Link to comment Share on other sites More sharing options...
Zamin Posted September 9, 2009 Author Share Posted September 9, 2009 @VitinhooxD:> Woo. Its REALLY like to my new quest system.Awesome job.Its a great core.Thanks, appreciate the support. :)OK, edited something in **Sub Commands(Index)**If you are already using this, just copy-paste this again. Added another restriction for efficiency.**@evilbunnie**: I have edited your Main.txt and it works 100% for me.The entire problem was in Sub MenuScripts. I had to remove your entire sub and had to add your code line by line to close in to the error. One of the cases were being closed more than once.Anyways, I didn't changed anything. Just use this code and everything should work for you. I think I changed a variable name from 'menu_title' to 'MenuTitle'. I guess i'm used to this. Anyways, I changed where ever it was called to this so your code should work. It was working for me though. Everything.Also, when you called the 'InitiateQuest' sub in your JoinGame sub, it was's copy-pasted corretly. You forgot to put a couple of quotation marks. I fixed that as well. This shouldn't have caused a problem with the quest script because it also checks it again right before you talk to your scripted NPC. This might has got in the way of your other scripts which you called in your JoinGame sub. But whatever, I fixed that as well. So everything should be good to go.EDIT: You also need godlords inventory script. Add it where your Main.txt and CQS.txt are (/Server/Scripts). I called it on the top of your Mian. Download it from here:http://www.touchofdeathforums.com/smf/index.php/topic,28174.0.htmlDownload your main from attached downloads. Let me know if you have any other problems.-Thanks Link to comment Share on other sites More sharing options...
Diskmaster Posted September 9, 2009 Share Posted September 9, 2009 So, we can edit how the customs look too (I am totally giving credit for this, this is WAY better then anything I could do with customs):azn: Thank God I have MS vb6… Link to comment Share on other sites More sharing options...
JayT Posted September 9, 2009 Share Posted September 9, 2009 yer its Epic!! and he's still relatively new here so he deserves a "pat" on the back for this Link to comment Share on other sites More sharing options...
evilbunnie Posted September 9, 2009 Share Posted September 9, 2009 @Zamin:> Thanks, appreciate the support. :)> > OK, edited something in **Sub Commands(Index)**> If you are already using this, just copy-paste this again. Added another restriction for efficiency.> > **@evilbunnie**: I have edited your Main.txt and it works 100% for me.> The entire problem was in Sub MenuScripts. I had to remove your entire sub and had to add your code line by line to close in to the error. One of the cases were being closed more than once.> > Anyways, I didn't changed anything. Just use this code and everything should work for you. I think I changed a variable name from 'menu_title' to 'MenuTitle'. I guess i'm used to this. Anyways, I changed where ever it was called to this so your code should work. It was working for me though. Everything.> > Also, when you called the 'InitiateQuest' sub in your JoinGame sub, it was's copy-pasted corretly. You forgot to put a couple of quotation marks. I fixed that as well. This shouldn't have caused a problem with the quest script because it also checks it again right before you talk to your scripted NPC. This might has got in the way of your other scripts which you called in your JoinGame sub. But whatever, I fixed that as well. So everything should be good to go.> > EDIT: You also need godlords inventory script. Add it where your Main.txt and CQS.txt are (/Server/Scripts). I called it on the top of your Mian. Download it from here:> http://www.touchofdeathforums.com/smf/index.php/topic,28174.0.html> > Download your main from attached downloads. Let me know if you have any other problems.> > -ThanksThank you so much!!!! it worked!! this is totaly epic your gonna be on the top of my credits now dude!Oh and about the custom menus, i like just copyed and pasted from a tut and i didn't have a clue about scripting once again thanks!evilbunnie Link to comment Share on other sites More sharing options...
Zamin Posted September 9, 2009 Author Share Posted September 9, 2009 Thanks for all the support guys. I hope it helps. :) Link to comment Share on other sites More sharing options...
Minilinkki Posted September 12, 2009 Share Posted September 12, 2009 screens!! Link to comment Share on other sites More sharing options...
Zamin Posted September 12, 2009 Author Share Posted September 12, 2009 @Minilinkki:> screens!!Screens? What screens?Or is this a typo and you wanted to write 'Screems!!'. lol ;)-Thanks Link to comment Share on other sites More sharing options...
Akselj Posted September 12, 2009 Share Posted September 12, 2009 He means "I want some screenshots please." Link to comment Share on other sites More sharing options...
Zamin Posted September 12, 2009 Author Share Posted September 12, 2009 Lol, my bad. I did post 2 images in the first post, but here are some more. I understand why one would need more screenshots before adding such a messy script, lol.Images are attached in attachment.For QuestReset.jpg. It shows that you can reset all quests of a certain user by using the following command (Zamin = target Player:```/QuestReset Zamin All```Or reset a specific quest, 2 in this case:```/QuestReset Zamin 2```Script checks whether the player and/or quest number exists or not. If it does not, it will list an error and terminate command.-Thanks Link to comment Share on other sites More sharing options...
uman Posted September 13, 2009 Share Posted September 13, 2009 1\. **About: Sub ScriptedNPC(index, script, npcSlot)****I have this:**Sub ScriptedNPC(Index, Script, npcSlot)Select Case ScriptCase 0Call PlayerMsg(Index, "This scripted NPC has no apparent use.", WHITE)Exit SubCase ElseCall PlayerMsg(Index, "No NPC script found. Please contact an admin to solve this problem.", WHITE)Exit SubEnd SelectEnd Sub**Where do I put the code?**2\. **About: modGameLogic**I did'nt find this line: MyScript.ExecuteStatement "Scripts\Main.txt", "ScriptedNPC " & Attacker & "," & NPC(NPCnum).SpawnSecs >>>>**Many thanks to help.** Link to comment Share on other sites More sharing options...
Zamin Posted September 13, 2009 Author Share Posted September 13, 2009 1\. OK, replace your entire Sub ScriptedNPC with this:```Sub ScriptedNPC(index, script, npcSlot) Select Case Script Case 0 Call PlayerMsg(Index, "This scripted NPC has no apparent use.", WHITE) Exit Sub Case 1 Call PlayerMsg(Index, "This scripted NPC has no apparent use.", WHITE) Exit Sub Case 2 '***********************Begin Quest*********************** Dim NPCnum Dim QuestCount Dim IndexCount Dim Amount QuestCount = 1 IndexCount = 1 Amount = Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUESTS", "Amount")) NpcNum = GetMapNPCNumber(GetPlayerMap(index), npcSlot) '***********************Begin Initiate Quest*********************** Call InitiateQuest(Index) '***********************End Initiate Quest*********************** Call CustomMenuClose(Index) Call CustomMenuShow(Index, "QuestExtra", "\GUI\CUSTOM\QuestExtra\Menu.gif", 1) Call CustomMenuLabel(Index, 0, "Close!", 150, 280, 8, 4, 0, 40, 15) Do While QuestCount <= Amount If Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "NPC")) = Int(NPCnum) Then If Int(GetVar("\Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "Switch")) = 1 Then If Int(GetVar("\Scripts\Quests\QuestDatabase\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest" & QuestCount)) = 0 Then Call CustomMenuLabel(Index, IndexCount, GetVar("Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "Description"), 3, 50, 8, 0, 0, 190, 200) Call CustomMenuLabel(Index, IndexCount+1, "Accept Quest!", 3, 260, 8, 5, 0, 78, 15) Call CustomMenuLabel(Index, IndexCount+2, "Deny Quest!", 3, 280, 8, 5, 0, 70, 15) Exit Do ElseIf Int(GetVar("\Scripts\Quests\QuestDatabase\" & GetPlayerName(Index) & ".ini", "QUESTS", "Quest" & QuestCount)) = 1 Then Call CustomMenuLabel(Index, IndexCount+3, GetVar("Scripts\Quests\QuestSystem.ini", "QUEST" & QuestCount, "Description2"), 3, 50, 8, 0, 0, 190, 200) Call CustomMenuLabel(Index, IndexCount+4, "Yes!", 3, 260, 8, 5, 0, 25, 15) Call CustomMenuLabel(Index, IndexCount+5, "Not Yet!", 3, 280, 8, 5, 0, 50, 15) Exit Do End If End If End If IndexCount = IndexCount + 6 QuestCount = QuestCount + 1 Loop If Amount = QuestCount - 1 Then Call CustomMenuLabel(Index, 4, GetVar("Scripts\Quests\QuestSystem.ini", "QUESTS", "EndOfQuests"), 3, 50, 8, 0, 0, 190, 200) End If Exit Sub '***********************End Quest*********************** Case Else Call PlayerMsg(Index, "No NPC script found. Please contact an admin to solve this problem.", WHITE) Exit Sub End SelectEnd Sub```2\. My bad, you should find that in Server source. I edited it, my mistake man. It's not Client, but Server source.I hope this helps.-Thanks Link to comment Share on other sites More sharing options...
uman Posted September 13, 2009 Share Posted September 13, 2009 I fixed all the problems!I'll return back when quest system works!Thank You very much. Link to comment Share on other sites More sharing options...
Zamin Posted September 14, 2009 Author Share Posted September 14, 2009 OK, let me know if you need anything.-Thanks Link to comment Share on other sites More sharing options...
Broojo02 Posted November 12, 2009 Share Posted November 12, 2009 Edit: Nevermind, stupid directional search. Link to comment Share on other sites More sharing options...
Zetasis Posted November 24, 2009 Share Posted November 24, 2009 Okay I added this quest system and I must say this is great. I'm having porblems getting it to work though. When ever I try and talk to the quest NPC nothing seems to happen. When I push the page down button the quest log will load up so I am not sure if it is my scripts or not. Here is my main.txt will someone please look at it and let me know if I installed everything right? If not would you please let me know what I did wrong and explane how to fix it? Thank you very much. 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