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:	500
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
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
  #5  
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
  #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, 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
  #11  
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
  #12  
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
  #13  
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
  #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
  #16  
Old 09-28-2006, 01:50 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 Stefan View Post
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 =(
Reply With Quote
  #17  
Old 09-28-2006, 02:02 AM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
I gave u teh points nub

aww u had ur hopes up thinkin it was stefan ;]
Reply With Quote
  #18  
Old 09-28-2006, 02:04 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
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
Reply With Quote
  #19  
Old 09-28-2006, 02:14 AM
Moondeath_2 Moondeath_2 is offline
"..."
Moondeath_2's Avatar
Join Date: Jan 2006
Location: Far Far Away.
Posts: 238
Moondeath_2 is an unknown quantity at this point
Send a message via AIM to Moondeath_2 Send a message via MSN to Moondeath_2 Send a message via Yahoo to Moondeath_2
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 View Post
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.
__________________
Aim: DarkFireXZ3
Email: [email protected] or [email protected]
Common Location: Unholy Nation
Gscript, Playerworld Rules, Support Center
Reply With Quote
  #20  
Old 09-28-2006, 02:30 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 Moondeath_2 View Post
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!
Reply With Quote
  #21  
Old 09-28-2006, 03:06 AM
Moondeath_2 Moondeath_2 is offline
"..."
Moondeath_2's Avatar
Join Date: Jan 2006
Location: Far Far Away.
Posts: 238
Moondeath_2 is an unknown quantity at this point
Send a message via AIM to Moondeath_2 Send a message via MSN to Moondeath_2 Send a message via Yahoo to Moondeath_2
Quote:
Originally Posted by KuJi View Post
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?
__________________
Aim: DarkFireXZ3
Email: [email protected] or [email protected]
Common Location: Unholy Nation
Gscript, Playerworld Rules, Support Center
Reply With Quote
  #22  
Old 09-28-2006, 03:17 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 Moondeath_2 View Post
Was that supposed to be funny on some level?
It's from experience of seeing almost everyones scripts.
Reply With Quote
  #23  
Old 09-28-2006, 06:25 AM
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
Man...i havn't got any rep yet ='(

Screw you guys I'm going home
Reply With Quote
  #24  
Old 09-28-2006, 01:17 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 Twinny View Post
Man...i havn't got any rep yet ='(

Screw you guys I'm going home
Now 5 reps =o
Reply With Quote
  #25  
Old 09-28-2006, 06:53 PM
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
I have not given points yet x-x
Reply With Quote
  #26  
Old 09-28-2006, 07:15 PM
zephirot zephirot is offline
Banned?
Join Date: Sep 2004
Location: Paris
Posts: 1,311
zephirot is a name known to allzephirot is a name known to allzephirot is a name known to all
Send a message via AIM to zephirot Send a message via MSN to zephirot
Really nice, but why you named it custom profile? More like a global chat :O
__________________

Quote:
Originally Posted by unixmad
Can you just shut up ?
MAGA
MFGA
MEGA
Reply With Quote
  #27  
Old 09-28-2006, 08:59 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 zephirot View Post
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?
Reply With Quote
  #28  
Old 12-22-2006, 08:19 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
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
__________________
Deep into the Darkness peering...
Reply With Quote
  #29  
Old 12-22-2006, 09:39 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
I would love to build those IMs into the DR computer
Reply With Quote
  #30  
Old 12-22-2006, 09:41 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
There not that difficult to make :P
__________________
Deep into the Darkness peering...
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 12:48 AM.


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