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 

help

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
abah
Halfop


Joined: 01 Dec 2013
Posts: 61
Location: Indonesia

PostPosted: Wed Dec 23, 2020 3:13 am    Post subject: help Reply with quote

Code:
bind pub * !story join:story
bind pub o|o !stop stop:story

proc join:story {nick uhost hand chan rest} {
  global story_timers
  set story "/home/s/sapri/mujahid/isi/db/isi.db"
  if {![info exists story_timers($story)]} {
    slowmsg $story
    } else {
    puthelp "privmsg $nick :Mohon tunggu sedang membaca files..."
  }
}

proc stop:story {nick uhost hand chan arg} {
   global story_timers
   if {[info exists story_timers]} {
     killtimer story_timers*
    } else {
    puthelp "privmsg $nick :Terima kasih sudah membaca cerita ane..."
   }
}
 
proc slowmsg {file {pos 0}} {
  global story_timers
  set f [open $file]
  seek $f $pos
  if {[gets $f line]>-1} {
    putserv "privmsg #Tausiyah :12 $line"
    set story_timers($file) [utimer 11 [list slowmsg $file [tell $f]]]
    } else {
    utimer 15 [list putserv "Membaca kembali files:"]
    set story_timers($file) [utimer 16 [list slowmsg $file]]
  }
  close $f
}

hello can anyone help me? I have tried all the scripts on this forum but they all don't work. Please me, what about the scripts if I want to stop when I type! Story. Thank you in advance
Back to top
View user's profile Send private message
ComputerTech
Master


Joined: 22 Feb 2020
Posts: 393

PostPosted: Wed Dec 23, 2020 6:35 am    Post subject: Reply with quote

You want to use !story to start and stop the script?
_________________
ComputerTech


Last edited by ComputerTech on Thu Dec 24, 2020 6:32 pm; edited 4 times in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
abah
Halfop


Joined: 01 Dec 2013
Posts: 61
Location: Indonesia

PostPosted: Thu Dec 24, 2020 5:53 am    Post subject: Reply with quote

ComputerTech wrote:
1st. you want to use !story to stop the script?

when I type !story script works as it should. When I type !stop the script will stop
Back to top
View user's profile Send private message
ComputerTech
Master


Joined: 22 Feb 2020
Posts: 393

PostPosted: Thu Dec 24, 2020 6:38 pm    Post subject: Reply with quote

Ok, so you want !story to start the script and !stop to stop the script, correct?

If so, and !stop isn't currently working for you.

Try changing

Code:

bind pub o|o !stop stop:story


To

Code:

bind pub * !stop stop:story


TIP, when changing Binds, you Should Restart your bot, and not just a standard Rehash Wink
_________________
ComputerTech
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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