Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import es
- import playerlib
- import gamethread
- import random
- overlaypath = "overlays/rockssuicide.vtf" #The path and name for your overlay
- overlaypath2 = "overlays/rocksmultikill.vtf" # Multikill overlay path
- overlaypath3 = "overlays/rockskillstreak.vtf" # Killstreak overlay path
- overlaypath4 = "overlays/rocksheadshot.vtf" # Headshot overlay path
- overlaypath5 = "overlays/rocksgrenade.vtf" # Grenade overlay path
- overlaypath6 = "overlays/rockscrowbar.vtf" # Crowbar/Stunstick overlay path
- overlaypath7 = "overlays/rocksslamkiller.vtf" # Slams overlaypath for killer
- overlaypath8 = "overlays/rocksslamvictim.vtf" # Slams overlaypath for victim
- overlaypath9 = "overlays/rocksbonus.vtf" # Bonus Overlay path (granate/brecheisen/pistole)
- overlaypath10 = "killmessage/mgt_2.vtf" # 11 kills to go
- overlaypath11 = "killmessage/mgt_3.vtf" # 10 kills to go
- overlaypath12 = "killmessage/mgt_4.vtf" # 9 kills to go
- overlaypath13 = "killmessage/mgt_5.vtf" # 8 kills to go
- overlaypath14 = "killmessage/mgt_6.vtf" # 6 kills to go
- overlaypath15 = "killmessage/mgt_7.vtf" # 5 kills to go
- overlaypath16 = "killmessage/mgt_8.vtf" # 4 kills to go
- overlaypath17 = "killmessage/mgt_9.vtf" # 3 kills to go
- overlaypath18 = "killmessage/mgt_10.vtf" # 2 kills to go
- overlaypath19 = "killmessage/mgt_11.vtf" # 1 kill to go
- overlaypath20 = "overlays/bloodvision-a.vtf" # normal deathoverlay 1
- overlaypath21 = "overlays/bloodvision-b.vtf" # normal deathoverlay 2
- overlaypath22 = "overlays/bloodvision-c.vtf" # normal deathoverlay 3
- overlaypath23 = "overlays/bloodvision-g.vtf" # normal deathoverlay 4
- overlaypath24 = "overlays/bloodvision-h.vtf" # normal deathoverlay 5
- overlaypath25 = "overlays/rockspostaldeath.vtf" # 12+ killstreak deathoverlay
- # Die liste mit den deathoverlays, wo am ende für jeden death zufällig eins von ausgewählt wird.
- deathoverlays = ['overlaypath20', 'overlaypath21', 'overlaypath22', 'overlaypath23', 'overlaypath24', 'overlaypath20']
- Time = 3 #How long the overlay will be displayed
- killdict = {}
- def load():
- es.msg('loaded')
- download()
- for userid in es.getUseridList():
- killdict[userid] = {}
- killdict[userid]['kills'] = 0
- killdict[userid]['killstreak'] = 0
- killdict[userid]['slamkills'] = 0
- def unload():
- for userid in es.getUseridList():
- del killdict[userid]
- def es_map_start(ev):
- download()
- killdict.clear()
- def download():
- es.stringtable('downloadables', 'materials/%s' %overlaypath)
- es.stringtable('downloadables', 'materials/%s' %overlaypath.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath2)
- es.stringtable('downloadables', 'materials/%s' %overlaypath2.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath3)
- es.stringtable('downloadables', 'materials/%s' %overlaypath3.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath4)
- es.stringtable('downloadables', 'materials/%s' %overlaypath4.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath5)
- es.stringtable('downloadables', 'materials/%s' %overlaypath5.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath6)
- es.stringtable('downloadables', 'materials/%s' %overlaypath6.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath7)
- es.stringtable('downloadables', 'materials/%s' %overlaypath7.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath8)
- es.stringtable('downloadables', 'materials/%s' %overlaypath8.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath9)
- es.stringtable('downloadables', 'materials/%s' %overlaypath9.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath10)
- es.stringtable('downloadables', 'materials/%s' %overlaypath10.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath11)
- es.stringtable('downloadables', 'materials/%s' %overlaypath11.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath12)
- es.stringtable('downloadables', 'materials/%s' %overlaypath12.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath13)
- es.stringtable('downloadables', 'materials/%s' %overlaypath13.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath14)
- es.stringtable('downloadables', 'materials/%s' %overlaypath14.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath15)
- es.stringtable('downloadables', 'materials/%s' %overlaypath15.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath16)
- es.stringtable('downloadables', 'materials/%s' %overlaypath16.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath17)
- es.stringtable('downloadables', 'materials/%s' %overlaypath17.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath18)
- es.stringtable('downloadables', 'materials/%s' %overlaypath18.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath19)
- es.stringtable('downloadables', 'materials/%s' %overlaypath19.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath20)
- es.stringtable('downloadables', 'materials/%s' %overlaypath20.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath21)
- es.stringtable('downloadables', 'materials/%s' %overlaypath21.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath22)
- es.stringtable('downloadables', 'materials/%s' %overlaypath22.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath23)
- es.stringtable('downloadables', 'materials/%s' %overlaypath23.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath24)
- es.stringtable('downloadables', 'materials/%s' %overlaypath24.replace('vtf', 'vmt'))
- es.stringtable('downloadables', 'materials/%s' %overlaypath25)
- es.stringtable('downloadables', 'materials/%s' %overlaypath25.replace('vtf', 'vmt'))
- def player_activate(ev):
- userid = int(ev['userid'])
- killdict[userid] = {}
- killdict[userid]['kills'] = 0
- killdict[userid]['killstreak'] = 0
- killdict[userid]['slamkills'] = 0
- def player_disconnect(ev):
- userid = int(ev['userid'])
- if userid in killdict:
- del killdict[userid]
- def player_spawn(ev):
- userid = int(ev['userid'])
- es.cexec(userid, 'r_screenoverlay 0')
- def player_death(ev):
- userid = int(ev['userid'])
- attacker = int(ev['attacker'])
- userteam = int(ev['es_userteam'])
- attackerteam = int(ev['es_attackerteam'])
- player = playerlib.getPlayer(attacker)
- weapon = ev['weapon']
- if userid == attacker:
- es.cexec(userid, 'r_screenoverlay %s'%overlaypath)
- gamethread.delayed(Time, v_stopoverlay, (userid))
- else:
- gamethread.delayed(1, resetkills, (attacker))
- killdict[attacker]['kills'] += 1
- if killdict[attacker]['kills'] >= 2:
- es.cexec(attacker, 'r_screenoverlay %s'%overlaypath2)
- gamethread.delayed(Time, a_stopoverlay, (attacker))
- killdict[attacker]['killstreak'] += 1
- if killdict[attakcer]['killstreak'] == 1:
- es.cexec(attacker, 'r_screenoverlay %s'%overlaypath10)
- gamethread.delayed(Time, a_stopoverlay, (attacker))
- if killdict[attakcer]['killstreak'] == 2:
- es.cexec(attacker, 'r_screenoverlay %s'%overlaypath11)
- gamethread.delayed(Time, a_stopoverlay, (attacker))
- if killdict[attakcer]['killstreak'] == 3:
- es.cexec(attacker, 'r_screenoverlay %s'%overlaypath12)
- gamethread.delayed(Time, a_stopoverlay, (attacker))
- if killdict[attakcer]['killstreak'] == 4:
- es.cexec(attacker, 'r_screenoverlay %s'%overlaypath13)
- gamethread.delayed(Time, a_stopoverlay, (attacker))
- if killdict[attacker]['killstreak'] == 5:
- player.health += 200
- es.tell(attacker, '#multi', '#lightgreen5 Killstreak: #greenYou got 200 HP for killing 5 enemies in a row.')
- es.cexec(attacker, 'r_screenoverlay %s'%overlaypath9)
- gamethread.delayed(Time, a_stopoverlay, (attacker))
- if killdict[attakcer]['killstreak'] == 6:
- es.cexec(attacker, 'r_screenoverlay %s'%overlaypath14)
- gamethread.delayed(Time, a_stopoverlay, (attacker))
- if killdict[attakcer]['killstreak'] == 7:
- es.cexec(attacker, 'r_screenoverlay %s'%overlaypath15)
- gamethread.delayed(Time, a_stopoverlay, (attacker))
- if killdict[attakcer]['killstreak'] == 8:
- es.cexec(attacker, 'r_screenoverlay %s'%overlaypath16)
- gamethread.delayed(Time, a_stopoverlay, (attacker))
- if killdict[attakcer]['killstreak'] == 9:
- es.cexec(attacker, 'r_screenoverlay %s'%overlaypath17)
- gamethread.delayed(Time, a_stopoverlay, (attacker))
- if killdict[attakcer]['killstreak'] == 10:
- es.cexec(attacker, 'r_screenoverlay %s'%overlaypath18)
- gamethread.delayed(Time, a_stopoverlay, (attacker))
- if killdict[attakcer]['killstreak'] == 11:
- es.cexec(attacker, 'r_screenoverlay %s'%overlaypath19)
- gamethread.delayed(Time, a_stopoverlay, (attacker))
- if killdict[attacker]['killstreak'] == 12:
- es.cexec(attacker, 'r_screenoverlay %s'%overlaypath3)
- player.godmode(1)
- gamethread.delayed(60, resetgodmode, (attacker))
- es.tell(attacker, '#multi', '#lightgreen12 Killstreak: #greenGodmode has been activated for 60 seconds!')
- gamethread.delayed(50, godmodetimeleft, (attacker))
- es.msg('#multi', '[#green12 killstreak#default] %s #greenhas now godmode for 60 seconds!' %es.getplayername(attacker))
- if weapon == 'grenade_frag':
- if not killdict[attacker]['kills'] >= 2:
- es.cexec(attacker, 'r_screenoverlay %s'%overlaypath5)
- if killdict[attacker]['killstreak'] < 12:
- gamethread.delayed(Time, a_stopoverlay, (attacker))
- if weapon == 'slam':
- killdict[attacker]['slamkills'] += 1
- if killdict[attacker]['slamkills'] >= 3:
- es.cexec(attacker, 'r_screenoverlay %s'%overlaypath7)
- if killdict[attacker]['killstreak'] < 12:
- gamethread.delayed(Time, a_stopoverlay, (attacker))
- es.cexec(userid, 'r_screenoverlay %s'%overlaypath8)
- gamethread.delayed(Time, v_stopoverlay, (userid))
- if killdict[userid]['killstreak'] < 12:
- es.cexec(userid, 'r_screenoverlay %s' %random.choice(deathoverlays))
- if killdict[userid]['killstreak'] >= 12:
- killdict[userid]['killstreak'] = 0
- es.cexec(userid, 'r_screenoverlay %s'%overlaypath25)
- killdict[userid]['slamkills'] = 0
- def v_stopoverlay(userid):
- es.cexec(userid, 'r_screenoverlay 0')
- def a_stopoverlay(attacker):
- es.cexec(attacker, 'r_screenoverlay 0')
- def resetkills(attacker):
- killdict[attacker]['kills'] = 0
- def resetgodmode(attacker):
- player = playerlib.getPlayer(attacker)
- player.godmode(0)
- def godmodetimeleft(attacker):
- es.tell(attacker, '#multi', '#lightgreen12 Killstreak: #greenGodmode being active for 10 seconds.')
Add Comment
Please, Sign In to add comment