Graal Forums

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

wicky111 01-29-2002 02:56 AM

Scripting query
 
I Need help on this script for a jail
This is it so far:
if(playersays(index,jail #a)){


thats all i can do!
Im really stuck on this!

zell12 01-29-2002 03:05 AM

playersays doesn't work nemore, try using playerchats or strequals

amonrabr 01-29-2002 04:02 AM

-
 
try to use:
if (playerchats&&startswith(jail,#c)){
setstring server.jail,#e(4,-1,#c);
setplayerprop #c,;}
if (strequals(server.jail,#a)){sleep 0.5;setlevel jail........
setstring server.jail,;}

or use tokens
if (playerchats&&startswith(jail,#c)){
tokenize #c;
setstring server.jail,#t(2);
......

wicky111 01-31-2002 02:27 AM

Thanks! :D

You guys are the first people to post an answer that doesnt talk c*** to me!
Thanks very much!
:D :D :D :D

TDK_RC6 01-31-2002 09:30 PM

try this
NPC Code:

if (playerchats) {
tokenize #c;
if (tokenscount==2&&strequals(#t(0),/jail)) {
addstring server.jailed,#t(1);
setplayeprop #c, ; }
if (tokenscount==2&&strequals(#t(0),/unjail)) {
if (lindexof(#t(1),server.jailed)>=0) {
deletestring server.jailed,lindexof(#t(1),server.jailed);
} else { say2 #t(1) isn't in jail; }
setplayerprop #c, ;
}
}



thats a pretty simple script, you will have to write a script that will jail the player (should be server side)

Shard_IceFire 02-01-2002 08:33 PM

Quote:

Originally posted by wicky111
Thanks! :D

You guys are the first people to post an answer that doesnt talk c*** to me!
Thanks very much!
:D :D :D :D

lol I don't believe you have to sensor the word "crap"...it's not even a bad word.

Saga2001 02-02-2002 01:08 AM

except turnips, right?

wicky111 02-02-2002 02:44 AM

lol

CRAP
CRAP
CRAP

see Uncle Shard_IceFire
Im learning well:D


Shard_IceFire Iz Da BOMB :cool:
He swear without sensor!!!

zell12 02-02-2002 02:52 AM

mhmm

TDK_RC6 02-02-2002 04:29 AM

Quote:

Originally posted by wicky111
lol

CRAP
CRAP
CRAP

see Uncle Shard_IceFire
Im learning well:D


Shard_IceFire Iz Da BOMB :cool:
He swear without sensor!!!

i can tell that you are a mature person

Saga2001 02-02-2002 09:29 AM

its like we went to an old folks home. look at this maturity!

zell12 02-02-2002 10:13 AM

arg, imagine what Graal would be like if there was no rules...lol

nyghtGT 02-02-2002 12:06 PM

Quote:

Originally posted by TDK_RC6
try this
NPC Code:

if (playerchats) {
tokenize #c;
if (tokenscount==2&&strequals(#t(0),/jail)) {
addstring server.jailed,#t(1);
setplayeprop #c, ; }
if (tokenscount==2&&strequals(#t(0),/unjail)) {
if (lindexof(#t(1),server.jailed)>=0) {
deletestring server.jailed,lindexof(#t(1),server.jailed);
} else { say2 #t(1) isn't in jail; }
setplayerprop #c, ;
}
}



thats a pretty simple script, you will have to write a script that will jail the player (should be server side)

'tokenscount' is not always 100% realible, but then very
few commands are.


All times are GMT +2. The time now is 01:25 PM.

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