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=33839)

Glory 07-19-2002 09:18 PM

Noplayerkilling?
 
I made an npc so...

if (weaponfired)
putnpc bush.gif,noplayerkilling.txt,playerx,player;

and inside the txt is noplayerkilling; when I updatethe level it stays nonplayerkilling anyhelp?

screen_name 07-19-2002 09:29 PM

:)
well, you shouldn't update the level, it will delete the NPC

and you should have
NPC Code:

if (created) {
noplayerkilling;
}


Glory 07-19-2002 09:49 PM

Quote:

Originally posted by screen_name
:)
well, you shouldn't update the level, it will delete the NPC

and you should have
NPC Code:

if (created) {
noplayerkilling;
}


Yes but I want tit to delete the npc for like event u put it and it makes it no pk then u upd and its pk but it stays pk.

screen_name 07-20-2002 02:32 AM

then

NPC Code:

if (created) {
noplayerkilling;
}

if (playerchats && strequals(#c,pk now) && strequals(#g,Events Team)) {
destoy;
}


Xbob42 07-20-2002 05:15 PM

Would it be possible to make an entire playerworld a nopkzone without putting this script in every level.
if(created){
noplayerkilling;
}

would you have to do something where it has a timeout and keeps it that way. Maybe something like
if(playerenters){toweapons *nopking;timeout=.05;}
if(timeout){if(isweapon){noplayerkilling;}timeout= .05;}

or is there some other ways to doing it. I just typed that in there so I'm not sure if that would work or not.

Xbob42 07-20-2002 05:19 PM

I have another question similar to the one I posted above it. It's a little bit different though.

Would it be possible to make it where players can not be pked by others and not be able to pk others.

What I'm saying is if you are given an option of being able to not be pked or pk, or can choose to be able to be pked and pk others.

I think this would be a nice option for players to be able to choose when getting on a playerworld. So anyone knows if that can be done or not?

screen_name 07-20-2002 09:23 PM

well the npc weapon is what you should do

but you should make system npcs start with -, so they are hidden

and you dont need to call a timeout, just a playerenter

NPC Code:

if (playertouchsme) {
toweapons -nopk;
}

if (playerenters && isweapon) {
noplayerkilling;
}



kai, can weapons makes levels nopk zones?


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

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