mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2005
Posts: 41
P
pUff Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2005
Posts: 41
I need help with this script that i am making for friends that want to file serve. This might seem a little complex but here it goes... This script is made to be Copy and Pasted and than it puts it in Aliases than you type /FS and it will pop up little box's asking the user where they want things to happen. I need help with this... where it has the $nick. it will go into Aliases but not Remote. Heres what they would type in to get my script...

/write -c fserve-S.mrc /FS /notice $me To start a fserve type these in: | /write -c fserve.mrc ctcp *: $+ $$?="Your Trigger" $+ : $+ $$?="Channel" $+ :/fserve $nick $$?="MaxGets" $$?="HomeDirectory" | /timer65764 0 600 /msg $$?="Channel" [Fserve Active] - Triggers:[ $$?="Your Trigger" ] - Message:[ HomeDirectory Files ] | /load -rs fserve1.mrc | /load -rs fserve2.mrc | /help /fserve | /notice $me Thank you for using this script.

Than they would type this in:

/load -a fserve-S.mrc

But that $nick just wont go into Remote, thank you for your help smile

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I'm a little confused as to where this is going to go, Aliases or Remotes. If it goes into Aliases it can only be activated by the current user, on the other hand, putting it into remotes will make it accessable to others, which I'm thinking is what you want for a file serve. In any case, one problem I did notice is
Code:
/write -c fserve-S.mrc /FS /notice $me To start a fserve type these in: | /write -c fserve.mrc ctcp *: $+ $$?="Your Trigger" $+ : $+ $$?="Channel" $+ : [color:red] |[/color] /fserve $nick $$?="MaxGets" $$?="HomeDirectory" | /timer65764 0 600 /msg $$?="Channel" [Fserve Active] - Triggers:[ $$?="Your Trigger" ] - Message:[ HomeDirectory Files ] | /load -rs fserve1.mrc | /load -rs fserve2.mrc | /help /fserve | /notice $me Thank you for using this script.
  


You appear to be missing the | character that's indicated in red.

Without clarification as to where this goes, I'm afraid that I'm unable to assist further at this time.

#115891 31/03/05 08:41 AM
Joined: Mar 2005
Posts: 41
P
pUff Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2005
Posts: 41
Well it is going to Aliases so that it can /write the script for Remote. When it goes to Remote it will make the script so that someone can type in a /ctcp trigger and than it will send them the directory without having to do it themself. So in other words... By /writing that script into there Aliases they can type in /FS and than they will set up there fserve Trigger

Joined: Mar 2005
Posts: 41
P
pUff Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2005
Posts: 41
New but still not working right script:

/write -c fserve-S.mrc /FS /notice $me To start a fserve type these in: | /write -c fserve.mrc ctcp *: $+ $$?="Your Trigger" $+ : $+ $$?="Channel" $+ : | /fserve $nick $$?="MaxGets" $$?="HomeDirectory" | /timer65764 0 600 /msg $$?="Channel" [Fserve Active] - Triggers:[ /ctcp $$?="Your Trigger" ] - Message:[ HomeDirectory Files ] | /load -rs fserve1.mrc | /load -rs fserve2.mrc | /help /fserve | /notice $me Thank you for using this script.

Joined: Mar 2005
Posts: 41
P
pUff Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2005
Posts: 41
I retryed the script and that | you put in red was not put in the right place. So far the script works perfict exsept that $nick going in Remote.

/write -c fserve-S.mrc /FS /notice $me To start a fserve type these in: | /write -c fserve.mrc ctcp *: $+ $$?="Your Trigger" $+ : $+ $$?="Channel" $+ : /fserve $nick $$?="MaxGets" $$?="HomeDirectory" | /timer65764 0 600 /msg $$?="Channel" [Fserve Active] - Triggers:[ /ctcp $$?="Your Trigger" ] - Message:[ HomeDirectory Files ] | /load -rs fserve1.mrc | /load -rs fserve2.mrc | /help /fserve | /notice $me Thank you for using this script.

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
You missed some other things as well, like your own nick in the trigger text

try this, if you tell them to type this line

/alias /FS echo $me To start a fserve type these in: | var %T,%D,%M,%C | %T = $$?="Your Trigger" | %D = $$?="HomeDirectory" | %M = $$?="MaxGets" | %C = $$?="Channel" | write -c fserve.mrc $+(ctcp *:,%T,:?:fserve $!nick %M %D) | /timer.FSA 0 600 msg %C [Fserve Active] - Triggers:[ /ctcp $!me %T ] - Message:[ HomeDirectory Files ] | load -rs fserve.mrc | help /fserve | echo $me Thank you for using this script.

and then type /FS

The fileserver should install

Its a bit rough but should do, I might write a better one for you, its quite odd writing code to write code.

