• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

JASS tags bug

Status
Not open for further replies.
Level 11
Joined
Feb 18, 2004
Messages
394
JASS:
struct extends interface needs library requires scope defaults uses static method
:< no vJASS for THW :<

    <-- that is a tab, but not 4 spaces wide. (Conversion to 4 spaces plox)
    debug function <-- come on! thats not even vJASS!

again

with

the

line

spacing

issue

:<
Really, I must say, the
JASS:
 tags here truly do fall short in so many ways. Lets hope Ralle can adress all my concerns with the [code=jass] tags! :3
 
Last edited by a moderator:

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,188
The tab thing can not be classed as a bug, as normally you can not input tabs into your browser as it is by default the skip button that goes to another object that you can interact with.

The lack of support for blank lines is a bug however that should eventually be fixed, I have knowen about this for ages but at the time development of the tags stopped so it never was corrected.

vJASS support is not really required since although it would be nice, 90% or more of all inputted code is normal JASS and so it may not be worth the extra work.

I also say the ability for auto indent that the tags at WC3search had would be nice in them. However as configurable option so as to enable people to choose weather they want auto indent or not.
 
Level 20
Joined
Apr 22, 2007
Messages
1,960
Please add vJass support. Here's the list of syntax you'd need to cover:
JASS:
struct endstruct
interface endinterface
debug
library endlibrary
requires
needs
uses
scope endscope
method endmethod
defaults
private
public
static
operator
keyword
readonly
initializer
All of the above would be bold styled.

JASS:
//! This is a preprocessor comment
The above line should be bold and grey.

Please add this if possible! :<
 
Last edited by a moderator:
Level 11
Joined
Aug 25, 2006
Messages
971
TESH is over ratted, it does crap all. Well that is atleast what I have seen it do.
I'm sorry, I don't quite get your meaning there. TESH isn't really overrated. It works great. If your using an external skin it may not work correctly. It actually has more features then Jasscraft and its in WE, what more could you want. (Besides vJASS!)
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,188
Well I am running english TFT on a swiss XP computer. But still I did everything it says and it does not work.

Even when I run it outside JNGP it comes up with some error saying a .dll can not be found and even if its right next to the file or anywhere else it can possiably look for it. I say bad programming of the utility that I can not locate vital components some times.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
One more thing with Jass Tags
When I copy
JASS:
LoL
LoL
it coppies as LoL LoL
make it copy
LoL
LoL

(I know I can copy from Quote but SHOULD BE FIXED)
 
Last edited by a moderator:
Level 15
Joined
Jun 28, 2007
Messages
1,424
I accept your chanenge
TASTE COMON J

JASS:
//===========================================================================

// 

// Just another Warcraft III map

// 

//   Warcraft III map script

//   Generated by the Warcraft III World Editor

//   Date: Sat Nov 17 17:36:47 2007

//   Map Author: Unknown

// 

//===========================================================================



//***************************************************************************

//*

//*  Global Variables

//*

//***************************************************************************



globals

    // Generated

    trigger                 gg_trg_Instructions        = null

    trigger                 gg_trg_DragDropCombine     = null

    trigger                 gg_trg_Weapons             = null

    trigger                 gg_trg_Initialization      = null

endglobals



function InitGlobals takes nothing returns nothing

endfunction



//***************************************************************************

//*

//*  Items

//*

//***************************************************************************



function CreateAllItems takes nothing returns nothing

    local integer itemID



    call CreateItem( 'FC0A', 129.3, 235.8 )

    call CreateItem( 'FC0A', 222.8, 169.3 )

    call CreateItem( 'FC0B', 225.2, -81.9 )

    call CreateItem( 'FC0B', 217.4, 54.8 )

    call CreateItem( 'PL00', 267.5, 239.3 )

    call CreateItem( 'PL00', -49.2, 302.2 )

    call CreateItem( 'PL10', 62.4, 306.6 )

    call CreateItem( 'PL20', 193.5, 304.6 )

endfunction



//***************************************************************************

//*

//*  Unit Creation

//*

//***************************************************************************



//===========================================================================

