Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Search Today's Posts Mark Forums Read

View Poll Results: Was this useful to you?
Yeah 7 87.50%
No 1 12.50%
Voters: 8. You may not vote on this poll

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-26-2006, 09:11 PM
KuJi KuJi is offline
Banned
Join Date: Apr 2004
Location: Staten Island, New York
Posts: 2,202
KuJi will become famous soon enough
Send a message via ICQ to KuJi Send a message via AIM to KuJi Send a message via MSN to KuJi Send a message via Yahoo to KuJi
Custom Profiles =)

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
Attached Thumbnails
Click image for larger version

Name:	graal_1159299077.png
Views:	494
Size:	341.0 KB
ID:	37993  

Last edited by KuJi; 09-26-2006 at 09:33 PM..
Reply With Quote
  #2  
Old 09-26-2006, 09:39 PM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Nice

I like the IM windows, it's better then PM's, but private :-D
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote
  #3  
Old 09-26-2006, 09:50 PM
Sum41Freeeeek Sum41Freeeeek is offline
Future Coder
Join Date: Feb 2004
Location: New York
Posts: 376
Sum41Freeeeek is on a distinguished road
Send a message via AIM to Sum41Freeeeek
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
__________________
Frankie Cassini: ex-Era LAT
Quote:
Originally Posted by brakk View Post
omg just go to your room and draw a pony then

**** the chicken wings!
Reply With Quote
  #4  
Old 09-26-2006, 09:51 PM
KuJi KuJi is offline
Banned
Join Date: Apr 2004
Location: Staten Island, New York
Posts: 2,202
KuJi will become famous soon enough
Send a message via ICQ to KuJi Send a message via AIM to KuJi Send a message via MSN to KuJi Send a message via Yahoo to KuJi
Quote:
Originally Posted by Sum41Freeeeek View Post
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 View Post
You're welcome!
=D. Deserve it, else I wouldn't of thought of the idea lol
Reply With Quote
  #5  
Old 09-26-2006, 09:51 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by KuJi View Post
P.S. Skyld.. thanks for info @ openprofile command =).
You're welcome!
Reply With Quote
  #6  
Old 09-27-2006, 12:29 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
Yawr umm, everytime I try to make one of these I always have this one problem with player indexes z.z
Reply With Quote
  #7  
Old 09-27-2006, 03:58 AM
KuJi KuJi is offline
Banned
Join Date: Apr 2004
Location: Staten Island, New York
Posts: 2,202
KuJi will become famous soon enough
Send a message via ICQ to KuJi Send a message via AIM to KuJi Send a message via MSN to KuJi Send a message via Yahoo to KuJi
Quote:
Originally Posted by Rapidwolve View Post
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 =)
Reply With Quote
  #8  
Old 09-27-2006, 04:41 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
All I needed was teh players part :]

<3 thx
Reply With Quote
  #9  
Old 09-27-2006, 05:40 AM
KuJi KuJi is offline
Banned
Join Date: Apr 2004
Location: Staten Island, New York
Posts: 2,202
KuJi will become famous soon enough
Send a message via ICQ to KuJi Send a message via AIM to KuJi Send a message via MSN to KuJi Send a message via Yahoo to KuJi
Quote:
Originally Posted by Rapidwolve View Post
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.

Last edited by KuJi; 09-27-2006 at 07:00 AM..
Reply With Quote
  #10  
Old 09-27-2006, 12:30 PM
Darlene159 Darlene159 is offline
Administrator
Darlene159's Avatar
Join Date: Aug 2001
Location: Florida
Posts: 12,470
Darlene159 has much to be proud ofDarlene159 has much to be proud ofDarlene159 has much to be proud ofDarlene159 has much to be proud ofDarlene159 has much to be proud ofDarlene159 has much to be proud of
Quote:
Originally Posted by KuJi View Post
=). 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.
__________________
FORUM RULES
GRAAL BIBLE (Lots of useful info)
INFO ABOUT REPUTATIONS.
INFO ABOUT INFRACTIONS.
HOW TO APPLY FOR THE NON-GRAAL RELATED FORUM (<<READ THOROUGHLY!)

SUPPORT: http://support.toonslab.com

NOTE: YOU ARE RESPONSIBLE FOR YOUR OWN POSTS.
READ>THINK>POST
Reply With Quote
  #11  
Old 09-27-2006, 04:09 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by Darlene159 View Post
I wish people would contribute more. Would be very helpful to the community.
And thus Code Gallery was introduced. Give it time.
Reply With Quote
  #12  
Old 09-27-2006, 08:41 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
yea Skyld rocks :]
__________________
Reply With Quote
  #13  
Old 09-27-2006, 04:02 PM
Jackel9 Jackel9 is offline
Dimension Zero Founder
Jackel9's Avatar
Join Date: Nov 2005
Location: NC SONZ
Posts: 193
Jackel9 is on a distinguished road
I just want to know which server is that screenshot on you post.
__________________

Reply With Quote
  #14  
Old 09-27-2006, 09:11 PM
KuJi KuJi is offline
Banned
Join Date: Apr 2004
Location: Staten Island, New York
Posts: 2,202
KuJi will become famous soon enough
Send a message via ICQ to KuJi Send a message via AIM to KuJi Send a message via MSN to KuJi Send a message via Yahoo to KuJi
Quote:
Originally Posted by Jackel9 View Post
I just want to know which server is that screenshot on you post.
Graal X.. my server of course.
Reply With Quote
  #15  
Old 09-28-2006, 12:11 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Thanks for sharing the code
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:43 AM.


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