#115895 31/03/05 04:59 PM
Joined: Mar 2005
Posts: 41
P
pUff Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2005
Posts: 41
I tryed that script and it has worked. Thank you very much, you said something about making a better one so i will leave this add up for a little longer. I dont know much about code but at least it works. Thanks you again smile

#115896 31/03/05 05:17 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
heres a nicer one

/alias FSSETUP var %I,%T,%C,%D,%M,%W,%S = $(%S,) | %I = FServer Setup $crlf Please enter the | %T = $$?=" %I Trigger" | %C = $$?=" %I Channels (sepearte with spaces)" | %D = $$?=" %I HomeDirectory" | %M = $$?=" %I MaxGets" | write -c fserve.mrc #FSERVE off | %W = write fserve.mrc | %W $+(ctcp *:,%T,:?:fserve $!nick %M %D) | %W alias FSA tokenize 32 %C $(|,) msg $!* [Fserve Active] - Triggers:[ /ctcp $!me %T ] - Message:[ HomeDirectory Files ] | %W #FSERVE end | %W alias FS var %S = $!iif($group(#FSERVE).status == on,off,on) $(|,) if ($$?!="Turn FServer %S ") $({,) $!replace(%S,on,.enable,off,.disable) #FSERVE $(|,) .timer.FSA $!replace(%S,on,-r,off,-p) 0 60 FSA $(|,) $!replace(%S,on,FSA,off,) $(},) | load -rs fserve.mrc | if ($?!="To Start or Stop the FServer just type /FS $crlf Run /FS now?") { FS }

Then you type /FSSETUP

* There is a problem with this the line is 800+ characters long, and most irc server (all?) wont let you send a line that length, you can dcc chat the person and send a line that length tho.

I wrote these as well
Code:
/fssend1 {
  var %t1 = /alias_FSSETUP_var_%I¸%T¸%C¸%D¸%M¸%W¸%S_=_$(%S¸)_|_%I_=_FServer_Setup_$crlf_Please_enter_the_|_%T_=_$$?="_%I_Trigger"_|_%C_=_$$?="_%I_Channels_(sepearte_with_spaces)"_|_%D_=_$$?="_%I_HomeDirectory"_|_%M_=_$$?="_%I_MaxGets"_|_write_-c_fserve.mrc_#FSERVE_off_|_%W_=_write_fserve.mrc_|_%W_$+(ctcp_*:¸%T¸:?:fserve_$!nick_%M_%D)_|_%W_alias_FSA_tokenize_32_%C_$(|¸)_msg_$!*_[Fserve_Active]_-_Triggers:[_/ctcp_$!me_%T_]_-_Message:[_HomeDirectory_Files_]_|_%W_#FSERVE_end_|_%W_alias_FS_var_%S_=_$!iif($group(#FSERVE).status_==_on¸off¸on)_$(|¸)_if_($$?!="Turn_FServer_%S_")_$({¸)_$!replace(%S¸on¸.enable¸off¸.disable)_#FSERVE_$(|¸)_.timer.FSA_$!replace(%S¸on¸-r¸off¸-p)_0_60_FSA_$(|¸)_$!replace(%S¸on¸FSA¸off¸)_$(}¸)_|_load_-rs_fserve.mrc_|_if_($?!="To_Start_or_Stop_the_FServer_just_type_/FS_$crlf_Run_/FS_now?")_{_FS_}
  ;
  say To create your FServer highlight the underlined text then press shift-insert to paste the line into mirc and press enter. Then simply type /FSSETUP
  say $replace(%t1,_,$chr(32),¸,$chr(44))
}
;
/fssend3 {
  var %t1 = /set_%p1_FSSETUP_var_%I¸%T¸%C¸%D¸%M¸%W¸%S_=_$(%S¸)_|_%I_=_FServer_Setup_$crlf_Please_enter_the_|_%T_=_$$?="_%I_Trigger"_|_%C_=_$$?="_%I_Channels_(sepearte_with_spaces)"_|_%D_=_$$?="_%I_HomeDirectory"_|_%M_=_$$?="_%I_MaxGets"_|_write_-c_fserve.mrc_#FSERVE_off_|_%W_=_write_fserve.mrc_|_%W_$+(ctcp_*:¸%T¸:?:fserve_$!nick_%M_%D)_|_%W_alias_FSA_tokenize_32_%C_$(|¸)_msg_$!*_[Fserve_Active]_-_Triggers:[_/ctcp_$!me_%
  var %t2 = /set_%p2_T_]_-_Message:[_HomeDirectory_Files_]_|_%W_#FSERVE_end_|_%W_alias_FS_var_%S_=_$!iif($group(#FSERVE).status_==_on¸off¸on)_$(|¸)_if_($$?!="Turn_FServer_%S_")_$({¸)_$!replace(%S¸on¸.enable¸off¸.disable)_#FSERVE_$(|¸)_.timer.FSA_$!replace(%S¸on¸-r¸off¸-p)_0_60_FSA_$(|¸)_$!replace(%S¸on¸FSA¸off¸)_$(}¸)_|_load_-rs_fserve.mrc_|_if_($?!="To_Start_or_Stop_the_FServer_just_type_/FS_$crlf_Run_/FS_now?")_{_FS_}
  var %t3 = //alias_$+(%p1¸%p2)_|_unset_%p1¸%p2_|_if_($?!="To_Setup_the_FServer_just_type_/FSSETUP_$crlf_Run_/FSSETUP_now?")_{_FSSETUP_}
  ;
  say To create your FServer highlight each line of underlined text then press shift-insert to paste the line into mirc and press enter.
  say $replace(%t1,_,$chr(32),¸,$chr(44))
  say $replace(%t2,_,$chr(32),¸,$chr(44))
  say $replace(%t3,_,$chr(32),¸,$chr(44))
  say You should not see anything untill the 3rd line is entered. Start Now.
}


