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

IRE GMCP auto mapping script

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Finished Scripts
View previous topic :: View next topic  
Author Message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Sun Jul 25, 2010 10:57 pm    Post subject: IRE GMCP auto mapping script Reply with quote

I added a GMCP event handler in the v2.00.3 beta code, available here:

http://tintin.sourceforge.net/download/tintin-beta.tar.gz

This is a basic IRE automapper, the full IRE specification is available at ironrealms.com/gmcp-doc.

An Aardwolf automapper is available in this topic:

http://tintin.sourceforge.net/board/viewtopic.php?t=1662


Here's an example script that makes auto mapping a breeze. Strongly suggested to enable: #map flag nofollow when using this script. Also a good idea to read through the change log.

Code:

#format IAC  %a 255
#format DONT %a 254
#format DO   %a 253
#format WONT %a 252
#format WILL %a 251                                                 
#format SB   %a 250
#format SE   %a 240

#format GMCP %a 201

#nop Turn telnet debug off once everything works as it's spammy.
 
#config {debug telnet} {on}   

#var CLIENT_NAME TinTin++
#var CLIENT_VERSION 2.00.3

#event {PROGRAM START}
{                     
        #var CLIENT_NAME %0;
        #var CLIENT_VERSION %1
}
       
#event {IAC WILL GMCP}
{       
        #send {$IAC$DO$GMCP\};
        #send {$IAC$SB$GMCP Core.Hello { "client": "$CLIENT_NAME", "version": "$CLIENT_VERSION" } $IAC$SE\};
        #send {$IAC$SB$GMCP Core.Supports.Set [ "Room 1", "Room.Info 1" ] $IAC$SE\}
}

#event {IAC SB GMCP Room.Info IAC SE}             
{
        #var ROOM_INFO {%0};

        #map goto {$ROOM_INFO[num]} {dig};

        #map get roomarea {result};         

        #if {"$result" == ""}           
        {
                #map set roomarea $ROOM_INFO[area];                             
                #map set roomnote $ROOM_INFO[environment];
                #map set roomname $ROOM_INFO[name];                 
                #map set roomcolor <178>                           
        };

        #foreach {$ROOM_INFO[exits][]} {exit}                                         
        {
                #map get {roomexit} {result};

                #if {&result[$exit] == 0}
                {                       
                        #map get {roomvnum} {result} {$ROOM_INFO[exits][$exit]};

                        #map dig {$exit} {$ROOM_INFO[exits][$exit]};
                                                                   
                        #if {$result == 0}                         
                        {                 
                                #map set {roomcolor} {<fca>} {$ROOM_INFO[exits][$exit]}
                        }                                                             
                }       
        }       

}


Last edited by Scandum on Fri Nov 04, 2011 5:32 pm; edited 3 times in total
Back to top
View user's profile Send private message Send e-mail
scaryjobob



Joined: 01 Feb 2010
Posts: 7

PostPosted: Fri Dec 10, 2010 9:22 pm    Post subject: One little snag, I'm seeing. Reply with quote

First of all, you sir, are a genius. This is probably one of the best automappers I've seen for IRE games.

I'm running into one little snag in Lusternia, though. The mapper starts going haywire when dealing with rooms with a vnum higher than 15000, is there a way to configure it to deal with these?
Back to top
View user's profile Send private message AIM Address
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Sat Dec 11, 2010 9:06 am    Post subject: Reply with quote

Thanks. Smile

You can edit the map file and at the top of the file you'll see:

C 15000

Change this to C 50000 or whatever Lusternia's highest vnum is.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Finished Scripts 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