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

[EO] Alatar's Quest System v1.1, Additional rewards…


Pasketi
 Share

Recommended Posts

Hi!

I'm trying to modify a copy of EO for my old game project. I think I'm quite close to correcting some problems in Alatar's Quest system, but I happen to be stuck.

Problem:
I've added 9 more reward-item and reward-item value scroll bars on the "Rewards" page, changed all the constants to arrays, added loops everywhere, where they are needed and modified the code as I THINK it should be done. What it does, it crashes the client when the quest editor is opened. Error message says it's RTE 380: Invalid Property Value

Also, for the next 279 days I'm in the army, so I can't possibly look deeper on this problem as often as I liked to.

The scrollbar names are the same, except for the (0) - (9) in the end.

Where I think the problem is (client side):

```
Private Sub scrlItemRew_Change(Index As Integer)
    lblItemReward(Index).Caption = "Item Reward: " & scrlItemRew(Index).Value & " (" & scrlItemRewValue(Index).Value & ")"
    Quest(EditorIndex).RewardItem(Index) = scrlItemRew(Index).Value
End Sub

Private Sub scrlItemRewValue_Change(Index As Integer)
    lblItemReward(Index).Caption = "Item Reward: " & scrlItemRew(Index).Value & " (" & scrlItemRewValue(Index).Value & ")"
    Quest(EditorIndex).RewardItemAmount(Index) = scrlItemRewValue(Index).Value
End Sub
```
The rest of the ducking thing…

In declarations:

```
    RewardItem(0 To 9) As Long 'ToDo: make this dynamic
    RewardItemAmount(0 To 9) As Long
```
In "QuestEditorInit":

```
        .scrlExp.Value = Quest(EditorIndex).RewardExp
        For i = 0 To 9
        .scrlItemRew(i).Value = Quest(EditorIndex).RewardItem(i)
        Next
        If Not Quest(EditorIndex).RewardItemAmount(i) = 0 Then
            For i = 0 To 9
            .scrlItemRewValue(i).Value = Quest(EditorIndex).RewardItemAmount(i)
            Next
        Else
            For i = 0 To 9
            .scrlItemRewValue(i).Value = 1
            Next
        End If

        'load task nº1
etc.
```
In Sub Form_Load:

```
    Dim i As Integer
    For i = 0 To 9
        scrlItemRew(i).Max = MAX_ITEMS
        scrlItemRewValue(i).Max = MAX_BYTE
    Next
```
Server side:

In Declarations:

```
    RewardItem(0 To 9) As Long
    RewardItemAmount(0 To 9) As Long
```
In SaveQuest:

```
        For i = 0 To 9
            Put #F, , Quest(QuestNum).RewardItem(i)
            Put #F, , Quest(QuestNum).RewardItemAmount(i)
        Next
```
In LoadQuests:

```
            For n = 0 To 9
                Get #F, , Quest(i).RewardItem(n)
                Get #F, , Quest(i).RewardItemAmount(n)
            Next
```
In EndQuest:

```
    'give rewards
    For i = 0 To 9
        GiveInvItem Index, Quest(QuestNum).RewardItem(i), Quest(QuestNum).RewardItemAmount(i)
    Next
```
I think that was all… Any suggestions?

-P
Link to comment
Share on other sites

And you say it now?

I've been in the army for, what, 83 days, and before that I already half a year ago dumped the project, because I had no graphics (Now I apologize for my angryness, because I'm tired, and I've been working on this for quite a while today) artist. Now, when I'm being enthusiastic to get a NEW game engine to work properly for my purposes (I have an assload of stuff to import and learn) you say to wait for a while. How long? A week? A month? 279 days?

God damnit… Can't you even try? This'll maybe help Alatar too (supposing he reads this).

PS. Oh, added one thing in the first ~~thread~~ post I totally forgot about…
PSS. I'm tired...
Link to comment
Share on other sites

Hi. Nice to see that you're using my system. Right now i'm working on multiple-rewards, and i'm getting good results on it so just be patient, it won't take thaaat long as the previous version did.

On the other hand you say it's crashing. What is the error that the ide shows?
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...