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 02-01-2004, 09:09 AM
Jimmii Jimmii is offline
Registered User
Join Date: Jan 2004
Posts: 3
Jimmii is on a distinguished road
with(getplayer(xi)) question

Ok, i am rather new to... well basically the npc-server setup itself... and i have a few questions

if i am on this account, and fire an NPC that has

with(getplayer(MeoDea)) {showimg 201,block.png,playerx,playery;}

only MeoDea will be able to see the image right?
and if so, if a seperate NPC player MeoDea has calls hideimg 201, will it hide this image?

and if i do

with(getplayer(MeoDea)) {timeout=4;}

will it set a timeout for MeoDea to 4 seconds?

Sorry if these seem like simple questions, but i was told getplayer(i) makes it like player i is the active player.... but not quite... and i don't know how close it is to them being the active player
Reply With Quote
  #2  
Old 02-01-2004, 03:40 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 used to get informations or send informations to the specified player,serverside. E.g:

NPC Code:

with(getplayer(osrs)){
setstring client.chat,Hey osrs!;
say2 New message for you!;
}



You can send any information to osrs using 'with(getplayer())' that way.
__________________
"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
  #3  
Old 02-01-2004, 04:55 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
Re: with(getplayer(xi)) question

Quote:
Originally posted by Jimmii
with(getplayer(MeoDea)) {showimg 201,block.png,playerx,playery;}
Because with (getplayer()) is serverside, I doubt this. Also, showimgs are NPC local anyway, and only the NPC that showed an image can hide it.


Quote:
with(getplayer(MeoDea)) {timeout=4;}

Nope, timeout is NPC local and not player dependant.
Reply With Quote
  #4  
Old 02-02-2004, 03:25 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
showimg is a function of the npc, so all players would see it. Also the timeout variable belongs to the npc, so it doesn't matter who the active player is, it would always set the timeout for the npc.

If you want to change something on the clientside you will need to set strings for the player (setstring client.name,value; or setstring clientr.name,value; ) and possibly do a trigger (like triggeraction 0,0,clientside, weaponname,params; ) and on clientside you then display an image or similar when the string is set or when the trigger is received (if (actionclientside)...)
Reply With Quote
  #5  
Old 02-05-2004, 02:21 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
Triggeraction to Clientside?

Hi,
Is it possible to make a triggeraction from Serverside to Clientside?
Reply With Quote
  #6  
Old 02-05-2004, 03:31 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
Re: Triggeraction to Clientside?

Quote:
Originally posted by projectigi
Hi,
Is it possible to make a triggeraction from Serverside to Clientside?
If it's a weapon, yes. If it's an other npc, I don't know, but i doubt it.
__________________
-Kjetil Valen
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 12:53 AM.


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