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

[EO] Quest system - edited


Qazek
 Share

Recommended Posts

  • Replies 95
  • Created
  • Last Reply

Top Posters In This Topic

@Robin:

> The amount of references to '.ini' files in this thread is making me cry.
>
> Do you lot learn _nothing_ from using Origins?

Apparently not heh. Ummm… What's a better (or easier) way to go about making quests do you think? It would be nice to not have this headache from trying to figure out how to send .ini information from the server...
Link to comment
Share on other sites

@Flaw:

> Stop saying .INI you're gonna make Robin shoot himself xD
>
> Origins doesn't use .INI files because they are slower, and more insecure, when compared with the types that Robin has come up with.

Yea, i get that now. I guess I got stuck in the past lol.
Link to comment
Share on other sites

@Flaw:

> Origins doesn't use .INI files because they are slower, and more insecure, when compared with the types that Robin has come up with.

No they're not. xD

Stable abuses them far too much. If you want to add something to the player data, add it to the damn player data. Don't make a whole new array which you just dump into a new set of files.

The reason this is done so much is because of inherent restrictions on the scripting system from Stable, and it's obviously been carried over when people start editing the source code.

Origins is a brand new slate. You should all wipe your memories clean of what you've done with Stable and Evolution in the past and learn anew.
Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
@Robin:

> If you look at the code, it's easy to see that it's just a basic "Give item" quest system. You attack a quest NPC to start the quest, you attack them again when you have the item they want, you receive reward.

I try to attack but i see only that text what I write on Say text box :( I do every think what we say
Link to comment
Share on other sites

@[Cake:

> Vitin â„¢ link=topic=62859.msg711256#msg711256 date=1289425499]
> Or he didnt download the NPC editor file.

I have downloaded NPC Editor and passed in to src folder on client side.
I know i send to us my client :P
[http://www.speedyshare.com/files/25132983/Orgins.rar](http://www.speedyshare.com/files/25132983/Orgins.rar)
Link to comment
Share on other sites

  • 1 month later...
Find Sub CanPlayerAttackNPC in modCombat. In this sub find this code:

```
If NpcX = GetPlayerX(attacker) Then
                If NpcY = GetPlayerY(attacker) Then
                    If Npc(npcNum).Behaviour <> NPC_BEHAVIOUR_FRIENDLY And Npc(npcNum).Behaviour <> NPC_BEHAVIOUR_SHOPKEEPER Then
                        CanPlayerAttackNpc = True
                    End If
                End If
            End If
```And replace this:

```
If Npc(npcNum).Behaviour <> NPC_BEHAVIOUR_FRIENDLY And Npc(npcNum).Behaviour <> NPC_BEHAVIOUR_SHOPKEEPER Then
                        CanPlayerAttackNpc = True
                    End If
```To:

```
If Npc(npcNum).Behaviour <> NPC_BEHAVIOUR_FRIENDLY And Npc(npcNum).Behaviour <> NPC_BEHAVIOUR_SHOPKEEPER Then
                        CanPlayerAttackNpc = True
                    Else
                        If Npc(NpcNum).Behaviour = NPC_BEHAVIOUR_QUEST Then
                            If Npc(NpcNum).QuestLevel <= GetPlayerLevel(Attacker) Then
                                If GetVar("data\quest\" & GetPlayerName(Attacker) & ".ini", "QUEST", "Quest" & Npc(NpcNum).QuestNum) = 0 Then
                                    Call PlayerMsg(Attacker, Npc(NpcNum).QuestMsg1, Yellow)
                                    Call PutVar("data\quest\" & GetPlayerName(Attacker) & ".ini", "QUEST", "Quest" & Npc(NpcNum).QuestNum, 1)
                                Exit Function
                                End If

                                If GetVar("data\quest\" & GetPlayerName(Attacker) & ".ini", "QUEST", "Quest" & Npc(NpcNum).QuestNum) = 1 Then
                                If HasItem(Attacker, Npc(NpcNum).QuestReqItem) Then
                                    Call PlayerMsg(Attacker, Npc(NpcNum).QuestMsg2, Yellow)
                                    Call TakeInvItem(Attacker, Npc(NpcNum).QuestReqItem, Npc(NpcNum).QuestReqItemHowMany)
                                    Call GiveInvItem(Attacker, Npc(NpcNum).QuestRewItem, Npc(NpcNum).QuestRewItemHowMany)
                                    Call PutVar("data\quest\" & GetPlayerName(Attacker) & ".ini", "QUEST", "Quest" & Npc(NpcNum).QuestNum, 2)
                                    Exit Function
                                Else
                                    Call PlayerMsg(Attacker, Npc(NpcNum).QuestMsg3, Yellow)
                                End If
                                End If

                                If GetVar("data\quest\" & GetPlayerName(Attacker) & ".ini", "QUEST", "Quest" & Npc(NpcNum).QuestNum) = 2 Then
                                    Call PlayerMsg(Attacker, Npc(NpcNum).QuestMsg4, Yellow)
                                Exit Function
                                End If
                            Else
                                Call PlayerMsg(Attacker, "You don't have required level!", Yellow)
                            End If
                        End If
```And everything what is doing on CanAttackNPC is in CanPlayerAttackNPC ;)
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...