JASS Classroom

Status
Not open for further replies.

San-D

New Member
Reaction score
15
I wish to sign up! But I can't promise you my everyday commitment- sometimes I get "occupied" during weekends.
 

Hero

─║╣ero─
Reaction score
250
I wish to sign up! But I can't promise you my everyday commitment- sometimes I get "occupied" during weekends.

Ok I will add you soon...lemme just get my homework outta the way..and then either today or tomorrow I will post a series of assignments...to make you learn faster...and I will redo that grade chart....If you need help with anything or have any questions PM me or a teacher of post it here...you can also chat with me on MSN at [email protected]


______

Added you San-D

___________

Ok I updated the Grade Chart..it is no readable..lol

I think I may have made mistakes...If I made a mistake and gave you a grade you did not do...please tell me..I will actually be happy that you are not taking the advantage and want to learn jass...hopefully you are not wasting my time

I will add the assignments soon. (Most likely more than one at once)

___________

Code:
Assignment # 4

Create a simple spell using your knowledge on JASS. The spell does not have to be a hugely complicated spell, hence the word "Simple"

If you need help post it here...no one will steal your work that is in this class..If they do..points will be deducted..The grading is done like:

Creativity: -/5
Code: -/5

When you are done with this assignment attach the map here...I will download them and check them. When I am done checking them I will post to tell you that you may remove it so that it doesn't take space on your profile.
 

Black Hawk

New Member
Reaction score
16
Please count me out of the class because I have lost interest in Warcraft III (Man, I cant believe I just said that) and moved on to World in Conflict. (I will still keep my commitment to the Gatekeeper of Pandaria)
 

Exide

I am amazingly focused right now!
Reaction score
448
Great, a new assignment. :) I'll get on to it as soon as I get home.

>I have lost interest in Warcraft III
You'll be back.. ;)
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
>>If you need help post it here...no one will steal your work that is in this class..If they do..points will be deducted...
Ok then :
JASS:
scope StormBounce

constant function RawSB takes nothing returns integer
return 'A000'
endfunction

constant function RawSBDummy takes nothing returns integer
return 'A001'
endfunction

constant function RawDumStomer takes nothing returns integer
return 'h001'
endfunction

constant function BounceInterval takes nothing returns real
return .75 //interval before the second bounce
endfunction

constant function GetBounceTimes takes integer Lvl returns integer
return Lvl+1 //how many time to bounce
endfunction

constant function Range takes nothing returns real
return 750.00 //bounce in what range
endfunction

function SurroundCond takes nothing returns boolean
return GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>0 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)!= true and IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetSpellAbilityUnit())) != true
endfunction

function tAct takes nothing returns nothing
local timer t            = GetExpiredTimer()
local integer BounceTime = GetHandleInt(t,"bouncetime")
local integer loopCount  = 0
local integer Lvl        = GetHandleInt(t,"lvl")
local unit target        = GetHandleUnit(t,"target")
local unit caster        = GetHandleUnit(t,"caster")
local unit randomU
local unit dummy
local group Surround     = CreateGroup()
local group Randomed     = CreateGroup()

    if BounceTime >0 then
        call GroupEnumUnitsInRange(Surround,GetUnitX(target),GetUnitY(target),Range(),Condition(function SurroundCond))
            loop
            exitwhen loopCount>CountUnitsInGroup(Surround)
                set Randomed = GetRandomSubGroup(1,Surround)
                set randomU  = FirstOfGroup(Randomed)
                    if IsUnitAlly(randomU,GetOwningPlayer(caster)) == false and randomU != target then
                        set loopCount = 8191
                    elseif IsUnitAlly(randomU,GetOwningPlayer(caster)) == true then
                        call DestroyGroup(Randomed)
                    endif
                set loopCount = loopCount + 1
            endloop
        set dummy = CreateUnit(GetOwningPlayer(caster),RawDumStomer(),GetUnitX(target),GetUnitY(target),270)
        call UnitApplyTimedLife(dummy,'BTLF',1.2)
        call UnitAddAbility(dummy,RawSBDummy())
        call SetUnitAbilityLevel(dummy,RawSBDummy(),Lvl)
        call IssueTargetOrder(dummy,"thunderbolt",randomU)
        call SetHandleHandle(t,"target",randomU)
        call SetHandleInt(t,"bouncetime",BounceTime-1)
    elseif BounceTime<= 0 then
        call PauseTimer(t)
        call FlushHandleLocals(t)
        call DestroyTimer(t)
    endif
    
    call DestroyGroup(Surround)
    call DestroyGroup(Randomed)
    set t = null
    set target = null
    set randomU = null
    set dummy = null
    set caster = null
    set Surround = null
    set Randomed = null
