dota 6.49c commands in the game

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

Rebell91
Junior Member
Posts: 28
Joined: January 29th, 2008, 8:34 am

dota 6.49c commands in the game

Post by Rebell91 »

Hi!
I dont know anything about jass, but i changed the sounds in dota 6.49c and the text. Thanks to Durchdringen, who made it possible, that this works! ;)
Now it would be nice, when somen can help me with my problem:
I want that when i type for example "-haha" in the ingame chat, that the sound "haha.mp3" is played! Thats just an example, so i only need the function cause then i can other commands myself! ;)
But if you need the map, here it is:
http://rapidshare.com/files/87951997/Do ... v6.49c.w3x
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

Re: dota 6.49c commands in the game

Post by initialD »

Try this, I haven't test it yet, it may or may not work. You know how to set the other part right? this is not complete yet wihout others parts.
Spoiler:

Code: Select all

function HahA takes nothing returns nothing
local sound gg_snd_haha
local player p=GetTriggerPlayer()
local string s=GetEventPlayerChatString()
if SubString(s,0,6)=="-haha" then
call PlaySoundBJ(gg_snd_haha)
call TriggerSleepAction(4.)
endif
set s=""
set p=null
endfunction
If you don't make it, wait for other good JAASSer or when I am free to run a few test for the map itself, probably after Chinese New Year. Good luck
Rebell91
Junior Member
Posts: 28
Joined: January 29th, 2008, 8:34 am

Re: dota 6.49c commands in the game

Post by Rebell91 »

initiald wrote:Try this, I haven't test it yet, it may or may not work. You know how to set the other part right? this is not complete yet wihout others parts.
Spoiler:

Code: Select all

function HahA takes nothing returns nothing
local sound gg_snd_haha
local player p=GetTriggerPlayer()
local string s=GetEventPlayerChatString()
if SubString(s,0,6)=="-haha" then
call PlaySoundBJ(gg_snd_haha)
call TriggerSleepAction(4.)
endif
set s=""
set p=null
endfunction
If you don't make it, wait for other good JAASSer or when I am free to run a few test for the map itself, probably after Chinese New Year. Good luck

No I dont know how to set the other part, because i dont know nothing about jass! So you have to tell me how to do that.^^
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

Re: dota 6.49c commands in the game

Post by initialD »

Rebell91 wrote:Hi!
I want that when i type for example "-haha" in the ingame chat, that the sound "haha.mp3" is played! Thats just an example, so i only need the function cause then i can other commands myself! ;)
I misundertood your words. lol
You have to wait then, I got to sleep now, when I came back next time I will download your map and run a few test if the function works.
Do you need a password for -haha( so taht only you can activate -haha), or, everybody can type -haha??
If you need a password tell so what you do want it to be...
Rebell91
Junior Member
Posts: 28
Joined: January 29th, 2008, 8:34 am

Re: dota 6.49c commands in the game

Post by Rebell91 »

No, i dont need a pw, cause those sounds should be for everybody! I just need an example function (script) for a sound.
For example when you type -haha in the game the sound haha is played. So when you have succes in the game to run away from 3 other enemies, you type -haha in the chat and the sound haha.mp3 is played! (just an example) =)
Its just for fun!
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: dota 6.49c commands in the game

Post by Aero »

Sounds like you need benny hill not "haha".
Rebell91
Junior Member
Posts: 28
Joined: January 29th, 2008, 8:34 am

Re: dota 6.49c commands in the game

Post by Rebell91 »

It was just an example! I meant that i only need the function (or something else^^) wich i have to put in the war3map.j file.
I think i can change myself the function with other sounds and commands. But i dont know how i can make that the sound "xxx.mp3" is played when somebody types "-xxx" in the ingame-chat.
Do u know what i mean? Its complicated to say this in english for me. :(
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

Re: dota 6.49c commands in the game

Post by initialD »

I tested it, it didn't work. Sorry. It is hard for me. Probably wait till Aero vacation ends? lol
User avatar
Aero
Forum Staff
Posts: 829
Joined: January 28th, 2007, 8:10 pm
Title: JASS Programmer
Location: Canada

Re: dota 6.49c commands in the game

Post by Aero »

Create a dummy map and import the haha.mp3.

Then in sound editor, customize it how you would like it.

Then save the map and open it with MPQ master. Then look at the .j script and copy the 2 or 3 lines where the sound is created.
Paste those in the dota map where the sounds are generated.

Then all you need to be is "Play Sound - <sound>".
Rebell91
Junior Member
Posts: 28
Joined: January 29th, 2008, 8:34 am

Re: dota 6.49c commands in the game

Post by Rebell91 »

I dont really know what to do...
Ive made what you had said and thats the function:

Code: Select all

function InitSounds takes nothing returns nothing
    set gg_snd_haha1 = CreateSound( "war3mapImported\\haha1.wav", false, false, false, 10, 10, "DefaultEAXON" )
    call SetSoundDuration( gg_snd_haha1, 5920 )
    call SetSoundChannel( gg_snd_haha1, 0 )
    call SetSoundVolume( gg_snd_haha1, 127 )
    call SetSoundPitch( gg_snd_haha1, 1.0 )
endfunction
But the rest i dont know what ive got to do.