IceChat Forums

IceChat 7 => IceChat 7 Scripts => Topic started by: TheCellist42 on March 02, 2008, 08:55:48 PM

Title: !topic Again...HELP
Post by: TheCellist42 on March 02, 2008, 08:55:48 PM
Hey Everyone, Im Using This Script To Change The Topics...

on 1:TEXT:!topic *:#SamF:/topic $chan "$message"

It Works Great, Except, It Includes !Topic in the topic, anyone know what is wrong?

Also, Do You Have Status and Message Scripts...

Like,

TOPIC Goes Here / STATUS Goes Here / MESSAGE Goes Here

(!topic, !status, !Message)

If Not, Fine, But Can You Help Me With The Topic Script?

-TheCellist42  :-)
Title: Re: !topic Again...HELP
Post by: BigRed on March 02, 2008, 10:15:15 PM
the problem is that there is !topic in your "$message" as far as the script is concerned. doing !topic is just a much work as doing /topic so wouldn't it make sense just to lift +t or whatever it is on your net and let them set it the normal way?
Title: Re: !topic Again...HELP
Post by: Morio on March 03, 2008, 12:19:01 AM
Code: [Select]
Sub ONTEXT(Message,Channel,Nickname,Host,ServerNumber)
If Left(Message,7) = "!topic " and Len(Message) > 7 then
  NewTopic = Mid(Message,8)
  SendCommand "/topic " & Channel & " " & NewTopic,ServerNumber
End If
End Sub

You need to save it as .ice not .ics
Title: Re: !topic Again...HELP
Post by: TheCellist42 on March 03, 2008, 01:43:39 PM
Thanks  :-)
Title: Re: !topic Again...HELP
Post by: TheCellist42 on March 04, 2008, 09:56:34 PM
Anything I Can Add To The Script To Make It Be Able To Be Triggered By Ops / HalfOps Only?
Title: Re: !topic Again...HELP
Post by: Morio on March 05, 2008, 12:13:08 AM
use this, it returns true or false ISOP(Nickname,Channel,ServerNumber)

and for halfops: ISHALFOP(Nickname,Channel,ServerNumber)
Title: Re: !topic Again...HELP
Post by: TheCellist42 on March 05, 2008, 03:08:54 PM
This Is What I Got

ERROR:modScriptFunctions:Topic.ice:Function:LoadScriptFile: Error Number:1044 : Cannot use parentheses when calling a Sub
Title: Re: !topic Again...HELP
Post by: Snerf on March 05, 2008, 03:12:15 PM
Check some of the other scripts and see how it was implemented how to check for ops.
You simply did not script the code correctly.
Title: Re: !topic Again...HELP
Post by: TheCellist42 on March 05, 2008, 03:17:55 PM
Ok
Title: Re: !topic Again...HELP
Post by: TheCellist42 on March 05, 2008, 09:21:04 PM
Im A Total Scripting n00b. I have no Idea what Im Doing In IceChat5 scripts. Ive searched the website, and can't find how to add these things in the script...this is what I have, where did I mess it up?

Sub ONTEXT(Message,Channel,Nickname,Host,ServerNumber)
If Left(Message,7) = "!topic " and Len(Message) > 7 then
  IfISOP(Nickname,Channel,ServerNumber)=True then
  IfISHALFOP(Nickname,Channel,ServerNumber)=True then
  NewTopic = Mid(Message,8)
  SendCommand "/topic " & Channel & " " & NewTopic,ServerNumber
End If
End Sub

??  :?
Title: Re: !topic Again...HELP
Post by: Snerf on March 05, 2008, 11:35:47 PM
Its an  If statement, you need a space between IF and ISHALFOP and ISOP.
You also need 2 extra END IF statements, just put 2 more below the one ya got.
Title: Re: !topic Again...HELP
Post by: TheCellist42 on March 06, 2008, 02:12:35 PM
Thanks For All The Help Snerf
Title: Re: !topic Again...HELP
Post by: TheCellist42 on March 06, 2008, 02:27:10 PM
and Morio  :-)