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 04-17-2002, 03:01 AM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
Timeout Cancel

Is there a way to cancel a timeout?

Kinda like this...

NPC Code:

if (this.onea=0){
//code that cancels the timeout
}

__________________
Reply With Quote
  #2  
Old 04-17-2002, 03:06 AM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
timeout = 0;
sleep 0;
timeout = 10^999; (doesn't exactly cancel, but you get the point)
Reply With Quote
  #3  
Old 04-17-2002, 03:32 AM
Gohan43331 Gohan43331 is offline
Registered User
Join Date: Jan 2002
Posts: 87
Gohan43331 is on a distinguished road
Send a message via AIM to Gohan43331
Inside the timeout loop:

NPC Code:

if (this.onea!=0) timeout = .1;



That will make it so when this.onea is 1, it will continue to timeout
Reply With Quote
  #4  
Old 04-17-2002, 03:04 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Quote:
Originally posted by Loriel

timeout = 10^999; (doesn't exactly cancel, but you get the point)
LOL, never thought of doing that. :-P, maybe you could return an unreal number as a timeout, lol.
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #5  
Old 04-18-2002, 10:52 PM
SaijinGohan SaijinGohan is offline
Registered User
SaijinGohan's Avatar
Join Date: Jul 2001
Location: U.S.A - Ohio
Posts: 536
SaijinGohan is on a distinguished road
Send a message via AIM to SaijinGohan Send a message via MSN to SaijinGohan
an imaginary number would be cool.
__________________

Job: A Legend

And you think that you have played Graal forever? Ha!
Reply With Quote
  #6  
Old 04-18-2002, 10:55 PM
Kadar Kadar is offline
Registered User
Join Date: Jan 2002
Posts: 636
Kadar is on a distinguished road
timeout = 0;
^ turns teh timout offfff
__________________
Reply With Quote
  #7  
Old 04-18-2002, 11:03 PM
SaijinGohan SaijinGohan is offline
Registered User
SaijinGohan's Avatar
Join Date: Jul 2001
Location: U.S.A - Ohio
Posts: 536
SaijinGohan is on a distinguished road
Send a message via AIM to SaijinGohan Send a message via MSN to SaijinGohan
an imaginary number would be cool.
__________________

Job: A Legend

And you think that you have played Graal forever? Ha!
Reply With Quote
  #8  
Old 04-19-2002, 12:35 AM
Slaktmaster Slaktmaster is offline
man with the mastahplan
Slaktmaster's Avatar
Join Date: Apr 2001
Location: Half-way over the river styx
Posts: 4,422
Slaktmaster is an unknown quantity at this point
Send a message via ICQ to Slaktmaster Send a message via AIM to Slaktmaster
Scriping underpants and SSJ race perhaps?

Why use timeout = 10^999; when you can use timeout = 0;?
Reply With Quote
  #9  
Old 04-19-2002, 04:42 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Quote:
Originally posted by Slaktmaster
Scriping underpants and SSJ race perhaps?

Why use timeout = 10^999; when you can use timeout = 0;?
cause it owns u! <3
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #10  
Old 04-21-2002, 02:45 AM
Mustang1988 Mustang1988 is offline
Registered User
Mustang1988's Avatar
Join Date: Mar 2001
Location: California
Posts: 0
Mustang1988 is on a distinguished road
Quote:
Originally posted by Slaktmaster
SSJ race
I GET TO BE SSJ6 GOKU!

I WILL KAMEHAMEHA YOU.
__________________
Reply With Quote
  #11  
Old 04-21-2002, 10:19 PM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
umm

you can cancel at time out like this:


if (timeout) {
if (clause) {this.timeagain = 0; sleep .1;
}

if (this.timeagain>0) {timeout = .1;
}
}

sleep will terminate a timeout until another command calls it. Or atleast it used to . It should work, because for me, sleep nulls timeout if I don't call timeout again.
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote
  #12  
Old 04-29-2002, 08:30 PM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
Quote:
Originally posted by Kaimetsu


What could you possibly use them for in Graal?
What could you possibly use them for at ANY! time!??
---Shifter
i h8 higher math, heh.
__________________
Quote:
*Stefan: it seems sometimes they hire newbie scripters everywhere x-x
*Stefan: scripters are sometimes like people that draw paintings
*Stefan: all that counts is that it looks nice
Reply With Quote
  #13  
Old 04-30-2002, 08:19 PM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
Don't say such big words, you're going to shatter my brain! LOL! Really, 99% +0.9999999999999999(repeating)% of people will never never UNDERSTAND let alone USE them!
---Shifter
__________________
Quote:
*Stefan: it seems sometimes they hire newbie scripters everywhere x-x
*Stefan: scripters are sometimes like people that draw paintings
*Stefan: all that counts is that it looks nice
Reply With Quote
  #14  
Old 05-01-2002, 01:15 PM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
We use them in electronics constantly.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #15  
Old 05-01-2002, 02:10 PM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
Hmm... Not sure. There is still lot's of electronics ahead of me. It is entirely possible.


Im only 3/5'th through AC electronics. So far we've used complex numbers almost every day. It's all right triangle math and stuff. Lot's of trig.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
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 11:58 PM.


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