English edit the utsfx.lua

3 replies
Goto Page
To the start Previous 1 Next To the start
20.07.11 04:16:17 pm
Up
tonton2d
User
Offline Off
Hi all, I need to edit utsfx.lua, I saw that in the original script when you didn't kill someone after a delay, your "level" return to 0 . so when you kill someone more it's just a first Blood.
The original script is :
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
--------------------------------------------------
-- UT+Quake Sounds Script by Unreal Software    --
-- 22.02.2009 - www.UnrealSoftware.de           --
-- Adds UT and Quake Sounds to your Server      --
--------------------------------------------------

if sample==nil then sample={} end
sample.ut={}

-----------------------
-- INITIAL SETUP     --
-----------------------
function initArray(m)
     local array = {}
     for i = 1, m do
          array[i]=0
     end
     return array
end
sample.ut.timer=initArray(32)
sample.ut.level=initArray(32)
sample.ut.fblood=0


-----------------------
-- PREPARE TO FIGHT! --
-----------------------
addhook("startround","sample.ut.startround")
function sample.ut.startround()
     parse("sv_sound \"fun/prepare.wav\"")
     sample.ut.fblood=0
end


-----------------------
-- KILL SOUNDS+MSGS  --
-----------------------
addhook("kill","sample.ut.kill")
function sample.ut.kill(killer,victim,weapon)
     if (os.clock()-sample.ut.timer[killer])>3 then
          sample.ut.level[killer]=0;
     end
     level=sample.ut.level[killer]
     level=level+1
     sample.ut.level[killer]=level
     sample.ut.timer[killer]=os.clock()
     -- FIRST BLOOD?
     if (sample.ut.fblood==0) then
          sample.ut.fblood=1
          parse("sv_sound \"fun/firstblood.wav\"");
          msg (player(killer,"name").." sheds FIRST BLOOD by killing "..player(victim,"name").."!")
     end
     -- HUMILIATION? (KNIFEKILL)
     if (weapon==50) then
          -- HUMILIATION!
          parse("sv_sound \"fun/humiliation.wav\""); 
          msg (player(killer,"name").." humiliated "..player(victim,"name").."!")
     else
          -- REGULAR KILL
          if (level==1) then
               -- Single Kill! Nothing Special!
          elseif (level==2) then
               parse("sv_sound \"fun/doublekill.wav\"");
               msg (player(killer,"name").." made a Doublekill!")
          elseif (level==3) then
               parse("sv_sound \"fun/multikill.wav\"")
               msg (player(killer,"name").." made a Multikill!")
          elseif (level==4) then
               parse("sv_sound \"fun/ultrakill.wav\"")
               msg (player(killer,"name").." made an ULTRAKILL!")
          elseif (level==5) then
               parse("sv_sound \"fun/monsterkill.wav\"")
               msg (player(killer,"name").." made a MO-O-O-O-ONSTERKILL-ILL-ILL!")
          else
               parse("sv_sound \"fun/unstoppable.wav\"")
               msg (player(killer,"name").." is UNSTOPPABLE! "..level.." KILLS!")
          end
     end
end


Me, I want the level return to 0 only when you are dead.
So I pretty sure that the code what I should edit is in this part:
Code:
1
2
3
4
5
addhook("kill","sample.ut.kill")
function sample.ut.kill(killer,victim,weapon)
     if (os.clock()-sample.ut.timer[killer])>3 then
          sample.ut.level[killer]=0;
     end

Someone could help me please ?
"Akounamatata"
20.07.11 04:21:21 pm
Up
DannyDeth
User
Offline Off
You don't need to really edit it that much, just remove this part:
Code:
1
2
3
if (os.clock()-sample.ut.timer[killer])>3 then
     sample.ut.level[killer]=0;
end

And there will no longer be a time limit.
20.07.11 04:29:51 pm
Up
Cure Pikachu
User
Offline Off
Removing the timer is only 50% of what was requested.
Insert this part before the level=sample.ut.level[killer] line.
Code:
1
sample.ut.level[victim]=0;
IMG:https://i.imgur.com/uUrye71.png
IMG:https://i.imgur.com/xpsyQRX.png
20.07.11 05:15:59 pm
Up
tonton2d
User
Offline Off
ohh good ! it work ! Thanks a lot guys ;]
"Akounamatata"
To the start Previous 1 Next To the start