Graal Forums

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

SlayerOfDarkness 11-16-2001 05:47 AM

Timming
 
Hi, im trying to find out how to like...
jail account minutes
ive figuered out the jailing part but not the timming part, can someone help me out? :eek:

royce 11-16-2001 06:13 AM

I know what to do, Timevar I am pretty sure, is this p2p?

SlayerOfDarkness 11-16-2001 07:03 AM

nope
 
nope its not p2p :(

entravial 11-16-2001 07:07 AM

~AlphaFlame~

You mean something like this...?

if (playerenters || created){
toweapons *Jailed;
setstring time,timevar+(insert minutes in seconds here);
}
if (timevar>=strtofloat(#s(time))){
setplayerprop #c,~Your time in jail has been served. You're free to go.~;
setlevel onlinestartlocal.graal;
destroy;
}


Just a quick example.

AlexH 11-16-2001 07:08 AM

Quote:

Originally posted by entravial
~AlphaFlame~

You mean something like this...?

if (playerenters || created){
toweapons *Jailed;
setstring time,timevar+(insert minutes in seconds here);
}
if (timevar>=strtofloat(#s(time))){
setplayerprop #c,~Your time in jail has been served. You're free to go.~;
setlevel onlinestartlocal.graal;
destroy;
}


Just a quick example.

*looks at your sig*
"what rabit?"

SlayerOfDarkness 11-16-2001 07:30 AM

probs
 
Hey look,

//In player System Weapon

if(playerenters || timeout){
if(!hasweapon(*system)){set gotsys;toweapons *system;}
if(startswith(#a,#s(server.jail,))){
tokenize #s(server.jail);

setstring server.jail,;
setlevel broom2.graal;
}
timeout=.05;
}


//In Staff Weapon

if(playerchats && startswith(jail,#c)){
tokenize #c;
setstring server.jail,#t(1);
}

message #a;


Now How do i make the timming thing work with this script. I want it so when the staff says
jail account name time
EXAMPLE: jail uberex 30

nyghtGT 11-16-2001 08:52 AM

Quote:

Originally posted by AlexH


*looks at your sig*
"what rabit?"

his avatar ...

nyghtGT 11-16-2001 09:11 AM

here:
NPC Code:

NPC Code:

// In Staff NPC
if (playerchats && startswith(jail,#c)){
tokenize #c;
setstring server.jail,#t(1);
setstring server.jailtime,timevar+(strtofloat(#t(3)));
setplayerprop #c,(#t(1) jailed for #t(3) sec.);
}

// In Player NPC
if (strcontains(#a,#s(server.jail)) && !strcontains(#L,jaillevel.graal)) {
setlevel2 jaillevel.graal,32,32;
setstring server.jail,;
setstring client.jailtime,#s(serverjailtime);
setstring server.jailtime,;
}
if (timevar>=strtofloat(#s(client.jailtime))){
setplayerprop #c,~Your time in jail has been served. You're free to go.~;
setlevel onlinestartlocal.graal;
destroy;
}




that seems like it would work ....

nyghtGT 11-16-2001 09:14 AM

i dont mean to totally sound stupid nor is this just spam (well maybe) but doesn't that script look beautiful ...

entravial 11-16-2001 09:17 AM

~AlphaFlame~

Looks fine to me... of course, it's a bit hackable...

And yea, it is beautiful... considering a bit of it came from my example... *shrugs*

nyghtGT 11-16-2001 09:19 AM

Quote:

Originally posted by entravial
~AlphaFlame~

Looks fine to me... of course, it's a bit hackable...

And yea, it is beautiful... considering a bit of it came from my example... *shrugs*

yeah using client stuff for very important player actions is not the best but in ths case it would work ok ....

entravial 11-16-2001 09:22 AM

~AlphaFlame~

Well, you see... you're clearing the server.jail flag after the player goes to jail... a moderately good hacker could just warp levels and tada! Out of jail. Either use a very server-laggy method and use server.#ajailed, or use tokenize and one long server. string of jailed accounts...

nyghtGT 11-16-2001 09:28 AM

Quote:

Originally posted by entravial
~AlphaFlame~

Well, you see... you're clearing the server.jail flag after the player goes to jail... a moderately good hacker could just warp levels and tada! Out of jail. Either use a very server-laggy method and use server.#ajailed, or use tokenize and one long server. string of jailed accounts...

yeah i dont feel like explaining to him how to use #e to extract players account name outta the jail string so i just left that out ....

royce 11-16-2001 09:30 AM

why not use a flag when the player is jailed and put in the system if the player enters and isjailed flag warp back and when they get out unset the jail flag?

entravial 11-16-2001 09:39 AM

~AlphaFlame~

Even a newbie hacker can hack flags... oi...

nyghtGT 11-16-2001 09:39 AM

Quote:

Originally posted by royce
why not use a flag when the player is jailed and put in the system if the player enters and isjailed flag warp back and when they get out unset the jail flag?
flags can be edited by using glitches and stuff .....

royce 11-16-2001 09:53 AM

lol how ya do that?

nyghtGT 11-16-2001 10:05 AM

*sarcasm*
press control-alt-del twice ....
*sarcasm*

kids do not try that at home .....

nyght_2001 11-16-2001 10:51 AM

shut up nyght your a total retard !

nyghtGT 11-16-2001 10:54 AM

Quote:

Originally posted by nyght_2001
shut up nyght your a total retard !
whatever !

royce 11-16-2001 12:46 PM

actually i was the retard and i aint afraid to admit it!

SlayerOfDarkness 11-17-2001 04:15 AM

How Do i make it non hackable?
 
HOW DO I MAKE IT NON HACKABLE, no point in jailig them and them watch them come out again? :cool:

JeffTL 11-17-2001 06:32 AM

Conceal your jail flag as a chest in some realistic-sounding fake level...or just use RC and let the player out with the same.

entravial 11-17-2001 06:42 AM

~AlphaFlame~

To make the jail system its most non-hackable... set these:

1- flag
2- this.variable
3- string

Quote:

And have it
if (flag || this.variable=value || strequals(string,value) && !strequals(#L,jaillevel.graal)){
setplayerprop #c,STOP TRYING TO HACK OUTTA JAIL! Another (insert minutes here) minutes added to your time!;
setstring jailtime,#v(strtofloat(#s(jailtime))+time);
setlevel jaillevel.graal;
}

entravial 11-18-2001 07:54 AM

---- THE ORIGINAL ENTRAVIAL ----

haha my rabbit is funny.

(stop saying timming)!!!!!

entravial 11-18-2001 08:06 AM

~AlphaFlame~

*smacks the original* Fine, we'll call it Timining.

-- another fine example of :spam: --

Faheria_GP2 11-18-2001 09:48 AM

hmm..it's best to set the account to be jailed and the time to be jailed in the same server flag, and use tokenize to seperate the two

server.jailaccount="SupersonicII" "15";

because sometimes you get a lot of lag and one flag will be set before or after the other

royce 11-20-2001 07:36 AM

Quote:

Originally posted by Faheria_GP2
hmm..it's best to set the account to be jailed and the time to be jailed in the same server flag, and use tokenize to seperate the two

server.jailaccount="SupersonicII" "15";

because sometimes you get a lot of lag and one flag will be set before or after the other

yes so u know how long they are in jail and if they hackout you know how long they were sopposed to get.


All times are GMT +2. The time now is 05:42 AM.

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