Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Need help with a script (https://forums.graalonline.com/forums/showthread.php?t=59995)

raiden0899 07-15-2005 12:51 PM

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?

WanDaMan 07-15-2005 01:10 PM

'setcharprop' is for NPC's, use 'setplayerprop' ;)

raiden0899 07-15-2005 01:45 PM

ok. its working now. thanks


All times are GMT +2. The time now is 01:16 PM.

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