function CreateUnitsForPlayer0 takes nothing returns nothing

    local player p = Player(0)

    local unit u

    local integer unitID

    local trigger t

    local real life



    set u = CreateUnit( p, 'Hblm', 7.9, 5.3, 30.851 )

endfunction



//===========================================================================

function CreatePlayerBuildings takes nothing returns nothing

endfunction



//===========================================================================

function CreatePlayerUnits takes nothing returns nothing

    call CreateUnitsForPlayer0(  )

endfunction



//===========================================================================

function CreateAllUnits takes nothing returns nothing

    call CreatePlayerBuildings(  )

    call CreatePlayerUnits(  )

endfunction



//***************************************************************************

//*

//*  Custom Script Code

//*

//***************************************************************************

//TESH.scrollpos=0

//TESH.alwaysfold=0



//***************************************************************************

//*

//*  Triggers

//*

//***************************************************************************



//===========================================================================

// Trigger: DragDropCombine

//===========================================================================

//TESH.scrollpos=36

//TESH.alwaysfold=0

library DragDropCombine initializer Init

    globals

        private trigger t

        private gamecache g

    endglobals



    //===============================================================================================

    function SetDragDropCombo takes integer itemid, integer gem, integer result returns nothing

        call StoreInteger(g,I2S(gem),I2S(itemid),result)

    endfunction



    //===============================================================================================

    function SetDragDropComboDouble takes integer i1, integer i2, integer result returns nothing

     local string k1=I2S(i1)

     local string k2=I2S(i2)

        call StoreInteger(g,k1,k2,result)

        call StoreInteger(g,k2,k1,result)

     set g=null

    endfunction



    //===============================================================================================

    function SetDragDropSound takes integer itemid, string soundpath returns nothing

        call StoreString(g,"sounds",I2S(itemid),soundpath)

    endfunction



    //===============================================================================================

    private function Trig_DragDropCombine_Conditions takes nothing returns boolean

     local integer i=GetIssuedOrderId()

        return (i>=852002) and (i<=852007)

    endfunction



    //===============================================================================================

    private function Trig_DragDropCombine_Actions takes nothing returns nothing

     local integer i=GetIssuedOrderId()-852002

     local unit u=GetTriggerUnit()

     local item it=GetOrderTargetItem()

     local item ot=UnitItemInSlot(u,i)

     local string k1=I2S(GetItemTypeId(it))

     local string k2

     local sound snd

        if HaveStoredString(g,"sounds",k1) then

            set snd=CreateSound(GetStoredString(g,"sounds",k1), false, false, true, 12700, 12700, "")

            if GetLocalPlayer()==GetOwningPlayer(u) then

                call StartSound(snd)

            endif

            call KillSoundWhenDone(snd)

           set snd=null

        endif

        if (ot!=null) then

            set k2=I2S(GetItemTypeId(ot))

            if HaveStoredInteger(g,k1,k2) then

                call RemoveItem(it)

                call RemoveItem(ot)

                call UnitAddItemToSlotById(u,GetStoredInteger(g,k1,k2), i)

            endif

        endif

     set u=null

     set it=null

     set ot=null

     set g=null

    endfunction



    private function Init takes nothing returns nothing

     set t = CreateTrigger(  )

     set g = InitGameCache("dragdropcombo.vx")

        call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )

        call TriggerAddCondition(t, Condition( function Trig_DragDropCombine_Conditions ) )

        call TriggerAddAction(t, function Trig_DragDropCombine_Actions )

    endfunction

endlibrary//===========================================================================

// Trigger: Weapons

//===========================================================================

//TESH.scrollpos=0

//TESH.alwaysfold=0

library Weapons initializer Init requires DragDropCombine

    globals

    

    endglobals

    

    private function Init takes nothing returns nothing

        call SetDragDropCombo('PL00','FC0A','PL0A')

        call SetDragDropCombo('PL00','FC0B','PL0B')

    endfunction

endlibrary//===========================================================================

// Trigger: Initialization

//

// Default melee game initialization for all players

//===========================================================================

function Trig_Initialization_Actions takes nothing returns nothing

