找回密码
 点一下
查看: 2228|回复: 6

请问有人能将这jass翻译成T吗?

[复制链接]
发表于 2009-6-22 00:03:17 | 显示全部楼层 |阅读模式
Jass代码如下:
[jass]
function Trig_devour_Timer takes nothing returns nothing
    local timer t = GetExpiredTimer()
    local unit unit1 = I2U(GetStoredInteger(udg_gc, I2S(H2I(t)), "unit1"))
    local unit unit2 = I2U(GetStoredInteger(udg_gc, I2S(H2I(t)), "unit2"))
    if IsUnitLoaded(unit2) then
        call UnitDamageTarget(unit1, unit2, 5, false, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNKNOWN, WEAPON_TYPE_WHOKNOWS)
    else
        call PauseTimer(t)
        call DestroyTimer(t)
        call FlushStoredMission(udg_gc, I2S(H2I(t)))
        call UnitRemoveAbility(unit2, 'B000')
    endif
    set unit1 = null
    set unit2 = null
    set t = null
endfunction

function Trig_devour_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == 'A000'
endfunction

function Trig_devour_Actions takes nothing returns nothing
    local unit unit1 = GetTriggerUnit()
    local unit unit2 = GetSpellTargetUnit()
    local timer t = CreateTimer()

    call UnitAddAbilityBJ( 'A001', unit2 )
    call SetPlayerAbilityAvailableBJ( true, 'A001', GetOwningPlayer(unit2) )
    call UnitAddItemByIdSwapped( 'I000', unit2 )
    call SetPlayerAbilityAvailableBJ( false, 'A001', GetOwningPlayer(unit2) )


    call StoreInteger(udg_gc, I2S(H2I(t)), "unit1", H2I(unit1))
    call StoreInteger(udg_gc, I2S(H2I(t)), "unit2", H2I(unit2))
    call TimerStart(t, 1, true, function Trig_devour_Timer)
    set unit1 = null
    set unit2 = null
    set t = null
endfunction

//===========================================================================
function InitTrig_devour takes nothing returns nothing
    set gg_trg_devour = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_devour, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_devour, Condition( function Trig_devour_Conditions ) )
    call TriggerAddAction( gg_trg_devour, function Trig_devour_Actions )
endfunction
[/jass]
发表于 2009-6-22 00:07:03 | 显示全部楼层
不是所有jass都能和转化成T的,而且转化了也缺乏意义

我怎么觉得是当时我写的那个多人吞噬,而且还把部分函数bj化了……我当时写的都是cj函数额……
回复

使用道具 举报

发表于 2009-6-22 10:13:44 | 显示全部楼层
这个... 如果你想直接用的话
新建一个空白的触发叫做devour

转化成文本以后把这些直接粘进去... 再修改下A000 A001 I000 B000这几项就可以了
回复

使用道具 举报

发表于 2009-6-22 10:25:35 | 显示全部楼层
话说A001难道是物品栏?
B001又是什么?

I001是啥?好奇...
回复

使用道具 举报

发表于 2009-6-22 11:16:20 | 显示全部楼层
肯定是有的
回复

使用道具 举报

发表于 2009-6-22 11:31:06 | 显示全部楼层
A001是物品栏,B001是自定义的一个buff,I001是一本含有残废技能的书
回复

使用道具 举报

阿里山慝少 该用户已被删除
发表于 2009-6-22 11:48:58 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-7-22 00:24 , Processed in 0.051234 second(s), 20 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表