SHOW:
|
|
- or go back to the newest paste.
| 1 | if sample==nil then sample={} end
| |
| 2 | sample.ut={}
| |
| 3 | ||
| 4 | ----------------------- | |
| 5 | -- INITIAL SETUP -- | |
| 6 | ----------------------- | |
| 7 | function initArray(m) | |
| 8 | local array = {}
| |
| 9 | for i = 1, m do | |
| 10 | array[i]=0 | |
| 11 | end | |
| 12 | return array | |
| 13 | end | |
| 14 | sample.ut.timer=initArray(32) -- time of last kill, for each player | |
| 15 | sample.ut.level=initArray(32) -- current kill level (killstreak), for each player | |
| 16 | sample.ut.fblood=0 -- first blood already shed? 0=no/1=yes | |
| 17 | ||
| 18 | ||
| 19 | ----------------------- | |
| 20 | -- PREPARE TO FIGHT! -- | |
| 21 | ----------------------- | |
| 22 | addhook("startround","sample.ut.startround")
| |
| 23 | function sample.ut.startround() | |
| 24 | parse("sv_sound \"fun/prepare.wav\"")
| |
| 25 | sample.ut.fblood=0 | |
| 26 | end | |
| 27 | ||
| 28 | ||
| 29 | ----------------------- | |
| 30 | -- KILL SOUNDS+MSGS -- | |
| 31 | ----------------------- | |
| 32 | addhook("kill","sample.ut.kill")
| |
| 33 | function sample.ut.kill(killer,victim,weapon) | |
| 34 | -- Was last kill more than 3 secs ago? | |
| 35 | ||
| 36 | -- Reset the timer the dumb victim is dead | |
| 37 | sample.ut.level[victim]=0 --- reset after death | |
| 38 | ||
| 39 | -- Get level of player and increase it | |
| 40 | - | level=sample.ut.level[killer] |
| 40 | + | local level = sample.ut.level[killer] + 1 |
| 41 | - | level=level+1 |
| 41 | + | sample.ut.level[killer] = level |
| 42 | - | sample.ut.level[killer]=level |
| 42 | + | |
| 43 | -- FIRST BLOOD? | |
| 44 | if (sample.ut.fblood==0) then | |
| 45 | sample.ut.fblood=1 | |
| 46 | parse("sv_sound \"fun/firstblood.wav\"");
| |
| 47 | msg("©210180140"..player(killer,"name").." sheds FIRST BLOOD by killing "..player(victim,"name").."!")
| |
| 48 | - | msg (player(killer,"name").." sheds FIRST BLOOD by killing "..player(victim,"name").."!") |
| 48 | + | |
| 49 | ||
| 50 | -- HUMILIATION? (KNIFEKILL) | |
| 51 | if (weapon==50) then | |
| 52 | -- HUMILIATION! | |
| 53 | parse("sv_sound \"fun/humiliation.wav\"");
| |
| 54 | msg("©210180140"..player(killer,"name").." humiliated "..player(victim,"name").."!")
| |
| 55 | - | msg (player(killer,"name").." humiliated "..player(victim,"name").."!") |
| 55 | + | |
| 56 | ||
| 57 | -- 210180140 | |
| 58 | -- REGULAR KILL | |
| 59 | --if (level==1) then --we dont need shit that slows the performance | |
| 60 | - | if (level==1) then |
| 60 | + | |
| 61 | if (level==2) then | |
| 62 | - | elseif (level==2) then |
| 62 | + | |
| 63 | --parse("sv_sound \"fun/doublekill.wav\"") --disabled some sound, they're a bit nervous
| |
| 64 | - | parse("sv_sound \"fun/doublekill.wav\"");
|
| 64 | + | |
| 65 | elseif (level==3) then | |
| 66 | -- 3: Multikill | |
| 67 | --parse("sv_sound \"fun/multikill.wav\"")
| |
| 68 | - | parse("sv_sound \"fun/multikill.wav\"")
|
| 68 | + | |
| 69 | elseif (level==4) then | |
| 70 | -- 4: Ultrakill | |
| 71 | parse("sv_sound \"fun/ultrakill.wav\"")
| |
| 72 | msg ("©210180140"..player(killer,"name").." made an ULTRAKILL!")
| |
| 73 | - | msg (player(killer,"name").." made an ULTRAKILL!") |
| 73 | + | |
| 74 | -- 5: Monsterkill | |
| 75 | parse("sv_sound \"fun/monsterkill.wav\"")
| |
| 76 | msg ("©210180140"..player(killer,"name").." made a MO-O-O-O-ONSTERKILL-ILL-ILL!")
| |
| 77 | - | msg (player(killer,"name").." made a MO-O-O-O-ONSTERKILL-ILL-ILL!") |
| 77 | + | elseif level>5 then |
| 78 | - | else |
| 78 | + | |
| 79 | parse("sv_sound \"fun/unstoppable.wav\"")
| |
| 80 | msg ("©210180140"..player(killer,"name").." is UNSTOPPABLE! "..level.." KILLS!")
| |
| 81 | - | msg (player(killer,"name").." is UNSTOPPABLE! "..level.." KILLS!") |
| 81 | + | |
| 82 | end | |
| 83 | end |