Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 9th, 2012, 02:39 PM
IOwN IOwN is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 7 IOwN User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 21 m 49 sec
Reputation Power: 0
New to code

Hello im IOwN i play a game called URBAN TERROR i mod servers and more. I wonder can i get help with mods here? Is it allowed? Answer please!

IOwN

Reply With Quote
  #2  
Old July 9th, 2012, 02:54 PM
IOwN IOwN is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 7 IOwN User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 21 m 49 sec
Reputation Power: 0
i mean help with b3/python to my mods here? can i?

Reply With Quote
  #3  
Old July 9th, 2012, 03:09 PM
b49P23TIvg's Avatar
b49P23TIvg b49P23TIvg is offline
Contributing User
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Aug 2011
Posts: 3,458 b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 4 Days 6 h 26 m 43 sec
Reputation Power: 403
You'll probably get good response if you're polite, use the best English grammar you're capable, and have specific programming questions that can be answered without familiarity with your favorite game.

If you expect your audience to understand "i mod servers and more." then perhaps devshed forums shouldn't be your first choice for help.

Likewise, if you consider "Answer please!" polite then you should look elsewhere before your transfer to the blacklist occurs.
__________________
[code]Code tags[/code] are essential for python code!

Reply With Quote
  #4  
Old July 9th, 2012, 03:31 PM
IOwN IOwN is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 7 IOwN User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 21 m 49 sec
Reputation Power: 0
Excuse me, im not so great on english but i gonna make a mod it is called INFECTION mod, cs have it and i think some other games have it. This is how the mod works. First 2 random person be in red team and the rest in blue team. If a red team player kill one in blue the blue team player that be killed forces into red team. If i am red and die i will wait to the other red die. if the red dont kill it restart the round. Any ideas how i can make this with b3? Sorry for my english

IOwN

Reply With Quote
  #5  
Old July 9th, 2012, 05:29 PM
b49P23TIvg's Avatar
b49P23TIvg b49P23TIvg is offline
Contributing User
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Aug 2011
Posts: 3,458 b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 4 Days 6 h 26 m 43 sec
Reputation Power: 403
You needn't be a native English speaker. Here's a python code that implements my understanding of your description:
Code:
# The game of infection
# I do not know what is "b3"

# example game command line:
# python -c 'import p;p.main(4)'

import random, pdb

class avatar:

    def __init__(self,name,team,offensive_skill,defense_rating):
        if not ((0 < offensive_skill < 1) and (0 < defense_rating < 1)):
            raise ValueError('offensive_skill and defense_rating must be between 0 and 1')
        self.name = name
        self.team = team
        self.offense = offensive_skill
        self.defense = defense_rating
        self.state = 'live'

    def __str__(self):
        return ' '.join(self.team,self.name,self.state)

    def __gt__(self,other):
        try:
            return random.random() < self.offense*(1-other.defense)
        except:
            raise ValueError('undefined operation with '+self.__class__.__name__)

def create(name,team):
    return avatar(name,
                  team,
                  offensive_skill = 0.2 + random.random()*0.2, # baseball like statistics
                  defense_rating = 0.7 + random.random()*0.2,
                  )

def shoot(red,blue):
    # shooting is not simultaneous.
    #   a dead player can be shot.
    #   a dead player cannot shoot.
    players = red+blue
    random.shuffle(players)
    #pdb.set_trace()
    change = 0
    for shooter in players:
        if 'live' != shooter.state:
            continue
        i = 'red' == shooter.team
        receivers = (red,blue,)[i]
        if not(len(receivers)):
            continue
        j = random.randrange(len(receivers))
        receiver = receivers[j]
        if receiver < shooter:
            change = 1
            if i:
                red.append(receiver)
                del blue[j]
            else:
                red[i].state = 'dead'
    return change

def simulation(players):
    red = [create(str(i),'red') for i in range(max(0,min(2,players)))]
    blue = [create(str(i+2),'blue') for i in range(max(0,players-2))]
    print('%d red, %d blue'%(sum('live' == r.state for r in red),len(blue)))
    while red and blue:
        if shoot(red,blue):
            print('%d red, %d blue'%(sum('live' == r.state for r in red),len(blue)))
            red = [r for r in red if 'live' == r.state]
    if red:
        print('The zombie infection overwhelmed the living')
    if blue:
        print('blue wins---zombie threat eliminated')

infection = main = simulation
Comments on this post
Sepodati agrees: Nice thought, but wasted effort.

Reply With Quote
  #6  
Old July 10th, 2012, 06:14 AM
IOwN IOwN is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 7 IOwN User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 21 m 49 sec
Reputation Power: 0
Is this the force? Or dose i need to fix something! Im so thankful guys! What have u done here?

Thank you from IOwN

Reply With Quote
  #7  
Old July 12th, 2012, 02:11 AM
IOwN IOwN is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 7 IOwN User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 21 m 49 sec
Reputation Power: 0
It says No Module name infection (in b3 log) whats wrong?

Reply With Quote
  #8  
Old July 24th, 2012, 02:30 PM
IOwN IOwN is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 7 IOwN User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 21 m 49 sec
Reputation Power: 0
???

Reply With Quote
  #9  
Old July 24th, 2012, 04:09 PM
b49P23TIvg's Avatar
b49P23TIvg b49P23TIvg is offline
Contributing User
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Aug 2011
Posts: 3,458 b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level)b49P23TIvg User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 4 Days 6 h 26 m 43 sec
Reputation Power: 403
I do not know what a b3 is.

to Sepodati: I enjoyed writing the infection game and learned a little. Far better than my usual wasteful activities.

Reply With Quote
  #10  
Old July 25th, 2012, 11:31 AM
IOwN IOwN is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 7 IOwN User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 21 m 49 sec
Reputation Power: 0
b3/Big brother bot = http://bigbrotherbot.net

U can make plugins in it and have this for Urban Terror that game i play and cod games etc.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > New to code

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap