Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
lussien
Newbie


Joined: 04 Apr 2009
Posts: 2

PostPosted: Sat Apr 04, 2009 3:10 pm   

CMUD event in prompt not firing when it's supposed to.
 
I've checked all triggers to make sure that they match the prompt that I have in Lusternia, however, it doesnt seem to do any good. When my health gets low below my healthlimit, it continues to do nothing and not fire my autosip. Only when I've manually executed the script, then it worked once. There are variables of my prompt, my health and max health and all of that. I use the ATCP prompt to keep track of my max statistics and all the health jiggy. So right now, I cannot figure out why my sipper doesnt want to fire.

Codes:

ATCP:
Code:
<trigger name="promptATCP" type="Telnet" param="200" priority="1" case="true" stop="true" regex="true" newline="false" prompt="true" id="32">
  <pattern>NL:(\d+)/100 H:(\d+)/(\d+) M:(\d+)/(\d+) E:(\d+)/(\d+) P:(\d+)/10</pattern>
  <value><![CDATA[//High priority trigger! Make sure other high-pris are set in appropriate order.
//Trigger returned values list:
//%1 is percent to next level (of 100%)
//%2 is current HP
//%3 is max hp
//%4 is current mana
//%5 is max mana
//%6 is current ego
//%7 is max ego
//%8 is current power (of 10)
oldHealth = @health
health = %2
#if (%3 <> @maxHealth) {
  maxHealth = %3
  healthSipLimit = (%3-%round( (%3*0.15+100)*1.2*1.3))
  healthSparkleberryLimit = %round( %3-(%3*0.1)-(%3*0.15+100)*1.2)
  }
oldMana = @mana
mana = %4
#if (%5 <> @maxMana) {
  maxMana = %5
  manaSipLimit = (%5-%round( (%5*0.15+100)*1.2*1.3))
  manaSparkleberryLimit = %round( %5-(%5*0.1)-(%5*0.15+100)*1.2)
  }
oldEgo = @ego
ego = %6
maxEgo = %7
#if (%7 <> @maxEgo) {
  maxEgo = %5
  egoSipLimit = (%7-%round( (%7*0.15+100)*1.2*1.3))
  egoSparkleberryLimit = %round( %7-(%7*0.1)-(%7*0.15+100)*1.2)
  }
power = %8
levelPercent = %1]]></value>
</trigger>


Prompt:
Code:
<trigger name="promptNormal" priority="2" case="true" stop="true" regex="true" newline="false" prompt="true" id="34">
  <pattern>^(\d+)h, (\d+)m, (\d+)e, (\d+)p(?:, (\d+)mo)? ([esSilrxbdkp]*)-$</pattern>
  <value><![CDATA[//High priority trigger! Make sure other high-pris are set in appropriate order.
#if (%6 <> @promptString) {
  #if (%pos( "e", %6) > 0) {balMind = 1} {balMind = 0}
  #if (%pos( "l", %6) > 0) {balBodyLeftArm = 1} {balBodyLeftArm = 0}
  #if (%pos( "r", %6) > 0) {balBodyRightArm = 1} {balBodyRightArm = 0}
  #if (%pos( "x", %6) > 0) {balBody = 1} {balBody = 0}
  promptString = %6
  }
#if (%null( %5)) {momentum = 0} {momentum = %5}
#raiseevent onPromptHealth]]></value>
</trigger>


Event:
Code:
<event event="onPromptHealth" priority="360" id="36">
  <value>#if (@sipBalance == 1) {#IF (@health < @healthSipLimit) {
    siphealth
    sipBalance = 0
    }}
    #echo test</value>
</event>


So I sent these codes to a friend of mine who uses CMUD and his prompt can always see the echo -test after his prompt, but mine isnt doing anything. I've made sure the EO/G-something is checked as well. I really dont know what else to do to get my script to start sipping.

A little help please?
Reply with quote
lussien
Newbie


Joined: 04 Apr 2009
Posts: 2

PostPosted: Sat Apr 04, 2009 3:39 pm   
 
Alright, please forget this topic. Its fixed. I just need to check the Newline.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net