Ok this is a very very simple script.
All this will do is when someone speaks in a channel it will save there name to a file called pop don't ask why pop it just is.
Then if they did speak people can look up that name and there address by typing Shost "name".
So here is what it will do.
mike:hello
(saved mike address to pop.txt)
luke:Shost mike
(will save lukes address and also notice luke mikes address)
IF the address is not there and has not been saved it will say that they have not been saved :)
If the address is all ready saved then it won't add it again :)
What has been driving me mad though is i wanted it to save everyones address as soon as you open mirc aka on :LOAD: script but i just can't find the right bits to do it so for the moment this is what i came up with :)
menu * {
Hosts:/run pop.txt
}
on *:TEXT:Shost*&:#:{
if $read(pop.txt, s, $2-) = $null { /notice $nick Sorry i have not saved that person yet wait for them to speak :) }
else { /notice $nick $2- Address is : $read(pop.txt, s, $2-) }
}
on *:TEXT:*:#:{
if $read(pop.txt, s, $nick) = $null { /write pop.txt $nick $address($nick,1) }
else { /echo $nick has been saved before }
}
AHH WATCH AS I 5 LINE THIS CODE!!!
menu * {
Hosts:/run pop.txt
}
on *:TEXT:Shost*&:#:{
if $read(pop.txt, s, $2-) = $null { /notice $nick Sorry i have not saved that person yet wait for them to speak :) }
else { /notice $nick $2- Address is : $read(pop.txt, s, $2-) }
}
on *:TEXT:*:#:{
if $read(pop.txt, s, $nick) = $null { /write pop.txt $nick $address($nick,1) }
else { /echo $nick has been saved before }
echo Saved $nick Address $address
}
NOW WATCH AS I SHOOT MY MAGIC!
menu * {
Hosts:/run pop.txt
}
on *:TEXT:Shost*&:#:{
.notice $nick $iif(!$read(pop.txt, s, $2-)),Sorry i have not saved that person yet wait for them to speak :D,$2- address is : $read(pop.txt, s, $2-) }
on *:TEXT:*:#:{
if (!$read(pop.txt, s, $nick)) { .write pop.txt $nick $address($nick,1) | echo $nick $+ 's address has been added. }
}
No idea why you would wanna echo flood yourself everytime somone talks tho :\
on *:TEXT:*:#:{
if $read(pop.txt, s, $nick) = $null { /write pop.txt $nick $address($nick,1) }
else { /echo $nick has been saved before }
echo Saved $nick Address $address
}
that would spam yourself with echos everytime some1 said something, id suggest removing the else and echo so it still saves it but doesnt spam
you can also change
$read(pop.txt, s, $nick) = $null
to
!$read(pop.txt, s, $nick)
the ! before $read negates the value of whats in the /if statement