endfunction

function SBCond takes nothing returns boolean
return GetSpellAbilityId() == RawSB()
endfunction

function Trig_Storm_Bounce_Actions takes nothing returns nothing
local timer t     = CreateTimer()
local unit caster = GetSpellAbilityUnit()
local unit target = GetSpellTargetUnit()
local integer Lvl = GetUnitAbilityLevel(caster,RawSB())
local integer BounceTime = GetBounceTimes(Lvl)
    call SetHandleHandle(t,"target",target)
    call SetHandleHandle(t,"caster",caster)
    call SetHandleInt(t,"bouncetime",BounceTime)
    call SetHandleInt(t,"lvl",Lvl)
    call TimerStart(t,BounceInterval(),true,function tAct)
set t = null
set caster = null
set target = null
endfunction

//===========================================================================
function InitTrig_Storm_Bounce takes nothing returns nothing
    set gg_trg_Storm_Bounce = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ(gg_trg_Storm_Bounce, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(gg_trg_Storm_Bounce, Condition(function SBCond))
    call TriggerAddAction( gg_trg_Storm_Bounce, function Trig_Storm_Bounce_Actions )
endfunction

endscope

View attachment Assignment 4.w3x
 

Exide

I am amazingly focused right now!
Reaction score
448
Done with my 4th assignment. I know, the spell sucks, but here it is anyway. :p

No fancy screenshot like ~Gals~, and the code is a bit 'too much' to put here.. Just download and see for yourself. :p

(Do notice how I added my User name to the file name, to avoid confusion - Bonus points for me, yay! :p)
 

Hero

─║╣ero─
Reaction score
250
Results:

>Gals

I loved it...so nicely written...code looks beautiful...lag-free...10/10

>Exide

It was pretty creative...The code could of used some work...for example it is possible to make those 4 triggers into 1...but yeah...other wise it was good 9/10

_______________

Since I didn't state it has to be leak free..leaks will not affect your grade...for this assignment.


_______

Updated the Table...made the first post better to our eyes. >.<
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
>>I loved it...so nicely written...code looks beautiful...lag-free...10/10
Thanks, and i am wondering..
Am I allowed to use that spell for spell submition?
I like it too :p
 

Kenoriga

Ultra Cool Member
Reaction score
34
I was wondering if I could use ~GaLs~ as a guideline... Cuz those kind of format allows for easier editting isn't it?
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
>>I was wondering if I could use ~GaLs~ as a guideline...
I don't really care of that, it is a basic format that is used by most jasser.

>>Cuz those kind of format allows for easier editting isn't it?
True.
 

Kenoriga

Ultra Cool Member
Reaction score
34
Mm kay then. Now to drink some creativity juices n thanks GaLs, I will be using yours as my guideline =x
 

Black Hawk

New Member
Reaction score
16
Great, a new assignment. :) I'll get on to it as soon as I get home.

>I have lost interest in Warcraft III
You'll be back.. ;)

I know I will, but it will take a while, as I will be modding World in Conflict as I said.
 

San-D

New Member
Reaction score
15
I have 2 questions-
1) Who is my teacher (who will I have to annoy)?
2) Do I have to do my homework from the 1st assignment?
 

Hero

─║╣ero─
Reaction score
250
I have 2 questions-
1) Who is my teacher (who will I have to annoy)?
2) Do I have to do my homework from the 1st assignment?



Read the chart in post 1...it lists all the teachers..

Yes please do all the homework so that I may see that you are improving...any problems?

PM me or another teacher or contactme via MSN
 

rodead

Active Member
Reaction score
42
Sign me in as student if it is possible!

and what program should i download to make my Jass triggers?
(i know you can convert it from GUI done it before)
 

Kenoriga

Ultra Cool Member
Reaction score
34
*away from exams*

Shall think about the 4th assignment after I complete each exam with spare time. Heh. =]
 
Status
Not open for further replies.
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top