 |
|  |
 | Crazy Tronners King of the Hill |  |
   
| CT Rank: 10 |
| Field's place: def-sweep |
| Grid Name: ct¤kyle |
| GID: kyle@ct/jedi |
| CT Wild Fort Rank: na |
| Joined: 31 Mar 2006 |
| Posts: 458365372 Posts |
Location: United States
|
|
Posted: Fri Aug 21, 2009 1:43 am |
|
A new game mode has been born. It is king of the hill an idea Vanhayes and dubStep asked me to create. The object is to stay inside the zone without any other competitors getting inside. for every so many seconds that you stay in the zone you will be awarded so many points. The default values are for every 5 seconds you stay inside you get 1 point.
the settings
KOH_SCORE 1
KOH_SCORE_TIME 5 |
how to spawn a zone
| SPAWN_ZONE koh posx posy radius growth xdir ydir interactive(1 or 0) r g b target_size |
the code is in sty+ct
a sample script wrote in python
#!/usr/bin/python
# -*- coding: utf-8 -*-
from sys import stdout, stdin
from os import stat
from time import sleep, time
from random import randint
from re import match
########################################################################
## Configuration setting ##
########################################################################
# file_paths
ladderlog = '/path/to/ladderlog.txt'
output_file='/path/to/cmds.txt' # file to read into server
# miscellaneous settings
next_round=0
game_time=-5
# Create a string from a a position in an array to the end of array
def g_build_string(array, startval):
str=""
for i in range(startval, len(array)):
str += array[i]
str += " "
return(str.strip())
#output the data to server
def o_writter(text):
stdout.write(text)
stdout.flush()
f = open(output_file, 'a')
f.write(text)
f.close()
file = open(ladderlog,'r')
st_results = stat(ladderlog)
st_size = st_results[6]
file.seek(st_size)
while 1:
where = file.tell()
line = file.readline()
if not line:
sleep(1)
file.seek(where)
else:
# START Strip the [L] if we are getting console log
game_end_last=False
if match("^\[L\]", line):
line = line.replace("[L]","", 1)
line = line.strip()
# END Strip the [L] if we are getting console log
# START PLAYER_ENTERED <player> <ip> <grid name>
if match("^PLAYER_ENTERED", line):
keywords = line.split()
o_writter("CONSOLE_MESSAGE 0xff1c15* 0xeeff00Welcome 0xff1c15%-15s 0xeeff00to Crazy Tronners King of the Hill. 0xff1c15*\n" % (g_build_string(keywords , 3) ))
# END PLAYER_ENTERED
# START GAME_TIME watch the game time to update settings based on time
if match("^GAME_TIME", line):
keywords = line.split()
game_time=int(keywords[1])
if (game_time == -1):
y=randint(0, 450)+25
x=randint(0, 450)+25
radius=randint(0, 15)+20
o_writter("SPAWN_ZONE n king koh "+str(x)+" "+str(y)+" "+str(radius)+" 0\n")
if (((game_time%25) == 0) and (game_time is not 0)):
o_writter("COLLAPSE_ZONE king\n")
y=randint(0, 450)+25
x=randint(0, 450)+25
radius=randint(0, 15)+20
o_writter("SPAWN_ZONE n king koh "+str(x)+" "+str(y)+" "+str(radius)+" 0\n")
# start of deadly bouncy balls
# END of GAME_TIME
# START ROUND_COMMENCING A new round is starting, let's prepare the following round.
if match("^ROUND_COMMENCING", line):
keywords = line.split()
# find the current map being played, for settings.
next_round=int(keywords[1])
if ( (next_round > int(keywords[2])) or (next_round < 0) ):
next_round=1
if ( next_round == int(keywords[2]) ):
o_writter("CENTER_MESSAGE Final Round \n")
else:
o_writter("CENTER_MESSAGE Round " + str(next_round) + " of " + keywords[2] + "\n")
sleep(1) |
|
_________________
In theory it should work in reality who knows if it will work.
MB53: I am 26 years old how can i be a teen ?
owned: You got the heart of a teen
Gonzap: and the innocence of a little child
|
|
Ex-CTer
Aren't you a CT?
| CT Rank: Not a CTer |
| Field's place: attack |
| Grid Name: dreadlord |
| GID: dreadlord@ct/public |
| CT Wild Fort Rank: na |
| Joined: 16 Jul 2008 |
| Posts: 18T361613 Posts |
Location: Germany
|
|
Posted: Sun Aug 30, 2009 7:55 am |
|
are you faking |x| Infamous? |
|
|
|
Wacko
| CT Rank: Not a CTer |
| Field's place: |
| Grid Name: |
| GID: Hoax@ct/public |
| CT Wild Fort Rank: |
| Joined: 26 Jun 2006 |
| Posts: 6Q36242 Posts |
Location: UK
|
|
Posted: Sun Aug 30, 2009 7:23 pm |
|
|
|
|
|
Newbie
| CT Rank: Not a CTer |
| Field's place: |
| Grid Name: Infamous, Possibly: (Echo, Whisper) |
| GID: infa(mous)@ct/public |
| CT Wild Fort Rank: na |
| Joined: 27 Sep 2008 |
| Posts: 3363 Posts |
Location: Be wary.
|
|
Posted: Sun Aug 30, 2009 11:08 pm |
|
Dreadlord... How can I fake someone who doesn't play anymore, and whose clan no longer exists? o_O |
_________________

|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
All times are GMT
Page 1 of 2
|
|
|
|
|  |