mIRC Home    About    Download    Register    News    Help

Print Thread
#4524 02/01/03 12:33 PM
Joined: Dec 2002
Posts: 174
P
Vogon poet
OP Offline
Vogon poet
P
Joined: Dec 2002
Posts: 174
alias autoaway.checkphm {
if ($idle > %autoidleaway) { /set %phmawaymsgsc autoaway after $duration(%autoidleaway)
/setawayphm
.timer(autoaway) off
}
}
ok i fixed it up some,

the /set %phmawaymsgsc is the away msg variable and i think you understand the rest of it perhaps

/setawayphm is another alias that sets me away and i know works
and the timer,
but it still wont work arg lol
any one know why?

Last edited by PHMinistries; 02/01/03 12:48 PM.
#4525 02/01/03 03:01 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
just paste us the whole script


Code:
//if ( khaled isgod ) echo yes | else echo no
#4526 02/01/03 03:03 PM
Joined: Dec 2002
Posts: 174
P
Vogon poet
OP Offline
Vogon poet
P
Joined: Dec 2002
Posts: 174
menu menubar,channel,nicklist,query {
-
PHM Away System:
.PHM Away Preferences:/phmawaypref
.Set PHM $iif($away == $true,Back Mode,Away Now) : $iif($away == $true,setbackphm,phmawaynowf)
.Pager:/set %phmpagermsg69 $$?="Pager Message" | /set %phmpagernick69 $$?="Who To Page" | /ctcp %phmpagernick69 page 13,6(0P1)13(0A1)13(0G1)13(0E1)13(0R1)8,5 %phmpagermsg69 13,6(0M1)13(0E1)13(0S1)13(0S1)13(0A1)13(0G1)13(0E1)
.Read Pages: run NotePad.exe $scriptdir\page.txt
.Clear Pages: {
write -c $scriptdir\page.txt clearing all pages on $fulldate
echo -at ** Page file now cleared
}
-
}

alias phmawaypref { dialog -m phmawaypref phmawaypref }
dialog phmawaypref {
title "PHM Multi Server Away Preferences"
size -1 -1 500 290
icon graphics/icon.ico, index
text "PHM Multi Server Away Preferences", 1, 120 13 200 20,center
button "OK", 2, 15 250 30 20,ok
text "Select Auto Repeat Message Time", 3, 275 30 200 20, center
combo 4, 340 50 63 100, drop
text "Activate Auto Idle Away", 5, 15 30 200 20,center
combo 6, 80 50 63 100, drop
check "Enable Auto Idel Away",7, 150 50 125 20
check "Enable Away Pager",8, 50 80 115 20
check "Enable Away Nick", 9, 190 80 115 20
text "Away Nick", 10, 350 80 80 20
edit %phmawaynicksc , 11, 320 105 120 20, autohs
Check "DeOP In Channels When Away",12, 50 105 200 20
text "Away Nick Nickserv Password", 13, 310 135 200 20
edit %phmawaynssc ,14,320 160 120 20, autohs
check "Set Back Mode On Click On Channel Input",15, 50 135 225 20
icon 16, 10 200 50 50, graphics/icon.ico, index, center
icon 17, 100 200 50 50, graphics/icon.ico, index, center
icon 18, 200 200 50 50, graphics/icon.ico, index, center
icon 19, 300 200 50 50, graphics/icon.ico, inxed, center
icon 20, 400 200 50 50, graphics/icon.ico, index, center
icon 21, 450 200 50 50, graphics/icon.ico, index, center
button "Cancel", 22, 230 250 50 20,cancel
button "Apply", 23, 430 250 50 20
text "Regular Nick", 24, 15 160 100 20,
edit %phmregunick , 25, 80 160 100 20, autohs
}
on *:dialog:phmawaypref:sclick:6:{
set %autoidleaway $calc($did(6) * 60)
}