endfunction



//===========================================================================

function InitTrig_Initialization takes nothing returns nothing

    set gg_trg_Initialization = CreateTrigger(  )

    call TriggerAddAction( gg_trg_Initialization, function Trig_Initialization_Actions )

endfunction



//===========================================================================

function InitCustomTriggers takes nothing returns nothing

    call InitTrig_DragDropCombine(  )

    call InitTrig_Weapons(  )

    call InitTrig_Initialization(  )

endfunction



//===========================================================================

function RunInitializationTriggers takes nothing returns nothing

    call ConditionalTriggerExecute( gg_trg_Initialization )

endfunction



//***************************************************************************

//*

//*  Players

//*

//***************************************************************************



function InitCustomPlayerSlots takes nothing returns nothing



    // Player 0

    call SetPlayerStartLocation( Player(0), 0 )

    call SetPlayerColor( Player(0), ConvertPlayerColor(0) )

    call SetPlayerRacePreference( Player(0), RACE_PREF_HUMAN )

    call SetPlayerRaceSelectable( Player(0), true )

    call SetPlayerController( Player(0), MAP_CONTROL_USER )



endfunction



function InitCustomTeams takes nothing returns nothing

    // Force: TRIGSTR_006

    call SetPlayerTeam( Player(0), 0 )



endfunction



//***************************************************************************

//*

//*  Main Initialization

//*

//***************************************************************************



//===========================================================================

function main takes nothing returns nothing

    call SetCameraBounds( -3328.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), -3584.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 3328.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 3072.0 - GetCameraMargin(CAMERA_MARGIN_TOP), -3328.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 3072.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 3328.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), -3584.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM) )

    call SetDayNightModels( "Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl", "Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl" )

    call NewSoundEnvironment( "Default" )

    call SetAmbientDaySound( "VillageDay" )

    call SetAmbientNightSound( "VillageNight" )

    call SetMapMusic( "Music", true, 0 )

    call CreateAllItems(  )

    call CreateAllUnits(  )

    call InitBlizzard(  )

    call InitGlobals(  )

    call InitCustomTriggers(  )

    call RunInitializationTriggers(  )



endfunction



//***************************************************************************

//*

//*  Map Configuration

//*

//***************************************************************************



function config takes nothing returns nothing

    call SetMapName( "TRIGSTR_001" )

    call SetMapDescription( "TRIGSTR_003" )

    call SetPlayers( 1 )

    call SetTeams( 1 )

    call SetGamePlacement( MAP_PLACEMENT_USE_MAP_SETTINGS )



    call DefineStartLocation( 0, 0.0, 0.0 )



    // Player setup

    call InitCustomPlayerSlots(  )

    call SetPlayerSlotAvailable( Player(0), MAP_CONTROL_USER )

    call InitGenericPlayerSlots(  )

endfunction
JASS:
//===========================================================================

// 

// Just another Warcraft III map

// 

//   Warcraft III map script

//   Generated by the Warcraft III World Editor

//   Date: Sat Nov 17 17:36:47 2007

//   Map Author: Unknown

// 

//===========================================================================



//***************************************************************************

//*

//*  Global Variables

//*

//***************************************************************************



globals

    // Generated

    trigger                 gg_trg_Instructions        = null

    trigger                 gg_trg_DragDropCombine     = null

    trigger                 gg_trg_Weapons             = null

    trigger                 gg_trg_Initialization      = null

endglobals



function InitGlobals takes nothing returns nothing

endfunction



//***************************************************************************

//*

//*  Items

//*

//***************************************************************************



function CreateAllItems takes nothing returns nothing

    local integer itemID



    call CreateItem( 'FC0A', 129.3, 235.8 )

    call CreateItem( 'FC0A', 222.8, 169.3 )

    call CreateItem( 'FC0B', 225.2, -81.9 )

    call CreateItem( 'FC0B', 217.4, 54.8 )

    call CreateItem( 'PL00', 267.5, 239.3 )

    call CreateItem( 'PL00', -49.2, 302.2 )

    call CreateItem( 'PL10', 62.4, 306.6 )

    call CreateItem( 'PL20', 193.5, 304.6 )

