• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

-lvlup xx cheat

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,103
can someone show me how to mke that cheat?
I cnt figure out how did he in DotA made that when you type -lvlup (any number), the hero increses the level by the number you type in... I tried it like this:
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing (-lvlup + <Empty String>) as A substring
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units owned by (Triggering player)) and do (Actions)
        • Loop - Actions
          • Hero - Set (Picked unit) Hero-level to (Integer((Entered chat string))), Show level-up graphics
¸

fails to work...
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) types a chat message containing -lvlup as A substring
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units owned by (Triggering player)) matching (((Matching unit) is a hero)) Equal to true and do (Actions)
        • Loop - Actions
          • Hero - Set (Triggering unit) Hero-level to (Integer((Substring((Entered chat string), 7, (Length of (Entered chat string)))))), Hide level-up graphics
if you don't know about how substring works, look here

additional notes : if the max level of the hero is 100 in gameplay constant, and you type -lvlup 1000, it won't work.
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
thank you so much, and can you tell me why this: (Length of (Entered chat string)))))) instead of number 8?
I dont unserstand it...

errr, i'm sorry. it should not be 7, it should be (Integer((Substring((Entered chat string), 8, (Length of (Entered chat string)))))), because (space) is also count as a string.

when they type -lvlup 10, it will work indeed. what if it's more than 2 digits ?
for example -lvlup 100.
1. -
2. l
3. v
4. l
5. u
6. p
7. (space)
8. 1
9. 0
10. 0

they will only sub the string from 8 to 9.. which is only 10, while they type 100. that's why i used length of entered chat string..

if the length is 10, then it will sub the string from 8 to 10, if the length is 12, then it will sub the string from 8 to 12, and so on.

sorry if i explained it badly..
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
when they type -lvlup 10, it will work indeed. what if it's more than 2 digits ?
for example -lvlup 100.
1. -
2. l
3. v
4. l
5. u
6. p
7. (space)
8. 1
9. 0
10. 0

they will only sub the string from 8 to 9.. which is only 10, while they type 100. that's why i used length of entered chat string..

if the length is 10, then it will sub the string from 8 to 10, if the length is 12, then it will sub the string from 8 to 12, and so on.

sorry if i explained it badly..
But as for me, I would limit the trigger to have a certain limit of the feature it has.
Let's say the limit is 100 LVL, what if the user enters 10000000000 ?
I know, if the gameplay constant is set to 100, you will still get 100 max lvl, but what happens if you want to limit that trigger per usage ?

Let's say you want to limit the lvl gain per trigger usage to 2 digit, you would have 8, 9, therefore it will only take -lvlup 1000000000 which is 10.

It's better to put a limit there rather than depends on the Length of Entered chat string.
But all in all, it really depends on what you want.
 
Status
Not open for further replies.
Top