Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   The Clientside Cops - PART THREE (https://forums.graalonline.com/forums/showthread.php?t=54940)

Googi 08-17-2004 09:31 PM

The Clientside Cops - PART THREE
 
So, I'm still having problems with clientside.

NPC Code:

//#CLIENTSIDE

if (created) {
this.var=1;
}
if (playertouchsme) {
if (this.var==1) {
if (client.hasflag) {
disabledefmovement;
}
}
}



As you can guess, it doesn't work. I can't seem to figure out why though, but I would guess it has something to do with the this.var.

Xecutor 08-17-2004 09:58 PM

Did you initialize the size of the NPC with setshape or some other means? Also make sure that client.hasflag was set.

Lance 08-17-2004 09:58 PM

Does it have an image? If it has neither setshape nor image, how can one touch it?

Googi 08-17-2004 10:37 PM

Quote:

Originally Posted by Xecutor
Did you initialize the size of the NPC with setshape or some other means? Also make sure that client.hasflag was set.

It does have setshape. Also, I know that client.hasflag is set because serverside actions that require client.hasflag to be set are being executed.

calum 08-18-2004 02:13 PM

It seems to work fine for me when i setshape...

MysticalDragon 08-18-2004 04:31 PM

Quote:

Originally Posted by Googi
So, I'm still having problems with clientside.

NPC Code:

//#CLIENTSIDE

if (created) {
this.var=1;
}
if (playertouchsme) {
if (this.var==1) {
if (client.hasflag) {
disabledefmovement;
}
}
}



As you can guess, it doesn't work. I can't seem to figure out why though, but I would guess it has something to do with the this.var.

Sir your wrong.client.hasflag is not beeing executed.Alls your script says is when this.var,1 is set and client.hasflag it will disabledefmovement.i dont see setstring client.hasflag,; or set client.hasflag;

Xecutor 08-18-2004 04:51 PM

Quote:

Originally Posted by MysticalDragon
Sir your wrong.client.hasflag is not beeing executed.Alls your script says is when this.var,1 is set and client.hasflag it will disabledefmovement.i dont see setstring client.hasflag,; or set client.hasflag;

That is not his entire script.

osrs 08-18-2004 06:04 PM

Quote:

Originally Posted by MysticalDragon
Sir your wrong.client.hasflag is not beeing executed.Alls your script says is when this.var,1 is set and client.hasflag it will disabledefmovement.i dont see setstring client.hasflag,; or set client.hasflag;

And that flag is not set by using the command setstring as you cited too, otherwise Googi would have to check this way:

NPC Code:

if(strequals(#s(client.string),content)){
}


Dach 08-18-2004 07:03 PM

Something is enabledefmovement;-ing in the background.

Quote:

Originally Posted by MysticalDragon
Sir your wrong.client.hasflag is not beeing executed.Alls your script says is when this.var,1 is set and client.hasflag it will disabledefmovement.i dont see setstring client.hasflag,; or set client.hasflag;

... whatever happened to not posting unless you understand the problem?
Quote:

Originally Posted by Googi
It does have setshape. Also, I know that client.hasflag is set because serverside actions that require client.hasflag to be set are being executed.


Googi 08-18-2004 07:28 PM

Quote:

Originally Posted by calum
It seems to work fine for me when i setshape...

It works offline but not online.

Dach 08-18-2004 07:42 PM

Quote:

Originally Posted by Googi
It works offline but not online.

I found the same predicament, but I found another script had enabledefmovent in a timeout. After commenting that out, it worked just fine.

GoZelda 08-26-2004 02:31 PM

It could be a problem somewhere else in your script, or because the disabledefmovement command is outdated? Doubtful though.
Perhaps try using a 'real' string instead of this.var, like setstring test,1;

Dach 08-26-2004 03:39 PM

Quote:

Originally Posted by GoZelda
It could be a problem somewhere else in your script, or because the disabledefmovement command is outdated? Doubtful though.
Perhaps try using a 'real' string instead of this.var, like setstring test,1;

It's old yes, but not outdated ;)
You shouldn't have to use strings unless you have to hold the information. Take out the this.var==1 check and see that really is the problem, or just replace the "disabledefmovement;" with a "setplayerprop #c,this is rank;".

Googi 08-26-2004 11:54 PM

Has disabledefmovement been replaced by a different command?

Rick 08-27-2004 02:19 AM

No.

(stupid ten character limit)

Googi 08-27-2004 07:41 PM

Quote:

Originally Posted by Rick
No.

Then how could it be outdated?

GoZelda 08-27-2004 07:59 PM

Quote:

Originally Posted by Googi
Then how could it be outdated?

I said that it could be outdated, in the way of if (playersays) was outdated. I also said it was doubtful it's outdated.


All times are GMT +2. The time now is 08:56 AM.

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