Solved Bug - 2 Purple Orbs from Yurel

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Solved Bug - 2 Purple Orbs from Yurel

Post by Knight Captain »

Here's the answer to an ancient bug report as to why Yurel can give two purple orbs:

There are three variable checks, as converted:
var got_wheel = hasItemCount(AVATAR, 1, SHAPE_FOOD, QUALITY_ANY, FRAME_CHEESE_WHEEL);
var got_wedge = hasItemCount(AVATAR, 1, SHAPE_FOOD, QUALITY_ANY, FRAME_CHEESE_WEDGE);
var got_green = hasItemCount(AVATAR, 1, SHAPE_FOOD, QUALITY_ANY, FRAME_GREEN_CHEESE);
If you meet the got_wheel check, Yurel says the same text and gives the orb, but misses the setting the of gflags[0x030E] = true; so he still acts hungry. The other two checks correctly set the flag, so you cannot get additional orbs if you didn't first give him the yellow cheese wheel.

As part of my mod work I have fully reimplemented Yurel to fix the many missing closing quotes in his conversation, enable his PATROL barks, and also knock out him saying he's hungry after he's gotten some cheese. Hopefully this can be used in SIfixes someday as well.

The submitter's email is dead. :(
Gotcha!
Posts: 354
Joined: Thu May 14, 2020 1:34 pm

Re: Solved Bug - 2 Purple Orbs from Yurel

Post by Gotcha! »

Created in 2004. Yeah, I can imagine his email is gone. :P
Nice job though!
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Solved Bug - 2 Purple Orbs from Yurel

Post by Dominus »

Thanks! The reason I had a savegame was because I stumbled over it myself as well on my last playthrough and found this earlier bug report.
I'm closing this SI fixes feature request now since it is more in your league now until Marzo moves to accept your NPC monster -> NPC pull request.
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Knight Captain
Posts: 1219
Joined: Thu May 14, 2020 1:34 pm

Re: Solved Bug - 2 Purple Orbs from Yurel

Post by Knight Captain »

On a related note, Surok has two different answers for the Belt of Strength in his code:
Why, thou dost wear the Belt of Strength! 'Twas made by Commander Ardiniss's wife, Loriel, many years ago. If I remember correctly, she made the belt from the hair of Giants and then enchanted it. Loriel was a gifted mage, but alas, was yet another victim of this damnable war with Chaos! As thou dost wear her handiwork, thou shouldst remember her, ", title, "...
Thou dost wear the Belt of Strength?! How didst thou come by it? It was thought lost these many months. No... no, I do not want to know, ", title, ", though I would not show the others the Belt. They would not be as understanding as I and perhaps would demand that thou returnest it.
I hope to reimplement him so he can give different answers if the Avatar has the item or not.
Locked