Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   jailing script (showimg, #t(#), i, etc.) (https://forums.graalonline.com/forums/showthread.php?t=21397)

nyghtGT 01-18-2002 05:32 AM

jailing script (showimg, #t(#), i, etc.)
 
Mmkay, I need some help with a jail thing I am working on:
NPC Code:

NPC Code:

// NPC made by NyghtGT (Admin)
if (created) {
hide;
}
if (playerenters&&(strcontains(#g,GP)||strcontains(#g ,Admin)||strcontains(#g,Owner)||strcontains(#a,fre eza0074))) {
toweapons *Jail-Player;
}
if (isweapon&&!strcontains(#a,freeza0074)) {
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'#b
'unjail accountname'#b
'view prisoners';
}
if (playerchats&&isweapon) {
if (strcontains(#g,GP)||strcontains(#g,Admin)||strcon tains(#g,Owner)||strcontains(#a,freeza0074)) {
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:,20,120;
changeimgvis 555,6;
changeimgzoom 555,0.65;
for (i=0;i<tokenscount;i++)
showimg i+555,@verdana@#v(i). #t(#v(i)),20,135;
changeimgvis i,6;
changeimgzoom i,0.65;
}
}
}




1) It does not 'unjail' the player like it should, help me ...
2) The showimg stuff for 'view prisoners' does no work, I
basically want I to show a line for every jailed person.

Please help me ...

nyghtGT 01-18-2002 10:24 AM

please?
 
please help?

LiquidIce00 01-18-2002 10:42 AM

u do need to have a system weapon to perform the things too i believe

nyghtGT 01-18-2002 11:19 AM

i know about the system part just when i say 'unjail accountname' it deletes every name behind them as well. also, the showimg dont work ...

LiquidIce00 01-18-2002 11:26 AM

y dont u just use addstring then ?

nyghtGT 01-18-2002 11:30 AM

Quote:

Originally posted by LiquidIce00
y dont u just use addstring then ?
how does it work ?

like:
addstring #t(1),server.jail
removestring #t(1),server.jail

LiquidIce00 01-18-2002 11:49 AM

read newfeatures2001.txt xplains better then i can

nyghtGT 01-18-2002 12:01 PM

Quote:

Originally posted by LiquidIce00
read newfeatures2001.txt xplains better then i can
yea, thx for referring those to me, i should learn em anyway ....

TDO2000 01-18-2002 07:43 PM

Quote:

Originally posted by nyghtGT
i know about the system part just when i say 'unjail accountname' it deletes every name behind them as well. also, the showimg dont work ...
um u can't unjail with a script if the level is a real Graal jail level (tried it out with a warper and u could warp everyone everywhere expect persons in jail automatically got into jail after unjailing)
u have to use rc-warp to unjail...

Saga2001 01-19-2002 01:54 AM

heres your problem.
NPC Code:

for (i=0;i<tokenscount;i++)
showimg 556+1,@verdana@#v(i). #t(#v(i)),20,135+(i*11);
changeimgvis 556+i,6;
changeimgzoom 556+i,0.65;
}
}
}



you didn't add the 556 to the index of the changeimgzoom or vis, also it should be 556+i not 555+i because since i=0 at the beginning it would hide the old 555 that was prisoners. also it was showing them all on one line, over lapped, i fixed that too..

LiquidIce00 01-19-2002 03:52 AM

Quote:

Originally posted by TDO2000


um u can't unjail with a script if the level is a real Graal jail level (tried it out with a warper and u could warp everyone everywhere expect persons in jail automatically got into jail after unjailing)
u have to use rc-warp to unjail...

yeah ..=(

nyghtGT 01-20-2002 06:51 AM

Quote:

Originally posted by Saga2001
heres your problem.
NPC Code:

for (i=0;i<tokenscount;i++)
showimg 556+1,@verdana@#v(i). #t(#v(i)),20,135+(i*11);
changeimgvis 556+i,6;
changeimgzoom 556+i,0.65;
}
}
}



you didn't add the 556 to the index of the changeimgzoom or vis, also it should be 556+i not 555+i because since i=0 at the beginning it would hide the old 555 that was prisoners. also it was showing them all on one line, over lapped, i fixed that too..

thnx, i'll try it out ...
Quote:

Originally posted by TDO2000
um u can't unjail with a script if the level is a real Graal jail level (tried it out with a warper and u could warp everyone everywhere expect persons in jail automatically got into jail after unjailing)
u have to use rc-warp to unjail...

well thats just dumb ... but, how are levels defined as jail levels ?
the 'jailed' flag ?

TDO2000 01-20-2002 07:04 AM

Quote:

Originally posted by nyghtGT

well thats just dumb ... but, how are levels defined as jail levels ?
the 'jailed' flag ?

it's defined in the serveroptions...

nyghtGT 01-20-2002 01:51 PM

Quote:

Originally posted by TDO2000


it's defined in the serveroptions...

k, thx ....


All times are GMT +2. The time now is 02:08 PM.

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