on *:dialog:PHMawaypref:init:0: {
.did -a PHMawaypref 4 15
.did -a PHMawaypref 4 30
.did -a PHMawaypref 4 45
.did -a PHMawaypref 4 60
.did -a PHMawaypref 4 90
.did -a PHMawaypref 6 15
.did -a PHMawaypref 6 30
.did -a PHMawaypref 6 45
.did -a PHMawaypref 6 60
.did -a PHMawaypref 6 90
if (%enableautoid == On) { did -c PHMawaypref 7 }
if (%phmautopager == On) { did -c PHMawaypref 8 }
if (%phmnickaway == on) { did -c PHMawayPref 9 }
if (%deopinchanonaway == on) { did -c PHMawayPref 12 }
if (%backonchaninput == on) { did -c PHMawayPref 15 }
}

On *:DIALOG:PHMawaypref:sclick:23:{
if ($did(PHMawaypref,7).state == 1) { set %enableautoid On }
else { set %enableautoid Off }
if ($did(PHMawaypref,8).state == 1) { set %phmautopager on }
else { set %phmautopager Off }
if ($did(PHMawaypref,9).state == 1) { set %phmnickaway On }
else { set %phmnickaway off }
if ($did(PHMawaypref,12).state == 1) { set %deopinchanonaway On }
else { set %deopinchanonaway off }
if ($did(PHMawaypref,15).state == 1) { set %backonchaninput On }
else { set %backonchaninput off }
set %phmawaynicksc $did($dname,11)
set %phmawaynssc $did($dname,14)
set %phmregunick $did($dname,25)
}
alias Deopalla {
var %i = 1
while (%i <= $chan(0)) {
if ($me isop $chan(%i)) mode $chan(%i) -o $me
inc %i
}
}
alias phmawaynowf { dialog -m phmawaynowf phmawaynowf }
dialog phmawaynowf {
title "Going Into Away Mode"
size -1 -1 400 170
icon graphics/icon.ico, index
button "Cancel", 1, 15 130 50 20,cancel
button "OK", 2, 140 130 30 20,ok
text "PHM Going Into Away Mode", 3, 120 10 150 20,center
text "Away Message", 4, 15 30 100 20,center
edit %phmawaymsgsc , 5, 125 30 250 20, autohs
check "Away Pager On", 6, 15 60 100 20
text "Away Nick", 7, 120 60 60 20, center
edit %phmawaynicksc , 8, 200 60 120 20. autohs
icon 9, 10 90 50 50, graphics/icon.ico, index, center
icon 10, 130 90 50 50, graphics/icon.ico, index, center
icon 11, 250 90 50 50, graphics/icon.ico, index, center
icon 12, 350 90 50 50, graphics/icon.ico, inxed, center
button "Apply",13, 80 130 50 20
}
on *:DIALOG:phmawaynowf:sclick:13:{ /set %phmawaynicksc $did($dname,7) | /set %phmawaymsgsc $did($dname,5) }
on *:Dialog:phmawaynowf:sclick:2:{ /setawayphm }
on *:dialog:PHMawaynowf:init:0: {
if (%phmautopager == On) { did -c PHmawaynowf 6 }
}
alias setawayphm {
if (%deopinchanonaway == on) { deopalla }
if (%phmnickaway == on) { .timer 1 5 /nick %phmawaynicksc }

away 8,1( $+ 11,2¸,+8¡11+,¸,+8¡11+,¸,+8¡11+,¸,+8¡11+,¸12,15 $me is away (Reason: %phmawaymsgsc $+ ) AwayPager is %phmautopager $+ , AwayLog is on 11,2¸,+8¡11+,¸,+8¡11+,¸,+8¡11+,¸,+8¡11+,¸ 8,2 $+ )
set %away.time $ctime
ame Away : 8,1( $+ 11,2¸,+8¡11+,¸,+8¡11+,¸,+8¡11+,¸,+8¡11+,¸12,15 $me is away (Reason: %phmawaymsgsc $+ ) AwayPager is %phmautopager $+ , AwayLog is on 11,2¸,+8¡11+,¸,+8¡11+,¸,+8¡11+,¸,+8¡11+,¸ 8,2 $+ )

.timer(away) 0 %autorepeatphm ame still Away : 8,1( $+ 11,2¸,+8¡11+,¸,+8¡11+,¸,+8¡11+,¸,+8¡11+,¸12,15 $me is away (Reason: %phmawaymsgsc $+ ) since %away.time AwayPager is %phmautopager $+ , AwayLog is on 11,2¸,+8¡11+,¸,+8¡11+,¸,+8¡11+,¸,+8¡11+,¸ 8,2 $+ )

}
on *:NOTICE:*NickServ IDENTIFY*:?:/msg nickserv identify %phmawaynssc
ctcp:page*:{
if (%phmautopager == On) { /notice $nick Away : 8,1( $+ 11,2¸,+8¡11+,¸,+8¡11+,¸,+8¡11+,¸,+8¡11+,¸12,15 $me is away (Reason: %phmawaymsgsc $+ ) since %away.time AwayPager is %phmautopager $+ , AwayLog is on 11,2¸,+8¡11+,¸,+8¡11+,¸,+8¡11+,¸,+8¡11+,¸ 8,2 $+ ) Your Page Was Recieved And I Will Get Back To You Asap! | /echo -at ** [ You have been PAGED by $nick ] $address on $fulldate | write $scriptdir\page.txt paged by : $nick $address $fulldate MSG : $2- }
if (%phmautopager != on) { /halt }
}
on *:INPUT:#:{
if (%backonchaninput == On) && ( $left($1,1) != / ) && ( %away == 1 ) { /setbackphm }

}


