Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   Custom Profiles =) (https://forums.graalonline.com/forums/showthread.php?t=68975)

KuJi 09-26-2006 09:11 PM

Custom Profiles =)
 
1 Attachment(s)
Version: 1.00
Made By: KuJi
At 3 AM.. dont complain =(

PHP Code:

// 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.0temp.players.size(); temp.I++)
  {
    if (
mousex in |players[temp.I].xplayers[temp.I].3| && mousey in |players[temp.I].yplayers[temp.I].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(0players[thiso.pid].account);
    
addrow(-1"-");
    for (
temp.0temp.thiso.commands.size(); temp.I++)
    {
      
addRow(temp.1thiso.commands[temp.I]);
    }
    
    
open(mousescreenxmousescreeny);
  }
}

function 
Profile_Menu.onSelect(entryidtext)
{
  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 09:39 PM

Nice :)

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

Sum41Freeeeek 09-26-2006 09: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 09:51 PM

Quote:

Originally Posted by KuJi (Post 1222567)
P.S. Skyld.. thanks for info @ openprofile command =).

You're welcome!

KuJi 09-26-2006 09:51 PM

Quote:

Originally Posted by Sum41Freeeeek (Post 1222586)
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 =)

Quote:

Originally Posted by Skyld (Post 1222587)
You're welcome!

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

Rapidwolve 09-27-2006 12: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 03:58 AM

Quote:

Originally Posted by Rapidwolve (Post 1222661)
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 04:41 AM

All I needed was teh players part :]

<3 thx

KuJi 09-27-2006 05:40 AM

Quote:

Originally Posted by Rapidwolve (Post 1222751)
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 08:41 AM

yea Skyld rocks :]

Darlene159 09-27-2006 12:30 PM

Quote:

Originally Posted by KuJi (Post 1222768)
=). 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 04:02 PM

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

Twinny 09-27-2006 04:09 PM

Quote:

Originally Posted by Darlene159 (Post 1222808)
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 09:11 PM

Quote:

Originally Posted by Jackel9 (Post 1222844)
I just want to know which server is that screenshot on you post.

Graal X.. my server of course.

Admins 09-28-2006 12:11 AM

Thanks for sharing the code :)

KuJi 09-28-2006 01:50 AM

Quote:

Originally Posted by Stefan (Post 1223023)
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 02:02 AM

I gave u teh points nub

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

KuJi 09-28-2006 02:04 AM

Quote:

Originally Posted by Rapidwolve (Post 1223094)
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 02: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. :)

Quote:

Originally Posted by Jackel9 (Post 1222844)
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 02:30 AM

Quote:

Originally Posted by Moondeath_2 (Post 1223109)
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:

PHP Code:

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


=O!

Moondeath_2 09-28-2006 03:06 AM

Quote:

Originally Posted by KuJi (Post 1223126)
Please no code that looks like this:

PHP Code:

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


=O!

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

KuJi 09-28-2006 03:17 AM

Quote:

Originally Posted by Moondeath_2 (Post 1223135)
Was that supposed to be funny on some level? :asleep:

It's from experience of seeing almost everyones scripts.

Twinny 09-28-2006 06:25 AM

Man...i havn't got any rep yet ='(

Screw you guys I'm going home >_<

KuJi 09-28-2006 01:17 PM

Quote:

Originally Posted by Twinny (Post 1223192)
Man...i havn't got any rep yet ='(

Screw you guys I'm going home >_<

Now 5 reps =o

Admins 09-28-2006 06:53 PM

I have not given points yet x-x

zephirot 09-28-2006 07:15 PM

Really nice, but why you named it custom profile? More like a global chat :O

KuJi 09-28-2006 08:59 PM

Quote:

Originally Posted by zephirot (Post 1223319)
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


All times are GMT +2. The time now is 12:35 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.