Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-14-2002, 01:11 PM
HoudiniMan HoudiniMan is offline
Playerworld Administrator
HoudiniMan's Avatar
Join Date: Dec 2001
Location: Calfiornia - USA
Posts: 3,512
HoudiniMan is on a distinguished road
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 (Chief Playerworld Administrator)
Compulsive Support Center Checker - 5 Years and Change
Graal Support Center

Reply With Quote
  #2  
Old 10-14-2002, 01:15 PM
HoudiniMan HoudiniMan is offline
Playerworld Administrator
HoudiniMan's Avatar
Join Date: Dec 2001
Location: Calfiornia - USA
Posts: 3,512
HoudiniMan is on a distinguished road
I'm a bit confused and can't think straight, how would one do that?
__________________
-HoudiniMan (Chief Playerworld Administrator)
Compulsive Support Center Checker - 5 Years and Change
Graal Support Center

Reply With Quote
  #3  
Old 10-14-2002, 01:20 PM
HoudiniMan HoudiniMan is offline
Playerworld Administrator
HoudiniMan's Avatar
Join Date: Dec 2001
Location: Calfiornia - USA
Posts: 3,512
HoudiniMan is on a distinguished road
npc in the level or in the NC?
just checking particulars
__________________
-HoudiniMan (Chief Playerworld Administrator)
Compulsive Support Center Checker - 5 Years and Change
Graal Support Center

Reply With Quote
  #4  
Old 10-14-2002, 01:23 PM
HoudiniMan HoudiniMan is offline
Playerworld Administrator
HoudiniMan's Avatar
Join Date: Dec 2001
Location: Calfiornia - USA
Posts: 3,512
HoudiniMan is on a distinguished road
npc in the level:

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

not working
__________________
-HoudiniMan (Chief Playerworld Administrator)
Compulsive Support Center Checker - 5 Years and Change
Graal Support Center

Reply With Quote
  #5  
Old 10-15-2002, 10:22 AM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
You could always put a if (playerenters) {setlevel2 police2test.nw,30.5,30;} script in the unstuck me level.
__________________
Reply With Quote
  #6  
Old 10-15-2002, 10:23 AM
AlexH AlexH is offline
Have A Drink On Me
AlexH's Avatar
Join Date: Jun 2001
Location: Somewhere In Time
Posts: 7,442
AlexH is on a distinguished road
Send a message via AIM to AlexH Send a message via MSN to AlexH
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.
__________________
QUICK LOOK BUSY JESUS IS COMING!
Reply With Quote
  #7  
Old 10-15-2002, 11:06 PM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
Quote:
Originally posted by AlexH


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

Googi - World's most careless scripter.
__________________
Reply With Quote
  #8  
Old 10-16-2002, 01:39 AM
CheeToS2 CheeToS2 is offline
That Guy
CheeToS2's Avatar
Join Date: Dec 2001
Location: Seattle, WA
Posts: 2,528
CheeToS2 will become famous soon enough
Send a message via AIM to CheeToS2
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
__________________

Reply With Quote
  #9  
Old 10-16-2002, 05:05 AM
KuJi2002 KuJi2002 is offline
Banned
Join Date: Jul 2002
Location: NYC
Posts: 144
KuJi2002 is on a distinguished road
Send a message via AIM to KuJi2002 Send a message via Yahoo to 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
Reply With Quote
  #10  
Old 10-16-2002, 05:09 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu has a spectacular aura aboutTorankusu has a spectacular aura about
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...
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #11  
Old 10-16-2002, 07:04 AM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
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
__________________
Quote:
*Stefan: it seems sometimes they hire newbie scripters everywhere x-x
*Stefan: scripters are sometimes like people that draw paintings
*Stefan: all that counts is that it looks nice
Reply With Quote
  #12  
Old 10-16-2002, 07:39 AM
KuJi2002 KuJi2002 is offline
Banned
Join Date: Jul 2002
Location: NYC
Posts: 144
KuJi2002 is on a distinguished road
Send a message via AIM to KuJi2002 Send a message via Yahoo to KuJi2002
Just do what 2k1 does and on the main level just put a join script like
join jailchecks;
and put whatever is needed
Reply With Quote
  #13  
Old 10-17-2002, 09:56 AM
user13-xo user13-xo is offline
Registered User
Join Date: Nov 2001
Location: California
Posts: 297
user13-xo is on a distinguished road
Send a message via AIM to user13-xo
Quote:
Originally posted by CheeToS2


ehh, well.. playerleaves is a serverside-only event anyways, isn't it? :P
I was going to say that
Reply With Quote
  #14  
Old 10-17-2002, 03:29 PM
HoudiniMan HoudiniMan is offline
Playerworld Administrator
HoudiniMan's Avatar
Join Date: Dec 2001
Location: Calfiornia - USA
Posts: 3,512
HoudiniMan is on a distinguished road
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 (Chief Playerworld Administrator)
Compulsive Support Center Checker - 5 Years and Change
Graal Support Center

Reply With Quote
  #15  
Old 10-17-2002, 03:30 PM
HoudiniMan HoudiniMan is offline
Playerworld Administrator
HoudiniMan's Avatar
Join Date: Dec 2001
Location: Calfiornia - USA
Posts: 3,512
HoudiniMan is on a distinguished road
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
__________________
-HoudiniMan (Chief Playerworld Administrator)
Compulsive Support Center Checker - 5 Years and Change
Graal Support Center

Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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