![]() |
|
["For" Loop] KILLAURA CODE [HELP] - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: General Topics (https://hackforums.net/forumdisplay.php?fid=7) +--- Forum: Entertainment (https://hackforums.net/forumdisplay.php?fid=446) +---- Forum: Gaming (https://hackforums.net/forumdisplay.php?fid=65) +---- Thread: ["For" Loop] KILLAURA CODE [HELP] (/showthread.php?tid=5674394) |
["For" Loop] KILLAURA CODE [HELP] - TrolleDz - Jul 20, 2017 Hi all. I'm not a real Minecraft Hacked Client devolper but I'm learning (and skidding xD). I found a code for a killaura. Not working. Fixed and now it works but only for 1 time, i need to press again every time the keybind (every f***ing time) Here is the code Code public void toggle(){This should be a For loop but this doesn't work. I tried with public void onUpdate() but doesn't work at all. Help please!! MC version is 1.8. MCP 910 (I'm not sure about the MCP version but probably is correct 910). Thank you all for your time!! * - Desquh - Jul 20, 2017 Warning I don't actually know if this is correct or not. Take it with a grain of salt. I just felt like leaving my own input though for the hell of it. It will only work once per entity that is within area of the player because the for loop only loops as many times as there are entities rendered and it only will run code for each entity once before going to the next one. One way of achieving it to keep attacking would be changing the "if(!this.getState())" to "while(!this.getState())" assuming getState() returns if the module is enabled or not. But an issue would be that it would be running the code too fast/often. So you would have to incorporate a delay/timer so it only runs the code every so often. Also my own question since I don't develop clients myself either, would he need to check the instance of the entity that he gets from the loadedEntitylist so he isn't attacking non living entities like armor stands and minecarts? * - TrolleDz - Jul 21, 2017 Hi, thank you for your reply! [Also my own question since I don't develop clients myself either, would he need to check the instance of the entity that he gets from the loadedEntitylist so he isn't attacking non living entities like armor stands and minecarts?] The module should check for player, mobs or animals (SHOULD). I'm learning coding java so if I wrong something sorry me :C and sorry for my ugly english but I'm italian :) I will try to replace if(!this.getState()) with while(!this.getState()) Edit - If i put "while" the game crash. I need to add a delay. Any idea? * - Desquh - Jul 21, 2017 What is the error that it says when the game crashes? Also yeah you are probably going to need to put a delay. I guess that depending on how the isDead boolean is returned, that will get rid of all non living entities. * - Nicá´‹ - Jul 23, 2017 For future reference, This type of question might be better suited in the griefing section. * - Haksel - Jul 23, 2017 Edit - If i put "while" the game crash. I need to add a delay. Any idea? Nope, the thing is that this will keep going even if you aren't in a world, so it will keep trying to do the loop in the main menu persay, which would mean that 'mc.thePlayer' doesn't even exist therefore causing a crash. Too lazy to tell you the proper way to do it, I suggest watching some sort of tutorial or something. Good Luck! * - TrolleDz - Jul 23, 2017 Thank you all :C I'm sad xD Desquh idk wich is the error :C * - Wdestroier - Jul 23, 2017 You are looping through entities when you toggle your module, thats why everytime you toggle your module it attacks. If you don't want to manually attack entities everytime, you need to call your method from another where else. The most common place is under EntityPlayer#onUpdate. You can create an onUpdate method in your module class and call from there, for example EntityPlayer#onUpdate{Client.modules.get(KillAura.class).onUpdate(); doMoreStuff();} I hope it helps you * - Haksel - Jul 24, 2017 (Jul 23, 2017 09:59 PM)Wdestroier Wrote: You are looping through entities when you toggle your module, thats why everytime you toggle your module it attacks. I'm gonna make a tutorial on a basic client base eventually, newbies with shitty client bases, ughhh~ * - TrolleDz - Jul 29, 2017 Thank you all :) WDestroier I will try!! * - me_irl - Aug 21, 2017 Couple things. First of all, when is your toggle method being called? If its named correctly, then I would imagine it gets called when you enable the module, so the reason its only hitting once is because you only call the method once. You need to be calling this method constantly. Also, if !this.getState() would lead me to believe that that expression is only true when the module is NOT on, but I can't know for sure without seeing the code. * - Jimey - Aug 23, 2017 do you have discord? i can hmu * - CanadianBacon - Aug 23, 2017 this wont help in any way but heres my code for kill aura. for all those people who want to copy/paste : sadly you wont learn anything form copy/pasting but fuck it im high af so il just post it... and also this is a simple kill aura that puches at a normal speed regardless of the combat update and locks on to kneck/head area. (terrible and outdated but it works) hopefully you guys will be able to build on this and make it a lot better. Code int delay;if you are getting errors at mc.thePlayer(etc) replace "mc" with "Minecraft.getMinecraft()" * - codering - Sep 13, 2017 you can use the source of wurst to get all codes this work very good |