play a certain song by typing a certain phrase
Moderator: Cheaters
-
- Junior Member
- Posts: 40
- Joined: November 26th, 2007, 6:09 pm
play a certain song by typing a certain phrase
can someone tell me how to add a function that plays a certain song when any player typing in a certain phrase. it needs to be standalone from a cheat pack and it needs to be put inside the map throught jass craft
-
- Newcomer
- Posts: 21
- Joined: August 17th, 2008, 2:08 pm
Re: play a certain song by typing a certain phrase
U need a setup into the .j file with the triggers to activate... like "-music" in JJ´s Pack... also u need place this song/music inside the map, probably using the MPQ Master...

Even in death, we fight together! For the Horde!
-
- Junior Member
- Posts: 40
- Joined: November 26th, 2007, 6:09 pm
Re: play a certain song by typing a certain phrase
but i don't want it to be a part of the cp and i don't think have have any code for that. i want it so WHOEVER type in a phrase(shut the hell up) and a song will will play
-
- Shopping Maul USA Creator
- Posts: 1798
- Joined: January 18th, 2007, 11:07 am
- Title: No Comment
- Location: Calgary Canada
- Has thanked: 88 times
- Been thanked: 9 times
Re: play a certain song by typing a certain phrase
Since you didnt post a "gui or jass" wish, and since its in map cheating (the wrong section), this is what you get. GUI
Code: Select all
Play a sound trigger
Events
Player - Player 1 (Red) types a chat message containing [color=#800000]blah blah [/color]
Conditions
sound Equal to True
Actions
Sound - Play [color=#800040]your imported sound file here [/color]<gen>
Trigger - Run Stop <gen> (checking conditions)
Code: Select all
Stop
Events
Conditions
Actions
Set sound = False
Wait 20.00 seconds
Set sound = True
-
- Junior Member
- Posts: 40
- Joined: November 26th, 2007, 6:09 pm
Re: play a certain song by typing a certain phrase
actually i did ask to be in jass, because i need it to be put into the map using jass craft. i try making a simple one by myself and put it in a map, but the map became unplayable and yes i did put the music file in
Code: Select all
globals
trigger playmusic=null
endglobals
function musicplayed takes nothing returns nothing
call PlayThematicMusic("war3mapImported\\1.mp3")
endfunction
function musicaction takes nothing returns nothing
set playmusic=CreateTrigger()
call TriggerRegisterPlayerChatEvent(e,Player(0),"Cross World",true)
call TriggerRegisterPlayerChatEvent(e,Player(1),"Cross World",true)
call TriggerRegisterPlayerChatEvent(e,Player(2),"Cross World",true)
call TriggerRegisterPlayerChatEvent(e,Player(3),"Cross World",true)
call TriggerRegisterPlayerChatEvent(e,Player(4),"Cross World",true)
call TriggerRegisterPlayerChatEvent(e,Player(5),"Cross World",true)
call TriggerRegisterPlayerChatEvent(e,Player(6),"Cross World",true)
call TriggerRegisterPlayerChatEvent(e,Player(7),"Cross World",true)
call TriggerRegisterPlayerChatEvent(e,Player(8),"Cross World",true)
call TriggerRegisterPlayerChatEvent(e,Player(9),"Cross World",true)
call TriggerRegisterPlayerChatEvent(e,Player(10),"Cross World",true)
call TriggerRegisterPlayerChatEvent(e,Player(11),"Cross World",true)
call TriggerAddAction(playmusic,function musicplayed)
endfunction
-
- Forum Staff
- Posts: 2618
- Joined: June 2nd, 2007, 6:53 pm
- Title: I Just Lost the Game
Re: play a certain song by typing a certain phrase
Try replacing "e" in all of those ChatEvent strings with "playmusic".
My Warcraft III Tool Collection
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
-
- Junior Member
- Posts: 40
- Joined: November 26th, 2007, 6:09 pm
Re: play a certain song by typing a certain phrase
ah i see, but where do i put in in the script?? do i put the endglobal part after the chaetpack,before the cheat pack or after everything??
-
- Forum Staff
- Posts: 2618
- Joined: June 2nd, 2007, 6:53 pm
- Title: I Just Lost the Game
Re: play a certain song by typing a certain phrase
I thought you didn't want it in a cheatpack?
Anyhoo, you would want to put the "trigger playmusic=null" anywhere below globals and above endglobals. The two functions would go under endglobals. If you're also inserting a cheatpack, then it can go above the cheatpack or below it, it doesn't matter.
Anyhoo, you would want to put the "trigger playmusic=null" anywhere below globals and above endglobals. The two functions would go under endglobals. If you're also inserting a cheatpack, then it can go above the cheatpack or below it, it doesn't matter.
My Warcraft III Tool Collection
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
-
- Junior Member
- Posts: 40
- Joined: November 26th, 2007, 6:09 pm
Re: play a certain song by typing a certain phrase
nvm, just try it and it didn't work. i type the code and nothing happen
-
- Forum Staff
- Posts: 2618
- Joined: June 2nd, 2007, 6:53 pm
- Title: I Just Lost the Game
Re: play a certain song by typing a certain phrase
Then take the GUI that Vegas gave you, make it in the WE, and right click on the triggers and choose Convert to Custom Script, or something to that effect. You'll get the jass, which you can copy and paste into your map.
My Warcraft III Tool Collection
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle