Skip to content
MSN

Onjoin help

A TG007 community discussion started by BâdBôý™.

Discussion 7 posts
Page 1 of 1
Open
Topic #6369 · 7 published posts · 560 views

Hi guys and gals.

 

I was wondering if someone can sort this out.

 

If someone can sort this I wud appreciate it if you could do all of the following like the adding of the name by right clicking and all I have here below.

 

Thank you I certainly appreciate it.

 

 

 

I would love it if, I had a code that would read the person's name as the entered the room and when that name matched a name held in a file, .txt perhaps, it would place a link in the room to that person's picture I have loaded on my server.

 

So something like this.

 

Member joins, the script reads the name, checks a text file for that exact name, if it finds it, displays a link to their picture (That I have uploaded to my server) and places it in the main room.

 

I wish also to be able to right click on that person's name while in the room and left on add to pic onjoin.

 

This should add the name and gate to the text file.

 

Then I wish to be able to load that person's picture on my server if they wish and call it say for instance calling the picture that members exact name whether or not in special letters.

 

so again.

 

member joins, script reads name, matches name to one that I have added to text file via right click and left on the member's name in the room, sees the match, and places link to that person's pic which I have placed there manually to accmpany that name.

 

Is this possible?

 

Thank you all so MUCH if this can be done.

 

Spanky

u could use writeini to save name on an ini file but about the picture, where do u want to get the picture from? or r u gonna set a picture for each user?

on *:JOIN:#:{

if ($readini(userpics.ini,Users,$nick)) { msg $chan $nick Picture: $readini(userpics.ini,Users,$nick) }

else { msg $chan User with no picture }

}

menu nicklist {

Picture Stats

.User $iif($readini(userpics.ini,Users,$1),Have a picture,Do not have a picture) :/

.-

.Add/Replace picture :/writeini -n userpics.ini users $1 $??="Picture URL"

.Delete Picture :/remini userpics.ini users $1

-

}

 

If need me to explain let me know

Edited Apr 14, 2006 11:04 PM by 0bscuridad

|[ Simple Code ]|

Yes Thank you For such a quick response and all my questions answered too!

 

Ok let me explain in detail.

 

I wish to see a member in the room and ask them, would you like me to load a picture on my server so that when you enter the room, the script will see you have entered and message the room with a link to your picture.

 

I would like to be able to right click on the member name while viewing them through the script. I wish to be able to right click on their name in the script and left click on their name. I wish when I do this, a little menu will open much like what you have done here and I will be able to select "Add User To Onjoin Pic".

 

When I select this option, I wish the name of that person whether or not using special characters in their name, to be added to a file.

 

So when they come in the room, the bot will see them, match the name of that person to the file that I added their name to by right clicking on their name and left on add user to onjoin pic, and the bot will message the room with the link to that person's pic.

 

Now then, The address for that persons picture will be http://blah blah blah.com/(here will be thier name).jpg

 

I will load a picture up on a server and rename that picture to be the exact name of the person to whom the picture belongs.

 

Finally, I will place the link in the same file that the user's name has been added to by me

 

So I think, that the onjoin should have a way to read that person's nickname in the file to where it was added and also allow for a space and (read the space) to the right of that name and then also read the link information next to that. The link wont be here till I add it in but the onjoin should know to post what ever information is to the right of the space in that name file.

 

So I wish to have the name add to the file like so.

 

Frênzý® http://blah blah blah.com/memberpics/Frênzý®.jpg

 

I will manually add the bold part myself and rename the members pic.

 

I hope this better explains this.

 

Thank you if you can help again.

Edited Apr 14, 2006 11:19 PM by BâdBôý™

im not sure if you can have the name on the url, because sometimes some characters rename by default to their value on hex, for example the "@" character its hex value on hes is 40 so the url will kind of like http://blahblahblah.com/userpics/blah%40blah.jpg so i think it would be a bad idea to do that, it could be better if you change his nickname to the hex value ( i dont know if you have an alias to do so ) but when u do that the whole nickname is converted to hex, like this:

Nickname: ǿвšçµяίđลđ_м-т

Hex Value: C7BFD0B2C5A1C3A7C2B5D18FCEAFC491E0B8A5C4915FD0BC2DD182

u may want to set the picture name to the nickname hex value, that wopuld be easier.

http://blahblah.com/userpics/C7BFD0B2C5A1C...FD0BC2DD182.jpg

 

This is vincula's tohex converter

alias msn.tohex {
 var %l 1, %r
 while (%l <= $len($1-)) {
   %r = %r $+ $base($asc($mid($1-,%l,1)),10,16,2)
   inc %l
 }
 return %r
}

so as i wxplained, to you on my first response, use same 2 things but with some litle changes on it

on *:JOIN:#:{
if ($readini(userpics.ini,Users,$nick)) {
;$readini(userpics.ini,Users,$nick) this will send the value given to the nick on the ini file, in this case, the link
msg $chan $nick Picture: $readini(userpics.ini,Users,$nick)
}
else { msg $chan User with no picture }
}
menu nicklist {
Picture Stats
.User $iif($readini(userpics.ini,Users,$1),Have a picture,Do not have a picture) :/
.-
.Add/Replace picture :/writeini -n userpics.ini users $1 http://clahblah.com/userpics/ $+ $msn.tohex($1) $+ .jpg
.Delete Picture :/remini userpics.ini users $1
-
}

Edited Apr 14, 2006 11:35 PM by 0bscuridad

|[ Simple Code ]|

Yes thank you good idea.. or I can just name the picture a number of some sort like Snagit-0001

Edited Apr 14, 2006 11:29 PM by BâdBôý™

This works as well. If you upload pics ASCII then you won't have any problems naming them a plain text nick. Sorry this isnt a complicated ini code but it does work as I have tested it. I even added a whisper command so you dont have to manually add the site info.

 

on ^*:JOIN:#: { $read(nick.txt, s, $nick) { 
   msg $comchan($me,1) $read(nick.txt, s, $nick) $2 
 } 
}
menu nicklist {
 Add Nick:write nick.txt $$1
}
on ^*:TEXT:*:?: { 
 if (!write == $1) {
   write nick.txt $2 $+ $chr(32) $+ $3
 }
}

Edited Apr 15, 2006 1:24 AM by Mail

 

"Diplomacy is the art of saying 'Nice doggie' until you can find a rock".-Will Rogers

MY GOD MAN YOU HAVE DONE IT!!!!!!!!!!!!!!!!!!

 

Thank you so darn MUCH! :lmaojump::lmaojump::lmaojump::lmaojump::lmaojump::lmaojump:

 

 

 

Thank You also Mail I sincerely appreciate it!