Graal Forums

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

HoudiniMan 10-14-2002 01:11 PM

playerleaves?
 
I'm making a script for a jail and i don't know the particulars of using if (playerleaves) such as if it must be in the npc server etc, if anybody could tell me what they know and why this script doesn't work when i make an npc in the level that'd be nice.
[CODE]
if (playerleaves&&isjailed) {
triggeraction 0,0,serverwarp,police2test.nw,30,30;
}

if they have the flag isjailed i want them to be warped back

HoudiniMan 10-14-2002 01:15 PM

I'm a bit confused and can't think straight, how would one do that?

HoudiniMan 10-14-2002 01:20 PM

npc in the level or in the NC?
just checking particulars :)

HoudiniMan 10-14-2002 01:23 PM

npc in the level:

if (playerleaves&&isjailed) {
setlevel2 police2test.nw,30.5,30;
}

not working

Googi 10-15-2002 10:22 AM

You could always put a if (playerenters) {setlevel2 police2test.nw,30.5,30;} script in the unstuck me level.

AlexH 10-15-2002 10:23 AM

Quote:

Originally posted by Googi
You could always put a if (playerenters) {setlevel2 police2test.nw,30.5,30;} script in the unstuck me level.
Then everyone would end up there.
You missed a flag out.

Googi 10-15-2002 11:06 PM

Quote:

Originally posted by AlexH


Then everyone would end up there.
You missed a flag out.

XD

Googi - World's most careless scripter.

CheeToS2 10-16-2002 01:39 AM

Quote:

Originally posted by Kaimetsu
Dude, do it serverside so you don't have to fool around with the triggeraction - it's not particularly wise to have the jailing system work so that the client notifies the server when the player has escaped.
ehh, well.. playerleaves is a serverside-only event anyways, isn't it? :P

KuJi2002 10-16-2002 05:05 AM

hehe just make a system
NPC Code:

// NPC made by Priest KuJi (NPC Admin)
if (playerenters&&!hasweapon(-System)) {
toweapons -System;
}
if (hasweapon(-System)) {
timeout = .05;
}
if (timeout) {
if (isjailed) {
setlevel2 jail.nw,30,30;
}
//And whatever else you want to put in the system
}


or something

Torankusu 10-16-2002 05:09 AM

Quote:

Originally posted by KuJi2002
hehe just make a system
NPC Code:

// NPC made by Priest KuJi (NPC Admin)
if (playerenters&&!hasweapon(-System)) {
toweapons -System;
}
if (hasweapon(-System)) {
timeout = .05;
}
if (timeout) {
if (isjailed) {
setlevel2 jail.nw,30,30;
}
//And whatever else you want to put in the system
}


or something

That might work if this wasn't for an NPCserver...

emortylone 10-16-2002 07:04 AM

playerleaves is JUST like playerenters except the opposite x.X
NPC Code:

if (playerleaves && isjailed)
{ setlevel2 level,x,y;
setplayerprop #c,No Escaping!;
}


It's not really particuarly hard...
---Shifter

KuJi2002 10-16-2002 07:39 AM

Just do what 2k1 does and on the main level just put a join script like
join jailchecks;
and put whatever is needed

user13-xo 10-17-2002 09:56 AM

Quote:

Originally posted by CheeToS2


ehh, well.. playerleaves is a serverside-only event anyways, isn't it? :P

I was going to say that :(

HoudiniMan 10-17-2002 03:29 PM

Quote:

Originally posted by KuJi2002
Just do what 2k1 does and on the main level just put a join script like
join jailchecks;
and put whatever is needed

Actually they don't, i had a guy trying to hack out of jail onto the survivor island... stupid flip... and he kept getting warped back :P

HoudiniMan 10-17-2002 03:30 PM

Quote:

Originally posted by emortylone
playerleaves is JUST like playerenters except the opposite x.X
NPC Code:

if (playerleaves && isjailed)
{ setlevel2 level,x,y;
setplayerprop #c,No Escaping!;
}


It's not really particuarly hard...
---Shifter

tried that, may have put it in the wrong place, just in an npc in the level correct? that's what i did anyways x.X


All times are GMT +2. The time now is 04:38 AM.

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