高级玩家

- 贡献度
- 52
- 金元
- 3007
- 积分
- 509
- 精华
- 0
- 注册时间
- 2012-10-20
|
本帖最后由 Uncle_Muscle 于 2013-8-23 16:58 编辑
不知道lua代码是什么,怎么用的请看这里,教程和注入工具都在:
http://bbs.3dmgame.com/thread-3981125-1-1.html
今晚闲着没事,翻了一下lua的原代码,捡几个改了一下,然后试了一试真的有效果唉,好开心。。。。 
我没怎么学过编程也不是计算机专业的,所以这次改了点代码巨有成就感。。。
所以小技术请大家不要打击 ,多多支持,而且在3DM发帖也是第一次。。。原来打算在贴吧发的。。代码一复制上去格式就乱了
想着破解和汉化都是用3DM的,所以就来3DM发啦,莫打击莫打击
收获日2
steam:357539725
昵称:joker_lu
代码如下:
医疗包(单个医疗包无限治疗效果,四个人怎么都吃不完)
无限医疗包.lua
(319 Bytes, 下载次数: 6459)
function DoctorBagBase:_take( unit )
--local taken = 1 - unit:character_damage():health_ratio()
local taken = 1
self._amount = self._amount
unit:character_damage():recover_health() -- replenish()
return taken
end
哨兵机枪(机枪无限弹、无敌,好爽好爽,游戏开始挑敌人多的地方放一个,它一直突突到你们撤离)
无限机枪.lua
(2.66 KB, 下载次数: 2430)
function SentryGunWeapon ut_of_ammo()
if self._ammo_total then
return self._ammo_total == 9999
else
return self._ammo_ratio == 1
end
end
function SentryGunWeapon:fire( blanks, expend_ammo )
if expend_ammo then
if self._ammo_total <= 0 then
return
end
self._ammo_total = self._ammo_total - 0
local ammo_percent = self._ammo_total / self._ammo_total
if ammo_percent == 0 or math.abs( ammo_percent - self._ammo_sync ) >= self._ammo_sync_resolution then
self._ammo_sync = ammo_percent
self._unit:network():send( "sentrygun_ammo", math.ceil( ammo_percent / self._ammo_sync_resolution ) )
end
end
local fire_obj = self._effect_align[ self._interleaving_fire ]
local from_pos = fire_obj:position()
local direction = fire_obj:rotation():y()
-- mvector3.negate( direction )
mvector3.spread( direction, tweak_data.weapon[ self._name_id ].SPREAD * self._spread_mul )
World:effect_manager():spawn( self._muzzle_effect_table[ self._interleaving_fire ] ) -- , normal = col_ray.normal } )
if self._use_shell_ejection_effect then
World:effect_manager():spawn( self._shell_ejection_effect_table )
end
local ray_res = self:_fire_raycast( from_pos, direction, blanks )
if self._alert_events and ray_res.rays then
RaycastWeaponBase._check_alert( self, ray_res.rays, from_pos, direction, self._unit )
end
self._unit:movement():give_recoil()
return ray_res
end
function SentryGunDamage:damage_bullet( attack_data )
--print( "[SentryGunDamage:damage_bullet]", inspect( attack_data ) )
if self._dead or self._invulnerable or PlayerDamage:_look_for_friendly_fire( attack_data.attacker_unit ) then
return
end
local hit_shield = attack_data.col_ray.body and attack_data.col_ray.body:name() == self._shield_body_name
local hit_bag = attack_data.col_ray.body and attack_data.col_ray.body:name() == self._bag_body_name
local dmg_adjusted = attack_data.damage * ( hit_shield and tweak_data.weapon.sentry_gun.SHIELD_DMG_MUL or 1 ) * ( hit_bag and tweak_data.weapon.sentry_gun.BAG_DMG_MUL or 1 )
-- print( "hit_shield", hit_shield, "hit_bag", hit_bag, "damage", attack_data.damage, "dmg_adjusted", dmg_adjusted )
if dmg_adjusted >= self._health then
self:die()
else
self._health = self._health
end
local health_percent = self._health / self._health_max
if health_percent == 0 or math.abs( health_percent - self._health_sync ) >= self._health_sync_resolution then
self._health_sync = health_percent
self._unit:network():send( "sentrygun_health", math.ceil( health_percent / self._health_sync_resolution ) )
end
end
——————————————————————
第一次发帖哦,第一次哦,回复多的话会考虑更新的
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
第三次更新,面具的材料图案颜色,累感无爱,帖子都没人理的……本小学生自己写的啊,再没人爱去玩CF了!!!!!
面具解锁代码
managers.blackmarket:_setup_masks()
for mask_id,_ in pairs(tweak_data.blackmarket.masks) do
Global.blackmarket_manager.masks[mask_id].unlocked = true
managers.blackmarket:add_to_inventory("normal", "masks", mask_id, false)
end
颜色解锁代码
for color_id,_ in pairs(tweak_data.blackmarket.colors) do
tweak_data.blackmarket.colors[ texture_id ].unlocked = true
managers.blackmarket:add_to_inventory("normal", "colors", color_id, false)
end
图案解锁代码
for texture_id,_ in pairs(tweak_data.blackmarket.textures) do
tweak_data.blackmarket.textures[ texture_id ].unlocked = true
managers.blackmarket:add_to_inventory("normal", "textures", texture_id, false)
end
材料解锁代码
for material_id,_ in pairs(tweak_data.blackmarket.materials) do
tweak_data.blackmarket.materials[ material_id ].unlocked = true
managers.blackmarket:add_to_inventory("normal", "materials", material_id, false)
end
|
评分
-
4
查看全部评分
-
|