Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

EO Quest/Item/Tile Source Systems


Richy420Rich
 Share

Recommended Posts

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

  • Replies 78
  • Created
  • Last Reply

Top Posters In This Topic

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

I've tried adding multiple quests on top of one npc, like so:

```
Option Explicit

Public Sub QuestScript(attacker, Script)

Select Case Script

Case 1
If Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 3 Then
Call PlayerMsg(attacker, "I have nothing more for you.", Green)
ElseIf Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 2 Then
If HasItem(attacker, 4) Then
Call 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 = 3
Else
Call PlayerMsg(attacker, "Angel: I really don't know where to get one. haha.", Green)
End If
If Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 2 Then
Call PlayerMsg(attacker, "Angel: Now go get the other item", Green)
ElseIf Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 1 Then
If HasItem(attacker, 3) Then
Call 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 = 2
Else
Call 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 If
ElseIf Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 0 Then
Call 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 = 1
End If
Exit Sub

Case 2
Exit Sub

Case 3
Exit Sub

Case 4
Exit Sub

Case 5
Exit Sub

Case Else
Call PlayerMsg(attacker, "There is no quest script for NPC Number " & Int(Script) & ". Check the source..", BrightRed)
Exit Sub

End Select
End 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

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 1
If Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 3 Then
Call PlayerMsg(attacker, "I have nothing more for you.", Green)
ElseIf Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 2 Then
If HasItem(attacker, 4) Then
Call 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 = 3
Else
Call PlayerMsg(attacker, "Angel: I really don't know where to get one. haha.", Green)
End If
ElseIf Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 1 Then
If HasItem(attacker, 3) Then
Call 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 = 2
Else
Call 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 If
ElseIf Player(attacker).NPCQuest(Int(Script)).NPCQuestProgress = 0 Then
Call 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 = 1
End If
Exit Sub
```
Link to comment
Share on other sites

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...