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

new window with map

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



Joined: 29 Jul 2012
Posts: 66

PostPosted: Thu Aug 25, 2016 4:47 am    Post subject: new window with map Reply with quote

Hi i have new window with map, i want to connect to it via nc because i need to have some seperate logic there like editing features.

so, every thins works i create bunch of actions, sessions and events to comunicate both ways, but keyboard works funny i dont know why
this is how it works:

http://screencast.com/t/AIcDa96gYb

thanks
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Thu Aug 25, 2016 6:36 pm    Post subject: Reply with quote

Looks like you have some macros set?

You can't macro normal keys without creating weird behavior.
Back to top
View user's profile Send private message Send e-mail
dorian



Joined: 29 Jul 2012
Posts: 66

PostPosted: Fri Aug 26, 2016 2:13 am    Post subject: Reply with quote

i thought that myself but i have no macros at all. this is the full script:

Code:

#config {command echo} {off};
#split {34} {1};
#run mapa {nc -lp 9082}

#delay {1} {
   #session callback {127.0.0.1} {9083};
   #mapa;
}

#action {read:%1} {
   #var {map_url} {%1};
   #map read %1;
}

#action {execute:%1} {
   %1;
}
#action {next_position}{
   loc;
}

#action {save} {
   #map write ${map_url};
}

#action {move:%1} {
   #var last_recive %1;
   %1;
}

#action {goto:%1} {
   #map goto {} {} {%1};
}

#action undo {
   #map undo;
}

#action {desc:%1} {
   #map set {roomdesc} {%1};
   #map write ${map_url};
}


#action {mode:%1} {
   #var mapa_mode %1;
   #switch {"%1"} {
      #case {"walk"} {#map flag static on;#map flag nofollow off;#var mode {<BDB><aaa> WALK <088>}};
      #case {"craft"} {#map flag nofollow off;#map flag static off;#var mode {<CAB><aaa> CRAFT <088>}};
      #case {"freeze"} {#map flag static on;#map flag nofollow on;#var mode {<CDF><aaa> FREEZE <088>}};
   };
   #echo {{%+1s} {1}} {<ECA><aaa>  $vnum  <088> <BDB><aaa>   $gmcp  <088> $mode};

}

#event {SCREEN RESIZE} {
   #echo {{%+1s} {1}} {<ECA><aaa>  $vnum  <088> <BDB><aaa>   $gmcp  <088> $mode};
}



#event {MAP ENTER ROOM} {
   #var vnum %0;

   #map get {roomexits} {ex};
   #map get {roomdesc} {gmcp};

   #echo {{%+1s} {1}} {<ECA><aaa>  $vnum  <088> <BDB><aaa>   $gmcp  <088> $mode};


   #if {$visit[$vnum] > 0} {
      #math {vi} {$visit[$vnum]+1};
   } {
      #var {vi} {1};
   }
   #var {visit[$vnum]} {$vi};
};

#event {SEND OUTPUT} {
   #var last_send {%0};

   #sh {<ead>%0<088>}

   #replace {last_send} { } {};
   #replace {last_send} {\x0d} {};
   #replace {last_send} {\n} {};
   #if {"$last_send" == "$last_recive"} {
      #nop;
   };
   #elseif {"$last_send" != ""} {
      #sh {$last_send = $last_recive};
      #format len {%L} {$last_send};
      #if {$len > 2} {
         #if {$ben_sent != 1} {#callback {$last_send}}
         #var ben_sent 1;
         #delay {1} {#var ben_sent 0};
      }
   }
}

#function inform {
   #sh %1;
   #return;
}
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Fri Aug 26, 2016 5:17 pm    Post subject: Reply with quote

Can try using #cursor echo on in the #napa session.

When you use #run you leave the tt++ input mode, but #cursor echo on should re-enable it.

Hope that helps. Ecstatic
Back to top
View user's profile Send private message Send e-mail
dorian



Joined: 29 Jul 2012
Posts: 66

PostPosted: Sat Aug 27, 2016 4:12 pm    Post subject: Reply with quote

looks good i would not figure that one out,

thanks a lot.
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