Register  |  Home  |  Chat   |  ArmaBrowser  |  HowTo  |  Wiki  |  ServerStats  |  Donate  |  Forum  |  MapTools  |  Servers  |  Log in 
Forums
Information Desk
Latest News
Round Table
Servers
Trainees
Challenge us!
Off Topic

Clan Information
Public Clan Information
Active CTers+Trainees
All CTers+Trainees
Inactive CTers
CTers Earth Map
CT Groups
CT Medals
Armahacktron Wiki
Forum Ranks
Won/Lost Battles

Servers and Maps
ArmaBrowser
BFC New Ladder
CT Server Ladders
CT Mayhem Ladder
CTWF New Ladder
CT Server Maps
Flower Power Sumo Assault
Map Tools
Want to help? Donate

Jumble
HomeForum
CalendarChatMessengerIRC
Forum Members
LinksFAQ
NewsView Online

Search

Advanced Search

User Block
Username:

Password:

 Remember me



I forgot my password

Don't have an account yet?
You can register for FREE


Reply to topic
 Crazy Tronners King of the Hill 
Jedi
Crazy Tronner
Clan Admin
Senior Member
Ladle, 1x (Amount: 1) Map Maker (Amount: 1)
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
Reply with quote
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
Code:
KOH_SCORE 1
KOH_SCORE_TIME 5


how to spawn a zone
Code:
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
Code:
#!/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 ? Very Happy
owned: You got the heart of a teen Smile
Gonzap: and the innocence of a little child
View user's profile Find all posts by kyle Send private message AIM Address Yahoo Messenger MSN Messenger
  
Crazy Tronner
Senior Member
Ghost Member
Fortress Cafe Tournemant 1 Winner (Amount: 1)
CT Rank: 8
Field's place: attack
Grid Name: ct|Theroze
GID: theroze@ct/senior
CT Wild Fort Rank: na
Joined: 07 Mar 2009
Posts: 1AJ361675 Posts
Location: Between Venus and Mars
Reply with quote
The Settings are good i like them. maybe with cycle_accel_rim 1?

_________________


The fuck.
View user's profile Find all posts by theroze Send private message MSN Messenger
  
Crazy Tronner
Ex-CTer but Clan Fellow
Fortress Cafe Tournemant 1 Winner (Amount: 1) Ladle, 4x (Amount: 1)
CT Rank: Not Ranked
Field's place: attack
Grid Name: ct|Puuquie
GID: Puuquie@ct/fellow
CT Wild Fort Rank: na
Joined: 19 Mar 2008
Posts: 1NY362158 Posts
Location: Valencia
Reply with quote
Well, how can i say this again?
I love you, kyle.
View user's profile Find all posts by Puuquie Send private message
  
Crazy Tronner
Senior Member
Ghost Member
Fortress Cafe Tournemant 1 Winner (Amount: 1) Ladle, 4x (Amount: 1) Mega Team Sumo Knockout 1 (Amount: 1)
CT Rank: Not Ranked
Field's place: support
Grid Name: ct-wap
GID: wap@ct/senior
CT Wild Fort Rank: na
Joined: 10 Aug 2009
Posts: V5361121 Posts
Location: California
Reply with quote
Wow this seems cool, wanna try this soon. :d
View user's profile Find all posts by wap Send private message
  
Crazy Tronner
Senior Member
Ghost Member
Fortress Cafe Tournemant 1 Winner (Amount: 1)
CT Rank: 8
Field's place: attack
Grid Name: ct|Theroze
GID: theroze@ct/senior
CT Wild Fort Rank: na
Joined: 07 Mar 2009
Posts: 1AJ361675 Posts
Location: Between Venus and Mars
Reply with quote
I love it, cause there are auto_respawns.

_________________


The fuck.
View user's profile Find all posts by theroze Send private message MSN Messenger
  
Jedi
Crazy Tronner
Clan Admin
Senior Member
Ladle, 1x (Amount: 1) Map Maker (Amount: 1)
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
Reply with quote
cycle_accel_rim is now 1

I love you too puu <3

_________________

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 ? Very Happy
owned: You got the heart of a teen Smile
Gonzap: and the innocence of a little child
View user's profile Find all posts by kyle Send private message AIM Address Yahoo Messenger MSN Messenger
  
Crazy Tronner
Senior Member
Ghost Member
Fortress Cafe Tournemant 1 Winner (Amount: 1)
CT Rank: 8
Field's place: attack
Grid Name: ct|Theroze
GID: theroze@ct/senior
CT Wild Fort Rank: na
Joined: 07 Mar 2009
Posts: 1AJ361675 Posts
Location: Between Venus and Mars
Reply with quote
Thank you very much <3

_________________


The fuck.
View user's profile Find all posts by theroze Send private message MSN Messenger
  
Crazy Tronner
Server Tech
Honorary Member
CT Rank: Not Ranked
Field's place: support
Grid Name: CT×W124
GID: P4@ct/jedi
CT Wild Fort Rank: na
Joined: 20 Jun 2006
Posts: 22Y362698 Posts
Location: 50°17'50.79"N 18°41'04.70"E
Reply with quote
Very Happy

_________________
P4
View user's profile Find all posts by P4 Send private message Visit poster's website MSN Messenger
  
Jedi
Crazy Tronner
Clan Admin
Senior Member
Ladle, 1x (Amount: 1) Map Maker (Amount: 1)
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
Reply with quote
It now should spawn 1 zone for every 3 players
so
1-3 - 1 zone
4-6 - 2 zones
and so on

I haven't had enough players to test it yet but it should work

_________________

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 ? Very Happy
owned: You got the heart of a teen Smile
Gonzap: and the innocence of a little child
View user's profile Find all posts by kyle Send private message AIM Address Yahoo Messenger MSN Messenger
  
Crazy Tronner
Server Tech
Honorary Member
Bowl 2 Winner (Amount: 1) Fortress Cafe Tournemant 1 Winner (Amount: 1) Map Maker (Amount: 1)
CT Rank: 6
Field's place: def-sweep
Grid Name: CT~Voodoo
GID: Voodoo@ct/jedi
CT Wild Fort Rank: na
Joined: 05 May 2006
Posts: YI361242 Posts
Location: somewhere on earth
Reply with quote
Nice place Wink
View user's profile Find all posts by Voodoo Send private message Yahoo Messenger
  
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.
Reply with quote
That's awesome. Nice one, Kyle. Very Happy

_________________
View user's profile Find all posts by infa(mous) Send private message Visit poster's website AIM Address
  
Ex-CTer
Aren't you a CT?
Fortress Cafe Tournemant 1 Winner (Amount: 1) Ladle, 2x (Amount: 1)
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
Reply with quote
are you faking |x| Infamous?
View user's profile Find all posts by dreadlord Send private message
  
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
Reply with quote
No that's this infamous
View user's profile Find all posts by Hoax Send private message
  
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.
Reply with quote
Dreadlord... How can I fake someone who doesn't play anymore, and whose clan no longer exists? o_O

_________________
View user's profile Find all posts by infa(mous) Send private message Visit poster's website AIM Address
  
Crazy Tronner
Server Tech
Honorary Member
CT Rank: Not Ranked
Field's place: support
Grid Name: CT×W124
GID: P4@ct/jedi
CT Wild Fort Rank: na
Joined: 20 Jun 2006
Posts: 22Y362698 Posts
Location: 50°17'50.79"N 18°41'04.70"E
Reply with quote
too easy Razz

_________________
P4
View user's profile Find all posts by P4 Send private message Visit poster's website MSN Messenger
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  

  
  
 Reply to topic  Post a reply  

free counters