mIRC Homepage

tons of alias nick issue

Posted By: HappyFappy

tons of alias nick issue - 06/02/15 08:06 AM

my script has quite a number of ALIAS'

but its for multiple users at a single time

how can i set the alias's to pm the correct nick each time?

i tried "set %player $nick" but it doesnt like to work correctly when more than 1 person playing
Posted By: OrFeAsGr

Re: tons of alias nick issue - 07/02/15 01:13 PM

hi there smile a quick answer would be to set different variable for each player but in order to be more specific .. could you post your code?
Posted By: EUDIS1980

Re: tons of alias nick issue - 09/02/15 06:44 PM

Well if i got it right, it's about some game, so maybe you could try assigning a sort of profile to each player. Because you dont know the number of players or who the players are each time, i would try putting them in a plain text file and tokenize the information i want for each player, including the nickname, each time a new player shows up:

In my example i want nickname, join date and score (which initially is zero) and i separate them with ^ which is $chr(94):

on *:JOIN.......bla bla {
write "players.txt" $+($nick,^,$date,^,0)
}

Now, the next time the same nick enters the game, i can recall their nick or score or anything by accessing the file:

var %mask = $+(*,$nick,*)
var %search = $read("players.txt",w,%mask), %line
if ($readn) { %line = $readn }
else { halt }
var %nickname = $gettok($read("players.txt",%line),1,94)
var %score = $gettok($read("players.txt",%line),3,94)

And then use it as needed:

/msg %nickname Hello again!
© 2020 mIRC Discussion Forums