PDA

View Full Version : Custom Profiles =)


KuJi
09-26-2006, 10:11 PM
Version: 1.00
Made By: KuJi
At 3 AM.. dont complain =(

// NPC Created by KuJi (September 26, 2006)
//#CLIENTSIDE
function onCreated()
{
this.commands = {"Profile"};
}

function onMouseDown(temp.mtype)
{
switch (temp.mtype)
{
case "right":
{
this.pid = onFindPlayers();

if (this.pid >= 0)
{
if (this.pid == 0)
{
player.showProfile();
}
else
{
onShowMenu();
}
}

break;
}
}
}

function onFindPlayers()
{
// Method 1 - UNTESTED -
/*temp.found = testplayer(mousex, mousey);

if (temp.found)
{
return temp.found;
}
else
{
return -1;
}*/

// Method 2
for (temp.I = 0; temp.I < players.size(); temp.I++)
{
if (mousex in |players[temp.I].x, players[temp.I].x + 3| && mousey in |players[temp.I].y, players[temp.I].y + 3|)
{
return temp.I;
}
}

return -1;
}

function onShowMenu()
{
new GuiContextMenuCtrl(Profile_Menu)
{
profile = "GuiBluePopUpMenuProfile";
textprofile = "GuiBlueTextListProfile";
text = players[thiso.pid].account;
width = 20;

clearrows();

addRow(0, players[thiso.pid].account);
addrow(-1, "-");
for (temp.I = 0; temp.I < thiso.commands.size(); temp.I++)
{
addRow(temp.I + 1, thiso.commands[temp.I]);
}

open(mousescreenx, mousescreeny);
}
}

function Profile_Menu.onSelect(entryid, text)
{
switch (text)
{
case "Profile":
{
players[this.pid].showProfile();

break;
}
}

Profile_Menu.destroy();
}


If you don't like it, whatever. Basically when you right-click a player it will show there account then a ---- (basically a line) which seperates the commands. (Those shown in this.commands on the onCreated function). There are two methods for checking for players on your right-click, they both SHOULD work (unsure =o). I prefer method 2 as it's more accurate in right-clicking. Anyway, when you right-click and click Profile it will show there graal profile.. right-clicking your self will show your own profile without the menu (is changable though)

If you have a suggestion add it, once again. I made this @ 3 AM.. so dont complain =(.

P.S. Skyld.. thanks for info @ openprofile command =).

Also, the attached picture is the profile menu opened ASWELL as the chat system (not included) which is basically direct-messaging (like aim? =o).

I will probally add a savelog (chat log) command, and maybe even a load log command. Gotta wait tho =P

contiga
09-26-2006, 10:39 PM
Nice :)

I like the IM windows, it's better then PM's, but private :-D

Sum41Freeeeek
09-26-2006, 10:50 PM
The IMs are cool, but did you make an accept system where you can turn
off and on IMs? So you're not pking or something and someone goes HI

Skyld
09-26-2006, 10:51 PM
P.S. Skyld.. thanks for info @ openprofile command =).
You're welcome!

KuJi
09-26-2006, 10:51 PM
The IMs are cool, but did you make an accept system where you can turn
off and on IMs? So you're not pking or something and someone goes HI

The message doesn't take focus, your graal keeps focus.

BUT: I am going to work on a friends / ignore list soon =). I'll probally add new features asap =)

You're welcome!

=D. Deserve it, else I wouldn't of thought of the idea lol

Rapidwolve
09-27-2006, 01:29 AM
Yawr umm, everytime I try to make one of these I always have this one problem with player indexes z.z

KuJi
09-27-2006, 04:58 AM
Yawr umm, everytime I try to make one of these I always have this one problem with player indexes z.z

Now you have a base =)

Rapidwolve
09-27-2006, 05:41 AM
All I needed was teh players part :]

<3 thx

KuJi
09-27-2006, 06:40 AM
All I needed was teh players part :]

<3 thx

=). Glad to help.. rep me =)

*Edit* Woah... it's only been one day and we've had a nifty amount of views - awsuem. Maybe I should contribute more =P.

xAndrewx
09-27-2006, 09:41 AM
yea Skyld rocks :]

Darlene159
09-27-2006, 01:30 PM
=). Glad to help.. rep me =)

