• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

NPC Problem: executing <action> script even when not necessary

Taturana182

New Member
Joined
May 4, 2008
Messages
9
Reaction score
0
I have an problem with npc interaction system, dunno if its a bug or if I'm doing something wrong. Look:

Code:
<interact topic="1" keywords="yes">
      <response text="By the way, I would like a donation for my temple. Are 500 gold ok?">
        <action name="topic" value="2"/>
		<action name="price" value="500"/>
		<action name="amount" value="1"/>
      </response>
    </interact>

<interact topic="2" keywords="yes">
      <response param="lowmoney" text="You want to fool me? May Fafnar burn your soul!">
		<action name="script">
		<![CDATA[
		local condition = createConditionObject(CONDITION_FIRE)
		addDamageCondition(condition, 10, 3000, -50)
		doAddCondition(cid, condition)
		]]>
		</action>
	  </response>
	  <response text="Thank you very much. Now, name me the first person in alphabetical order, his age, his fate, and how long he was on his journeys!">
        <action name="topic" value="3"/>
		<action name="takemoney" value="500"/>
      </response>
    </interact>

But when I say "yes" and it's on topic 2, player starts burning, even if it has the necessary money. It shouldn't happen, the player should only burn if he hasn't the money. It's executing the <action name="script"> of <response param="lowmoney"> even if I have the 500 gp.

OBS: but it don't show the message "You want to fool me? May Fafnar burn your soul!", it only executes the script.

Some solutions?

Thank you
 
Back
Top