找回密码
 点一下
楼主: ogura

技能效果:+25%攻击力/500点血 (区域)

[复制链接]
发表于 2015-2-12 15:45:24 | 显示全部楼层
RoyalFlare 发表于 2015-2-11 20:17
@疯人¢衰人 YDWE保存地图时出现预处理器编辑错误 弹出1串的错误代码,是什麽原因造成的?
我就是在地图里使 ...

对YDWE不了解,不弄WE很多年,
如果它依然使用了JassHelper作为预处理软件
你看看更新下jassHelper?

另外你确定自己写的代码无问题?
回复

使用道具 举报

发表于 2015-2-12 15:46:55 | 显示全部楼层
ogura 发表于 2015-2-12 10:13
原以为一晃4,5年   早已推出神马功能强大的地图编辑器能够便利的制作加血光环呢~   唉

这是War3自身的问题,没有开放技能之下的底层的修改
想要解决问题方法只能换如SC2了
回复

使用道具 举报

发表于 2015-2-12 15:50:45 | 显示全部楼层
本帖最后由 RoyalFlare 于 2015-2-12 16:01 编辑

  1. scope KiritoAOE initializer KiritoAOE__init

  2. globals
  3. private constant real KiritoAOE__DISTANCE=18
  4. private constant real KiritoAOE__RADIUS=400
  5. private constant integer KiritoAOE__SPELLID='A012'
  6. private constant integer KiritoAOE__OODAMABALL='h0C9'
  7. private constant integer KiritoAOE__ICENOVA='h0A5'
  8. private constant integer KiritoAOE__ICENOVA1='h0A7'
  9. private constant integer KiritoAOE__EFFECTID='A0EC'
  10. private constant integer KiritoAOE__EFFECTID1='A0EB'
  11. private constant integer si__KiritoAOE__data=48
  12. private integer si__KiritoAOE__data_F=0
  13. private  integer si__KiritoAOE__data_I=0
  14. private integer array si__KiritoAOE__data_V
  15. endglobals


  16. private function s__KiritoAOE__data__allocate takes nothing returns integer
  17.     local integer this=si__KiritoAOE__data_F
  18.     if(this!=0)then
  19.         set si__KiritoAOE__data_F=si__KiritoAOE__data_V[this]
  20.     else
  21.         set si__KiritoAOE__data_I=si__KiritoAOE__data_I+1
  22.         set this=si__KiritoAOE__data_I
  23.     endif
  24.     if(this>8190)then
  25.         call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,1000.,"Unable to allocate id for an object of type: KiritoAOE__data")
  26.         return 0
  27.     endif
  28.     set si__KiritoAOE__data_V[this]=-1
  29.     return this
  30. endfunction

  31. private function s__KiritoAOE__data_deallocate takes integer this returns nothing
  32.     if this==null then
  33.         call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,1000.,"Attempt to destroy a null struct of type: KiritoAOE__data")
  34.         return
  35.     elseif(si__KiritoAOE__data_V[this]!=-1)then
  36.         call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,1000.,"Double free of type: KiritoAOE__data")
  37.         return
  38.     endif
  39.     set si__KiritoAOE__data_V[this]=si__KiritoAOE__data_F
  40.     set si__KiritoAOE__data_F=this
  41. endfunction

  42. private struct data
  43.     unit array s__KiritoAOE__data_c
  44.     real array s__KiritoAOE__data_targetx
  45.     real array s__KiritoAOE__data_targety
  46.    
  47. method function s__KiritoAOE__data_destroy takes integer this returns nothing
  48.     call UnitRemoveAbility(s__KiritoAOE__data_c[this],KiritoAOE__EFFECTID)
  49.     call UnitRemoveAbility(s__KiritoAOE__data_c[this],KiritoAOE__EFFECTID1)
  50.     call s__KiritoAOE__data_deallocate(this)
  51. endmethod

  52. static method function s__KiritoAOE__data_Boolean takes nothing returns boolean
  53.     return true
  54. endmethod

  55. static method function s__KiritoAOE__data_FinalTimer takes nothing returns nothing
  56.     local timer z=GetExpiredTimer()
  57.     local integer this=(LoadInteger(ht,0,GetHandleId((z))))
  58.     local group g
  59.     local unit v
  60.     local real a
  61.     local real r=(GetUnitAbilityLevel(s__KiritoAOE__data_c[this],KiritoAOE__SPELLID)*100)
  62. call PauseUnit(s__KiritoAOE__data_c[this],false)
  63. call SetUnitInvulnerable(s__KiritoAOE__data_c[this],false)
  64. call SetUnitPathing(s__KiritoAOE__data_c[this],true)
  65. call SetUnitTimeScale(s__KiritoAOE__data_c[this],1)
  66. call DustWave(0.4,0.12,1.0,20,s__KiritoAOE__data_targetx[this],s__KiritoAOE__data_targety[this],155,255,255,30)
  67. set g=NewGroup()
  68. call GroupEnumUnitsInRange(g,s__KiritoAOE__data_targetx[this],s__KiritoAOE__data_targety[this],KiritoAOE__RADIUS,Filter(function s__KiritoAOE__data_Boolean))
  69. loop
  70.     set v=FirstOfGroup(g)
  71.     exitwhen v==null
  72.     if FilterGeneral(s__KiritoAOE__data_c[this],v)then
  73.         set a=Angle(s__KiritoAOE__data_targetx[this],s__KiritoAOE__data_targety[this],GetUnitX(v),GetUnitY(v))
  74.         call DamageTarget(s__KiritoAOE__data_c[this],v,r,TAIJUTSU_DAMAGE)
  75.         call SlideUnitAngle(v,0,0,a,"")
  76.         call SetUnitAnimation(v,"death")
  77.     endif
  78.     call GroupRemoveUnit(g,v)
  79. endloop
  80. call ReleaseGroup(g)
  81. call SetUnitAnimation(s__KiritoAOE__data_c[this],"attack")
  82. call EffectUnitColor(s__KiritoAOE__data_c[this],s__KiritoAOE__data_targetx[this],s__KiritoAOE__data_targety[this],GetUnitFacing(s__KiritoAOE__data_c[this]),3,KiritoAOE__OODAMABALL,1,255,255,255,255)
  83. call EffectUnitColor(s__KiritoAOE__data_c[this],s__KiritoAOE__data_targetx[this],s__KiritoAOE__data_targety[this],GetUnitFacing(s__KiritoAOE__data_c[this]),2,KiritoAOE__ICENOVA,1,255,255,255,255)
  84. call EffectUnitColor(s__KiritoAOE__data_c[this],s__KiritoAOE__data_targetx[this],s__KiritoAOE__data_targety[this],GetUnitFacing(s__KiritoAOE__data_c[this]),3,KiritoAOE__ICENOVA1,1,255,255,255,255)
  85. call ReleaseTimer(z)
  86. call s__KiritoAOE__data_destroy(this)
  87. endmethod

  88. static method function s__KiritoAOE__data_TimerExpired takes nothing returns nothing
  89. local timer z=GetExpiredTimer()
  90. local integer this=(LoadInteger(ht,0,GetHandleId((z))))
  91. local real a=Angle(GetUnitX(s__KiritoAOE__data_c[this]),GetUnitY(s__KiritoAOE__data_c[this]),s__KiritoAOE__data_targetx[this],s__KiritoAOE__data_targety[this])
  92. local real x=(((GetUnitX(s__KiritoAOE__data_c[this]))*1.0)+((KiritoAOE__DISTANCE)*1.0)*Cos(((a)*1.0)*bj_DEGTORAD))
  93. local real y=(((GetUnitY(s__KiritoAOE__data_c[this]))*1.0)+((KiritoAOE__DISTANCE)*1.0)*Sin(((a)*1.0)*bj_DEGTORAD))
  94. local real r=50
  95. if IsTerrainPathable(x,y,PATHING_TYPE_FLYABILITY)==false then
  96.     call SetUnitPosition(s__KiritoAOE__data_c[this],x,y)
  97. else
  98.     call SetUnitAnimation(s__KiritoAOE__data_c[this],"attack")
  99.     call TimerStart(z,0.1,false,function s__KiritoAOE__data_FinalTimer)
  100. endif
  101. if Distance(x,y,s__KiritoAOE__data_targetx[this],s__KiritoAOE__data_targety[this])<=100 then
  102.     call SetUnitAnimation(s__KiritoAOE__data_c[this],"attack")
  103.     call TimerStart(z,0.1,false,function s__KiritoAOE__data_FinalTimer)
  104. endif
  105. endmethod

  106. static method function s__KiritoAOE__data_create takes unit caster,real x,real y returns integer
  107. local timer z=(NewTimerEx(0))
  108. local integer this=s__KiritoAOE__data__allocate()
  109. set s__KiritoAOE__data_c[this]=caster
  110. set s__KiritoAOE__data_targetx[this]=x
  111. set s__KiritoAOE__data_targety[this]=y
  112. call PauseUnit(s__KiritoAOE__data_c[this],true)
  113. call SetUnitInvulnerable(s__KiritoAOE__data_c[this],true)
  114. call SetUnitPathing(s__KiritoAOE__data_c[this],false)
  115. call SetUnitAnimationByIndex(s__KiritoAOE__data_c[this],1)
  116. call SaveInteger(ht,0,GetHandleId((z)),(this))
  117. call SetUnitAnimation(s__KiritoAOE__data_c[this],"attack")
  118. call SetUnitTimeScale(s__KiritoAOE__data_c[this],0)
  119. call UnitAddAbility(s__KiritoAOE__data_c[this],KiritoAOE__EFFECTID)
  120. call UnitAddAbility(s__KiritoAOE__data_c[this],KiritoAOE__EFFECTID1)
  121. call SoundStart("war3mapImported\\KiritoWhak2.mp3",GetUnitX(s__KiritoAOE__data_c[this]),GetUnitY(s__KiritoAOE__data_c[this]))
  122. call TimerStart(z,0.02,true,function s__KiritoAOE__data_TimerExpired)
  123. return this
  124. endmethod

  125. endstruct

  126. private function KiritoAOE__Conditions takes nothing returns boolean
  127. return GetSpellAbilityId()==KiritoAOE__SPELLID
  128. endfunction

  129. private function KiritoAOE__Actions takes nothing returns nothing
  130. call s__KiritoAOE__data_create(GetTriggerUnit(),GetSpellTargetX(),GetSpellTargetY())
  131. endfunction

  132. private function KiritoAOE__init takes nothing returns nothing
  133.     local trigger t=CreateTrigger()
  134.     local integer index=0
  135.     loop
  136.         call TriggerRegisterPlayerUnitEvent(t,Player(index),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
  137.         set index=index+1
  138.         exitwhen index==bj_MAX_PLAYER_SLOTS
  139.     endloop
  140.     call TriggerAddCondition(t,Condition(function KiritoAOE__Conditions))
  141.     call TriggerAddAction(t,function KiritoAOE__Actions)
  142.     set t=null
  143. endfunction

  144. endscope
复制代码

疯人¢衰人 不知道你还记不记得vJass的基本书写格式? 论坛没有Jass语法高亮插件就是不方便 代码1长看起来就费劲.
难道GA都没人玩vJ和cJ了?
顺便1提JassCraft不支持vJass和cJass代码的语法检查 需要检查代码只能求助于JassHelper和AdicHelper 真是无奈

点评

lo
GA已经没什么人玩魔兽了。  详情 回复 发表于 2015-2-12 16:39
回复

使用道具 举报

发表于 2015-2-12 16:39:32 | 显示全部楼层
RoyalFlare 发表于 2015-2-12 15:50
疯人¢衰人 不知道你还记不记得vJass的基本书写格式? 论坛没有Jass语法高亮插件就是不方便 代码1长看起来 ...

GA已经没什么人玩魔兽了。
回复

使用道具 举报

发表于 2015-2-21 13:24:16 | 显示全部楼层
RoyalFlare 发表于 2015-2-12 15:50
疯人¢衰人 不知道你还记不记得vJass的基本书写格式? 论坛没有Jass语法高亮插件就是不方便 代码1长看起来 ...

有支持jasshelper的JassCraft

点评

真心求附件 我习惯用JassCraft的语法高亮以后看EverEdit简直是折磨  详情 回复 发表于 2015-2-22 00:01
回复

使用道具 举报

发表于 2015-2-22 00:01:15 | 显示全部楼层
疯人¢衰人 发表于 2015-2-21 13:24
有支持jasshelper的JassCraft

真心求附件 我习惯用JassCraft的语法高亮以后看EverEdit简直是折磨
回复

使用道具 举报

发表于 2015-2-24 21:37:37 | 显示全部楼层
本帖最后由 疯人¢衰人 于 2015-2-24 21:39 编辑
RoyalFlare 发表于 2015-2-22 00:01
真心求附件 我习惯用JassCraft的语法高亮以后看EverEdit简直是折磨

http://bbs.islga.org/forum.php?mod=viewthread&tid=37188JassHelper自己换下最新的,还有CJ和BJ
回复

使用道具 举报

发表于 2015-2-24 21:49:46 | 显示全部楼层
本帖最后由 RoyalFlare 于 2015-2-24 21:51 编辑

http://home.feifeishijie.com/thread-379750-1-1.html
cJass与Zinc vJass共存演示
http://home.feifeishijie.com/thread-379717-1-1.html
YDWE编程
http://home.feifeishijie.com/thread-371621-1-1.html
Lua捕捉代码
http://home.feifeishijie.com/thread-371859-1-1.html
Lua预处理之自动申明全局变量
http://bbs.wow8.org/viewthread.php?tid=206645
WurstScript language
@疯人¢衰人 不知道你还玩WE不? 最近有不少新玩意呢~还有Wurst的新语言
回复

使用道具 举报

发表于 2015-5-7 02:08:17 | 显示全部楼层
真的不错
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-12-22 15:54 , Processed in 0.131333 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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