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 07-15-2005, 12:51 PM
raiden0899 raiden0899 is offline
Registered User
raiden0899's Avatar
Join Date: Oct 2004
Posts: 192
raiden0899 is on a distinguished road
Question Need help with a script

a made a class that copies everything the selected player does. i tried to set it so that when i say "/say text" it sets text as the selected player's chat text. Here's the part of the code that's supposed to do this:
NPC Code:

// this.copy is the account of the selected player
if (playerchats) {
tokenize #c;
if (strequals(#t(0),/say)) {
with(getplayer(#s(this.copy))) {
setcharprop #c,#t(1);
}
}
}


Instead of changing the player's chat text, it only sets it's own chat text. Does anyone know how to make it work?
Reply With Quote
  #2  
Old 07-15-2005, 01:10 PM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
'setcharprop' is for NPC's, use 'setplayerprop'
__________________
V$:CONFL16T
Reply With Quote
  #3  
Old 07-15-2005, 01:45 PM
raiden0899 raiden0899 is offline
Registered User
raiden0899's Avatar
Join Date: Oct 2004
Posts: 192
raiden0899 is on a distinguished road
ok. its working now. thanks
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 11:16 PM.


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