Author Topic: [Scripts] Quest Scripting, help needed.  (Read 368 times)

0 Members and 1 Guest are viewing this topic.

RaPiDzZ123

  • Jr. Member
  • **
  • Posts: 21
  • If it doesn't challange you, It doesn't change you
    • View Profile
    • Awards
  • Xbox: Zeus RaPiDzZ
[Scripts] Quest Scripting, help needed.
« on: July 04, 2017, 03:21:22 PM »
Hey guys, I'm looking in on how to create a quest script basically I want it to be able to have mulitple quests i.e after finishing one quest a new one unlocks. The quests will be to do with mining blocks for example 'I need 100 limestone can you please bring me it'.
If anyone can help me out it would be much appreciated.. Really stuck with this one
:p
Green Cloud

Lunar

  • Elite Member
  • *****
  • Posts: 899
  • The God of the Galaxy
  • Awards 1 year on site+100 posts 2 years on site+300 posts
    • View Profile
    • Awards
  • Xbox: Qvzw
  • PSN: Widumn_Boise
Re: Quest Scripting, help needed.
« Reply #1 on: July 04, 2017, 06:25:11 PM »
Code: [Select]
If
   HasHistory [quest1] [player] [false]
   HasInventory [player] [limesteone] [>=] [100]
Then
   Inventory [player] [take] [limestone] [100]
   History [quest1] [player] [1]
   Inventory [player] [add] [goldpieces] [500]
   Notify [Thank you, here is 500 Gold Pieces!] [local]
ElseIf
   HasHistory [quest1] [player] [true]
Then
   Notify [You have already completed this quest!] [local]
Else
   Notify [I need 100 limestone can you please bring me it?] [local]
EndIf

As for the part that unlocks other quests when you finish this one. (This is an example quest of bringing 100 coal)

Code: [Select]
If
   HasHistory [quest1] [player] [true]
   HasHistory [quest2] [player] [false]
   HasInventory [player] [coal] [>=] [100]
Then
   Inventory [player] [take] [coal] [100]
   History [quest2] [player] [1]
   Inventory [player] [add] [goldpieces] [1000]
   Notify [Thank you, here is 1000 Gold Pieces!] [local]
ElseIf
   HasHistory [quest2] [player] [true]
Then
   Notify [You have already completed this quest!] [local]
ElseIf
   HasHistory [quest1] [player] [false]
Then
   Notify [You must complete the "100 Limestone" quest before doing this one!]
Else
   Notify [I need 100 coal can you please bring me it?] [local]
EndIf

RaPiDzZ123

  • Jr. Member
  • **
  • Posts: 21
  • If it doesn't challange you, It doesn't change you
    • View Profile
    • Awards
  • Xbox: Zeus RaPiDzZ
Re: Quest Scripting, help needed.
« Reply #2 on: July 04, 2017, 07:09:43 PM »
Thanks alot Lunar, really helped alot. Much appreciated.
Green Cloud