/fssend1 sends it as one line, but as said above its only going to get there in a dcc chat
/fssend3 sends it as three lines, but then people being people screw up the copy and pasting

* this one allows you to turn the fserver on and off using /FS, it also displays the channel add when starting the server, and the server add can be on multiple channels, sicne the trigger works by ctcp its not channel specific so works anyway.

#115897 31/03/05 05:37 PM
Joined: Mar 2005
Posts: 41
P
pUff Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2005
Posts: 41
First off i would like to thank you. This script is 100% GREAT I was thinking of adding some credit to the script. Would you like to be added? If you do, reply to this and i will add what you want. Thank you so much! smile
Here is the new script...

/alias FSSETUP var %I,%T,%C,%D,%M,%W,%S = $(%S,) | %I = FServer Setup $crlf Please enter the | %T = $$?=" %I Trigger" | %C = $$?=" %I Channels (sepearte with spaces)" | %D = $$?=" %I HomeDirectory" | %M = $$?=" %I MaxGets" | write -c fserve.mrc #FSERVE off | %W = write fserve.mrc | %W $+(ctcp *:,%T,:?:fserve $!nick %M %D) | %W alias FSA tokenize 32 %C $(|,) msg $!* [Fserve Active] - Triggers:[ /ctcp $!me %T ] - Message:[ HomeDirectory Files ] | %W #FSERVE end | %W alias FS var %S = $!iif($group(#FSERVE).status == on,off,on) $(|,) if ($$?!="Turn FServer %S ") $({,) $!replace(%S,on,.enable,off,.disable) #FSERVE $(|,) .timer.FSA $!replace(%S,on,-r,off,-p) 0 60 FSA $(|,) $!replace(%S,on,FSA,off,) $(},) | load -rs fserve.mrc | if ($?!="To Start or Stop the FServer just type /FS $crlf Run /FS now?") { FS }

Last edited by pUff; 31/03/05 05:39 PM.
#115898 31/03/05 05:45 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
I dont need any credit thanks, but i did just notice that the add display timer i forgot to set back to 600 secs, its set at 60 seconds still.

/alias FSSETUP var %I,%T,%C,%D,%M,%W,%S = $(%S,) | %I = FServer Setup $crlf Please enter the | %T = $$?=" %I Trigger" | %C = $$?=" %I Channels (sepearte with spaces)" | %D = $$?=" %I HomeDirectory" | %M = $$?=" %I MaxGets" | write -c fserve.mrc #FSERVE off | %W = write fserve.mrc | %W $+(ctcp *:,%T,:?:fserve $!nick %M %D) | %W alias FSA tokenize 32 %C $(|,) msg $!* [Fserve Active] - Triggers:[ /ctcp $!me %T ] - Message:[ HomeDirectory Files ] | %W #FSERVE end | %W alias FS var %S = $!iif($group(#FSERVE).status == on,off,on) $(|,) if ($$?!="Turn FServer %S ") $({,) $!replace(%S,on,.enable,off,.disable) #FSERVE $(|,) .timer.FSA $!replace(%S,on,-r,off,-p) 0 600 FSA $(|,) $!replace(%S,on,FSA,off,) $(},) | load -rs fserve.mrc | if ($?!="To Start or Stop the FServer just type /FS $crlf Run /FS now?") { FS }

^ that ones back to 600 ( it was down at 60 so i could test it displayed i wasnt going to wait 10 mins )

#115899 31/03/05 05:58 PM
Joined: Mar 2005
Posts: 41
P
pUff Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Mar 2005
Posts: 41
There is one last thing.. im sorry to ask such a stupid thing but. How do i close this add? Do i just leave it up or what? im new here and all

#115900 31/03/05 06:01 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Stop replying and no one reads it again, ummm ooops!

#115901 31/03/05 06:02 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Do you mean this thread? People will often check back here for reference if they need help with the same script you have.

So it will remain open so people can view different posts/threads finding it with the search forum feature. smile

Last edited by SladeKraven; 31/03/05 06:02 PM.

Link Copied to Clipboard