egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

starting a game [hangman]

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
scope
Voice


Joined: 05 Nov 2006
Posts: 10

PostPosted: Sun Nov 05, 2006 12:15 am    Post subject: starting a game [hangman] Reply with quote

hi all

my first post here because ive never had a problem with eggdrop untill now lol.
i decided to spice my bot up a bit and add a game script.
the problem is i can start the game by using the command !startgame but my guests that join the channel cant. i want it so my guests can start the game too
it must be a simple solution but i cant think what it is. ive added public commands but to no avail.
would be grateful for any help.
thanks

topic moved from Scripting Help and script name appended to title - slennox
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sun Nov 05, 2006 3:08 am    Post subject: Reply with quote

What game? What are the bind's flags for it? Does it have any "if's" that make it check matchattr? etc..
Back to top
View user's profile Send private message
scope
Voice


Joined: 05 Nov 2006
Posts: 10

PostPosted: Sun Nov 05, 2006 6:54 am    Post subject: Reply with quote

the game is hangman.
here is the tcl script: hangman
it's my first game and im not entirely sure what im looking for.

thanks for your reply
Back to top
View user's profile Send private message
scope
Voice


Joined: 05 Nov 2006
Posts: 10

PostPosted: Sun Nov 05, 2006 11:19 am    Post subject: Reply with quote

it ok now. sorted!
was bind flag.
thanks for you help.
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sun Nov 05, 2006 4:43 pm    Post subject: Reply with quote

I did some mods to that game myself, but haven't published it since such is specifically prohibited by the script author. There's a few problems with the script. Maybe I can post a diff file, if you know how to use 'diff' to apply the changes.
Back to top
View user's profile Send private message
scope
Voice


Joined: 05 Nov 2006
Posts: 10

PostPosted: Sun Nov 05, 2006 7:49 pm    Post subject: Reply with quote

you can post it if you like mate. thanks

i did some mods to, like correcting the spelling mistakes lol.

i got the !hangmanstart cmd to work for all people on the channel but i would like to set the .hangman cmd to so others can start there custom games.
not found out how to do this yet though Rolling Eyes
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sun Nov 05, 2006 10:52 pm    Post subject: patchfile Reply with quote

I posted a patch file here:

http://members.dandy.net/~fbn/hangman.diff.txt

Main changes were to create a msg bind to allow people to do
/msg botnick hangcust My Custom puzzle, added more of a helpfile, fixed a few bugs, fixed ugly colors, formatting and spelling errors, etc.

I have not figured out how the "hint" stuff was meant to be formatted, and there is an unused proc in the script "proc hangman_fake" that I have no clue about.. And obviously the scripts instructions were wrong, as typing "!hangman" does not start the game..

I wonder if this script could be considered abandoned so someone else could re-release it.

Anyway, the above changes work for me, although they're not pretty (I'd just as soon re-write the script, but...)
Back to top
View user's profile Send private message
scope
Voice


Joined: 05 Nov 2006
Posts: 10

PostPosted: Mon Nov 06, 2006 9:39 am    Post subject: Reply with quote

well mate that is a massive improvement. thanks

seeing the last release date was in 2002 i wouldent of thought the author would of minded and probably would welcome the bug fixes.
but im not up on copyrights lol.

the mods you made though are spot on. works great now.

cheers again.
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Wed Nov 08, 2006 10:56 pm    Post subject: hangman - sort guessed letters fix Reply with quote

I made another small fix for the hangman101 script, this is to make it sort the guessed letters:

in proc hangman_show, just before the line with "switch $hangman(level)"
Code:

#################################################################################################
set hangman(guessed) [string trim [join [lsort [lrange [split $hangman(guessed) {}] 0 end]] {}]]


I just noticed the script also bugs out if you hammer guesses at it (heh another false claim by the original author Razz) I suspect that's cos it messes up the timers.

It also considers non-alpha chars as guesses, i'll prolly fix it so it doesn't.
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Fri Nov 10, 2006 2:06 am    Post subject: more bugs - doesn't close open files ;/ Reply with quote

Gah, just noticed while debugging a different script that this hangman script does not close open files..Lovely.. There are 4 "open" calls, and only 2 closes, so whoever uses the script might want to grep through the file and find the opens, then also add in appropriate "catch {close $in}" and "catch {close $out}" lines where they belong Razz
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 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


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber