make the program talk

An ICS Emulator for YAHOO Chess

make the program talk

Postby nerd.tech » 21 Oct 2007 21:44

How do you make your program say a specific line of text when someone joins your table thx
VISIT http://www.magic-booterz.com FOR ALL YOU YAHOO/PROGRAM/HACKING NEEDS!!!!!!!!!
User avatar
nerd.tech
Vip Member
Vip  Member
 
Posts: 55
Joined: 21 Oct 2007 20:38

Re: make the program talk

Postby g00dtr » 21 Oct 2007 22:07

right click on the pl file which is in the Yay or Stuci folder and click Edit, then find the typing part which is below somewhere and type what you want your program to say when someone joins or sits at your table

Code: Select all
sub rop_tableentry {   # 6a
        my $line=sprintf
        my $who=sreadutf($_[0]);
   my $table=unpack('C',shift());
   exists($handles{$who}) or return;
   defined($tables[$table]) or return;
   push(@{$handles{$who}->[2]},$table);
   push(@{$tables[$table]->[5]},$who);
   if (lc($who) eq lc($me)) {
      iprint "You are now observing game $table.\n";
      prompt;
      defined($primary) or $primary=$table;
   } else {
      top_ack $table,"Game $table: $who is now observing.";
                if (lc($tables[$table]->[6]->[0]) eq lc($me))   {   
         my $t=$tables[$primary];                       
                        my $message="Welcome @ $who  messaage  ";
                        nprinttop($t,0x43,packutf($message));
   
      }                     
   }
}
User avatar
g00dtr
Site Admin
Site Admin
 
Posts: 126
Joined: 27 Sep 2007 11:55
Location: Turkey

Re: make the program talk

Postby matematiko » 21 Oct 2007 22:53

I'd like to add that before editing your script( or any other perl script), allways make a back up.
It is so easy to mess up a good working script and so hard to find the error, specially when editing with a plain and simple text editor (such as notepad). Even professional editors not allways detect errors. See this topic for more information on editing perl scripts http://autochess.com/forum/viewtopic.php?t=63.

I have a technique( not necesary the best one) but I'd like to share it.

In the folder where ytoics.pl is ( usually c:\ytoics\), creare a new folder and name it "Backups", then when backing up a file save it with the date included in the file name, for example: ytoics_102107.pl . I also have in this folder a text file with notes. For example something like this:

ytoics.pl was backed up as ytoics_102107 before attempting to implement an autoboot.


Cheers

Using engines to cheat:
- It is not ethical,
- It is useless, nothing is gained (how can one be proud of a score earn with dishonesty?)
- You will be baned, sooner or later,
- It gives us (the true chess engine players) a bad reputation.
User avatar
matematiko
Co-Admin
Co-Admin
 
Posts: 1279
Joined: 17 Oct 2007 13:32
Location: Texas USA


Return to YaY

Who is online

Users browsing this forum: No registered users and 0 guests