Graal Forums  

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

 
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 11-20-2001, 05:57 AM
Andor_GP1 Andor_GP1 is offline
Registered User
Join Date: Nov 2001
Posts: 35
Andor_GP1 is on a distinguished road
getplayer

Ok say i have the account of a person set to the variable this.buddy. how would i take his chat string (#c) using getplayer and set it to the chat string of the npc.?
__________________

~Pikaz
(formually used account Bravo_LAT-Admin)
~Banana Admin at Andor XD
  #2  
Old 11-20-2001, 10:35 AM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
First off. Is this a NPC Weapon or a serverside NPC?
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
  #3  
Old 11-20-2001, 07:02 PM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
NPC Code:
if (initialized||timeout) {
with (getplayer(#s(this.buddy))) message #c;
timeout=0.1;
}


Should work.
__________________

  #4  
Old 11-21-2001, 04:10 AM
Andor_GP1 Andor_GP1 is offline
Registered User
Join Date: Nov 2001
Posts: 35
Andor_GP1 is on a distinguished road
serverside npc =p and grim that didn't work (i did change the timeout to .5[.1 won't wok serverside on p2p])0.o thanx anyway though
__________________

~Pikaz
(formually used account Bravo_LAT-Admin)
~Banana Admin at Andor XD

Last edited by Andor_GP1; 11-21-2001 at 04:14 AM..
  #5  
Old 11-21-2001, 07:08 AM
Faheria_GP2 Faheria_GP2 is offline
Banned
Faheria_GP2's Avatar
Join Date: Oct 2001
Posts: 1,177
Faheria_GP2 is on a distinguished road
...

.1 works for NPC-Server, it's .05 that don't work
  #6  
Old 11-21-2001, 07:12 AM
Andor_GP1 Andor_GP1 is offline
Registered User
Join Date: Nov 2001
Posts: 35
Andor_GP1 is on a distinguished road
o

i thought it was .1 that didn't o well =p either way it don't work.
__________________

~Pikaz
(formually used account Bravo_LAT-Admin)
~Banana Admin at Andor XD
  #7  
Old 11-21-2001, 08:33 PM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
Then try this:
NPC Code:
if (initialized||timeout) {
with (getplayer(#s(this.buddy))) setstring this.buddytext,#c;
message #s(this.buddytext);
timeout=0.1;
}

And if that doesn't work I'm stumped.
__________________

  #8  
Old 11-22-2001, 04:01 AM
Andor_GP1 Andor_GP1 is offline
Registered User
Join Date: Nov 2001
Posts: 35
Andor_GP1 is on a distinguished road
nope... you be stumped just like me : / thanx anyway though!
__________________

~Pikaz
(formually used account Bravo_LAT-Admin)
~Banana Admin at Andor XD
  #9  
Old 11-22-2001, 04:38 AM
Faheria_GP2 Faheria_GP2 is offline
Banned
Faheria_GP2's Avatar
Join Date: Oct 2001
Posts: 1,177
Faheria_GP2 is on a distinguished road
Quote:
Originally posted by grim_squeaker_x
NPC Code:
if (initialized||timeout) {
with (getplayer(#s(this.buddy))) message #c;
timeout=0.1;
}


Should work.
grim, players dont message, they setplayerprop...

NPC Code:

if (initialized||timeout) {
with (getplayer(#s(this.buddy))) setplayerprop #c,#c;
timeout=0.1;
}



that should work
  #10  
Old 11-22-2001, 06:10 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
:-)

Supersonic is one smart cookie!
--PastAustin
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
  #11  
Old 11-22-2001, 08:08 AM
Andor_GP1 Andor_GP1 is offline
Registered User
Join Date: Nov 2001
Posts: 35
Andor_GP1 is on a distinguished road
well grim was right in the fact i want the npc to say the message not the player. but it still doesn't wok
__________________

~Pikaz
(formually used account Bravo_LAT-Admin)
~Banana Admin at Andor XD
  #12  
Old 12-18-2001, 03:54 AM
Andor_NPC-Admin1 Andor_NPC-Admin1 is offline
Registered User
Join Date: Nov 2001
Posts: 69
Andor_NPC-Admin1 is on a distinguished road
hmm.......i dunno
maybe add an index to #c ? =8
  #13  
Old 12-18-2001, 08:53 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Quote:
Originally posted by Faheria_GP2


grim, players dont message, they setplayerprop...

NPC Code:

if (initialized||timeout) {
with (getplayer(#s(this.buddy))) setplayerprop #c,#c;
timeout=0.1;
}



that should work
All that does is make this.buddy say what he was saying before...Essentially the same as if (playerenters) setlevel #L;, just a waste of processor power and bandwidth
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
  #14  
Old 12-18-2001, 10:10 AM
kp_p2p kp_p2p is offline
Banned
kp_p2p's Avatar
Join Date: Sep 2001
Location: In my own world of chaos and depression.
Posts: 1,758
kp_p2p is on a distinguished road
setlevel #L; causes an infinite loop and freezes graal.
  #15  
Old 12-18-2001, 12:08 PM
Andor_NPC-Admin1 Andor_NPC-Admin1 is offline
Registered User
Join Date: Nov 2001
Posts: 69
Andor_NPC-Admin1 is on a distinguished road
I think he means that both the #c 's have different causes.
The first #c is the npc chat, and the second is the player chat
so maybe it would need to be:

if (initialized||timeout) {
with (getplayer(#s(this.buddy))) setplayerprop #c(-1),#c(0);
timeout=0.1;
}

to seperate its different #c =)
 


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 04:31 PM.


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