TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

#delay variable not working...

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
wrxwagon



Joined: 08 Feb 2008
Posts: 11

PostPosted: Fri Feb 08, 2008 10:51 pm    Post subject: #delay variable not working... Reply with quote

Ok this code worked, and now it's broken. I did the upgrade from 97.7 to 97.9

Here's the code:

Code:
#ACTION           {< %0H %1M %2V >}       
{
   #all #var tankhp %0;
   #all #var tankmana %1;
   #if {$tankhp < $crithp}
    {
   #if {$curmana > 89 && $healdelay == 0}
    {
     rf;
     #var healdelay 1;
     #delay 4 {#var healdelay 0};
     };
   #if {$curmana > 49 && $curmana < 90 && $healdelay == 0}
    {
     hf;
     #var healdelay 1;
     #delay 4 {#var healdelay 0};
     };
   #if {$curmana < 50 && $tankmana > 49 && $healdelay == 0}
    {
     #fb sling 'heal' fbi;
     #var healdelay 1;
     #delay 4 {#var healdelay 0};
     };
     }
}
#CONFIG           {TINTIN CHAR}           {#}
#VARIABLE         {crithp}                {130}
#VARIABLE         {healdelay}             {0}


The part that is no long working is the setting of the healdelay variable. In other words my curist character is now spamming heals because the 4 second delay is not kicking in. What gives?
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Sat Feb 09, 2008 4:09 pm    Post subject: Reply with quote

It works for me, though I had to set $curmana myself.

Possibly things get messed up somewhere else?
Back to top
View user's profile Send private message Send e-mail
wrxwagon



Joined: 08 Feb 2008
Posts: 11

PostPosted: Sat Feb 09, 2008 5:54 pm    Post subject: Reply with quote

Yes curmana is set in another session. When I trigger that prompt twice in succession using #showme I get two successive heals, when it should be pausing 4 seconds before the if statement is considered true again. I"ll have to play around with it.
Back to top
View user's profile Send private message
wrxwagon



Joined: 08 Feb 2008
Posts: 11

PostPosted: Tue Feb 12, 2008 10:58 am    Post subject: The fix Reply with quote

I was able to fix this behavior by making healdelay a "global" variable using the #all command. Not sure why I had to do that but it's working!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> General Discussion All times are GMT - 5 Hours
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
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group