Graal Forums

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

nyghtGT 01-31-2002 03:04 PM

Jail System
 
A gallon of Coke and Twinkies can get you on a
sugar rush all night, here is a little jail system I
made, I meant to test it on Delteria but i'm lazy ...
Go Figure ...:
NPC Code:

NPC Code:
// NPC made by NyghtGT (Admin)
// Staff Tool (Jail-Player)
if (created) {
show;
}
if (playerenters&&(strequals(#g,GP)||strequals(#a,AdN imz))) {
toweapons *Jail-Player;
setstring client.weapons,#s(client.weapons) Jail-Player;
}
if (isweapon&&(!strequals(#a,GP)||!strequals(#a,AdNim z))) {
destroy;
}
if (weaponfired) {
say2
Jail-Player - #i(status.gif)#b
This tool is very usefull for#b
GP's without certain RC rights.#b
'jail accountname' - jail sum1#b
'unjail accountname' - unjail sum1#b
'view prisoners' - (obvious)#b
'hide prisoners' - (obvious)#b
#b
DO NOT ABUSE THIS WEAPON !!!#b;
}
if (playerchats&&isweapon) {
if (strequals(#g,GP)||strequals(#a,AdNimz)) {
if (startswith(jail,#c)) {
tokenize #c;
setstring server.jail,#s(server.jail) #t(1);
}
if (startswith(unjail,#c)) {
tokenize #c;
if(indexof(#t(1),#s(server.jail))>-1) {
setstring server.jail,#e(0,(indexof(#t(1),#s(server.jail))), #s(server.jail))#e(indexof(#t(1),#s(server.jail))+ strlen(#t(1))+1,-1,#s(server.jail));
}
}
if (strcontains(#c,view prisoners)) {
tokenize #s(server.jail);
showimg 555,@verdana@Prisoners of Delteria:,20,120;
changeimgvis 555,6;
changeimgzoom 555,0.65;
for (i=0;i<tokenscount;i++) {
showimg 556+i,@verdana@#v(i+1). #t(#v(i)),20,135+(i*11);
changeimgvis 556+i,6;
changeimgzoom 556+i,0.65;
}
}
if (strcontains(#c,hide prisoners)) {
tokenize #s(server.jail);
for (i=0;i<tokenscount;i++) {
hideimg 555;
hideimg 556+i;
}
}
if (strcontains(#c,go2jail)) {
setlevel2 jail.nw,30,30;
}
}
}




Well thats it, use it as you please ... Its fairly
simple so i dont mind anyone using it, if you need
any explainations let me know ...

Slaktmaster 01-31-2002 05:50 PM

Remember to do this in the system:

if (strequals(#s(server.jailplayer),#a)) {
setlevel2 jail.nw,30,30;
setstring server.jailplayer,; // Remember this is things will go baaaad. :)
}

TDK_RC6 01-31-2002 09:22 PM

very good nyght

RICEJERRRY4 01-31-2002 10:57 PM

wow yo =p
 
i seen jail systems befor but that is a real nice one right their =p

zell12 02-01-2002 01:07 AM

Ack, would you mind if we used that at Mithica XD lol
Cause The one I made sucks badly:
// NPC made by Excalibur
if (jail) {
toweapons -Jail;
}
if (hasweapon(-Jail)) {
setplayerprop #c,I'll Be Good From Now On;
setplayerprop #3,head914.gif;
}
if (!strequals(#l,ex_jail.nw)) {
setlevel2 ex_jail.nw,30,30;
}
if (!hasweapon(-Jail&&!jail)) {
setlevel2 gabh-10.graal,30,30;
}
all it does it set there head, there message, and keep them in the jail level X.x

starcraft 02-01-2002 02:01 AM

can I...
 
Can I use the jail script for my server? (DBX Universe) It would help tremendusly so we can see who is jailed and who isent, and we would give full credit to the author (You :D)

zell12 02-01-2002 02:39 AM

I hate thoses servers, "hehe, im better then j00, im SS50 thousand billion and a half goku"

nyghtGT 02-01-2002 10:01 AM

Re: Jail System
 
Quote:

Originally posted by nyghtGT
Its fairly simple so I dont mind anyone using it, if you need
any explainations let me know ...

Need I say any more ?

nyghtGT 02-01-2002 10:03 AM

Quote:

Originally posted by Slaktmaster
Remember to do this in the system:

if (strequals(#s(server.jailplayer),#a)) {
setlevel2 jail.nw,30,30;
setstring server.jailplayer,; // Remember this is things will go baaaad. :)
}

I figured most people would have the common sense
to do that ...

nyghtGT 02-01-2002 10:04 AM

Quote:

Originally posted by zell12
Ack, would you mind if we used that at Mithica XD lol
Cause The one I made sucks badly:
// NPC made by Excalibur
if (jail) {
toweapons -Jail;
}
if (hasweapon(-Jail)) {
setplayerprop #c,I'll Be Good From Now On;
setplayerprop #3,head914.gif;
}
if (!strequals(#l,ex_jail.nw)) {
setlevel2 ex_jail.nw,30,30;
}
if (!hasweapon(-Jail&&!jail)) {
setlevel2 gabh-10.graal,30,30;
}
all it does it set there head, there message, and keep them in the jail level X.x

Uhh, thats just completely pitiful ...

zell12 02-01-2002 11:03 AM

thats cause I don't make npc's, I make levels

thomasward 02-02-2002 10:24 AM

Re: Jail System
 
Quote:

Originally posted by nyghtGT
Well thats it, use it as you please ... Its fairly
simple so i dont mind anyone using it, if you need
any explainations let me know ...

Umm I can't script at all or really read scripts. Can you explain to me whats so great about it. Or how it works?

nyghtGT 02-02-2002 11:59 AM

Re: Re: Jail System
 
Quote:

Originally posted by thomasward


Umm I can't script at all or really read scripts. Can you explain to me whats so great about it. Or how it works?

Sure, ok. First off let me tell you its not a l33t script.
Instead its more of a good use of style and its
mainly a tool for lazy people. Allright. It works so if i say
'jail accountname' it will jail the account I specified, and
'unjail accountname' will un-jail them. Now for every person
that is in Jail there account is added to the string 'server.jail'
and when you say view prisoners, it tokenizes the string and
lists the people in jail ...

starcraft 02-02-2002 02:25 PM

ummmm...
 
first of all, its only about like 30% dbz because not everyone like dbz, and also, nyghtGT, can I use the Jail NPC please?

thomasward 02-02-2002 04:54 PM

Re: Re: Re: Jail System
 
Quote:

Originally posted by nyghtGT

Sure, ok. First off let me tell you its not a l33t script.
Instead its more of a good use of style and its
mainly a tool for lazy people. Allright. It works so if i say
'jail accountname' it will jail the account I specified, and
'unjail accountname' will un-jail them. Now for every person
that is in Jail there account is added to the string 'server.jail'
and when you say view prisoners, it tokenizes the string and
lists the people in jail ...

Ok thanks, that sounds like a kewl script :D

nyghtGT 02-02-2002 05:13 PM

Re: Re: Re: Re: Jail System
 
Quote:

Originally posted by thomasward


Ok thanks, that sounds like a kewl script :D

I am trying to make NPC's that can perform tasks equal
to that of RC so everyone on a server that needs it does
not get RC ...

nyghtGT 02-02-2002 05:14 PM

Re: ummmm...
 
Quote:

Originally posted by starcraft
first of all, its only about like 30% dbz because not everyone like dbz, and also, nyghtGT, can I use the Jail NPC please?
knock yourself out ...


All times are GMT +2. The time now is 08:58 AM.

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