endfunction



//***************************************************************************

//*

//*  Unit Creation

//*

//***************************************************************************



//===========================================================================

function CreateUnitsForPlayer0 takes nothing returns nothing

    local player p = Player(0)

    local unit u

    local integer unitID

    local trigger t

    local real life



    set u = CreateUnit( p, 'Hblm', 7.9, 5.3, 30.851 )

endfunction



//===========================================================================

function CreatePlayerBuildings takes nothing returns nothing

endfunction



//===========================================================================

function CreatePlayerUnits takes nothing returns nothing

    call CreateUnitsForPlayer0(  )

endfunction



//===========================================================================

function CreateAllUnits takes nothing returns nothing

    call CreatePlayerBuildings(  )

    call CreatePlayerUnits(  )

endfunction



//***************************************************************************

//*

//*  Custom Script Code

//*

//***************************************************************************

//TESH.scrollpos=0

//TESH.alwaysfold=0



//***************************************************************************

//*

//*  Triggers

//*

//***************************************************************************



//===========================================================================

// Trigger: DragDropCombine

//===========================================================================

//TESH.scrollpos=36

//TESH.alwaysfold=0

library DragDropCombine initializer Init

    globals

        private trigger t

        private gamecache g

    endglobals



    //===============================================================================================

    function SetDragDropCombo takes integer itemid, integer gem, integer result returns nothing

        call StoreInteger(g,I2S(gem),I2S(itemid),result)

    endfunction



    //===============================================================================================

    function SetDragDropComboDouble takes integer i1, integer i2, integer result returns nothing

     local string k1=I2S(i1)

     local string k2=I2S(i2)

        call StoreInteger(g,k1,k2,result)

        call StoreInteger(g,k2,k1,result)

     set g=null

    endfunction



    //===============================================================================================

    function SetDragDropSound takes integer itemid, string soundpath returns nothing

        call StoreString(g,"sounds",I2S(itemid),soundpath)

    endfunction



    //===============================================================================================

    private function Trig_DragDropCombine_Conditions takes nothing returns boolean

     local integer i=GetIssuedOrderId()

        return (i>=852002) and (i<=852007)

    endfunction



    //===============================================================================================

    private function Trig_DragDropCombine_Actions takes nothing returns nothing

     local integer i=GetIssuedOrderId()-852002

     local unit u=GetTriggerUnit()

     local item it=GetOrderTargetItem()

     local item ot=UnitItemInSlot(u,i)

     local string k1=I2S(GetItemTypeId(it))

     local string k2

     local sound snd

        if HaveStoredString(g,"sounds",k1) then

            set snd=CreateSound(GetStoredString(g,"sounds",k1), false, false, true, 12700, 12700, "")

            if GetLocalPlayer()==GetOwningPlayer(u) then

                call StartSound(snd)

            endif

            call KillSoundWhenDone(snd)

           set snd=null

        endif

        if (ot!=null) then

            set k2=I2S(GetItemTypeId(ot))

            if HaveStoredInteger(g,k1,k2) then

                call RemoveItem(it)

                call RemoveItem(ot)

                call UnitAddItemToSlotById(u,GetStoredInteger(g,k1,k2), i)

            endif

        endif

     set u=null

     set it=null

     set ot=null

     set g=null

    endfunction



    private function Init takes nothing returns nothing

     set t = CreateTrigger(  )

     set g = InitGameCache("dragdropcombo.vx")

        call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )

        call TriggerAddCondition(t, Condition( function Trig_DragDropCombine_Conditions ) )

        call TriggerAddAction(t, function Trig_DragDropCombine_Actions )

    endfunction

endlibrary//===========================================================================

// Trigger: Weapons

//===========================================================================

//TESH.scrollpos=0

//TESH.alwaysfold=0

library Weapons initializer Init requires DragDropCombine

    globals

    

    endglobals

    

    private function Init takes nothing returns nothing

        call SetDragDropCombo('PL00','FC0A','PL0A')

        call SetDragDropCombo('PL00','FC0B','PL0B')

    endfunction

