Dota's Hero Leveling System... how?

snmiglight

Active Member
Reaction score
3
in dota, there's a command when you typed a message will level up your hero according to the typed number, for example you typed: levelup 25, then the hero your selecting will level up according to the number specified... how is it coded? thanks in advance .
 

istar

New Member
Reaction score
31
event-player types -lvl as substring
action-set all hero belonging to player to StringtoInteger(substring of chat message 6,8)
something like that, i forgot the syntax
 

Tom_Kazansky

--- wraith it ! ---
Reaction score
157
Trigger:
  • Level Up
    • Events
      • Player - Player 1 (Red) types a chat message containing -lvl as A substring
      • Player - Player 2 (Blue) types a chat message containing -lvl as A substring
      • Player - Player 3 (Teal) types a chat message containing -lvl as A substring
    • Conditions
      • (Substring((Entered chat string), 1, 5)) Equal to -lvl
    • Actions
      • Set TempInt = (Integer((Substring((Entered chat string), 6, (Length of (Entered chat string))))))
      • Set TempGroup = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Hero - Set (Picked unit) Hero-level to ((Hero level of (Picked unit)) + TempInt), Show level-up graphics
      • Custom script: call DestroyGroup( udg_TempGroup )


I hope it works :D

EDIT: you should add events for the rest of players (Player 4 -> player 12)
 

Nerfpl

New Member
Reaction score
53
Trigger:
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -level as A substring
      • Player - Player 1 (Red) types a chat message containing -blink as An exact match
    • Conditions
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to (==) (-level + (Substring((Entered chat string), 8, 10)))
        • Then - Actions
          • Hero - Set AHero Hero-level to (Integer((Substring((Entered chat string), 8, 10)))), Show level-up graphics
        • Else - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Entered chat string) Equal to (==) -blink
            • Then - Actions
              • Unit - Add imba blink to AHero
              • Unit - Set level of imba blink for AHero to 1
              • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across (Entire map)
            • Else - Actions

only first thing is level cheat. other is way to show multiple cheats in 1 trigger
 

istar

New Member
Reaction score
31
both triggers work on the same principle, both should work
post your trigger and we shall see
 

Tom_Kazansky

--- wraith it ! ---
Reaction score
157
oh, sorry, you want the -lvlup not -lvl right ? here :D

Trigger:
  • Level Up
    • Events
      • Player - Player 1 (Red) types a chat message containing -lvlup as A substring
      • Player - Player 2 (Blue) types a chat message containing -lvlup as A substring
      • Player - Player 3 (Teal) types a chat message containing -lvlup as A substring
    • Conditions
      • (Substring((Entered chat string), 1, 7)) Equal to -lvlup
    • Actions
      • Set TempInt = (Integer((Substring((Entered chat string), 8, (Length of (Entered chat string))))))
      • Set TempGroup = (Units owned by (Triggering player) matching (((Matching unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in TempGroup and do (Actions)
        • Loop - Actions
          • Hero - Set (Picked unit) Hero-level to ((Hero level of (Picked unit)) + TempInt), Show level-up graphics
      • Custom script: call DestroyGroup( udg_TempGroup )


-lvlup 25 should add 25 levels to your heroes :thup:

If you still have problems, post your trigger :)

Note: there is a space after -lvlup ( "-lvlup ")
 

snmiglight

Active Member
Reaction score
3
oh my, it works! thank you! the reason why it dont work earlier is because i didn't knew that i have to put a space after the -lvl / -lvlup (i think)... anyways thank you and +rep!


Trigger:
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -level as A substring
      • Player - Player 1 (Red) types a chat message containing -blink as An exact match
    • Conditions
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to (==) (-level + (Substring((Entered chat string), 8, 10)))
        • Then - Actions
          • Hero - Set AHero Hero-level to (Integer((Substring((Entered chat string), 8, 10)))), Show level-up graphics
        • Else - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Entered chat string) Equal to (==) -blink
            • Then - Actions
              • Unit - Add imba blink to AHero
              • Unit - Set level of imba blink for AHero to 1
              • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across (Entire map)
            • Else - Actions

only first thing is level cheat. other is way to show multiple cheats in 1 trigger

what's -blink for? i dont get it...

@tomkazansky: offtopic, i'm one of the diablo 2 fans; why don't you try frozen orb (a diablo 2 skill)? i've downloaded your spells (arctic blast) and as far as i see it i could say that you emulated it from diablo very well, and works just like in the said game... i see spell submissions regarding frozen orb; but i dont see justice from their interpretation of the spell... :D
 

BlackDeath09

New Member
Reaction score
9
if interested in an easier way to do it you do not need conditions at all, simply go to map initialization for event and then for action player 1(you) types lvlup variable as an exact match, then as another action make it for when player 1 types "this" as an exact match, have selected hero lvl to 25. 1 event 2 actions can take care of it, then copy paste those actions to do it for every level and that saves you a lot of time, copy paste x10. + dunno why u would do it on dota its a dead game, second new games come out no1 will play wc3 anymore, projected 70k avg users to 19k avg uses by blizzard statistics.
 

istar

New Member
Reaction score
31
f interested in an easier way to do it you do not need conditions at all, simply go to map initialization for event and then for action player 1(you) types lvlup variable as an exact match, then as another action make it for when player 1 types "this" as an exact match, have selected hero lvl to 25. 1 event 2 actions can take care of it, then copy paste those actions to do it for every level and that saves you a lot of time, copy paste x10. + dunno why u would do it on dota its a dead game, second new games come out no1 will play wc3 anymore, projected 70k avg users to 19k avg uses by blizzard statistics.
you cant type anything at map initialization
player types lvlup isnt an action, is event
same for typing 'this'
there is no choice to what level player is allowed to raise other than 25
blizzard stats dont include LAN or non-bnet plays accurately
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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