June 26, 2019, 11:09:28 PM

Author Topic: Need help How to convert python to Hollidays  (Read 801 times)

Offline Mazyn

  • Level 0 Beginner
  • Posts: 9
Need help How to convert python to Hollidays
« on: January 04, 2010, 07:35:02 AM »
I have a Python coding custom race i want to know how to make it into a regular db txt so it will go in my race.db file ##############
# IMPORT STUFF
import es
import wcs
import random
import playerlib
import gamethread

##############
# PUBLISH INFO
info = es.AddonInfo()
info.name = '2Fast2Furious'
info.author = 'DanMister'

###########
# RACE INFO
RaceName = '2Fast2Furious'
race = wcs.Race(RaceName)

############
# SKILL INFO
race.registerSkill('Protection Gear',5,1,' (Starting Gear)Extra Health and Armor if in this "Gear"')
race.registerSkill('Damage Gear',5,1,'(Gear 2)Extra Damage if in this "Gear"')
race.registerSkill('Speed Gear',5,1,'(Gear 3) Extra speed if in this "Gear"')
race.registerSkill('Impact Area Damage Gear',5,1,'(Gear 4) Area damage where bullet hits if in this "Gear"')
race.registerSkill('Multi Gear',5,1,'(Gear 5) Extra speed, and drain bullets if in this "Gear"')

############
# BEGIN CODE

def load():
        es.regcmd('!UpShift', 'script/player_UpShift', 'This "shifts" the players ability')
        es.regcmd('!DownShift', 'script/player_DownShift', 'This "Down Shifts" the players ability')

def player_UpShift():
    userid = getcmduserid()

    if wcs.GetLevel(userid, RaceName'Protection Gear') >== 1:
    es.regcmd('!gear1', 'script/gear1', 'Does the Gear 1 ability')
    elif es.exist('script', '!gear1') and wcs.GetLevel(userid, RaceName, 'Damage Gear') >== 1:
        es.unregcmd('!gear1')
        es.regcmd('!gear2', 'script/gear2', 'Does the Gear 2 ability')
    elif es.exist('script', '!gear2') and wcs.GetLevel(userid, RaceName, 'Speed Gear') >== 1:
        es.unregcmd('!gear2')
        es.regcmd('!gear3', 'script/gear3', 'Does the Gear 3 ability')
    elif es.exist('script', '!gear3') and wcs.GetLevel(userid, RaceName, 'Impact Area Damage Gear') >== 1:
        es.unregcmd('!gear3')
        es.regcmd('!gear4', 'script/gear4', 'Does the Gear 4 ability')
    elif es.exist('script', '!gear4') and wcs.GetLevel(userid, RaceName, 'Multi Gear') >== 1:
        es.unregcmd('!gear4')
        es.regcmd('!gear5', 'script/gear5', 'Does the Gear 5 ability')
       
def player_DownShift():
    userid = getcmduserid()

    if es.exist('script', '!gear5') and wcs.GetLevel(userid, RaceName, 'Impact Area Damage Gear') >== 1:
        es.unregcmd('!gear5')
        es.regcmd('!gear4', 'script/gear4', 'Does the Gear 4 ability')
    elif es.exist('script', '!gear4') and wcs.GetLevel(userid, RaceName, 'Speed Gear') >== 1:
        es.unregcmd('!gear4')
        es.regcmd('!gear3', 'script/gear3', 'Does the Gear 3 ability')
    elif es.exist('script', '!gear3') and wcs.GetLevel(userid, RaceName, 'Damage Gear') >== 1:
        es.unregcmd('!gear3')
        es.regcmd('!gear2', 'script/gear2', 'Does the Gear 2 ability')
    elif ex.exist('script', '!gear2') and wcs.GetLevel(userid, RaceName, 'Protection Gear') >== 1:
        es.unregcmd('!gear2')
        es.regcmd('!gear1', 'script/gear1', 'Does the Gear 1 ability')
           
       

thats half of it i need it go go in the format as the regular ones i see i do not know how to do this please help