| Author |
Message |
|
Tiberiusxix
Staff Sergeant
Joined: Sun Sep 18, 2011 8:20 pm Posts: 16
|
 send burst on the hour server side
I'm terrible at writing scripts, am trying to learn but there are only so many hours in a day.  My question is, how would I structure a script that would react to a trigger - send a burst, and then send bursts on server side hour every hour until I shut it off? i.e 12:45 (trigger burst) 1:00 (burst) 2:00 (burst) I got 1/2 through writing a delaytrigger when I realized that it wouldn't work for what I wanted to do  Thanks in advance 
|
| Mon Mar 26, 2012 9:25 pm |
|
 |
|
Vid Kid
Commander
Joined: Sun Feb 25, 2001 3:00 am Posts: 1838 Location: Guam USA
|
 Re: send burst on the hour server side
Tiberiusxix wrote: I'm terrible at writing scripts, am trying to learn but there are only so many hours in a day.  My question is, how would I structure a script that would react to a trigger - send a burst, and then send bursts on server side hour every hour until I shut it off? i.e 12:45 (trigger burst) 1:00 (burst) 2:00 (burst) I got 1/2 through writing a delaytrigger when I realized that it wouldn't work for what I wanted to do  Thanks in advance  You will probably want to use the system clock to trigger off of. you do not say what you want to burst , the reason a say , is because system side bursts will not slow server down and may not do what you want. Most of what you would do on a server side will need pacing to keep it in control. I think you may get better help if you describe what you are doing or show an example (even if only in words to outline what you want to accomplish) Sorry I could not be of any better help , but I work with what I was given 
_________________ TWGS V2 Vids World on Guam Port 2002 Telnet://vkworld.ddns.net:2002 Discord @ DiverDave#8374 Vid's World Discord
Founding Member -=[Team Kraaken]=- Ka Pla
 Winners of Gridwars 2010 MBN Fall Tournament 2011 winners Team Kraaken Undisputed Champions of 2019 HHT Just for showing up!
The Oldist , Longist Running , Orginal Registered Owner of a TWGS server : Vids World On Guam
|
| Mon Mar 26, 2012 9:44 pm |
|
 |
|
Tiberiusxix
Staff Sergeant
Joined: Sun Sep 18, 2011 8:20 pm Posts: 16
|
 Re: send burst on the hour server side
NP,
I'd like to have a simple script that sits in my base watching for fig hits. If a hit happens adjacent to where I'm sitting I want to ptorp that sector, and then hit it on the hour when turns regen so the potential invader can't get away or clamber into my base.
|
| Mon Mar 26, 2012 9:49 pm |
|
 |
|
Kaus
Gameop
Joined: Tue Nov 19, 2002 3:00 am Posts: 1050 Location: USA
|
 Re: send burst on the hour server side
You said server side, so I got thinking about t-edit scripts. If I'm barking up the wrong tree I apologize in advance. But I wrote this while loop awhile back to trigger off specific (PM) time and figured it might help you. Code: setVar $flag 0 While ($flag = 0) SetDelaytrigger emq :emq 350 pause :emq Send "ctq" Waitfor "PM" Getword CURRENTLINE $time 1 ReplaceText $time ":" #32 Getword $time $min 2 Getword $time $sec 3 If ($min = 59) and ($sec > 57) Send $Mac add $flag 1 end end
_________________ Dark Dominion TWGS Telnet://twgs.darkworlds.org:23 ICQ#31380757, -=English 101 pwns me=- "This one claims to have been playing since 1993 and didn't know upgrading a port would raise his alignment."
|
| Mon Mar 26, 2012 9:51 pm |
|
 |
|
Vid Kid
Commander
Joined: Sun Feb 25, 2001 3:00 am Posts: 1838 Location: Guam USA
|
 Re: send burst on the hour server side
oh , that is not a server side script ... server side deals mostly with Tedit and TWGS operations. Your looking for a turn based script that is used to photon on the hour after an adj fig hit .. ok , that can be done. The triggers for on the hour is when you recover XX turns .. but you do have to make sure your player has room for said turns or you stop getting these messages. Be warned , a fast macro can get away from that in the same way you trigger for the turns. better help this time 
_________________ TWGS V2 Vids World on Guam Port 2002 Telnet://vkworld.ddns.net:2002 Discord @ DiverDave#8374 Vid's World Discord
Founding Member -=[Team Kraaken]=- Ka Pla
 Winners of Gridwars 2010 MBN Fall Tournament 2011 winners Team Kraaken Undisputed Champions of 2019 HHT Just for showing up!
