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

0 Members and 1 Guest are viewing this topic.

RaPiDzZ123

  • Jr. Member
  • **
  • Posts: 23
  • 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: 938
  • The God of the Galaxy
  • Awards 2 years on site+300 posts 1 year on site+100 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: 23
  • 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

byodinsbeard13

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
    • Awards
  • Xbox: byodinsbeard13
Re: Quest Scripting, help needed.
« Reply #3 on: July 25, 2017, 02:08:12 AM »
Making such a script is easy just make a script with set hisory to the name of the quest then when is removed it runs a script to start  a quest sorry it not in full detail due to me typing on a tablet.

Lunar

  • Elite Member
  • *****
  • Posts: 938
  • The God of the Galaxy
  • Awards 2 years on site+300 posts 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: Qvzw
  • PSN: Widumn_Boise
Re: Quest Scripting, help needed.
« Reply #4 on: July 26, 2017, 03:32:44 AM »
What? That doesnt make sense, and also you can clearly tell his question has already been answered, no need to give a half explanation of whatever youre trying to say.

byodinsbeard13

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
    • Awards
  • Xbox: byodinsbeard13
Re: Quest Scripting, help needed.
« Reply #5 on: July 26, 2017, 04:00:10 AM »
Yeah and theres no reason to be rude either. Enlish is not my native language

Lunar

  • Elite Member
  • *****
  • Posts: 938
  • The God of the Galaxy
  • Awards 2 years on site+300 posts 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: Qvzw
  • PSN: Widumn_Boise
Re: Quest Scripting, help needed.
« Reply #6 on: July 26, 2017, 04:06:06 AM »
English or not, you attempted to answer a question thats already been answered.

byodinsbeard13

  • Jr. Member
  • **
  • Posts: 21
    • View Profile
    • Awards
  • Xbox: byodinsbeard13
Re: Quest Scripting, help needed.
« Reply #7 on: July 26, 2017, 04:08:58 AM »
Ok im sorry but I do believe you could lighten up a bit im trying to be part of the tmf community