Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Lockable Door OMI!@ (https://forums.graalonline.com/forums/showthread.php?t=18409)

Kumada 12-06-2001 02:25 PM

Lockable Door OMI!@
 
this has to work on p2p..
if i say close door it will say "door closed" and nobody can get in untill i say "open door"
and maybe i can set a time on it like
"open door" then say "time 3" and it will be open for 3 seconds

Brad_Elven 12-06-2001 06:51 PM

i dont know the exact code for p2p but it will have something to do with playerchat&&strequals(#c,sadksald) and then also using something to break it up. I just went blank. On a free it would be a server flag but i dont know for p2p

btedji 12-06-2001 08:24 PM

do you want it to be based on guild names or account names or something else?

TDO2000 12-07-2001 12:25 AM

mkay because I have no time it's a definated owner and not changeable

P2P
//show stat if player enters
if(playerenters){
if(strequals(#s(this.open),close)){message Door closed;}
else {message Door open;}
}
//What happens if touched
if(playertouchsme){
if(strequals(#s(this.open),open)){setlevel2 level,x,y;}
else {say2 Closed go away!;}
}

//changing stat
if(playerchats && strequals(#a,Account)){
if(strequals(#c,open)){
setstring this.open,open;
message Door open;
}
if(strequals(#c,close)){
setstring this.open,close;
message Door closed
}
}

Xaviar 12-07-2001 03:57 AM

Quote:

Originally posted by TDO2000
mkay because I have no time it's a definated owner and not changeable

P2P
//show stat if player enters
if(playerenters){
if(strequals(#s(this.open),close)){message Door closed;}
else {message Door open;}
}
//What happens if touched
if(playertouchsme){
if(strequals(#s(this.open),open)){setlevel2 level,x,y;}
else {say2 Closed go away!;}
}

//changing stat
if(playerchats && strequals(#a,Account)){
if(strequals(#c,open)){
setstring this.open,open;
message Door open;
}
if(strequals(#c,close)){
setstring this.open,close;
message Door closed
}
}

Why on earth did you need to use a string?

TDO2000 12-07-2001 04:17 AM

Quote:

Originally posted by Xaviar


Why on earth did you need to use a string?

um I do not need to ;) but I just wanted to show an easy example... but if u want it another way...

//show stat if player enters
if(playerenters){
if(save[0]==0){message Door closed;}
else {message Door open;}
}
//What happens if touched
if(playertouchsme){
if(save[0]==1){setlevel2 level,x,y;}
else {say2 Closed go away!;}
}

//changing stat
if(playerchats && strequals(#a,Account)){
if(strequals(#c,open)){
save[0]=1;
message Door open;
}
if(strequals(#c,close)){
save[0]=0;
message Door closed
}
}

just an easy example too but should work ;)

Poogle 12-07-2001 05:43 AM

Quote:

Originally posted by TDO2000

um I do not need to ;) but I just wanted to show an easy example... but if u want it another way...

//show stat if player enters
if(playerenters){
if(save[0]==0){message Door closed;}
else {message Door open;}
}
//What happens if touched
if(playertouchsme){
if(save[0]==1){setlevel2 level,x,y;}
else {say2 Closed go away!;}
}

//changing stat
if(playerchats && strequals(#a,Account)){
if(strequals(#c,open)){
save[0]=1;
message Door open;
}
if(strequals(#c,close)){
save[0]=0;
message Door closed
}
}

just an easy example too but should work ;)

u keep forgeting the ;


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

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