找回密码
 点一下
查看: 1230|回复: 3

关于随机合成武器

[复制链接]
发表于 2010-5-10 17:26:34 | 显示全部楼层 |阅读模式
刚才自己做了一随机合武器的触发,但是[trigger]
未命名触发器 003
    事件
        单位 - 任意单位 获得物品
    条件
        ((触发单位) 拥有 攻击之爪 +15) 等于 TRUE
        ((触发单位) 拥有 死亡面罩) 等于 TRUE
        ((触发单位) 拥有 科勒恩的逃脱匕首) 等于 TRUE
    动作
        物品 - 删除 ((触发单位) 所持有的 攻击之爪 +15)
        物品 - 删除 ((触发单位) 所持有的 死亡面罩)
        物品 - 删除 ((触发单位) 所持有的 科勒恩的逃脱匕首)
        自定义代码: call suiji()
[/trigger]
function suiji takes nothing returns nothing
    call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ratf') )
    call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'modt') )
    call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'desc') )
     if  ( GetRandomInt(1, 3) == 1 ) then
        call UnitAddItemByIdSwapped( 'ankh', GetTriggerUnit() )
    elseif ( GetRandomInt(1, 3) == 2) then
    call UnitAddItemByIdSwapped( 'kysn', GetTriggerUnit() )
    elseif ( GetRandomInt(1, 3) == 3) then
        call UnitAddItemByIdSwapped( 'ofro', GetTriggerUnit() )
    else
        call DoNothing(  )
    endif
    call BJDebugMsg( "TRIGSTR_012" )
endfunction  没办法,后面的触发不会用T写,就只能用JASS写,谁帮我把它用T写出来呢??

这样做触发有点不论不类啊!
 楼主| 发表于 2010-5-10 18:50:09 | 显示全部楼层
清一色的T很好看啊!!
回复

使用道具 举报

发表于 2010-5-10 19:35:46 | 显示全部楼层
好看又不顶用= =
回复

使用道具 举报

发表于 2010-5-10 22:07:04 | 显示全部楼层
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ratf') )
    call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'modt') )
    call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'desc') )

这几句 有啥子用
哥竟然看懂了J

----------- 帖子于 22:07 更新 --------- 之前内容发布于 22:03 ------------

哥考证了一下,果然是重复了。
而且,貌似这个用J
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-7-7 15:24 , Processed in 0.037969 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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