Graal Forums

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

theHAWKER 05-25-2007 03:39 AM

temparary noPK..
 
i was making a temp noPK zone, when i noticed that there is nothing to unset noPK...
is there any way to fix this problem?

so far ive used:
PHP Code:

function onPlayerEnters(){
noplayerkilling();
sleep(5);
playerkilling();


yeah, but theres no "playerkilling();" thing :(

Deadly_Killer 05-25-2007 03:56 AM

Sadly.. there isn't =[

godofwarares 05-25-2007 03:57 AM

Quote:

Originally Posted by theHAWKER (Post 1311647)
i was making a temp noPK zone, when i noticed that there is nothing to unset noPK...
is there any way to fix this problem?

so far ive used:
PHP Code:

function onPlayerEnters(){
noplayerkilling();
sleep(5);
playerkilling();


yeah, but theres no "playerkilling();" thing :(

Nope :[

You can always do disableweapons() and enableweapons() :]

theHAWKER 05-25-2007 04:00 AM

Quote:

Originally Posted by Deadly_Killer (Post 1311657)
Sadly.. there isn't =[

well *looks at Skyld* someone should make one...

Deadly_Killer 05-25-2007 04:29 AM

Quote:

Originally Posted by theHAWKER (Post 1311662)
well *looks at Skyld* someone should make one...

Skyld doesn't code for graal. He only scripts for graal with its scripting engine.

Googi 05-25-2007 04:50 AM

It might be possible by using putnpc and destroy. Have the NPC use putnpc to create an NPC that makes the level an NPK zone, then have it destroy itself when you want to make the level a PK zone again. I'm not sure whether or not the level would remain NPK even after the NPC is destroyed, though.

cbk1994 05-25-2007 04:59 AM

It would remain no-pk even after the script is destroyed ... you could have the npc /updatelevel the level though I suppose.

Sum41Freeeeek 05-25-2007 06:31 AM

on era I would just use this.noplayerkilling = true/false

not sure if that's only Era though.

Deadly_Killer 05-25-2007 06:35 AM

Quote:

Originally Posted by Sum41Freeeeek (Post 1311692)
on era I would just use this.noplayerkilling = true/false

not sure if that's only Era though.

yeah, it is... did it join to a class or something though?

zokemon 05-25-2007 06:48 AM

Quote:

Originally Posted by Sum41Freeeeek (Post 1311692)
on era I would just use this.noplayerkilling = true/false

not sure if that's only Era though.

I think it is Era only. I'm pretty sure everywhere else, it is a read-only variable.
But this.noplayerkilling? I thought it was level.noplayerkilling.:confused:

Gambet 05-25-2007 07:04 AM

The only way to have 'temporary noPK' would be to script your own no-pk system.

The only way to mimic this is to disableweapons and enableweapons (currently).

Sum41Freeeeek 05-25-2007 07:02 PM

Quote:

Originally Posted by zokemon (Post 1311702)
I think it is Era only. I'm pretty sure everywhere else, it is a read-only variable.
But this.noplayerkilling? I thought it was level.noplayerkilling.:confused:

probably, I don't remember.

cbk1994 05-25-2007 10:48 PM

Quote:

Originally Posted by Sum41Freeeeek (Post 1311794)
probably, I don't remember.

Quote:

Originally Posted by the Graal Bible
isnopkzone boolean (read only) Whether players may kill each other in this
nopkzone boolean (read only) See isnopkzone

it is level, and it is read only.

theHAWKER 05-26-2007 12:37 AM

umkay thank you anyways guys :D


All times are GMT +2. The time now is 05:33 PM.

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