alias setbackphm {
if ($away == $false) { echo -at ** You Aren't Away! }
.timer(away) off
ame Back 8,1( $+ 11,2¸,+8¡11+,¸,+8¡11+,¸,+8¡11+,¸,+8¡11+,¸12,15 $me is away (Reason: %phmawaymsgsc $+ ) Duration of Away Time $duration($calc($ctime - %away.time)) AwayPager is %phmautopager $+ , AwayLog is on 11,2¸,+8¡11+,¸,+8¡11+,¸,+8¡11+,¸,+8¡11+,¸ 8,2 $+ )
nick %phmregunick
}
}
alias autoaway.checkphm {
if ($idle > %autoidleaway) { /set %phmawaymsgsc autoaway after $duration(%autoidleaway)
/setawayphm
.timer(autoaway) off
}
}
on *:connect: .timer(autoaway) 0 30 autoaway.checkphm


im sorry i know its a long script
but im doing my best
and thanks to everyone here for their awesome help im learning more and more each day!

#4527 02/01/03 03:30 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
there is something wrong with your timers
next time use the code tags to keep things idented, and correct the spelling mistakes and do something... grin


Code:
//if ( khaled isgod ) echo yes | else echo no
#4528 02/01/03 03:35 PM
Joined: Dec 2002
Posts: 174
P
Vogon poet
OP Offline
Vogon poet
P
Joined: Dec 2002
Posts: 174
say what i dont understand

#4529 02/01/03 06:11 PM
Joined: Dec 2002
Posts: 174
P
Vogon poet
OP Offline
Vogon poet
P
Joined: Dec 2002
Posts: 174
actually scratch that
there was nothing wrong with it
i have it fixed,
the bracket above it was to exzesive so i killed it and now it works thanks for all your help

#4530 03/01/03 12:03 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
theRat means that you really should include [[/b]code] and [[/b]/code] tags around your code to preserve indentation and making your script MUCH, MUCH easier to read/decipher/see problems.

[[/b]code]
Code:
alias whatever {
  ; this is a code block
  ; that keeps your indentation
  ; intact
}
[[/b]/code]


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C

Link Copied to Clipboard