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

Why is this matching broken?

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Script Help
View previous topic :: View next topic  
Author Message
Treise



Joined: 11 Mar 2012
Posts: 19

PostPosted: Sun Mar 11, 2012 4:17 am    Post subject: Why is this matching broken? Reply with quote

This is a simple tell in my script:

#action {^$leader tells you 'relo'} {spell rel $leader;#showme spell rel $leader;}

The example text from the mud is something like. Eskae tells you 'relo'.

Yet 99% of the time when Eskae is set as leader of the group and tells me to perform an action, there is never a match. Why is that?

I've also tried

#action {$leader tells you 'relo'} {spell rel $leader;#showme spell rel $leader;}

And what seems to work is when I start my mud client up with #variable {leader} {Eskae} Those commands function find but then if I set #variable {leader}{Eskae} when after already being in the game it will fail. Is this some screwy thing with Mac OSX VS windows 7 vs linux?
Back to top
View user's profile Send private message
Azirek



Joined: 29 Jan 2012
Posts: 28

PostPosted: Sun Mar 11, 2012 6:52 am    Post subject: Reply with quote

Try:
Code:
#var {leader}{}
#alias {setleader %1}{#var {leader}{%1};#sh {Your leader is $leader}}
#action {^$leader tells you 'relo'} {spell rel $leader;#showme spell rel $leader;}


When You are in the game use alias:
Code:
setleader Eskae

_________________
GNU Linux Slackware Current, Tintin++ 2.00.7 and 2.00.9
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Sun Mar 11, 2012 9:58 am    Post subject: Reply with quote

The variable in the trigger of the action is substituted when the trigger is created. If you want it to remain a variable use:

Code:

#action {^$$leader tells you 'relo'} {spell rel $leader;#showme spell rel $leader;}
Back to top
View user's profile Send private message Send e-mail
Treise



Joined: 11 Mar 2012
Posts: 19

PostPosted: Sun Mar 11, 2012 2:29 pm    Post subject: Reply with quote

It is still not matching for some reason.

Here is the group tell.

** Kitt tells you 'come'

Here is my setup for the trigger
#variable {leader} {Kitt}

#act {$leader tells you 'come'}
{
spell rel $leader;
#showme spell rel $leader;
}

Why is it not matching and forcing me to relocate to the leader? When I tried the ^ and the ^$$ in front of the leader in the action it still didn't work. Any better suggestions?
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Sun Mar 11, 2012 3:03 pm    Post subject: Reply with quote

Works for me.

Code:

#act {^$$leader tells you 'come'} {#showme spell rel $leader}
#OK. {^$leader tells you 'come'} NOW TRIGGERS {#showme spell rel $leader} @ {5}.
#var leader Kitt
#OK. VARIABLE {leader} HAS BEEN SET TO {Kitt}.
#showme Kitt tells you 'come'
spell rel Kitt
Kitt tells you 'come'


Version 2.00.8
Back to top
View user's profile Send private message Send e-mail
Treise



Joined: 11 Mar 2012
Posts: 19

PostPosted: Sun Mar 11, 2012 6:07 pm    Post subject: Reply with quote

Is it possible that one of my action scripts could be incorrect and it is causing that one not to fire? Wouldn't I get some error if that was the case?
Back to top
View user's profile Send private message
Treise



Joined: 11 Mar 2012
Posts: 19

PostPosted: Sun Mar 11, 2012 6:31 pm    Post subject: Reply with quote

I don't understand... so I have this process it won't work.

I log in and the leader variable is set like this in the config file.

#variable {leader} {Sima}

#action {$leader tells you 'come'} {spell rel $leader}

It will work if Sima tells me to come.

Then I have the following action:

#act {%1 is now the new leader}
{
#showme %1;
#variable {leader} {%1};
#showme leader = $leader;
}

so lets say the new leader is Eskae after the exchange...

when he tells me to come... it won't match so I never relocate to him.

HOWEVER, if I set him as the leader in the configuration file and restart the client. As soon as I am logged in again if he tells me to come, it will match and I will relocate.
Back to top
View user's profile Send private message
Treise



Joined: 11 Mar 2012
Posts: 19

PostPosted: Sun Mar 11, 2012 6:58 pm    Post subject: Reply with quote

I stripped my script down to the bare bones function to fix the relocation piece.

< 3266hp 228mana 299mv > #showme Mogul is now the new leader of the group.
Mogul is now the new leader of the group.
#show me $leader
me Mogul
#showme $leader
Mogul
#showme ** $leader tells you 'come'
spell rel Mogul
** Mogul tells you 'come'
Relocate to whom ?

< 3266hp 228mana 299mv > #variable {leader} {Eskae}
#OK. VARIABLE {leader} HAS BEEN SET TO {Eskae}.
#showme ** $leader tells you 'come'
** Eskae tells you 'come'


So the same logic that assigned Mogul as leader works... but if manually change the $leader variable it seems to break the logic... why is this?

Here is my whole configuration file.

#session imperial 130.230.72.153 5000

#variable {leader} {Mogul}
#variable {stabber} {Redrum}
#variable {cryer} {Mogul}
#variable {fighting} {0}
#variable {decapper} {0}
#variable {grouped} {0}

#action {$leader tells you 'comegsum'}
{
spell rel $leader;
#showme spell rel $leader;
}
#action {$leader tells you 'come'}
{
spell rel $leader;
#showme spell rel $leader;
}
#action {$leader tells you 'relo'} {spell rel $leader;#showme spell rel $leader;}
#action {$leader tells you 'nilaah'} {spell rec;#showme spell rec;}
#action {$leader tells you 'tesuit'} {spell rec tesuit;#showme spell rec tesuit;}

#action {You are now a group member}
{

#variable {grouped} {1}
}

#action {%1 tells you 'delegate'}
{
delegate %1;
}

#action {%1 is now the new leader of the group.}
{
#variable {leader} {%1};
}
Back to top
View user's profile Send private message
Treise



Joined: 11 Mar 2012
Posts: 19

PostPosted: Sun Mar 11, 2012 7:43 pm    Post subject: Reply with quote

Ha... figured it out.

#action {^** $$leader tells you 'come'}
{
spell rel $leader;
#showme spell rel $leader;
}

guarentee's the commands after i set the values myself etc. Thanks for your assistance in fixing this issue. I really appreciate it!
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 -> Script Help 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