Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Serverside npc questions (https://forums.graalonline.com/forums/showthread.php?t=49364)

prozac424242 11-29-2003 05:53 AM

Serverside npc questions
 
On making very simple actions work such as say, say2, noplayerkilling, and sparringzone :
serverside, I find that they do not work on a map level.

I have tried them with loadmap and a gmap file, also with the old setmap command, with and without the //#CLIENTSIDE declaration.

They work offline but not on my server. Anyone know why and how to make those very simple things work on a mapped level?

Lance 11-29-2003 06:01 AM

noplayerkilling & sparringzone are clientside-only commands.

prozac424242 11-29-2003 06:12 AM

okay...
 
so why does the npc
NPC Code:

//#CLIENTSIDE
noplayerkilling


not work on the server?
What is the correct format?

Lance 11-29-2003 06:29 AM

You're probably better off putting that inside an event block, e.g.:

NPC Code:

//#CLIENTSIDE
if (playerenters) {
noplayerkilling;
}



Beyond that, dunno what your problem might be.

prozac424242 11-29-2003 06:54 AM

thank you, that worked for the noplayerkilling event.

But wouldn't you know it, that does not work for sparring zones?

Anyone know how to make a sparringzone on a map level in a server?

in non-map level I have this one line npc
NPC Code:

sparringzone


and that room works fine.

put that npc on a mapped level, does not work. Cliendtside line, nope. Event block with or without clientside, nope.

anyone know how to make it work?

Lance 11-29-2003 07:08 AM

NPC Code:

//#CLIENTSIDE
if (playerenters) {
sparringzone;
}



Should do it...

prozac424242 11-29-2003 07:15 AM

nope
 
you would think that would work, but it does not.

I thnk sparringzone has to do with the server becasue you can press R to see your and other's ratings?

Anyone else want to take a guess before I pm stefan on this apparent error?

Lance 11-29-2003 07:16 AM

Nah, sparring zones are handled clientside - the server's got no idea whether or not you're in a sparring zone - only the client knows this.

DIABLO2099 11-29-2003 08:24 AM

Did you try...
NPC Code:
//#CLIENTSIDE
sparringzone



This command sort of confused me before because it was required that it did not have semi-colon or any spaces when I used it.

Lance 11-29-2003 09:11 AM

Quote:

Originally posted by DIABLO2099
Did you try...
NPC Code:
//#CLIENTSIDE
sparringzone



This command sort of confused me before because it was required that it did not have semi-colon or any spaces when I used it.

Come to think of it, that rings a bell. I remember having similar difficulties with it when I was but a newbie. :)

Alexander 11-29-2003 10:03 AM

Make sure theres no spaces after sparringzone or it won't work.

Loriel 11-29-2003 01:40 PM

Quote:

Originally posted by Lance
Nah, sparring zones are handled clientside - the server's got no idea whether or not you're in a sparring zone - only the client knows this.
Actually the server should - AP and rating calculations better not be done clientside.

Other than that, sparringzone is not a script command and thus has to be in an npc by itself. Stefan probably got lazy implementing proper parsing :D

prozac424242 11-29-2003 03:54 PM

I have tred every suggestion in this thread, and none of them work on a mapped level on a server. Thank you all for your time in trying to help, I will pm Stefan about this now.

Luigi1 11-29-2003 05:50 PM

On SL, I've had to make 2 seperate NPC's containing these codes respectively to get the sparring zone to fully work:

NPC Code:
sparringzone


NPC Code:
//#CLIENTSIDE
sparringzone



Err. Or maybe the first one isn't needed. Either way, I'm still the biggest idiot to ever exist :)

osrs 11-29-2003 08:15 PM

Quote:

Originally posted by Luigi1
On SL, I've had to make 2 seperate NPC's containing these codes respectively to get the sparring zone to fully work:
NPC Code:
sparringzone


NPC Code:
//#CLIENTSIDE
sparringzone


Err. Or maybe the first one isn't needed. Either way, I'm still the biggest idiot to ever exist :)

As Lance said, you're probably better off putting that inside an event block.

Loriel 11-29-2003 09:20 PM

Quote:

Originally posted by osrs
As Lance said, you're probably better off putting that inside an event block.
asjkdhaksdjasdk NO, as I just said.


NPC Code:
sparringzone
//#CLIENTSIDE
sparringzone

should work.

prozac424242 11-29-2003 09:44 PM

aha!
 
Stefan replied to my pm; I was right, it's a programming oversight, he said:

Quote:

Re: Sparringzone server error
Yes the sparring zone thing is not working for levels in a gmap. I should probably add the sparring calculation as scripting command.
so I guess we can look for a fix in the next graal version?


All times are GMT +2. The time now is 09:26 PM.

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