Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   noplayerkilling() (https://forums.graalonline.com/forums/showthread.php?t=134269421)

Tim_Rocks 07-28-2014 09:57 PM

noplayerkilling()
 
Would anyone know if there's some sort of workaround to make players 'dontblock()' or 'block()'. On a gmap I can use noplayerkilling() via clientside, but that really defeats the purpose when they walk outside of my no pk zone.

Would be super if I could do something along the lines of:

noplayerkilling(true);
noplayerkilling(false);

MonkeyBob 07-28-2014 10:02 PM

You wish.

Jakov_the_Jakovasaur 07-28-2014 10:31 PM

hello!

in v6 there is now the clientside variable player.isblocking (boolean). however it is only effective on your own client, so you would have to loop through other player objects clientside and set isblocking to false

you could also possibly try writing player.gmap.nopkzone = true; on client now that the variable isnt read-only anymore, but i dont know if it will work

with that said, the best thing to do if youre willing to use up more cpu is script an entirely custom movement system

Tim_Rocks 07-28-2014 11:58 PM

Way better, thank you Jakov. That did exactly as intended.

Jakov_the_Jakovasaur 07-28-2014 11:59 PM

youre welcome!

what solution did you go with?

Tim_Rocks 07-29-2014 01:17 AM

I went with looping through allplayers via clientside checking their location on the gmap. If they're within a certain areas (no pk zones), they won't block. In Era's case though, I did a little extra step and did checks to see if a player was set to pk mode which would cause them to block even in a no pk zone. Very useful btw.

Restraint 08-21-2014 03:21 AM

Quote:

Originally Posted by Tim_Rocks (Post 1729189)
I went with looping through allplayers via clientside checking their location on the gmap. If they're within a certain areas (no pk zones), they won't block. In Era's case though, I did a little extra step and did checks to see if a player was set to pk mode which would cause them to block even in a no pk zone. Very useful btw.

You could do the same by simply looping through players on the clientside, instead of allplayers.

And, just a heads-up, you CAN alter player killing back and forth.

this.level.nopkzone = true/false;

Tim_Rocks 08-21-2014 11:08 AM

Yeah, I know we do that events a lot. I used allplayers since I already have the loop active with a map system. No need to make a whole new weapon for a one liner.


All times are GMT +2. The time now is 03:47 AM.

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