endlibrary//===========================================================================

// Trigger: Initialization

//

// Default melee game initialization for all players

//===========================================================================

function Trig_Initialization_Actions takes nothing returns nothing

endfunction



//===========================================================================

function InitTrig_Initialization takes nothing returns nothing

    set gg_trg_Initialization = CreateTrigger(  )

    call TriggerAddAction( gg_trg_Initialization, function Trig_Initialization_Actions )

endfunction



//===========================================================================

function InitCustomTriggers takes nothing returns nothing

    call InitTrig_DragDropCombine(  )

    call InitTrig_Weapons(  )

    call InitTrig_Initialization(  )

endfunction



//===========================================================================

function RunInitializationTriggers takes nothing returns nothing

    call ConditionalTriggerExecute( gg_trg_Initialization )

endfunction



//***************************************************************************

//*

//*  Players

//*

//***************************************************************************



function InitCustomPlayerSlots takes nothing returns nothing



    // Player 0

    call SetPlayerStartLocation( Player(0), 0 )

    call SetPlayerColor( Player(0), ConvertPlayerColor(0) )

    call SetPlayerRacePreference( Player(0), RACE_PREF_HUMAN )

    call SetPlayerRaceSelectable( Player(0), true )

    call SetPlayerController( Player(0), MAP_CONTROL_USER )



endfunction



function InitCustomTeams takes nothing returns nothing

    // Force: TRIGSTR_006

    call SetPlayerTeam( Player(0), 0 )



endfunction



//***************************************************************************

//*

//*  Main Initialization

//*

//***************************************************************************



//===========================================================================

function main takes nothing returns nothing

    call SetCameraBounds( -3328.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), -3584.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 3328.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 3072.0 - GetCameraMargin(CAMERA_MARGIN_TOP), -3328.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 3072.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 3328.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), -3584.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM) )

    call SetDayNightModels( "Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl", "Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl" )

    call NewSoundEnvironment( "Default" )

    call SetAmbientDaySound( "VillageDay" )

    call SetAmbientNightSound( "VillageNight" )

    call SetMapMusic( "Music", true, 0 )

    call CreateAllItems(  )

    call CreateAllUnits(  )

    call InitBlizzard(  )

    call InitGlobals(  )

    call InitCustomTriggers(  )

    call RunInitializationTriggers(  )



endfunction



//***************************************************************************

//*

//*  Map Configuration

//*

//***************************************************************************



function config takes nothing returns nothing

    call SetMapName( "TRIGSTR_001" )

    call SetMapDescription( "TRIGSTR_003" )

    call SetPlayers( 1 )

    call SetTeams( 1 )

    call SetGamePlacement( MAP_PLACEMENT_USE_MAP_SETTINGS )



    call DefineStartLocation( 0, 0.0, 0.0 )



    // Player setup

    call InitCustomPlayerSlots(  )

    call SetPlayerSlotAvailable( Player(0), MAP_CONTROL_USER )

    call InitGenericPlayerSlots(  )

endfunction
 
Level 32
Joined
Oct 23, 2006
Messages
5,291
Outstanding bug extermination Chieftain!

JASS:
//===================================
//Spell: Cluster Bombs
//Author: paskovich
//
//If you want to import this spell,
//make sure you copy the dummy units
//from the object editor,
//and set the raw codes below!
//
//For damage values, copy and edit
//the 'Cluster Damage' ability.
//
//It uses the Handle Vars and 
//     REQUIRES vJASS!!
//
//Thanks to Shadow1500 for the
//parabola function!
//
//
//Don't forget to give a credit!
//===================================

//=============RAW CODES=============
//Make sure you set the proper raw codes!

constant function ClusterBombs_SpellId takes nothing returns integer
    return 'A000' //The main ability's raw code
endfunction

constant function ClusterBombs_DummyId takes nothing returns integer
    return 'e000' //The generic dummy's raw code
endfunction

constant function ClusterBombs_AoEDamageAbility takes nothing returns integer
    return 'A001' //The AoE damage ability's raw code (it's called "Cluster Damage" in the object editor)
