SHARE
TWEET

Untitled

a guest Feb 26th, 2012 34 Never
  1. from ..tools import BaseClasses
  2. from ..tools.events import wcs_event
  3. from ..tools.Skills import Skill
  4. from ..tools import RaceTools
  5. from random import randint
  6.  
  7. import es
  8. import gamethread
  9. import playerlib
  10. import random
  11. import weaponlib
  12.  
  13. class HumanLord( object ):
  14.         def __init__( self ):
  15.                 #self.WeaponsCanOnlyUse =
  16.                 #self.WeaponsCantUse =
  17.                 #self.ItemsCanOnlyUse =
  18.                 #self.ItemsCantUse =
  19.                 self.RaceName      = "Human Lord"
  20.                 self.Coder         = "Iyedol & MrCoolness<3"
  21.                 self.TeamLimit     = 2
  22.                 self.RequiredLevel = 0
  23.                 self.ChangeRaceIndex  = 70
  24.                 self.AbilityCooldown  = 0
  25.                 self.UltimateCooldown = 5
  26.  
  27.                 self.Skill_2 = Skill( "Devotion", "[Spawn] Gain 15-50 HP.",                                     8, 0, wcs_event['Spawn']    )
  28.                 self.Skill_3 = Skill( "Master Bash", "[Attack] 10-24% to freeze your opponent.",                8, 0, wcs_event['Attack']   )
  29.                 self.Skill_4 = Skill( "Burning Devotion", "[Attack] 10-24% to burn opponent.",                  8, 0, wcs_event['Attack']   )
  30.                 self.Skill_5 = Skill( "Warlord's Booty", "[Attack] 30% chance to steal $40-250 off an enemy.",  8, 0, wcs_event['Attack']   )
  31.                 self.Skill_6 = Skill( "Teleport", "[Ultimate] Allows you to teleport to where you are aiming.", 8, 8, wcs_event['Ultimate'] )
  32.  
  33.  
  34.                 self.SkillList = [ self.Skill_1, self.Skill_2, self.Skill_3, self.Skill_4, self.Skill_5 ]
  35.  
  36.                 self.Function = [ self.Devotion_Aura, self.Bash, self.Burn, self.Steal, self.Teleport ]
  37.  
  38.         def Devotion_Aura( self, event_var, lvl ):
  39.                 userid = event_var['userid']
  40.                 player = playerlib.getPlayer( userid )
  41.                 health = 10 + ( lvl * 5 )
  42.                 player.health += health
  43.                 es.tell( userid, '#multi', '#lightgreenDevotion #greengrants you #lightgreen%i #greenadditional health.' % health )
  44.  
  45.         def Bash( self, event_var, lvl ):
  46.                 victim = event_var['userid']
  47.                 userid = event_var['attacker']
  48.                 freeze = 0.3
  49.                 chance = 8 + ( lvl * 2 )
  50.                 rand   = randint( 1, 100 )
  51.                 if ( chance >= rand ) :
  52.                         RaceTools.freezePlayer( victim, freeze )
  53.                         es.tell( userid, '#multi', '#lightgreenBash #greenfreezes #lightgreen%s #greenfor #lightgreen%f #greenseconds.' % ( victim.name, freeze ) )
  54.                         es.tell( victim, '#multi', '#lightgreen%s #greenfreezes you for %f seconds.' % ( userid.name, freeze ) )
  55.  
  56.         def Burn( self, event_var, lvl ):
  57.                 victim = event_var['userid']
  58.                 userid = event_var['attacker']
  59.                 burn = 2.5
  60.                 chance = 10 + ( lvl * 3 )
  61.                 rand   = randint( 1, 100 )
  62.                 if ( chance >= rand ) :
  63.                         RaceTools.burnPlayer( victim, burn )
  64.                         es.tell( userid, '#multi', '#lightgreenBash #greenburns #lightgreen%s #greenfor #lightgreen%f #greenseconds.' % ( victim.name, burn ) )
  65.                         es.tell( victim, '#multi', '#lightgreen%s #greenburn you for %f seconds.' % ( userid.name, burn ) )
  66.  
  67.         def cash( self, event_var, lvl ):
  68.                 victim = event_var['userid']
  69.                 userid = event_var['attacker']
  70.                 cash = 10
  71.                 chance = 10 + ( lvl * 30 )
  72.                 rand   = randint( 1, 100 )
  73.                 if ( chance >= rand ):
  74.                         RaceTools.cashPlayer( victim, cash )
  75.                         es.tell( userid, '#multi', '#lightgreenStolen #lightgreen%s $ .' % ( victim.name, cash ) )
  76.                         es.tell( victim, '#multi', '#lightgreen%s #greenLost #green%s $ .' % ( userid.name, cash ) )
  77.                         #es_tell event_var(attacker) #multi #lightgreenStole#green $ server_var(cash) #lightgreenoff#green event_var(es_username)
  78.                         #es_tell event_var(userid) #multi #lightgreenLost#green $ server_var(cash) #lightgreento#green event_var(es_attackername)
  79.  
  80.         def Teleport( self, event_var, lvl ):
  81.                 userid = event_var['userid']
  82.                 force = 400 + ( lvl * 50 )
  83.                 self.UltimateTriggered[str(userid)] = True
  84.                 RaceTools.pushToViewCoords( userid, force )
RAW Paste Data
Top