• 🏆 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!

Making Codes

Status
Not open for further replies.
Level 10
Joined
Apr 22, 2010
Messages
421
Alrigty, so im made this AOS and i feel i wanna make a few easter eggs to promote travel to this site for whatever reasons like to find hints.

Basicly its like cheat codes but not so strong-for example, if you type in "omgipwn" (not real one) then you will gain 1o0 attribute points.(in here, attribute points are diffrent then hero skills points)

(the attribute points are replacing lumber)

so how do i make it:
IF- i type a chat that matches: omgipwn
THEN- add 100 to taht player's lumber
:vw_wtf:
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

Simple way actually I hope I understand it right:

First of all add to your initialization trigger the following actions:
  • Player Group - Pick every player in (All players) and do (Actions)
    • Loop - Actions
      • Trigger - Add to Cheats <gen> the event (Player - (Picked player) types a chat message containing - as A substring)
Now you create the cheat trigger ( the name of the trigger I used is cheats, if you have another name you have to choose in the action above your trigger name! ):

  • Cheats
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to -omgipwn
        • Then - Actions
          • Player - Add 100 to (Triggering player) Current lumber
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Entered chat string) Equal to -omgipwnnot
        • Then - Actions
          • Player - Add 100 to (Triggering player) Current gold
        • Else - Actions
      • -------- and so on --------
Greetings and Peace
Dr. Boom
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
Actually, the name of the trigger is "Cheats" without quotes. The "<gen>" part is just a WE suffix. IDK what that's about, I'm assuming it stands for generated, though. So. Yeah.
 
Last edited:
Status
Not open for further replies.
Top