endfunction


//===========SPELL OPTIONS===========

constant function ClusterBombs_NumberOfBombs takes integer level returns integer
    return 1 + level //This defines the number of bombs falling from the sky.
endfunction

constant function ClusterBombs_NumberOfClusters takes nothing returns integer
    return 3 //The number of clusters that a bomb falls apart to.
endfunction

constant function ClusterBombs_AoE takes nothing returns real
    return 500.0 //The radius of the AoE. (Set this the same that you set in the object editor for the hero ability.)
endfunction

constant function ClusterBombs_Delay takes nothing returns real
    return 0.9 //The delay time between falling bombs.
endfunction

//=======================================
//============CLUSTER BOMBS==============
//=======================================
struct ClusterBombData
    unit c
    unit p
    real tx
    real ty
    real ang
    real dist
    real mdist
endstruct

function Trig_ClusterBomb_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == ClusterBombs_SpellId()
endfunction

function Timer_ClusterBombSplinter takes nothing returns nothing
    local timer t = GetExpiredTimer()
    local ClusterBombData dat3 = ClusterBombData(GetHandleInt(t,"data3"))
    local unit s = dat3.p
    local real a = dat3.ang
    local real h = GetParabolaHeight(dat3.dist, dat3.mdist, 1)
    local real offset = ClusterBombs_AoE() / 28
    call SetUnitX(s, GetUnitX(s)+offset*Cos(a*bj_DEGTORAD))
    call SetUnitY(s, GetUnitY(s)+offset*Sin(a*bj_DEGTORAD))
    call SetUnitFlyHeight(s,h,0)
    set dat3.dist = dat3.dist + offset
    if dat3.dist >= dat3.mdist then
        call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Incinerate\\FireLordDeathExplode.mdl",GetUnitX(s),GetUnitY(s)))
        call KillUnit(s)
        call PauseTimer(t)
        call FlushHandleLocals(t)
        call DestroyTimer(t)
        call ClusterBombData.destroy(dat3)
    endif
    set t = null
    set s = null
endfunction

function Timer_ClusterBombFall takes nothing returns nothing
    local timer t = GetExpiredTimer()
    local ClusterBombData dat2 = ClusterBombData(GetHandleInt(t,"data2"))
    local ClusterBombData dat3
    local unit b = null
    local real a = 0
    local timer tt = null
    local unit s = null
    local real offset = ClusterBombs_AoE() / 25
    if dat2.dist >= dat2.mdist then
        set b = dat2.p
        set a = dat2.ang
        call ShowUnit(b,true)
        call SetUnitX(b, GetUnitX(b) + offset * Cos(a*bj_DEGTORAD))
        call SetUnitY(b, GetUnitY(b) + offset * Sin(a*bj_DEGTORAD))
        call SetUnitFlyHeight(b, GetUnitFlyHeight(b) - 60, 0)
        if GetUnitFlyHeight(b) <= 40 then
            call PauseTimer(t)
            call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\LordofFlameMissile\\LordofFlameMissile.mdl",GetUnitX(b),GetUnitY(b)))
            set a = 0
            loop
                set a = a + 1
                exitwhen a > ClusterBombs_NumberOfClusters()
                set s = CreateUnit(GetOwningPlayer(b),ClusterBombs_DummyId(),GetUnitX(b),GetUnitY(b),0)
                call AddSpecialEffectTarget("abilities\\weapons\\DemolisherMissile\\DemolisherMissile.mdl",s,"origin")
                call UnitAddAbility(s, ClusterBombs_AoEDamageAbility())
                call SetUnitScale(s, 0.5, 0.5, 0.5)
                set tt = CreateTimer()
                set dat3 = ClusterBombData.create()
                set dat3.p = s
                set dat3.ang = GetRandomReal(1,360)
                set dat3.dist = 0
                set dat3.mdist = GetRandomReal(ClusterBombs_AoE()/8,ClusterBombs_AoE()/1.8)
                call SetHandleInt(tt,"data3",dat3)
                call TimerStart(tt, 0.04, true, function Timer_ClusterBombSplinter)
                set tt = null
            endloop
            call RemoveUnit(b)
            call FlushHandleLocals(t)
            call DestroyTimer(t)
            call ClusterBombData.destroy(dat2)
        endif
    else
        set dat2.dist = dat2.dist + 0.04
    endif
    set t = null
    set b = null
