Hi, I'm confused and unfamiliar with the mirc scripting syntax. I know this is a lot to ask, but if you could translate the following pseudocode into mirc-script it would be a great learning tool for me.
The purpose of the script is to message a user only once when they trigger a certain event and read & analyze the PM response of the user as well... I use an array syntax to handle the script remembering the user, feel free to best translate this to mirc-script. (like tokenezing.. or whatever the language can support)
Easier to read the script here:
http://phpfi.com/339185I want all variables to be LOCAL vars including the array so once I exit mIRC client all vars are lost and reset to nothing.
//initialize handleArray
$handleArray[0] = '';
on some event {
$handleExists = false;
$nickHandle = getNickHandle(); //gets the user's handle that sent the event
//see if nickHandle already exists within array
for ($i=0; $i<=$handleArray.length-1; $i++) {
if ($handleArray[$i] == $nickHandle){
$handleExists = true;
break loop;
}
}
if (!$handleExists) {
//store it in array
$handleArray[] = $nickHandle; //adds new entry to handleArray
//message nick
msg $nickHandle I will only message you once during my stay here
//read nick's PM reply as a string
$nickPM_reply = getNickPM_reply();
if (containsWord('no', $nickPM_reply) { //containsWord function returns true if 'no' is present
//do some action
}
}
}
Thanks for reading!