魔兽地图吧's Archiver

shingoscar 发表于 2008-3-13 22:49

JASS高亮标签使用说明

============================================================
1、普通高亮标签
============================================================
将jass代码放入j/和/j之间即可实现高亮。
------------------------------------------------------------
例:j/function H2I takes handle h returns integer
return h
return 0
endfunction/j
------------------------------------------------------------


============================================================
2、UBB兼容标签
============================================================
将jass代码放入[jass]和[/jass]之间即可实现高亮。
------------------------------------------------------------
例:[jass]function H2I takes handle h returns integer
return h
return 0
endfunction[/jass]
------------------------------------------------------------


============================================================
3、扩展模式
============================================================
在/j之后加入特定的字母可实现高亮的扩展,这些模式包括

3.1、模式a、b、c
a:高亮common.ai中定义的函数与常数
b:高亮blizzard.j中定义的函数与常数
c:高亮common.j中定义的函数与常数
------------------------------------------------------------
例:j/function H2I takes handle h returns integer
return h
return 0
endfunction/ja
------------------------------------------------------------
例:j/function H2I takes handle h returns integer
return h
return 0
endfunction/jbc
------------------------------------------------------------

3.2、模式f
对jass代码进行自动化缩进和格式处理
------------------------------------------------------------
例:j/function H2I takes handle h returns integer
return h
return 0
endfunction/jf
------------------------------------------------------------

3.3、模式t(a bug found in this mode)
可以为jass代码用t/和/t添加标题
------------------------------------------------------------
例:j/t/这是一段jass代码/t
function H2I takes handle h returns integer
return h
return 0
endfunction/jt
------------------------------------------------------------


============================================================
4、备注
============================================================
4.1、不能在UBB兼容标签中使用扩展模式
4.2、如果无法使用某种扩展模式,可能是管理员关闭了这项功能
4.3、目前jass高亮标签只能在讨论区,AI区,和JASS区使用
4.4、两种标签不得混用,不然按UBB兼容标签为主
4.5、你可以通过禁用discuz代码来禁用jass高亮
4.6、任何bug及建议请写信至shingoscar@yahoo.com.cn

feelerly 发表于 2008-3-13 23:12

很好很强大~~~先支持一下.
j/
function MyFunc takes nothing returns nothing
    if IsPlayerOnLine(feelerly) then
        call Debug("You see it like ghost!")
    endif
endfunction
/j

shingoscar 发表于 2008-3-13 23:14

function MyFunc takes nothing returns nothing
if IsPlayerOnLine(feelerly) then
call Debug("You see it like ghost!")
endif
endfunction
===自动格式===>
j/function MyFunc takes nothing returns nothing
if IsPlayerOnLine(feelerly) then
call Debug("You see it like ghost!")
endif
endfunction/jf

feelerly 发表于 2008-4-12 18:18

CJ、BJ、AI可以高亮了?
[jass]
function StartTimer takes timer whichTimer, real duration, boolean flag returns timer
    set bj_lastStartedTimer = t
    call TimerStart( bj_lastStartedTimer, duration, flag, null )
    return bj_lastStartedTimer
endfunction
[/jass]

shingoscar 发表于 2008-4-12 21:04

你不会用。。。。
j/function Trig_bn_Actions takes nothing returns nothing
    local location p = GetRectCenter(GetPlayableMapRect())
    call CreateNUnitsAtLoc( 1, 'hgyr', Player(PLAYER_NEUTRAL_AGGRESSIVE), p, bj_UNIT_FACING )
    call TriggerSleepAction( 0.5 )
    call KillUnit( GetLastCreatedUnit() )
endfunction

//===========================================================================
function InitTrig_bn takes nothing returns nothing
    set gg_trg_bn = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_bn, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddAction( gg_trg_bn, function Trig_bn_Actions )
endfunction/jbc

[[i] 本帖最后由 shingoscar 于 2008-4-12 21:12 编辑 [/i]]

everguo 发表于 2008-4-22 16:54

[jass]function f2 takes nothing returns nothing
    call TriggerSleepAction(10.00)  //f2做等待10秒的动作
     call BJDebugMsg("f2 called")        
endfunction [/jass]

[[i] 本帖最后由 everguo 于 2008-4-22 17:00 编辑 [/i]]

libla 发表于 2008-4-23 01:16

j/struct unit
{
real life;
real mana;
real x;
real y;
}/jf

thodylk 发表于 2008-4-23 08:39

[jass]
void main()
{
      if((int a=0)>-1)
      {
            return;
      }
      return;
}
[/jass]
[jass]
void main()
{
      if((int a=0)>-1)
      {
            return;
      }
      return;
}
[/jass]
[jass]
void main()
{
      if((int a=0)>-1)
      {
            return;
      }
      return;
}
[/jass]
[jass]
void main()
{
      if((int a=0)>-1)
      {
            return;
      }
      return;
}
[/jass]
我看下多几个标签行不?

[[i] 本帖最后由 thodylk 于 2008-4-23 08:42 编辑 [/i]]

shingoscar 发表于 2008-4-27 14:41

vjass并不属于jass的标准语法,所以不予支持

艾萨拉女王 发表于 2008-5-6 17:49

搜索一次居然也要智力。。。。。。。。

lina 发表于 2008-5-17 12:45

[jass]call GetLastCreatedUnit()
local integer x[/jass]
哈哈,终于会用了。

[[i] 本帖最后由 lina 于 2008-5-17 12:55 编辑 [/i]]

zmllzbh 发表于 2008-7-5 22:40

[jass]function H2I takes handle h returns integer
return h
return 0
endfunction[/jass]

popoyungao 发表于 2008-10-16 23:08

[code][jass]function H2I takes handle h returns integer
return h
return 0
endfunction[/jass] [/quote][/code][jass]function H2I takes handle h returns integer
return h
return 0
endfunction[/jass] [/quote][code]j/function H2I takes handle h returns integer
return h
return 0
endfunction/j
[/code]

[[i] 本帖最后由 popoyungao 于 2008-10-16 23:15 编辑 [/i]]

嗜血魂K 发表于 2008-10-30 13:41

[jass]
funcion 59546 takes handle abc returns integer
return abc
return 0
endfunction [/jass]
//////////////////////////////////////////
[jass]
function 59546j takes nothing return nothing
call call 59546(GetLastCreatedUnit) [/jass]

[[i] 本帖最后由 嗜血魂K 于 2008-10-30 13:43 编辑 [/i]]

alexloco 发表于 2008-11-7 20:45

j/ function see takes nothing returns nothing
         local  string         saw = "I have been seen you somewhere~"
         local  unit            you  = GetTriggerUnit()
         local  unit             i      =  GetSpellTargetUnit()
        call  UnitSpeak2Unit(i,you,saw)
endfunction /jabc

咖喱 发表于 2009-1-6 21:24

天书好长,一个字也看不懂(葱头:57)

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.