The Oldist , Longist Running , Orginal Registered Owner of a TWGS server : Vids World On Guam
|
| Mon Mar 26, 2012 9:54 pm |
|
 |
|
T0yman
Veteran Op
Joined: Sat Dec 29, 2007 5:06 pm Posts: 2059 Location: Oklahoma
|
 Re: send burst on the hour server side
This runs off your computer clock. You can pretty it up, but I wrote it so it would make sense what it was doing. Code: #Top of the hour run script.
settexttrigger 0 :go "Enter Text To Trigger Off" pause :go load scriptname setdelaytrigger 1 :check 60000 pause :check gettime $minute "nn" if ($minute = "59") goto :second else setdelaytrigger 2 :hold 30000 pause :hold goto :check end
:second gettime $second "ss" if ($second < 10) goto :go else setdelaytrigger 3 :temp 100 pause :temp goto :second end Or you could just set a trigger to key off when you get turns... there are other ways to get the server side time but it would have to send ctq to get the time and then start a counter to top of the hour. Sending the "ctq" will spam your screen constantly, not a big deal if your afk but if at the key it would be a PITA.
_________________ T0yman (Permanently Retired since 2012) Proverbs 17:28 <-- Don't know it, most should it would stop a lot of the discussions on here.
|
| Mon Mar 26, 2012 9:59 pm |
|
 |
|
Kaus
Gameop
Joined: Tue Nov 19, 2002 3:00 am Posts: 1050 Location: USA
|
 Re: send burst on the hour server side
T0yman wrote: This runs off your computer clock.
The issue with using gettime is it uses your time, if your out of sync with the server it will fire that top of the hour torp at the wrong time.
_________________ Dark Dominion TWGS Telnet://twgs.darkworlds.org:23 ICQ#31380757, -=English 101 pwns me=- "This one claims to have been playing since 1993 and didn't know upgrading a port would raise his alignment."
|
| Mon Mar 26, 2012 10:09 pm |
|
 |
|
T0yman
Veteran Op
Joined: Sat Dec 29, 2007 5:06 pm Posts: 2059 Location: Oklahoma
|
 Re: send burst on the hour server side
Kaus wrote: T0yman wrote: This runs off your computer clock. You can pretty it up, but I wrote it so it would make sense what it was doing.
The issue with using gettime is it uses your time, if your out of sync with the server it will fire that top of the hour torp at the wrong time. Yea I would just key off the ansi for getting turns it is the simplest way.  Simple is always better ... 
_________________ T0yman (Permanently Retired since 2012) Proverbs 17:28 <-- Don't know it, most should it would stop a lot of the discussions on here.
|
| Mon Mar 26, 2012 10:12 pm |
|
 |
|
Kaus
Gameop
Joined: Tue Nov 19, 2002 3:00 am Posts: 1050 Location: USA
|
 Re: send burst on the hour server side
T0yman wrote: Kaus wrote: T0yman wrote: This runs off your computer clock. You can pretty it up, but I wrote it so it would make sense what it was doing.
The issue with using gettime is it uses your time, if your out of sync with the server it will fire that top of the hour torp at the wrong time. Yea I would just key off the ansi for getting turns it is the simplest way.  Simple is always better ...  100% agreed, I've spent so much time scripting and over complicating things when something as basic as a waitfor would have worked just fine.
_________________ Dark Dominion TWGS Telnet://twgs.darkworlds.org:23 ICQ#31380757, -=English 101 pwns me=- "This one claims to have been playing since 1993 and didn't know upgrading a port would raise his alignment."
|
| Mon Mar 26, 2012 10:15 pm |
|
 |
|
T0yman
Veteran Op
Joined: Sat Dec 29, 2007 5:06 pm Posts: 2059 Location: Oklahoma
|
 Re: send burst on the hour server side
Just because I was bored here is one more but again it could be off a few ms and not fire at top of the hour. I would still key off the turns message but I already had this one almost done so here  Code: :top send "ctq" settexttrigger 1 :gettime "PM" settexttrigger 2 :gettime "AM" pause :gettime killalltriggers cuttext CURRENTLINE $min 4 2 cuttext CURRENTLINE $sec 7 2 setvar $time 60 subtract $time $min multiply $time 60000 setvar $second 60 subtract $second $sec multiply $second 1000 add $time $second setdelaytrigger 3 :go $time pause :go load script here goto :top
_________________ T0yman (Permanently Retired since 2012) Proverbs 17:28 <-- Don't know it, most should it would stop a lot of the discussions on here.
|
| Mon Mar 26, 2012 10:30 pm |
|
 |
