mIRC Homepage
Please, who can help me with this.
PS. I am Dutch and a medium user of mIRC
Dag OpaRob! Kun je uitleggen wat er aan die goedemorgen, goedemiddag, goedenavond boodschap vooraf gaat?
Wil je bijvoorbeeld dat je die boodschap uitspreekt wanneer iemand de kamer binnenkomt?

Hi OpaRob! Can you explain what precedes that good morning, good afternoon, good evening message?
For example, do you want to write that message when someone enters the channel?

Een beetje extra informatie zou tof zijn!
A little more information would be great!
Het is idd de bedoeling dat het bij binnenkomst gepost wordt, ik had wel iets gevonden maar dat werkte niet. En in welke .ini moet dit dan.komen?

It is intended that it will be posted upon arrival, I had found something but that did not work.

Like " goedemiddag $nick"
Nu heb ik in remote staan " on 1:join:#:{ /msg Hoi $Nick }

En dat wil ik veranderen naar goedemorgen, middag enz. Wat op het juiste tijdstip veranderd.

Now I have in remote "on 1: join: #: {/ msg Hi $ Nick}

And I want to change that to good morning, afternoon, etc. Which changes at the right time
Code
on !*:JOIN:#:{
  var %ret
  if ($time >= 00:00:00) && ($time < 06:00:00) %ret = Hey late binnenkomer! Ga lekker slapen, $nick $+ !
  elseif ($time >= 06:00:00) && ($time < 12:00:00) %ret = Goedenmorgen $nick $+ !
  elseif ($time >= 12:00:00) && ($time < 18:00:00) %ret = Goedenmiddag $nick $+ !
  elseif ($time >= 18:00:00) && ($time < 00:00:00) %ret = Goedenavond $nick $+ !
  else %ret = Iets ging fout met mijn greet script...
  msg $chan %ret
}


Je ziet, het uitroepsteken voor de JOIN statement zorgt ervoor dat deze gebeurtenis alleen plaatsvindt bij anderen (niet jezelf). Vervolgens gebruiken we IF en ELSEIF om de return value te bepalen welke naar de kamer wordt weer gegeven.

As you can see the exclamation mark before the JOIN statement makes sure the event is only fired when others JOIN (not you). Furthermore we use an IF and ELSEIF statement to set the return value which is being messaged to the channel.

Ik weet alleen niet of de operators <, > en >= kan rekenen met minuten en seconden waarden tussen de : char
I just don't know if the <, > and >= operators can calculate with minutes and second values between the : char
bedankt voor dit stukje script en ga hem testen. ik zal laten weten of het werkt

thanks for this piece of script and go test it. i will let you know if it works
hij werkte half en na een aanpassing werkt hij nu helemaal zoals ik het wil

on !*:JOIN:#:{
var %ret
if ($time >= 00:00:00) && ($time < 05:59:59) %ret = Goedenacht $nick $+ !
elseif ($time >= 06:00:00) && ($time < 11:59:59) %ret = Goedenmorgen $nick $+ !
elseif ($time >= 12:00:00) && ($time < 17:59:59) %ret = Goedenmiddag $nick $+ !
elseif ($time >= 18:00:00) && ($time < 23:59:59) %ret = Goedenavond $nick $+ !
else %ret = Hoi $nick
msg $chan %ret
}
Your tampering with kap's IF logic means that the first 4 lines will not match the times 05:59:59 11:59:59 17:59:59 23:59:59
Also, you should probably list the channels where this greetings is sent, because most large channels will not want this

Code
on !*:JOIN:#channelA,#channelB:{
  if     ($time < 06) var %ret Goedenacht
  elseif ($time < 12) var %ret Goedenmorgen
  elseif ($time < 18) var %ret Goedenmiddag
  else                var %ret Goedenavond
  msg $chan %ret $nick $+ !
}
Code
$gettok(Goedenacht Goedenmorgen Goedenmiddag Goedenavond, $calc($calc($time) *4 //24 +1), 32)
© mIRC Discussion Forums