*Edit* Woah... it's only been one day and we've had a nifty amount of views - awsuem. Maybe I should contribute more =P.I wish people would contribute more. Would be very helpful to the community. :)

Jackel9
09-27-2006, 05:02 PM
I just want to know which server is that screenshot on you post.

Twinny
09-27-2006, 05:09 PM
I wish people would contribute more. Would be very helpful to the community. :)

And thus Code Gallery was introduced. Give it time.

KuJi
09-27-2006, 10:11 PM
I just want to know which server is that screenshot on you post.

Graal X.. my server of course.

Admins
09-28-2006, 01:11 AM
Thanks for sharing the code :)

KuJi
09-28-2006, 02:50 AM
Thanks for sharing the code :)

Was that you who gave me points =o?

It says I am at 20.. You should let people see who reps you.. at least the positive ones =(

Rapidwolve
09-28-2006, 03:02 AM
I gave u teh points nub

aww u had ur hopes up thinkin it was stefan ;]

KuJi
09-28-2006, 03:04 AM
I gave u teh points nub

aww u had ur hopes up thinkin it was stefan ;]

I got 4 reps already from this script:

Custom Profiles =) 09-27-2006 06:03 PM
Custom Profiles =) 09-27-2006 03:43 PM Nice one. -Crono
Custom Profiles =) 09-27-2006 08:58 AM cool guy
Custom Profiles =) 09-27-2006 07:58 AM NPC contributers need rate ups!

20 point(s) total

Moondeath_2
09-28-2006, 03:14 AM
That im window reminds me of something I was doing execpt on the course I made it like the in game player list allowing you to ignore people. Maybe I should start contributing npcs too i'll start pulling out my backups disk case and see if there is anything useful for anyone. :)

I just want to know which server is that screenshot on you post.

This is off topic from what you said and this whole entire thread, but what on earth? You misspelled dimensionzero in that image you nimwit. X_x It's dimensionzero.ath.cx, ugh.

KuJi
09-28-2006, 03:30 AM
That im window reminds me of something I was doing execpt on the course I made it like the in game player list allowing you to ignore people. Maybe I should start contributing npcs too i'll start pulling out my backups disk case and see if there is anything useful for anyone. :)



This is off topic from what you said and this whole entire thread, but what on earth? You misspelled dimensionzero in that image you nimwit. X_x It's dimensionzero.ath.cx, ugh.

Please no code that looks like this:


function onPlayerChats()
{
if (player.chat == "hi")
{
}
}
=O!

Moondeath_2
09-28-2006, 04:06 AM
Please no code that looks like this:


function onPlayerChats()
{
if (player.chat == "hi")
{
}
}
=O!

Was that supposed to be funny on some level? :asleep:

KuJi
09-28-2006, 04:17 AM
Was that supposed to be funny on some level? :asleep:

It's from experience of seeing almost everyones scripts.

Twinny
09-28-2006, 07:25 AM
Man...i havn't got any rep yet ='(

Screw you guys I'm going home >_<

KuJi
09-28-2006, 02:17 PM
Man...i havn't got any rep yet ='(

Screw you guys I'm going home >_<

Now 5 reps =o

Admins
09-28-2006, 07:53 PM
I have not given points yet x-x

zephirot
09-28-2006, 08:15 PM
Really nice, but why you named it custom profile? More like a global chat :O

KuJi
09-28-2006, 09:59 PM
Really nice, but why you named it custom profile? More like a global chat :O

No, the global chat was a pic of me using the script I gave to right-click people for Chat.

Infact.. all that currently can do is Right-click -> Profile. Though adding a new command is totally easy.. you can even add Staff commands or something to it if you want.. choice is yours =D

Custom Profiles =) 09-27-2006 07:58 AM NPC contributers need rate ups! <-- wtf.. this one disapeared =o!

P.S. 24 points.. anyone got any ideas of something to make =o?

Angel_Light
12-22-2006, 08:19 PM
Kuji, I'm messing around with the script and realized clientr[this.pid].foo won't work for me. It's been like 2months since my last script so I'm a little rusty... Can you figure out a way to make it read XP

excaliber7388
12-22-2006, 09:39 PM
I would love to build those IMs into the DR computer :D

Angel_Light
12-22-2006, 09:41 PM
There not that difficult to make :P