mIRC Homepage
Posted By: moshkin Some final help [Hopefully] - 19/01/07 06:42 PM
Im taking a break from learning mIRC scripting, ive got loads of stuff to do, plus im in a really important year in my schooling, so ive decided to just add the finishing touches to my scripts, sort them out so when i come back i can easily pick up where i left off, but right now some of my scripts seem to not work, so i was wondering if you could go over them and see where ive gone wrong. Heres a link to the scripts: http://h1.ripway.com/moshkin/mirc.txt
Some of them dont work when i move them to the top they work, so i think somewhere there are incomplete scripts but i fail to find them.

Yours Truely
Moshkin
Posted By: DJ_Sol Re: Some final help [Hopefully] - 19/01/07 06:53 PM
I have enough going finallizing two script but from your description I just wanted to make sure you were aware abotu events.

You can only have one event in a file. mIRC will process the first event, from top down, and ignore any other below it. There are ways around this.

1. Most easiest, put them in seperate files.
2. Group all like events into one event.
3. You may have more than one of the same event in the same file if they have a different level or trigger.

For Instance:

on *:text:*:#:{ < this here will process ALL text events, so no other text event may follow.

on *:text:Hi *:#:{ < this will only trigger if they say Hi *, so if other text events after this would still be run but not during this exact event.

on admin:text:*:#:{ < this will only trigger if an admin speaks so it may share the file with other text events that aren't the admin level.

on admin:text:*:#:{ }
on host:text:*:#:{ }
on *:text:Hi *:#:{ }
on *:text:Goodbye *:#:{ }
on *:text:*:#:{ }

This will work because the text event which encompasses any words from anyone is last. So, in a text event, if they aren't admin, not a host, they dont say Hi * and don't say Goodbye *, then it will process the last event which is anyone saying anything.

This is true for all events. (search help for "On")
Posted By: moshkin Re: Some final help [Hopefully] - 20/01/07 12:01 PM

Quote:

1. Most easiest, put them in seperate files.

How would i go about doing that?
Posted By: Scripto Re: Some final help [Hopefully] - 20/01/07 12:25 PM
Open up your editor... in your toolbar, click 'file', then scroll down and click 'new'. mIRC will create a new file for you to put scripts into.

You can click on ok at the bottom, or click 'file' again, and then click 'save', or 'save as' to rename the new file.

If you have an event twice in the same script, as DJ_Sol said, it will execute from top to bottom, and halt after the first one it sees. The second one needs to be in a new, or different file.
© mIRC Discussion Forums