endfunction

function Timer_ClusterBombFlash takes nothing returns nothing
    local timer t = GetExpiredTimer()
    local ClusterBombData dat = ClusterBombData(GetHandleInt(t,"data"))
    local ClusterBombData dat2
    local unit u = dat.c
    local unit p = dat.p
    local real a = dat.ang
    local real h = GetParabolaHeight(dat.dist, dat.mdist, 2)
    local timer tt = null
    local integer c = 0
    local real tx = 0
    local real ty = 0
    local real offset = 4 * ClusterBombs_AoE() / 57
    call SetUnitX(p, GetUnitX(p)+offset*Cos(a*bj_DEGTORAD))
    call SetUnitY(p, GetUnitY(p)+offset*Sin(a*bj_DEGTORAD))
    call SetUnitFlyHeight(p, h, 0)
    set dat.dist = dat.dist + offset
    if dat.dist >= dat.mdist then
        call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Flare\\FlareCaster.mdl",GetUnitX(p),GetUnitY(p)))
        call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Flare\\FlareTarget.mdl",GetUnitX(p),GetUnitY(p)))
        call KillUnit(p)
        loop
            set c = c + 1
            exitwhen c > ClusterBombs_NumberOfBombs(GetUnitAbilityLevel(u,ClusterBombs_SpellId()))
            set a = GetRandomReal(1,360)
            set h = GetRandomReal(ClusterBombs_AoE()/1.3,ClusterBombs_AoE()/0.66)
            set tx = dat.tx + h * Cos(a*bj_DEGTORAD)
            set ty = dat.ty + h * Sin(a*bj_DEGTORAD)
            set p = CreateUnit(GetOwningPlayer(u),ClusterBombs_DummyId(),tx,ty,a)
            call AddSpecialEffectTarget("Abilities\\Weapons\\Mortar\\MortarMissile.mdl", p, "origin")
            call SetUnitFlyHeight(p,1700,0)
            call ShowUnit(p,false)
            set tt = CreateTimer()
            set dat2 = ClusterBombData.create()
            set dat2.p = p
            set dat2.ang = a+180
            set dat2.dist = 0
            set dat2.mdist = c * ClusterBombs_Delay()
            call SetHandleInt(tt,"data2",dat2)
            call TimerStart(tt, 0.04, true, function Timer_ClusterBombFall)
            set tt = null
        endloop
        call PauseTimer(t)
        call FlushHandleLocals(t)
        call DestroyTimer(t)
        call ClusterBombData.destroy(dat)
    endif
    set t = null
    set u = null
    set p = null
endfunction

function Trig_ClusterBomb_Actions takes nothing returns nothing
    local unit u = GetTriggerUnit()
    local location l = GetSpellTargetLoc()
    local real tx = GetLocationX(l)
    local real ty = GetLocationY(l)
    local timer t = CreateTimer()
    local unit p = CreateUnit(GetOwningPlayer(u),ClusterBombs_DummyId(),GetUnitX(u),GetUnitY(u),0)
    local ClusterBombData dat = ClusterBombData.create()
    call RemoveLocation(l)
    set l = null
    call SetUnitFlyHeight(u,20,0)
    call AddSpecialEffectTarget("Abilities\\Weapons\\BloodElfMissile\\BloodElfMissile.mdl",p,"origin")
    set dat.c = u
    set dat.p = p
    set dat.tx = tx
    set dat.ty = ty
    set dat.ang = AngleBetweenPointsXY(GetUnitX(u),GetUnitY(u),tx,ty)
    set dat.dist = 0
    set dat.mdist = DistanceBetweenPointsXY(GetUnitX(u),GetUnitY(u),tx,ty)
    call SetHandleInt(t,"data",dat)
    call TimerStart(t, 0.04, true, function Timer_ClusterBombFlash)
    set u = null
    set t = null
    set p = null
