I see the folder called "sounds", in the mods folder.
This indicates that the mod can use custom sounds in "playsound()"
How do you use custom sounds?
1) What file formats does it support?
2) Special names for the audio files?
3) What to call in "playsound()"?
1) .ogg only
2) any name will work, but just like regular minecraft,if it ends with a number, you must omit it, and one will be randomly selected
3) custom.sound for a sound.ogg in the sounds folder,
custom.starcraft.terran.dswht for files tswht01 tswht2 tdswht3, in sounds/starcraft/terran
etc., you just omit any numbers at the end, and replace the / with . in your path
you can also use sounds.random.breath or similar to play default minecraft sounds from the .minecraft/resources/sounds folder
i think there are additional limitations because some of my ogg files won't play, not sure what they are, but they stem from minecraft (java?) itself so i'm sure the info is out there
1) .ogg only
2) any name will work, but just like regular minecraft,if it ends with a number, you must omit it, and one will be randomly selected
3) custom.sound for a sound.ogg in the sounds folder,
custom.starcraft.terran.dswht for files tswht01 tswht2 tdswht3, in sounds/starcraft/terran
etc., you just omit any numbers at the end, and replace the / with . in your path
you can also use sounds.random.breath or similar to play default minecraft sounds from the .minecraft/resources/sounds folder
i think there are additional limitations because some of my ogg files won't play, not sure what they are, but they stem from minecraft (java?) itself so i'm sure the info is out there
I know for a fact it plays more, I've messed around with the MC sound system making a mod. Unfortunately I can't remember what the others are.
EDIT: I remember now! I found them on the ModLoader page: ogg, wav, and mus
If you use AudioMod you can also get mp3 support I believe.
My friend made me a keybind script, but it doesn't work. Instead of using the variables and scripts, when I put in the two variables, it spews out all the script in the chat, instead of executing it. Can someone help me?
It's meant to be an auto-auction, so when I press B, it would be as if someone raised a bid.
My friend made me a keybind script, but it doesn't work. Instead of using the variables and scripts, when I put in the two variables, it spews out all the script in the chat, instead of executing it. Can someone help me?
It's meant to be an auto-auction, so when I press B, it would be as if someone raised a bid.
It's sort of addicting actually, I'm not really a programmer but when I try out to write some scripts and they work... I feel like I could achieve anything.
Pure awesome-sauce. I started to experiment and watch some videos two days ago, so far I've made a brightness toggle(bright/moody (timed)), a FPS-zoomer (while holding, zooming out when letting go), auto-walk, auto-eat, auto-run(sprint), place torch, auto-switch on/off(combined with TheBombzens auto-switch mod), auto-jump (for swimming), auto-sneak, auto-attack, auto-mine and also some buttons for switching texturepacks, changing gamemodes and time of day.
Just wanted to let you know that your mod really lift minecraft to new heights for me. Thank you!
... I feel so... well stupid asking this hah seeing all the more complicated questions and part of me feels bad for asking such a dumb question, but I enjoy learning so here we go. This is based off my question from last night about this
$${IF(HEALTH = 10);LOG(Health at 50%);ENDIF;}$$
The problem is the mod is very exact so if it misses 10 it doesnt warn me, and if i make it < 10 it spams me is there any way i can do something like um
$${IF(HEALTH < 10 BUT > 7);LOG(Health at 50%);ENDIF;}$$
Sorry for asking such a simple question but I look forward to a response and thanks for the help!
... I feel so... well stupid asking this hah seeing all the more complicated questions and part of me feels bad for asking such a dumb question, but I enjoy learning so here we go. This is based off my question from last night about this
$${IF(HEALTH = 10);LOG(Health at 50%);ENDIF;}$$
The problem is the mod is very exact so if it misses 10 it doesnt warn me, and if i make it < 10 it spams me is there any way i can do something like um
$${IF(HEALTH < 10 BUT > 7);LOG(Health at 50%);ENDIF;}$$
Sorry for asking such a simple question but I look forward to a response and thanks for the help!
Simple questions are important to keep our memory fresh , besides, that's actually more or less what we usually get. It's what we're here for, please don't hesitate if you have any other questions =P
the syntax for multiple comparisons in an IF() is, for example
IF (HEALTH is below 10) AND (HEALTH is above 7)
IF((HEALTH < 10) && (HEALTH > 7))
if you ever need a logical or, use the pipe character; for example
IF (HEALTH is maxed) OR (HUNGER is less than 9/10) ((basically the two states when you're not regenerating health))
IF((HEALTH = 20) || (HUNGER < 18))
but even that might get bypassed
Personally, i recommend the following scripts (same script, last one is more efficient)
when you go below 10, it gives a warning. once
then, when you regenerate past 15, it tells you you're healthy again
it is completely incapable of producing the same message twice in a row, so until you heal up, it will only warn you once; nice and spam-free
Simple questions are important to keep our memory fresh , besides, that's actually more or less what we usually get. It's what we're here for, please don't hesitate if you have any other questions =P
the syntax for multiple comparisons in an IF() is, for example
IF (HEALTH is below 10) AND (HEALTH is above 7)
IF((HEALTH < 10) && (HEALTH > 7))
if you ever need a logical or, use the pipe character; for example
IF (HEALTH is maxed) OR (HUNGER is less than 9/10) ((basically the two states when you're not regenerating health))
IF((HEALTH = 20) || (HUNGER < 18))
but even that might get bypassed
Personally, i recommend the following scripts (same script, last one is more efficient)
when you go below 10, it gives a warning. once
then, when you regenerate past 15, it tells you you're healthy again
it is completely incapable of producing the same message twice in a row, so until you heal up, it will only warn you once; nice and spam-free
You can also make it simpler by using a conditional macro (the last of the three options near the top, they're kinda like tabs)
Condition: healthy
if true: $${IF(HEALTH < 10);Log(&cLow health!);Unset(healthy);ENDIF}$$
if false: $${IF(HEALTH > 15);Log(&2Healthy);Set(healthy);ENDIF}$$
Thanks so much, I'm a guard on a Prison server and this mods helps so much lol. I can do simple things and I'll be sure to comeback and ask things , I'm always looking to learn more though so just
Ok, another dumb question. With my auction script, I want it to say "Going Once" then "Going Twice" then "Sold" at respective coundown of 3, 2, then 1. I have the countdown working, but how do I signify that when #time = 1 to make #words = "Sold" or whatever. I know #words doesn't work as that's for numbers. What symbol should I use?
Ok, another dumb question. With my auction script, I want it to say "Going Once" then "Going Twice" then "Sold" at respective coundown of 3, 2, then 1. I have the countdown working, but how do I signify that when #time = 1 to make #words = "Sold" or whatever. I know #words doesn't work as that's for numbers. What symbol should I use?
for string variables, & is the prefix
why do you need variables though?
can't you use
[code]
You should be able to Stop(k) to stop all macros running on the key k, and so on
alternatively, without any additional binds, maybe this would work
You see, I could do that, but because I need to have an easy way to cut that off if someone bids, I need to keep it all within a variable that is constantly changing. It may just be that I'm over-complicating things. Oh well. Thank you for your help!
Tried it and it sort of worksbut not as I want it to. I can't use the macro key as a toggle. It starts with KEY_F (in this case), and the other one (KEY_S) stops it. I'm not sure how I should solve this. If I press KEY_F while the macro is running it starts the macro again.
I'll experiment a little.
Edit1:
Solved it (sort of) by putting an if command for F while still keeping your suggestion for S. Much better. Thanks for your help!
Edit2:
WIth this setup I have to press KEY_F twice after pressing KEY_S to actually stop and restart the script but now I can just press BACK to stop running, it's much more intuitive when running close to a gorge and should help me keep my hard earned levels.
Edit3:
Added [unset(sprint);] after the third log-command. Now it works as a charm.
java.lang.NullPointerException
at net.eq2online.macros.gui.screens.GuiMacroParam.a(GuiMacroParam.java:392)
at aue.n(SourceFile:150)
at aue.m(SourceFile:114)
at net.eq2online.macros.gui.shared.GuiScreenEx.m(GuiScreenEx.java:497)
at net.minecraft.client.Minecraft.l(Minecraft.java:1515)
at net.minecraft.client.Minecraft.J(Minecraft.java:858)
at net.minecraft.client.Minecraft.run(Minecraft.java:783)
at java.lang.Thread.run(Thread.java:722)
Got this while starting Minecraft, loaded successfully, but shouldnt this stuff be STDOUT instead of STDERR?
No. http://en.wikipedia.org/wiki/Standard_streams#Standard_error_.28stderr.29
Java's standard console log handler logs to stderr, generally because program output outputs to stdout (as you'd expect) and diagnostic or other informational messages go to stderr, this is normal. The "err" is misleading, it's basically just a secondary output stream.
I don't need to but I'll be releasing an update for 1.4.7 at some point, so I'll include it in that. Pretty busy at the moment though so probably not this week.
Still nothing happends. I've gone into --> onItemDurabilityChange. linked it to a txt script named Durability.txt ($$<Durability.txt>) Then i write :
$${
IIF(((ITEM = 277) && (DURABILITY < 1500)),"repair");
}$$
Nothing happends, what am i doing wrong?
You need to populate parentheses in your iif. Try what I quoted above.
Rollback Post to RevisionRollBack
Thanks to Mumfrey for creating this awesome mod! The Macro / Keybind Mod. If you ever need to contact me asap, go to the server: mc.synapsehlp.com
1) .ogg only
2) any name will work, but just like regular minecraft,if it ends with a number, you must omit it, and one will be randomly selected
3) custom.sound for a sound.ogg in the sounds folder,
custom.starcraft.terran.dswht for files tswht01 tswht2 tdswht3, in sounds/starcraft/terran
etc., you just omit any numbers at the end, and replace the / with . in your path
you can also use sounds.random.breath or similar to play default minecraft sounds from the .minecraft/resources/sounds folder
i think there are additional limitations because some of my ogg files won't play, not sure what they are, but they stem from minecraft (java?) itself so i'm sure the info is out there
'Cause tomorrow spring is here
I know for a fact it plays more, I've messed around with the MC sound system making a mod.
Unfortunately I can't remember what the others are.EDIT: I remember now! I found them on the ModLoader page: ogg, wav, and mus
If you use AudioMod you can also get mp3 support I believe.
It's meant to be an auto-auction, so when I press B, it would be as if someone raised a bid.
$$<$$[2]>//interval
LOG("Lets start the bidding at $$[1]!");
#price = $$[1];
#countdown = 7;
#timerms = 0;
#timer = 0;
#end = 0;
do;
LOG("Who claims for %#price% Gold?");
WAIT(100ms);
#timer = 1;
do;
if(KEY_
#timer = 50000000;
else
WAIT(10ms);
#timerms = #timerms + 1;
if(#timerms = 10);
#timer = #timer + 1;
#timerms = 0;
#remain = #countdown-#timer;
if((#remain < 4) && (#remain != 0));
LOG("%#remain% second(s) left!");
endif;
endif;
endif;
while(#timer<#countdown);
if(#timer = #countdown);
#end = 1;
else;
#price = #price + $$[2];
endif;
while(#end = 0);
LOG("Auction has ended!");
LOG("Final price was: %#price% Gold");
2 things you can do:
A) Add "$${" and "}$$" around the code that executes the script.
Note: Only one of these options has to be chosen. (Choosing both will mess up the script)
It's sort of addicting actually, I'm not really a programmer but when I try out to write some scripts and they work... I feel like I could achieve anything.
Pure awesome-sauce. I started to experiment and watch some videos two days ago, so far I've made a brightness toggle(bright/moody (timed)), a FPS-zoomer (while holding, zooming out when letting go), auto-walk, auto-eat, auto-run(sprint), place torch, auto-switch on/off(combined with TheBombzens auto-switch mod), auto-jump (for swimming), auto-sneak, auto-attack, auto-mine and also some buttons for switching texturepacks, changing gamemodes and time of day.
Just wanted to let you know that your mod really lift minecraft to new heights for me. Thank you!
The problem is the mod is very exact so if it misses 10 it doesnt warn me, and if i make it < 10 it spams me is there any way i can do something like um
Sorry for asking such a simple question but I look forward to a response and thanks for the help!
A is strongly recommended because it looks better, you can see ingame that it won't spam your chat, and you can easily include more files
'Cause tomorrow spring is here
Simple questions are important to keep our memory fresh , besides, that's actually more or less what we usually get. It's what we're here for, please don't hesitate if you have any other questions =P
the syntax for multiple comparisons in an IF() is, for example
IF (HEALTH is below 10) AND (HEALTH is above 7)
IF((HEALTH < 10) && (HEALTH > 7))
if you ever need a logical or, use the pipe character; for example
IF (HEALTH is maxed) OR (HUNGER is less than 9/10) ((basically the two states when you're not regenerating health))
IF((HEALTH = 20) || (HUNGER < 18))
but even that might get bypassed
Personally, i recommend the following scripts (same script, last one is more efficient)
when you go below 10, it gives a warning. once
then, when you regenerate past 15, it tells you you're healthy again
it is completely incapable of producing the same message twice in a row, so until you heal up, it will only warn you once; nice and spam-free
onHealthChange, naturally
$${IF((HEALTH < 10) && (healthy));LOG(&cLow health!);UnSet(healthy);ENDIF;IF((HEALTH > 16) && (!healthy));Log(&2Healthy);Set(healthy);ENDIF}$$
You can also make it simpler by using a conditional macro (the last of the three options near the top, they're kinda like tabs)
Condition: healthy
if true: $${IF(HEALTH < 10);Log(&cLow health!);Unset(healthy);ENDIF}$$
if false: $${IF(HEALTH > 15);Log(&2Healthy);Set(healthy);ENDIF}$$
'Cause tomorrow spring is here
Thanks so much, I'm a guard on a Prison server and this mods helps so much lol. I can do simple things and I'll be sure to comeback and ask things
I've written a simple auto-sprint script, but I want it to stop if I press key(back) as well as pressing the original key I bound it on.
if(sprint);
log("Sprint &foff");
unset(sprint);
keyup(forward);
(unsprint);
stop();
else;
log("Sprint &fon");
set(sprint);
keydown(forward);
do();
sprint();
wait(1t)
loop();
endif;
Mods I work on and maintain:
TabbyChat | Mine Little Pony
My Blog
for string variables, & is the prefix
why do you need variables though?
can't you use
Echo(going once)
Wait(1)
Echo(going twice)
Wait(1)
Echo(Sold!)
or
DO();UNTIL(#time = 8)
Echo(Going once)
DO();UNTIL(#time = 4)
Echo(Going twice)
DO();UNTIL(#time = 0)
Echo(Sold)
[code]
You should be able to Stop(k) to stop all macros running on the key k, and so on
alternatively, without any additional binds, maybe this would work
log("Sprint &fon");
set(sprint);
keydown(forward);
do();
sprint();
wait(1t)
Until(KEY_S || KEY_<this macro>);
KeyUp(forward)
log("Sprint &foff");
unsprint();
'Cause tomorrow spring is here
Tried it and it sort of worksbut not as I want it to. I can't use the macro key as a toggle. It starts with KEY_F (in this case), and the other one (KEY_S) stops it. I'm not sure how I should solve this. If I press KEY_F while the macro is running it starts the macro again.
I'll experiment a little.
Edit1:
Solved it (sort of) by putting an if command for F while still keeping your suggestion for S. Much better. Thanks for your help!
if(sprint);
log("Sprint &foff")
unset(sprint);
KEYUP(forward);
(unsprint);
stop();
else;
log("Sprint &fon");
set(sprint);
KEYDOWN(forward);
do();
sprint();
WAIT(1t)
UNTIL(KEY_S);
KEYUP(forward)
log("Sprint &foff");
unsprint();
endif;
Edit2:
WIth this setup I have to press KEY_F twice after pressing KEY_S to actually stop and restart the script but now I can just press BACK to stop running, it's much more intuitive when running close to a gorge and should help me keep my hard earned levels.
Edit3:
Added [unset(sprint);] after the third log-command. Now it works as a charm.
if(sprint);
log("Sprint &foff")
unset(sprint);
KEYUP(forward);
(unsprint);
stop();
else;
log("Sprint &fon");
set(sprint);
KEYDOWN(forward);
do();
sprint();
WAIT(1t)
UNTIL(KEY_S);
KEYUP(forward)
log("Sprint &foff");
unset(sprint);
unsprint();
endif;
at net.eq2online.macros.gui.screens.GuiMacroParam.a(GuiMacroParam.java:392)
at aue.n(SourceFile:150)
at aue.m(SourceFile:114)
at net.eq2online.macros.gui.shared.GuiScreenEx.m(GuiScreenEx.java:497)
at net.minecraft.client.Minecraft.l(Minecraft.java:1515)
at net.minecraft.client.Minecraft.J(Minecraft.java:858)
at net.minecraft.client.Minecraft.run(Minecraft.java:783)
at java.lang.Thread.run(Thread.java:722)
No.
http://en.wikipedia.org/wiki/Standard_streams#Standard_error_.28stderr.29
Java's standard console log handler logs to stderr, generally because program output outputs to stdout (as you'd expect) and diagnostic or other informational messages go to stderr, this is normal. The "err" is misleading, it's basically just a secondary output stream.
I don't need to but I'll be releasing an update for 1.4.7 at some point, so I'll include it in that. Pretty busy at the moment though so probably not this week.
No prefix is a boolean variable, or "flag" in the scripting jargon.
Your example would be written like this:
Notice that the variables do not need to be converted to string using % % when you are doing a comparison.
You need to populate parentheses in your iif. Try what I quoted above.
Oh dear god I'm an idiot.