mIRC Home    About    Download    Register    News    Help

Print Thread
tons of alias nick issue #250999 06/02/15 08:06 AM
Joined: Sep 2014
Posts: 83
H
HappyFappy Offline OP
Babel fish
OP Offline
Babel fish
H
Joined: Sep 2014
Posts: 83
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

Last edited by HappyFappy; 06/02/15 09:12 AM.
Re: tons of alias nick issue [Re: HappyFappy] #251051 07/02/15 01:13 PM
Joined: Feb 2015
Posts: 243
O
OrFeAsGr Offline
Fjord artisan
Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 243
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?

Re: tons of alias nick issue [Re: HappyFappy] #251099 09/02/15 06:44 PM
Joined: Feb 2015
Posts: 18
E
EUDIS1980 Offline
Pikka bird
Offline
Pikka bird
E
Joined: Feb 2015
Posts: 18
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!