I’ve been struggling a bit with my bartering code to get the Stone of the Present. Basically, I want to make it so that if you go too low they feel insulted, and increase the minimum they will accept. There seems to be a bug in here somewhere, but I don’t appear to see it correctly Any suggestions?
Yorgoghs extends his webbed appendages, and a resonant hum echoes through the water.
From water around the island more amphibian beings appear and stand behind him.
You realize these all wear clothing and other paraphernalia that is similar to that of Yorgoghs.
Yorgoghs then points towards a radiant seashell pendant that he wears, “The council is now convened to listen to you,
and will listen to what you will offer in exchange for the Stone of the Present.”
*temp barter_increase 0
*temp barter_too_low 20
*temp barter_low 25
temp barter_high (30 + (interplanar_counter5))
temp barter_too_high (40 + (interplanar_counter5))
temp barter_super_high (50 + (interplanar_counter5))
*temp bartering_round 0
*label bartering_for_stone_present
*set bartering_round +1
*choice
*if ((bartering_round =1) and (resource_iron >0)) #"I will offer you 1 iron."
*goto barter_super_low
*if ((resource_iron > 19) and (bartering_round >1)) #"I will offer you 20 iron."
*label barter_super_low
*set bartering_round +1
*set barter_too_low +10
*set barter_low +10
*set barter_high +10
*set barter_too_high +15
*set barter_super_high +25
Yorgoghs and the members of the council look at each other and shake their heads. "You…continue to insult us. As a consequence,
the minimum price we will accept has thus greatly gone up."
*goto bartering_for_stone_present
*if ((resource_iron > 24) and (bartering_round >2)) #"I will offer you 25 iron."
*set bartering_round +1
*set barter_too_low +10
*set barter_low +10
*set barter_high +10
*set barter_too_high +15
*set barter_super_high +25
Yorgoghs and the members of the council look at each other and shake their heads. "You…continue to insult us. As a consequence,
the minimum price we will accept has thus greatly gone up."
*goto bartering_for_stone_present
*if ((resource_iron > 29) and (bartering_round >3)) #"I will offer you 30 iron."
*set bartering_round +1
*set barter_too_low +10
*set barter_low +10
*set barter_high +10
*set barter_too_high +15
*set barter_super_high +25
Yorgoghs and the members of the council look at each other and shake their heads. "You…continue to insult us. As a consequence,
the minimum price we will accept has thus greatly gone up."
*goto bartering_for_stone_present
*if (resource_iron > (barter_too_low-1)) #"I will offer you ${barter_too_low} iron."
*set bartering_round +1
*set barter_too_low +5
*set barter_low +5
*set barter_high +5
*set barter_too_high +10
*set barter_super_high +20
Yorgoghs and the members of the council look at each other and shake their heads. "You…insult us. The minimum price we will accept has thus greatly gone up."
*goto bartering_for_stone_present
*if (resource_iron > (barter_low-1)) #"I will offer you ${barter_low} iron."
*set barter_too_low +1
*set barter_low +2
*set barter_high +3
*set barter_too_high +5
*set barter_super_high +10
Yorgoghs and the members of the council look at each other and shake their heads. "No, that will not do it. We have rethought the value of the stone."
*goto bartering_for_stone_present
*if (resource_iron > (barter_high-1)) #"I will offer you ${barter_high} iron."
*set resource_iron - barter_high
Yorgoghs and the members of the council look at each other and nod, "We accept."
*goto get_stone_present
*if (resource_iron > (barter_too_high-1)) #"I will offer you ${barter_too_high} iron."
*set resource_iron - barter_too_high
Yorgoghs and the members of the council look at each other and nod, "We accept."
*goto get_stone_present
*if ((resource_iron > (barter_super_high-1)) and (bartering_round >1)) #"I will offer you ${barter_super_high} iron."
*set resource_iron - barter_super_high
Yorgoghs and the members of the council look at each other and nod, "We accept."
*label get_stone_present
*set have_stone_present 1
You return the portal to fetch the iron, and once it is in their possession Yorgoghs hands you the Stone of the Present.
Then, they escort you back to the portal, which you traverse to return to your study.
*page_break
*if (forge_stone_ring =1)
Taking the Stone of the Present, a radiant ruby, you place it on the Time Ring,
next to the Stone of the Past.
As you do so a deluge of experiences inundates your consciousness.
Visions of the world around you come flooding to you,
and an invigorating surge of connection with the elemental planes courses through your bones.
In this temporal tapestry, the present unfolds with crystal clarity.
You witness the ebb and flow of currents in the elemental realms,
feeling the heartbeat of the living world resonate within your bones.
The red gem pulses in rhythmic unison with the runes next to it and the azure light of the Stone of the Past next to it.
Only one stone is now left for you to complete the artifact.
[Mana +5. The Time Ring, if completed, is a [i]Primordial Artifact[/i], which is required if you wish to try to become a demi-god.]
*set mana +5
*set max_mana +5
*return
*else
*return
#"I do not have enough iron."
Yorgoghs shakes his head. "The council notes this."
With that they escort you back to the portal, which you traverse to return to your study.
*page_break
*return