Spellbook problems...

Knatten

New Member
Reaction score
7
Hello, im working on a map called Druid War (name pending, w/e).

It's a map with 2 teams of 5 players (no it's not AoS). Each player gets same hero, a druid, which has several spells in a spellbook. Then you can research some forms for the druid in a research center. Each form has it's own spellbook, with different abillitys. I'll upload the map so you can see for yourself.

So this is where my problem is. I want the spells in spellbook to level up when the druid reaches level 3, 5, 7 and so on.
So i got this trigger.

Code:
Spells lvl up Copy
    Events
        Unit - A unit Gains a level
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of (Triggering unit)) Equal to 3
            Then - Actions
                Unit - Remove |CFF00C400Skills|r - Level 1 (D) Level 1 from (Triggering unit)
                Unit - Add |CFF00C400Skills|r - Level 2 (D) Level 2 to (Triggering unit)
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of (Triggering unit)) Equal to 5
                    Then - Actions
                        Unit - Remove |CFF00C400Skills|r - Level 2 (D) Level 2 from (Triggering unit)
                        Unit - Add |CFF00C400Skills|r - Level 3 (D) Level 3 to (Triggering unit)
                    Else - Actions

It works just fine, BUT (duh), when the druid switch form, and then back to his normal ''night-elf'' form, the spellbook is level 1 again :S.
And i have no experience in Jass whatsoever.

So, anyone who has a solution to this?
Thanks for reading.

Oh, and yeah, i used Tinki3's Creep Revival System and it works great, i will credit him. Thanks alot.
 

ZiggyMcjoney

Data editor?! AAAHHHHH!
Reaction score
95
Why don't you just use Increase Level of Ability for Unit?

EDIT: Didn't read your problem correctly, sorry.

Why don't you detect when the hero shapeshifts back into the nightelf, and then set all the abilities back to their correct levels.
 

denmax

You can change this now in User CP.
Reaction score
155
That's because you did not add the spellbook again if the druid turns back...


I dun' know the origin of your skill (the original spell it is based) and if it is Storm Crow Form, then this might fix it..
Code:
Event
    Unit - A unit Is issued an order with no target
Conditions
    Issued Order Equal to Order(unravenform)
Actions
    If (All conditions are true) then do (actions) else do (Actions)
        If - Conditions
            Or (any conditions) are true)
                Level of casting unit equal to 3
                Level of casting unit equal to 4
        Then - Actions
            Unit - add skills level 2 for casting unit
..........

if this doesn't work then add a 0.00 wait..

OR SIMPLY

make a spellbook multi-leveled (it can be even with unit abilities) and set the level of the ability (unit - set ability for unit) when the hero reaches into levl 3 or 5 or etc..
 

Knatten

New Member
Reaction score
7
You mean like this? Still resets after the transform into druid form.
Code:
Spells lvl up Copy
    Events
        Unit - A unit Gains a level
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of (Triggering unit)) Equal to 3
            Then - Actions
                Unit - Set level of |CFF00C400Skills|r - Level 1 (D) Level 1 for (Triggering unit) to 2
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of (Triggering unit)) Equal to 5
                    Then - Actions
                        Unit - Set level of |CFF00C400Skills|r - Level 1 (D) Level 1 for (Triggering unit) to 3
                    Else - Actions

Edit: Ok, i will try that Denmax, the forms are based of abilitys Ravenform, Druid of Claw Bear transform and Robogoblin. And all the spellbooks are normal-unit abilitys and the spells in them too.
 

denmax

You can change this now in User CP.
Reaction score
155
Yes simply like that IF your spellbook (which is one skill) is already having at least 3 levels. If not, then there's no effect.
 

Knatten

New Member
Reaction score
7
Yep, it worked. The drood get's his spellbook at level 2 if he transforms back.
Thanks alot.

But now another question. My trigger curently looks like this.

Code:
Dbug stone Copy 3
    Events
        Unit - A unit Is issued an order with no target
    Conditions
        (Issued order) Equal to (Order(unbearform))
    Actions
        Wait 2.00 seconds
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of (Triggering unit)) Greater than or equal to 3
            Then - Actions
                Unit - Set level of |CFF00C400Skills|r - Level 1  for (Triggering unit) to 2
            Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Level of (Triggering unit)) Greater than or equal to 5
                    Then - Actions
                        Unit - Set level of |CFF00C400Skills|r - Level 1  for (Triggering unit) to 3
                    Else - Actions

The problem is that when the druid transforms back at level 5, the game checks the first possible condition right? And since the druid is higher then level 3, he gets his spellbook set at level 2, not level 3. Im sure there is an super-easy solution to this, but i cant come up with anything right now.
 

denmax

You can change this now in User CP.
Reaction score
155
Erh, move the If/then/else for level 5 out of the else for the if/then/else of level 3? Lol! Or move the level 3 on the else of the level 5
 

Knatten

New Member
Reaction score
7
Oh yeah right :D. Im feeling so dumb right now.
And also, if i have 3 conditions in 1 trigger, do they all have to be true for trigger to work or do i have to make make 3 separate triggers for each ''unform'' ?

I know that's not a big problem as i can just copy-past the trigger and edit 1 line, but thats just something i was wondering about.
 

denmax

You can change this now in User CP.
Reaction score
155
That depends, does all of the triggers have to be true or at least on of them is true?

If at least one, then use "Or - Any conditions are true". If all conditions needed, then leave it to be..

EDIT: Actually, "wait" is not MUI-ish.. You have to set the caster into a local such as..

local unit udg_<variable for unit>

Or another thing would be read MUI tuts.. Mui = Multi unit instance
 

Knatten

New Member
Reaction score
7
Ok, thanks, figured that out. But now 1 last thing. How do i make an Vicotry/Defeat condition? You see, the druids on the map are not pre-placed, they spawn 10 sec after the game is started at each players starting location. So what i want is when 1 team got no druids left, the opposite team wins.
 

Knatten

New Member
Reaction score
7
Nevermind i figured it out. Here is what i got. It works fine in single player so im gonna try it tomorrow on B.net.

Code:
Druid Spawn
    Events
        Time - Elapsed game time is 5.00 seconds
    Conditions
    Actions
        Player Group - Pick every player in (All players) and do (Unit - Create 1 Druid for (Picked player) at ((Picked player) start location) facing Default building facing (270.0) degrees)
        Player Group - Pick every player in (All allies of Player 1 (Red)) and do (Actions)
            Loop - Actions
                Unit Group - Pick every unit in (Units owned by (Picked player) of type Druid) and do (Actions)
                    Loop - Actions
                        Set team1droods = (Units in (Playable map area) owned by (Picked player))
        Player Group - Pick every player in (All allies of Player 6 (Orange)) and do (Actions)
            Loop - Actions
                Unit Group - Pick every unit in (Units owned by (Picked player) of type Druid) and do (Actions)
                    Loop - Actions
                        Set team2droods = (Units in (Playable map area) owned by (Picked player))
        Set Team1 = (All allies of Player 1 (Red))
        Set Team2 = (All allies of Player 6 (Orange))

And

Code:
Defeat team1
    Events
        Time - Every 15.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in team1droods and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Picked unit) is Dead) Equal to True
                    Then - Actions
                        Player Group - Pick every player in Team1 and do (Actions)
                            Loop - Actions
                                Game - Defeat (Picked player) with the message: Defeat!
                                Quest - Display to (All players) the Quest Update message: Team 2 is Victoriou...
                    Else - Actions

And yes im also bumping this in case someone has the same problem.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top