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 06-11-2004, 06:14 PM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
getplayer

I have had several instances that i would like to know how to use getplayer. I need this for a new wep i made that basically your guy teleports to the nearest player and then circles him while slashing him with the sword.
Reply With Quote
  #2  
Old 06-11-2004, 06:15 PM
VeX_RaT_Boy VeX_RaT_Boy is offline
WannaBe Scripter
VeX_RaT_Boy's Avatar
Join Date: Aug 2002
Location: Norway
Posts: 960
VeX_RaT_Boy is on a distinguished road
Send a message via ICQ to VeX_RaT_Boy Send a message via AIM to VeX_RaT_Boy Send a message via Yahoo to VeX_RaT_Boy
Read this before posting! http://forums.graal2001.com/forums/announcement.php?f=8
__________________
-Kjetil Valen
Reply With Quote
  #3  
Old 06-11-2004, 06:19 PM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
Read the documents in the attatchment. they are getting old and somewhat outdated, but they contain a wealth of knowledge I am sure you will find usefull. *note I put my updated commands.rtf in there too, since there was an old one... or something, this is a semi-long note*

Edit: Kjetil, the search function is still broke, so that doesn't do him any good, sad but true
Attached Files
File Type: zip npcserverdocuments.zip (30.1 KB, 179 views)
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #4  
Old 06-11-2004, 06:24 PM
VeX_RaT_Boy VeX_RaT_Boy is offline
WannaBe Scripter
VeX_RaT_Boy's Avatar
Join Date: Aug 2002
Location: Norway
Posts: 960
VeX_RaT_Boy is on a distinguished road
Send a message via ICQ to VeX_RaT_Boy Send a message via AIM to VeX_RaT_Boy Send a message via Yahoo to VeX_RaT_Boy
Hm. Search Worked for me, but it only found this thread and the one Loriel closed, so I guess it's broken.
__________________
-Kjetil Valen
Reply With Quote
  #5  
Old 06-11-2004, 06:30 PM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
yeah, it only finds threads created after the update, which isn't all that usefull
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #6  
Old 06-11-2004, 06:43 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
It's not basically only getplayer, it envolves other things that you probably don't know how to work too; And to be honest it is not that easy for people that don't know much about scripting.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #7  
Old 06-11-2004, 11:00 PM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
I know more about scripting than most people, its just the newer commands that go with servers and stuff that tend to confuse me, but i have been an NAT on a couple servers b4 the one im on now. Also i still just want to know how to use the getplayer command, its not very specific in the document...
Reply With Quote
  #8  
Old 06-11-2004, 11:05 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
Quote:
Originally Posted by falco10291029
I know more about scripting than most people
...*stabs*

Quote:
its just the newer commands that go with servers and stuff that tend to confuse me,
They aren't that new.

Quote:
but i have been an NAT on a couple servers b4 the one im on now.
This truly lends credibility to your first statement.

Quote:
Also i still just want to know how to use the getplayer command, its not very specific in the document...
Serverside:
NPC Code:
with(getplayer(accountname)) {

Reply With Quote
  #9  
Old 06-11-2004, 11:08 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally Posted by falco10291029
I know more about scripting than most people, its just the newer commands that go with servers and stuff that tend to confuse me, but i have been an NAT on a couple servers b4 the one im on now. Also i still just want to know how to use the getplayer command, its not very specific in the document...
new? NEW?! the npcserver has been around for 2-3 years. That excuse doesn't work anymore
Reply With Quote
  #10  
Old 06-11-2004, 11:11 PM
Xecutor Xecutor is offline
Former UN Manager
Join Date: Apr 2004
Posts: 117
Xecutor is on a distinguished road
npcserver.rtf is specific enough.
Reply With Quote
  #11  
Old 06-11-2004, 11:17 PM
Malinko Malinko is offline
Unholy Nation
Join Date: Mar 2004
Location: Massachusetts, U.S.A.
Posts: 1,782
Malinko is on a distinguished road
Send a message via AIM to Malinko
I find it funny how five of those scripters above went insane when someone said it was "new" lmao.
Reply With Quote
  #12  
Old 06-11-2004, 11:19 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
Quote:
Originally Posted by Malinko
I find it funny how five of those scripters above went insane when someone said it was "new" lmao.
I find it funny that not only do you lack the ability to count but you also cannot distinguish between 'insane' and 'disgust'.
Reply With Quote
  #13  
Old 06-11-2004, 11:21 PM
Malinko Malinko is offline
Unholy Nation
Join Date: Mar 2004
Location: Massachusetts, U.S.A.
Posts: 1,782
Malinko is on a distinguished road
Send a message via AIM to Malinko
Hey, I just skimmed over the post, not my fault I said five =P.
Reply With Quote
  #14  
Old 06-12-2004, 02:25 AM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally Posted by falco10291029
I know more about scripting than most people, its just the newer commands that go with servers and stuff that tend to confuse me, but i have been an NAT on a couple servers b4 the one im on now. Also i still just want to know how to use the getplayer command, its not very specific in the document...
It's syntax is like what Lance said.

NPC Code:

with(getplayer(osrs)){
setplayerprop #3,head1172.png;
}



Will change osrs's head!
On your system, i would tell you to use getnearestplayers(); wich will return into an array of player's indexs. So get the first index (it's the nearest player) and get its account name,then use getplayer() to act on the specified player and do whatever you want.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #15  
Old 06-12-2004, 04:20 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally Posted by osrs
It's syntax is like what Lance said.
On your system, i would tell you to use getnearestplayers(); wich will return into an array of player's indexs. So get the first index (it's the nearest player) and get its account name,then use getplayer() to act on the specified player and do whatever you want.
why use getplayer when you can do players[index]...
Reply With Quote
  #16  
