Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-16-2001, 05:47 AM
SlayerOfDarkness SlayerOfDarkness is offline
Registered User
Join Date: Nov 2001
Location: I kinda forgot
Posts: 24
SlayerOfDarkness is on a distinguished road
Send a message via ICQ to SlayerOfDarkness Send a message via AIM to SlayerOfDarkness Send a message via Yahoo to SlayerOfDarkness
Question 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?
__________________

bya? -my ary take and die!
Reply With Quote
  #2  
Old 11-16-2001, 06:13 AM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to royce
I know what to do, Timevar I am pretty sure, is this p2p?
Reply With Quote
  #3  
Old 11-16-2001, 07:03 AM
SlayerOfDarkness SlayerOfDarkness is offline
Registered User
Join Date: Nov 2001
Location: I kinda forgot
Posts: 24
SlayerOfDarkness is on a distinguished road
Send a message via ICQ to SlayerOfDarkness Send a message via AIM to SlayerOfDarkness Send a message via Yahoo to SlayerOfDarkness
Exclamation nope

nope its not p2p
__________________

bya? -my ary take and die!
Reply With Quote
  #4  
Old 11-16-2001, 07:07 AM
entravial entravial is offline
Registered User
entravial's Avatar
Join Date: Mar 2001
Posts: 825
entravial is on a distinguished road
Send a message via ICQ to entravial Send a message via AIM to entravial Send a message via Yahoo to 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.
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #5  
Old 11-16-2001, 07:08 AM
AlexH AlexH is offline
Have A Drink On Me
AlexH's Avatar
Join Date: Jun 2001
Location: Somewhere In Time
Posts: 7,442
AlexH is on a distinguished road
Send a message via AIM to AlexH Send a message via MSN to AlexH
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?"
__________________
QUICK LOOK BUSY JESUS IS COMING!
Reply With Quote
  #6  
Old 11-16-2001, 07:30 AM
SlayerOfDarkness SlayerOfDarkness is offline
Registered User
Join Date: Nov 2001
Location: I kinda forgot
Posts: 24
SlayerOfDarkness is on a distinguished road
Send a message via ICQ to SlayerOfDarkness Send a message via AIM to SlayerOfDarkness Send a message via Yahoo to SlayerOfDarkness
Talking 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
__________________

bya? -my ary take and die!
Reply With Quote
  #7  
Old 11-16-2001, 08:52 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Quote:
Originally posted by AlexH


*looks at your sig*
"what rabit?"
his avatar ...
Reply With Quote
  #8  
Old 11-16-2001, 09:11 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
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 ....
Reply With Quote
  #9  
Old 11-16-2001, 09:14 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
i dont mean to totally sound stupid nor is this just spam (well maybe) but doesn't that script look beautiful ...
Reply With Quote
  #10  
Old 11-16-2001, 09:17 AM
entravial entravial is offline
Registered User
entravial's Avatar
Join Date: Mar 2001
Posts: 825
entravial is on a distinguished road
Send a message via ICQ to entravial Send a message via AIM to entravial Send a message via Yahoo to 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*
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #11  
Old 11-16-2001, 09:19 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
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 ....
Reply With Quote
  #12  
Old 11-16-2001, 09:22 AM
entravial entravial is offline
Registered User
entravial's Avatar
Join Date: Mar 2001
Posts: 825
entravial is on a distinguished road
Send a message via ICQ to entravial Send a message via AIM to entravial Send a message via Yahoo to 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...
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
  #13  
Old 11-16-2001, 09:28 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
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 ....
Reply With Quote
  #14  
Old 11-16-2001, 09:30 AM
royce royce is offline
Banned
royce's Avatar
Join Date: Sep 2001
Location: Yakitinzen, China
Posts: 2,271
royce is on a distinguished road
Send a message via AIM to 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?
Reply With Quote
  #15  
Old 11-16-2001, 09:39 AM
entravial entravial is offline
Registered User
entravial's Avatar
Join Date: Mar 2001
Posts: 825
entravial is on a distinguished road
Send a message via ICQ to entravial Send a message via AIM to entravial Send a message via Yahoo to entravial
~AlphaFlame~

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


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:11 AM.


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