Bug: when i set a new config to server ip then i make a new one then i use the first one then i go to another server so its not using the second. its using the first.. can you please fix it to be automatic config choose as the server ip?
@seeker17 that's not true, chatfilter will filter colored chat.
Your code has to be not working.
Anyway if you want to look for a single word you should use sth like following:
Any idea what I am doing wrong? Once again it does work with just " -> " but not " -> me"
What you need to understand is how colors in chat work...
They're not an overlay, they're part of the message itself
For example, in your screenshot, %CHAT% is probably similar to the following (colored for readability only)
§8[§0[§3ϧ1S-Mod§3₁§0] §dSpooker §7-> §eme§7] §r§ftest
where every §? is a color code, instructing the game to 'change' the color or format of any text following it
CHATCLEAN contains the message without color codes, so you can also use that, but then you need to be more careful that you don't accidentally accept messages you don't mean to
for example, your current code would be trivial to fake just by including "-> me" in a message
for example: [Trainee] Trick > This message pings everybody >=D -> me <-
Checking for specific colors is usually the easiest way to rule out bad actors, since most servers do not allow you to use color codes in messages (if you try, you'll get kicked)
Alternatively, you can include the color codes in your expression
To find out what they are, the easiest way is to put a LogTo(chatlog.txt,%CHAT%) command in your onChat or ChatFilter
after playing on the server for a while with that command running, you'll have all the messages (with color codes) in a file at .../.macros/logs/chatlog.txt
(this is necessary because just looking at what the colors are is not enough to tell where the color codes are (and sometimes there's even unnecessary ones you can't see))
Is it possible to ctrl+q using macromod to drop a whole stack directly from your hotbar at once?
I can spam key(drop) to drop items one at a time, or open the inventory and then simulate a drag and drop, but for complicated reasons I'd rather drop a whole stack of items at a time without first opening the inventory.
The Meaning of Life, the Universe, and Everything.
Location:
...
Join Date:
6/22/2011
Posts:
46
Minecraft:
Noobthebuilder
Member Details
Haven't received an answer yet, I wonder if this is even possible:
Would it be possible to make a script that limits spamclicking with <item_id's>?
I am on 1.7.10
For example:
I have a 2h modded sword, but I can keep spamclicking it. I would like to limit that the sword cannot swing more than once per 15 ticks or something. And a dagger to swing once per 5 ticks. Is this possible? If it is, how can I achieve this?
Example idea:
stop leftclick if holding <modded_swordID> and a click was used 15 ticks ago. endif
Haven't received an answer yet, I wonder if this is even possible:
Would it be possible to make a script that limits spamclicking with <item_id's>?
I am on 1.7.10
For example:
I have a 2h modded sword, but I can keep spamclicking it. I would like to limit that the sword cannot swing more than once per 15 ticks or something. And a dagger to swing once per 5 ticks. Is this possible? If it is, how can I achieve this?
Example idea:
stop leftclick if holding <modded_swordID> and a click was used 15 ticks ago. endif
This would make my private rpgserver really cool.
Thanks in advance!
Yes.., but, well, only for yourself (or whoever is using the mod and script) - so only by an honor system
Also you need some fancy trick to avoid situations where you log out during a cooldown and thus get stuck in one forever
Here's an idea (untested but it should work...?)
IF(!cooldown);
Key(attack);
cooldown = true;
Wait(15t);
cooldown = false;
ELSE;
Do(30); // for 30 ticks in a row, check if the cooldown has ended
IF(!cooldown); Stop; ENDIF; // If it does, do nothing and stop, everything is normal
Loop;
// If it hasn't ended in 30 ticks, assume it's stuck and end it
cooldown = false;
Log("&a[RPG] Cooldown unstuck (this should only happen on your first attack!)")
The Meaning of Life, the Universe, and Everything.
Location:
...
Join Date:
6/22/2011
Posts:
46
Minecraft:
Noobthebuilder
Member Details
Awesome! This worked! Now if it is possible, would it be possible to only play the script on certain items? And if not holding the id, no cooldown? Like
Awesome! This worked! Now if it is possible, would it be possible to only play the script on certain items? And if not holding the id, no cooldown? Like
The Meaning of Life, the Universe, and Everything.
Location:
...
Join Date:
6/22/2011
Posts:
46
Minecraft:
Noobthebuilder
Member Details
Many thanks! Now I have 2 last questions though.
In the script we use Key(attack); Would it be possible to change this to LMOUSE? Because with the current script, It is impossible to mine/break blocks. That is the only culprit left. I tried to do this, but I couldn't make it work. It doesn't matter if it needs to be a seperate script which needs all the items defined as well. If there is another workaround I would like to know.
I also wonder how many characters a textfile can have without making it lag. I have like 500 weapons I am going to categorise into weapon classes with the cooldowns. Not sure if this will cause issues?
Again, many thanks!!! This really spices up the gameplay :P. I used the cooldown from Dynamic Swordskills, but that changes every item.
In the script we use Key(attack); Would it be possible to change this to LMOUSE? Because with the current script, It is impossible to mine/break blocks. That is the only culprit left. I tried to do this, but I couldn't make it work. It doesn't matter if it needs to be a seperate script which needs all the items defined as well. If there is another workaround I would like to know.
I also wonder how many characters a textfile can have without making it lag. I have like 500 weapons I am going to categorise into weapon classes with the cooldowns. Not sure if this will cause issues?
Again, many thanks!!! This really spices up the gameplay :P. I used the cooldown from Dynamic Swordskills, but that changes every item.
Hey, it's me again, I am still messing with event-triggered scripts. This time I am trying to create a script that will trigger when a new player joins the server for the first time. (The server I play on does a special message the first time a player joins.) I have tried placing this script in both the "On player join" and "On chat" events and no luck. When I put it in the Chat event the message triggers but it says "false" for the player's name. But if I have it set in the On player join event it does not trigger at all. I am not sure what I can do about this.
Hey, it's me again, I am still messing with event-triggered scripts. This time I am trying to create a script that will trigger when a new player joins the server for the first time. (The server I play on does a special message the first time a player joins.) I have tried placing this script in both the "On player join" and "On chat" events and no luck. When I put it in the Chat event the message triggers but it says "false" for the player's name. But if I have it set in the On player join event it does not trigger at all. I am not sure what I can do about this.
Would it work if I added a "Wait(10t)" at the start of it if I had it trigger on player join?
Also is there a place where I can see all of the variables such as %CHAT%, %CLEANCHAT%, %JOINEDPLAYER%?
onPlayerJoin is wrong because the game has no way of telling if it's a new player or not (you might think the joining and the message happen at the same time, but as far as the game is concerned, they're completely separate events, no way to link them)
onChat is right because it's the message you're looking for and wanting to reply to.., but there's no JOINEDPLAYER shortcut because the message is just a piece of text, that, again, the game doesn't understand the meaning of.
you have to extract the name from the message yourself using IFMATCHES() and/or MATCH()
The Meaning of Life, the Universe, and Everything.
Location:
...
Join Date:
6/22/2011
Posts:
46
Minecraft:
Noobthebuilder
Member Details
You sir helped me a lot! That worked! You helped me before with the level bars (on chat xp and having progression bars) and now with weapon speed! Awesome!!! Many Thanks!
Bug: when i set a new config to server ip then i make a new one then i use the first one then i go to another server so its not using the second. its using the first.. can you please fix it to be automatic config choose as the server ip?
@noammiz007 just put config(%SERVER%) on the onJoinGame Event of every config
Chat filter does not filter colored text.
Like if I try to filter "f***" but it is in chat as "f***" it will not be filtered
I don't see what I am doing wrong then, it works until I add the color'ed text which is "me"
Any idea what I am doing wrong? Once again it does work with just " -> " but not " -> me"
What you need to understand is how colors in chat work...
They're not an overlay, they're part of the message itself
For example, in your screenshot, %CHAT% is probably similar to the following (colored for readability only)
§8[§0[§3ϧ1S-Mod§3₁§0] §dSpooker §7-> §eme§7] §r§ftest
where every §? is a color code, instructing the game to 'change' the color or format of any text following it
CHATCLEAN contains the message without color codes, so you can also use that, but then you need to be more careful that you don't accidentally accept messages you don't mean to
for example, your current code would be trivial to fake just by including "-> me" in a message
for example:
[Trainee] Trick > This message pings everybody >=D -> me <-
Checking for specific colors is usually the easiest way to rule out bad actors, since most servers do not allow you to use color codes in messages (if you try, you'll get kicked)
Alternatively, you can include the color codes in your expression
To find out what they are, the easiest way is to put a LogTo(chatlog.txt,%CHAT%) command in your onChat or ChatFilter
after playing on the server for a while with that command running, you'll have all the messages (with color codes) in a file at .../.macros/logs/chatlog.txt
(this is necessary because just looking at what the colors are is not enough to tell where the color codes are (and sometimes there's even unnecessary ones you can't see))
'Cause tomorrow spring is here
Is it possible to press a button in the trading screen with villagers?
I want to trade my emeralds to some specific items. Please help
@T0tem that is not possible by default however there is a plugin that adds an command to click them
Is it possible to ctrl+q using macromod to drop a whole stack directly from your hotbar at once?
I can spam key(drop) to drop items one at a time, or open the inventory and then simulate a drag and drop, but for complicated reasons I'd rather drop a whole stack of items at a time without first opening the inventory.
@TangentialThreat
you can use unsafe();do(3);press(LCONTROL);key(drop);loop;endunsafe();
Anyway I just wanted to promote a discordserver I made bcs I wanted to try this at least once:
http://discord.me/Macromod can be used to join the discord
this discord should be used to develop or ask questions about macromod scripts and or macromod modules
(I hope this is allowed if not please pm me a request to remove this)
Haven't received an answer yet, I wonder if this is even possible:
Would it be possible to make a script that limits spamclicking with <item_id's>?
I am on 1.7.10
For example:
I have a 2h modded sword, but I can keep spamclicking it. I would like to limit that the sword cannot swing more than once per 15 ticks or something. And a dagger to swing once per 5 ticks. Is this possible? If it is, how can I achieve this?
Example idea:
stop leftclick if holding <modded_swordID> and a click was used 15 ticks ago. endif
This would make my private rpgserver really cool.
Thanks in advance!
[SSSS]
Yes.., but, well, only for yourself (or whoever is using the mod and script) - so only by an honor system
Also you need some fancy trick to avoid situations where you log out during a cooldown and thus get stuck in one forever
Here's an idea (untested but it should work...?)
IF(!cooldown);
'Cause tomorrow spring is here
Awesome! This worked! Now if it is possible, would it be possible to only play the script on certain items? And if not holding the id, no cooldown? Like
IF(!cooldown);
ITEM = <item id or item id string, meta>
Key(attack);cooldown = true;
Wait(15t);
cooldown = false;
and if this isn't the case (you are not holding the item)
Default left click (not attack, since that is only once so you cannot mine)
[SSSS]
IFMATCHES(%ITEM%,"^(someid|someotherid)$"); //Note that item ID's are textual now, numeric ID's were deprecated a while ago
// Default behaviour if none of the above special cases triggered (currently just one)
Key(attack);
'Cause tomorrow spring is here
Many thanks! Now I have 2 last questions though.
In the script we use Key(attack); Would it be possible to change this to LMOUSE? Because with the current script, It is impossible to mine/break blocks. That is the only culprit left. I tried to do this, but I couldn't make it work. It doesn't matter if it needs to be a seperate script which needs all the items defined as well. If there is another workaround I would like to know.
I also wonder how many characters a textfile can have without making it lag. I have like 500 weapons I am going to categorise into weapon classes with the cooldowns. Not sure if this will cause issues?
Again, many thanks!!! This really spices up the gameplay :P. I used the cooldown from Dynamic Swordskills, but that changes every item.
[SSSS]
Hmm.., what if instead of Key(attack)...
DO;
WHILE(LMOUSE)
'Cause tomorrow spring is here
Hey, it's me again, I am still messing with event-triggered scripts. This time I am trying to create a script that will trigger when a new player joins the server for the first time. (The server I play on does a special message the first time a player joins.) I have tried placing this script in both the "On player join" and "On chat" events and no luck. When I put it in the Chat event the message triggers but it says "false" for the player's name. But if I have it set in the On player join event it does not trigger at all. I am not sure what I can do about this.
Put your
spoiler here.
Would it work if I added a "Wait(10t)" at the start of it if I had it trigger on player join?
Also is there a place where I can see all of the variables such as %CHAT%, %CLEANCHAT%, %JOINEDPLAYER%?
onPlayerJoin is wrong because the game has no way of telling if it's a new player or not (you might think the joining and the message happen at the same time, but as far as the game is concerned, they're completely separate events, no way to link them)
onChat is right because it's the message you're looking for and wanting to reply to.., but there's no JOINEDPLAYER shortcut because the message is just a piece of text, that, again, the game doesn't understand the meaning of.
you have to extract the name from the message yourself using IFMATCHES() and/or MATCH()
You can see event-specific variables in http://mkb.gorlem.ml/wiki/events (and also ingame by reading the help of any event)
'Cause tomorrow spring is here
You sir helped me a lot! That worked! You helped me before with the level bars (on chat xp and having progression bars) and now with weapon speed! Awesome!!! Many Thanks!
[SSSS]
Hey Noob;
See that [↑] on the bottom left of his reply? That's probably the best way to say thanks to anyone that helps you!
The only cost to you is a few seconds.
Links to pdf format, downloadable, command lists for (these often clarify/expand descriptions, and where possible link to the author's posting):
MoreCommands: http://www.mediafire.com/view/qjc9c6klcnp660e/CmdLstMoreCommands.pdf
WorldEdit: http://www.mediafire.com/view/bi7r00xd9rgxrrt/WE_Commands.pdf