|
Promethius
Ambassador
Joined: Mon Feb 09, 2004 3:00 am Posts: 3141 Location: Kansas
|
 Re: send burst on the hour server side
Personally I think this type of defense is flawed, but it is up to you so.... Code: # just so you know it has activated - popping a window Window TOH_Ptorp 200 75 "TOH Ptorp" setWindowContents TOH_Ptorp "TOH Ptorping Active*"
# $startUpRun is used to prevent ptorping if you start # the script at xx:00:xx minutes. setVar $startUpRun 1
# should check for ptorp quantity to make sure you have them # $hitSector must be passed to this
:checkTime send "ctq" setTextTrigger AM :chk "AM" setTextTrigger PM :chk "PM" pause
:chk killTrigger PM killTrigger AM cutText currentline $min 4 2 if ($min <> "00") setVar $startUpRun 2 setVar $timeDelay (59 - $min) * 60000 if ($timeDelay = 0) setVar $timeDelay 25 end setDelayTrigger checkTime :checkTime $timeDelay pause else if ($startUpRun = 1) goto :checkTime end send "cpy" $hitSector "*q" setDelayTrigger mDelay :checkTime 90000 pause
end
_________________
/ Promethius / Enigma / Wolfen /
"A man who has no skills can be taught, a man who has no honor has nothing."
|
| Tue Mar 27, 2012 2:04 am |
|
 |
|
Tiberiusxix
Staff Sergeant
Joined: Sun Sep 18, 2011 8:20 pm Posts: 16
|
 Re: send burst on the hour server side
Wow, thanks guys - you've given me a ton to look at when I get back from work tonight. Promethius wrote: Personally I think this type of defense is flawed, but it is up to you so....
What would you recommend as an afk defense then? The afk ptorp thing was something I thought about like 10 min before bed. I'm just getting back into the game after being out for about 6 years, and am pretty far behind again 
|
| Tue Mar 27, 2012 7:27 am |
|
 |
|
Promethius
Ambassador
Joined: Mon Feb 09, 2004 3:00 am Posts: 3141 Location: Kansas
|
 Re: send burst on the hour server side
Tiberiusxix wrote: Wow, thanks guys - you've given me a ton to look at when I get back from work tonight. Promethius wrote: Personally I think this type of defense is flawed, but it is up to you so....
What would you recommend as an afk defense then? The afk ptorp thing was something I thought about like 10 min before bed. I'm just getting back into the game after being out for about 6 years, and am pretty far behind again  The script I posted did not address all items - holo scan to verify that a player is still in sector prior to/after the top of hour ptorp launch for instance, and if not the actions to take. If the base is moveable and you don't think you can defend then you would be better off moving it. If it isn't moveable and you can't defend it then abandon it - better than being SD. A lot depends on the opponents skill on how you would react. I would still do the initial ptorp of the player, and SD them if possible - AFK attacks are dangerous though. If you go this route to defend your base, you might want to couple this with a citkiller if you have the resources. Just be aware of the defender ships being used to burn your figs down. If you can on your initial ptorp, do it a couple of sectors out so you can retreat to your base and reset. This way they can't simply dscan to see your base is adjacent. A lot of factors go into an AFK defensive setup.
_________________
/ Promethius / Enigma / Wolfen /
"A man who has no skills can be taught, a man who has no honor has nothing."
|
| Tue Mar 27, 2012 10:59 am |
|
 |
|
ElderProphet
Commander
Joined: Tue Oct 07, 2003 2:00 am Posts: 1134 Location: Augusta, GA
|
 Re: send burst on the hour server side
You can use setEventTrigger in TWX to create a trigger that will fire when the clock strikes a certain time. The ideal way to use it would be to first determine the time offset between your computer and the server's clock, then use this offset whenever specifying the schedule.
But I agree that this is NOT a sure fire way of photoning someone at the top of the hour, after they get turns back, but before they can move.
+EP+
_________________ Claim to Fame: only guy to ever crack the TW haggle algorithm, and fig/shield/hold price formula, twice.
|
| Thu Mar 29, 2012 7:12 pm |
|
 |
|