| View previous topic :: View next topic |
| Author |
Message |
abah Halfop
Joined: 01 Dec 2013 Posts: 61 Location: Indonesia
|
Posted: Wed Dec 23, 2020 3:13 am Post subject: help |
|
|
| 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 |
|
 |
ComputerTech Master

Joined: 22 Feb 2020 Posts: 393
|
Posted: Wed Dec 23, 2020 6:35 am Post subject: |
|
|
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 |
|
 |
abah Halfop
Joined: 01 Dec 2013 Posts: 61 Location: Indonesia
|
Posted: Thu Dec 24, 2020 5:53 am Post subject: |
|
|
| 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 |
|
 |
ComputerTech Master

Joined: 22 Feb 2020 Posts: 393
|
Posted: Thu Dec 24, 2020 6:38 pm Post subject: |
|
|
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  _________________ ComputerTech |
|
| Back to top |
|
 |
|