-
Notifications
You must be signed in to change notification settings - Fork 0
/
aobr.lua
72 lines (68 loc) · 2.73 KB
/
aobr.lua
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
register_blueprint "runtime_bullet_rain"
{
flags = { EF_NOPICKUP },
attributes = {
shots = 100,
},
text = {
denied_melee = "That would be cheatin', go play Berserk instead!",
denied_revolver = "That would be cheatin', go play Marksman instead!",
denied_grenade = "That's bullet rain, not grenade rain!",
denied_no_clip = "Wait, there is no clip in that!",
},
callbacks = {
can_pickup = [[
function( self, player, item )
if item and (gtk.is_weapon_group( item, "grenades" ) or item.text.name == "novabomb") then
ui:set_hint( self.text.denied_grenade, 1001, 0 )
world:play_voice( "vo_refuse" )
return -1
end
if item and item.weapon and (not item.stack) then
local clip_data = item.clip
if clip_data == nil then
ui:set_hint( self.text.denied_no_clip, 1001, 0 )
world:play_voice( "vo_refuse" )
return -1
end
if clip_data and clip_data.reload_count == 1 and clip_data.count > 1 then
ui:set_hint( self.text.denied_revolver, 1001, 0 )
world:play_voice( "vo_refuse" )
return -1
end
if item.weapon.group == world:hash("melee") then
ui:set_hint( self.text.denied_melee, 1001, 0 )
world:play_voice( "vo_refuse" )
return -1
end
end
end
]]
}
}
register_blueprint "challenge_bullet_rain"
{
text = {
name = "Angel of Bullet Rain",
desc = "{!MEGA CHALLENGE PACK MOD}\nYou just like a nice bullet rain, you know? Because there can’t be 'too much lead'. Each time you shoot, you empty your magazine! Of course, melee and revolver are forbidden. They are no fun!\n\nRating : {YMEDIUM}",
rating = "MEDIUM",
abbr = "AoBR",
letter = "B",
},
challenge = {
type = "challenge",
},
callbacks = {
on_create_player = [[
function( self, player )
player:attach( "runtime_bullet_rain" )
local egun = player:child("pistol") or player:child("rpistol")
if egun then world:destroy( egun ) end
local eammo = player:child("ammo_9mm") or player:child("ammo_44")
if eammo then world:destroy( eammo ) end
player:attach( "pistol" )
player:attach( "ammo_9mm", { stack = { amount = 32 } } )
end
]],
},
}