The code defines a quest called "Govern1MarauderRoom" and an object...

November 21, 2023 at 09:07 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 ``` ROOM Govern1MarauderRoom def Object Govern1Marauder begin Attribute GoalReachedIndex = 0-1 phrase TakeQuest() this.State = qGiven call PrintToJournal(this, 'Министр внутренних дел Альгейры Хуан Кадэрас готов предоставить мне разрешение на посещение закрытой зоны в обмен на "решение" вопроса с главарем мародеров в Санта-Марии. Имя главаря - Рауль Мангоста. В качестве доказательства необходимо представить министру именной армейский жетон Мангосты.') this.GoalReachedIndex = (on event "Player takes "+str(RaulMangostaJeton) callm this.GoalReached() Index(call GetNewIndex())) end phrase phrase GoalReached() call PrintToJournal(this, "Жетон Мангосты у меня. Можно возвращаться к Хуану Кадэрасу.") end phrase phrase CompleteQuest() this.State = qCompleted this.CheckPrecedence() call PrintToJournal(this, 'Вопрос с главарем мародеров из Санта-Марии "решен". У меня есть официальная бумага с разрешением на посещение закрытой зоны.') Player.ChangeProfessionalship(5) Player.ChangeReputation(3) SantaMaria.ChangePlayerReputation(30) Sagrada.ChangePlayerReputation(10) LasVacasiones.ChangePlayerReputation(10) clear event this.GoalReachedIndex GlobalSideGovernment.CompletedQuests++ // SantaMaria.SetOwner(sideGovernment) /* SantaMaria.OriginalOwner = GlobalSideGovernment callm GlobalSideGovernment.SendSpecialPatrol(Artrigo, SantaMaria, 10, ptAttackSectorWin) callm SantaMariaHead.SetSector(SantaMaria, "SantaMariaHead") callm GlobalSideRebels.SendSpecialPatrol(ForestCamp, SantaMaria, 30, ptAttackSector) */ end phrase ``` example of quest code

The code defines a quest called "Govern1MarauderRoom" and an object called "Govern1Marauder". The quest has several methods defined.

The "TakeQuest()" method sets the state of the quest to "qGiven" and prints a message to the journal. It also sets the "GoalReachedIndex" attribute to a value based on an event related to the player taking a certain item.

The "GoalReached()" method prints a message to the journal indicating that the player has the required item.

The "CompleteQuest()" method sets the state of the quest to "qCompleted" and performs several actions. It prints a message to the journal, changes the player's professionalship and reputation, changes the reputation of several locations, clears the "GoalReachedIndex" event, and increments a global counter for completed quests.

There are also some commented out lines of code that involve setting ownership of a location, sending patrols, and attacking sectors, but they are currently not active.

Generate your own explanations
Download our vscode extension
Read other generated explanations

Built by @thebuilderjr
Sponsored by beam analytics
Read our terms and privacy policy
Forked from openai-quickstart-node