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, 177 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
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:21 PM.


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