endfunction

//===========================================================================
function InitTrig_ClusterBomb takes nothing returns nothing
    set gg_trg_ClusterBomb = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(gg_trg_ClusterBomb, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(gg_trg_ClusterBomb, Condition( function Trig_ClusterBomb_Conditions))
    call TriggerAddAction(gg_trg_ClusterBomb, function Trig_ClusterBomb_Actions)
    call RemoveUnit(CreateUnit(Player(15),ClusterBombs_DummyId(),0,0,0))
    call Preload("Abilities\\Weapons\\BloodElfMissile\\BloodElfMissile.mdl")
    call Preload("Abilities\\Weapons\\Mortar\\MortarMissile.mdl")
    call Preload("Abilities\\Spells\\Human\\Flare\\FlareCaster.mdl")
    call Preload("Abilities\\Spells\\Human\\Flare\\FlareTarget.mdl")
    call Preload("abilities\\weapons\\DemolisherMissile\\DemolisherMissile.mdl")
    call Preload("Abilities\\Weapons\\LordofFlameMissile\\LordofFlameMissile.mdl")
    call Preload("Abilities\\Spells\\Other\\Incinerate\\FireLordDeathExplode.mdl")
endfunction

» REP DUMP «
 
Level 11
Joined
Feb 18, 2004
Messages
394
Problem 1
JASS:
    call Preload("Abilities\\Weapons\\LordofFlameMissile\\LordofFlameMissile.mdl")
    call Preload("Abilities\\Weapons\\LordofFlameMissile\\LordofFlameMissile.mdlmorecraptoillustrait")

Long lines wrap to two lines at a space, but scroll off the end properly without one. This also seems to happen in the edit box now. Its more annoying than a lack of proper spacing :p

Problem 2
[jass=Copied from Wolves post from quoting it] set dat2.mdist = c * ClusterBombs_Delay()
call SetHandleInt(tt,"data2",dat2)
call TimerStart(tt, 0.04, true, function Timer_ClusterBombFall)
set tt = null
endloop[/code]


[jass=Copied from Wolves post from within the compiled JASS tag] set dat2.mdist = c * ClusterBombs_Delay()
call SetHandleInt(tt,"data2",dat2)
call TimerStart(tt, 0.04, true, function Timer_ClusterBombFall)
set tt = null
endloop[/code]

the line set tt = null displays and copys without the spaces.


Problem 3
JASS:
	if true then
		loop
			if true then
				exitwhen true
			endif
		endloop
	endif

Tabs are now completely collapsed and do not display, it seems.


Problem 4

JASS:
library endlibrary
library_once endlibrary
JASS Helper Manual said:
The library_once keyword works exactly like library but you can declare the same library name twice, it would just ignore the second declaration and avoid to add its contents instead of showing a syntax error, it is useful in combination with textmacros.

Feature Request 1
JASS:
//! textmacro
//! endtextmacro
Preprocessor comments highlighted differently than normal comments plox.


Feature Request 2
JASS:
//code
//code

[code=jass]
//code
//code
[/code]

JASS:
//code
//code

[code=jass]//code
//code[/code]

Would be nice if both compiled to the same thing. The first example displays with an additional line at the top.


Misc.

Firefox version 2.0.0.12 with Noscript (hiveworkshop.com is whitelisted.)
Safari (Some shitty windows version)
Opera (Too lazy to check version)

All 3 display the same.

IE 7

Displays a vertical scroll bar in the first example, cuts off the right border of the quote box, and does not center the horizontal rules. (hr) I could check 6, 5.55, 5.01, and 4 too if you care :)
 
Last edited by a moderator:
Pyritie, you can always just do this. Use ljass tags. And type whatever. Then it will stretch the page like so. But I don't think other people use the ljass tags. xP

So yeah, I guess the width should definitely be increased at least a bit.
JASS:
//! textmacro
Textmacro tags are usually gray but whatever xD I like them red anyway. :cool:

Looks awesome Ralle! +rep
 
Last edited by a moderator:
Status
Not open for further replies.
Top