Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-13-2005, 08:36 PM
talkingnoodle talkingnoodle is offline
Rapidwolve
talkingnoodle's Avatar
Join Date: Nov 2005
Location: Leominster, MA
Posts: 229
talkingnoodle is on a distinguished road
Send a message via AIM to talkingnoodle Send a message via MSN to talkingnoodle
clicking other players

im trying to make a profile system and when u click on urself or someone else their profile shows up...but i dont know how to make it when you click on other players to make it work

can someone give me like an example script on how to make something happen when u click on another online player
Reply With Quote
  #2  
Old 11-13-2005, 08:57 PM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
You'd probably want to start off with mousedown and testplayer.
Reply With Quote
  #3  
Old 11-13-2005, 10:43 PM
talkingnoodle talkingnoodle is offline
Rapidwolve
talkingnoodle's Avatar
Join Date: Nov 2005
Location: Leominster, MA
Posts: 229
talkingnoodle is on a distinguished road
Send a message via AIM to talkingnoodle Send a message via MSN to talkingnoodle
can u gimme an example script...make it like use say2 or something
Reply With Quote
  #4  
Old 11-13-2005, 11:10 PM
Fry Fry is offline
Registered User
Fry's Avatar
Join Date: Sep 2001
Location: Germany
Posts: 384
Fry has a spectacular aura about
You could take a look at the Graal Wiki (http://wiki.graal.us/GScript sounds like it'd be useful for you) to get information about the particular functions or events.
__________________
Graal Statistics

Top 3 servers at the moment (players):


Reply With Quote
  #5  
Old 11-14-2005, 12:06 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
You want it so when you click on someone an action occurs, so you probably want to start with the mouse action, there are several mouse flags that detect mouse action such as
NPC Code:
mousedown


as Lance mentioned, then you probably want it to detect if a player is there so the final action doesnt just pop up out of nowhere even when there's no player there, so you can use
NPC Code:
testplayer(x,y)


that'll return the index of the player at x,y.
now depending on what you want the final action to be, you can use different commands, you can use say2 as you mentioned.

p.s. soo many run-ons
__________________
Reply With Quote
  #6  
Old 11-14-2005, 12:28 AM
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 ZeLpH_MyStiK
NPC Code:
testplayer(x,y)


that'll return the index of the player at x,y.
Is it not testplayer[x,y]?
__________________
Skyld
Reply With Quote
  #7  
Old 11-14-2005, 01:21 AM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
Quote:
Originally Posted by Skyld
Is it not testplayer[x,y]?
Nope.
Quote:
Originally Posted by commands.rtf
testplayer( x, y ) the index of the player on position (x,y)
Quote:
Originally Posted by scriptfunctions_client.txt
testplayer(float, float) - returns integer
Reply With Quote
  #8  
Old 11-14-2005, 04:27 AM
talkingnoodle talkingnoodle is offline
Rapidwolve
talkingnoodle's Avatar
Join Date: Nov 2005
Location: Leominster, MA
Posts: 229
talkingnoodle is on a distinguished road
Send a message via AIM to talkingnoodle Send a message via MSN to talkingnoodle
soo

if (mousedown){
if (testplayer(x,y){
blah?;
}
}

??
Reply With Quote
  #9  
Old 11-14-2005, 04:23 PM
Deek2 Deek2 is offline
Registered User
Join Date: May 2002
Location: Springfield, Missouri
Posts: 1,578
Deek2 is on a distinguished road
You should probably use mousex and mousey.
Reply With Quote
  #10  
Old 11-14-2005, 06:15 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 talkingnoodle
soo

if (mousedown){
if (testplayer(x,y){
blah?;
}
}

??
You should also close that testplayer() properly.

Also, if I remember correctly, testplayer returns the index of the found player, not true/false. You might want to modify your testplayer() check to support that.
__________________
Skyld
Reply With Quote
  #11  
Old 11-14-2005, 07:43 PM
Fry Fry is offline
Registered User
Fry's Avatar
Join Date: Sep 2001
Location: Germany
Posts: 384
Fry has a spectacular aura about
It returns -1 if no player is found at the specified location, otherwise the player's id (I'm not absolutly sure whether it returns the level or server id, but if I remember correctly it's the server id), yes.

Ben just pointed out that level/server id might be confused with an id for a level/server or stuff, the correct names would be id for the player number for the entire server, and index for the player number local to the level. Although I consider these even more confusing.
__________________
Graal Statistics

Top 3 servers at the moment (players):



Last edited by Fry; 11-14-2005 at 09:00 PM..
Reply With Quote
  #12  
Old 11-14-2005, 08:43 PM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi


Bam! I just made all this GScript talk totally redundant.
__________________
Reply With Quote
  #13  
Old 11-14-2005, 09:44 PM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by Googi


Bam! I just made all this GScript talk totally redundant.
That won't do anything (I'm pretty sure it's a custom profile system that he is talking about).
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #14  
Old 11-14-2005, 10:32 PM
talkingnoodle talkingnoodle is offline
Rapidwolve
talkingnoodle's Avatar
Join Date: Nov 2005
Location: Leominster, MA
Posts: 229
talkingnoodle is on a distinguished road
Send a message via AIM to talkingnoodle Send a message via MSN to talkingnoodle
will someone just give me an example script
Reply With Quote
  #15  
Old 11-14-2005, 10:43 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 talkingnoodle
will someone just give me an example script
Look. If you apply an ounce of knowledge, you can do this yourself.

Read the thread for the info we've given you.
__________________
Skyld
Reply With Quote
  #16  
Old 11-14-2005, 10:50 PM
talkingnoodle talkingnoodle is offline
Rapidwolve
talkingnoodle's Avatar
Join Date: Nov 2005
Location: Leominster, MA
Posts: 229
talkingnoodle is on a distinguished road
Send a message via AIM to talkingnoodle Send a message via MSN to talkingnoodle
-_-
Reply With Quote
  #17  
Old 11-15-2005, 01:41 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
Quote:
Originally Posted by talkingnoodle
-_-
=\ we basically told you exactly what you need to make this, now just piece it all together. we're not going to give you an "example script" because we know you're just going to copy the entire thing -.-
__________________
Reply With Quote
Reply


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 05:19 AM.


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