Old 06-12-2004, 04:22 AM
darkreign3 darkreign3 is offline
Senior Member
darkreign3's Avatar
Join Date: Sep 2003
Location: Azeroth
Posts: 125
darkreign3 is on a distinguished road
Send a message via AIM to darkreign3
Iam not to great at Scripting ill just stick to my level makeing and Pixel art
__________________

A staff member without his RC is like a fat kid wihtout cake!
Reply With Quote
  #17  
Old 06-12-2004, 07:38 AM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally Posted by Python523
why use getplayer when you can do players[index]...
Hm, indeed.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #18  
Old 06-12-2004, 08:23 AM
EsCanavi EsCanavi is offline
No Longer Graalian.
EsCanavi's Avatar
Join Date: Oct 2003
Location: ..:: Lassomption/Quebec/Canada ]::...
Posts: 214
EsCanavi is on a distinguished road
Send a message via AIM to EsCanavi Send a message via MSN to EsCanavi
1 thing don't work Clientside try it server side command still not working
maybe cause its an offline mode command like few other but most of them work serverside/clientside
__________________
:: Free Gift... 40$ ::
:: WrsHosting ::
:: Need a webhost, contact me ( free ) 99.9% Online ::
Contact me: [email protected] (msn|mailbox)
Reply With Quote
  #19  
Old 06-12-2004, 09:37 AM
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
Quote:
Originally Posted by Malinko
Hey, I just skimmed over the post, not my fault I said five =P.
If you care enough to make a reply, you should care enough to read. Otherwise, you should withhold your extremely witty reply for a thread you actually pay attention to. I could also point out that whatever you post to this forum is, in fact, 'your fault'.

Quote:
Originally Posted by darkreign3
Iam not to great at Scripting ill just stick to my level makeing and Pixel art
You know, I was going through this thread, and I didn't see your name in it. These are forums, not AIM. Don't spam.

Last edited by Lance; 06-12-2004 at 06:15 PM..
Reply With Quote
  #20  
Old 06-12-2004, 08:48 PM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
Ok....its new to me cus for the past 2 years ive made single player adventure games so its new for me.....also with(index) is thhe correct format right not with(players[index])
Reply With Quote
  #21  
Old 06-12-2004, 09:35 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
No, not really.
Reply With Quote
  #22  
Old 06-12-2004, 09:44 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally Posted by falco10291029
Ok....its new to me cus for the past 2 years ive made single player adventure games so its new for me.....also with(index) is thhe correct format right not with(players[index])
NPC Code:

with(players[index]){
//do action
}



There are a bunch of others players[index] variables too, not only .id;
Learning scripting is just an act of read, comprehend and test.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /

Last edited by osrs; 06-13-2004 at 12:03 AM..
Reply With Quote
  #23  
Old 06-12-2004, 10:13 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
... at which you apparently fail. with (players[i]).
Reply With Quote
  #24  
Old 06-12-2004, 10:15 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally Posted by Loriel
... at which you apparently fail. with (players[i]).
So will you put the .id outside the ()'s?
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #25  
Old 06-12-2004, 10:22 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Nope.
Reply With Quote
  #26  
Old 06-12-2004, 11:20 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally Posted by osrs
So will you put the .id outside the ()'s?
No. You will learn proper syntax though.
Reply With Quote
  #27  
Old 06-12-2004, 11:58 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Sorry for my wrong information falco10291029, next time i will make sure to post correct things.
Quote:
Originally Posted by Python523
No. You will learn proper syntax though.
Living and learning...
And i knew it wasn't possible to put the .id outside the ()'s, i was being sarcastic.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #28  
Old 06-13-2004, 12:10 AM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
ok yeh i testes after i posted and i was wrong so now i get it i still have some problems with such things but im learning by either geuss and chack or by looking at other scripts that i know what they do thewn seeing how they do it, and absorbing that info into my mind to use. When i first started scripting, i didnt even know how to make weps lol.
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 08:03 PM.


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