Noobonic Plague Mining Script

Posts 16–28 of 28 · Page 2 of 2
Quote Originally Posted by Gray View Post
Autistic has got to be the word of the month.
But I guess you're HF damaged.
Anyone else notice he is also using a deprecated function?
Quote Originally Posted by MeepDarknessMeep View Post
Anyone else notice he is also using a deprecated function?
If you're meaning talking down to, then yes.
Always.
Quote Originally Posted by GokusDog View Post
There is the video, if anyone is able to just code a script that hits E one time every 10 minutes then waits 5 seconds after pressing E the first time to do it again that would be great as that is all I need
So from what I'm gathering you want a script that every ten minutes presses E then waits five seconds to press E again that loops forever? Well if that's what you want here you go (untested, it's quite late, so it also might not even work. Please correct it if I messed up.):

Code:
new code is a couple of posts down.


---------- Post added at 03:57 PM ---------- Previous post was at 03:56 PM ----------

Quote Originally Posted by MeepDarknessMeep View Post
Anyone else notice he is also using a deprecated function?
Yeah you should be using RunConsoleCommand instead of LocalPlayer():ConCommand().
Quote Originally Posted by canttouchthis123 View Post
So from what I'm gathering you want a script that every ten minutes presses E then waits five seconds to press E again that loops forever? Well if that's what you want here you go (untested, it's quite late, so it also might not even work. Please correct it if I messed up.):

Code:
function AutoMine()
	if ( GetConVar("auto_mine") == 1 ) then
		timer.Create("HitEveryTenMin", 600, 0, function()
			RunConsoleCommand("+use")

			timer.Simple(5, function()
				RunConsoleCommand("+use")
			end)
		end)
	end
end

CreateClientConVar("auto_mine", "0")
AutoMine()


---------- Post added at 03:57 PM ---------- Previous post was at 03:56 PM ----------



Yeah you should be using RunConsoleCommand instead of LocalPlayer():ConCommand().

Thanks for the script I will post back in about 30 mins to tell you if it works
New script as request:

Code:
function AutoMine()
	timer.Create("HitEveryTenMin", 600, 0, function()
		RunConsoleCommand("+use")
		RunConsoleCommand("-use")

		timer.Simple(5, function()
			RunConsoleCommand("+use")
			RunConsoleCommand("-use")
		end)
	end)
end

concommand.Add("auto_mine", AutoMine)
Bind F9 ";+attack"

Bind F10 ";-attack"

Copy and paste those into console and you can use F9 and F10 to toggle +attack, be sure to include the ;
Quote Originally Posted by THC View Post
Bind F9 ";+attack"

Bind F10 ";-attack"

Copy and paste those into console and you can use F9 and F10 to toggle +attack, be sure to include the ;
That wouldnt work for a mining script
Quote Originally Posted by GokusDog View Post
That wouldnt work for a mining script
You want something to eat food for you too? Not gonna happen rofl.
Quote Originally Posted by THC View Post
You want something to eat food for you too? Not gonna happen rofl.
Not sure what you're trying to say but the person who coded the script I use did perfect, I AFK mined a few days ago for about 7 hours.
Code:
function automine()
if GetConVarNumber("automine") == 1 then
timer.Create("mine", 2.0, 1, function()
LocalPlayer():ConCommand("+attack")
end)
CreateClientConVar("automine", 0, true, false)
Im not super good at coding but I think this is right?? Tell me mah errors
Quote Originally Posted by johntheawe View Post
Code:
function automine()
if GetConVarNumber("automine") == 1 then
timer.Create("mine", 2.0, 1, function()
LocalPlayer():ConCommand("+attack")
end)
CreateClientConVar("automine", 0, true, false)
Im not super good at coding but I think this is right?? Tell me mah errors
There is so many things wrong I can't even tell you..

1. You never call the function
2. When you call the function, you get an error about timer.Create because you used the wrong syntax [timer.Create( Var uniqueID, Float delay, Integer reps, Function func )] (Did you mean timer.Simple() ?)
3. You never call the timer to be turned off when you turn it on, so you have to relog
4. Deprecated function Player:ConCommand(String command); use RunConsoleCommand(String command)
5. You call +attack two seconds after you create the timer, and it only happens once (Even though you are only supposed to call it once, I know you are trying to call it multiple times)
6. You do timer.Create ... end [correct] and function()..) [Doesn't match; should use function()..end]
Quote Originally Posted by johntheawe View Post
Code:
function automine()
if GetConVarNumber("automine") == 1 then
timer.Create("mine", 2.0, 1, function()
LocalPlayer():ConCommand("+attack")
end)
CreateClientConVar("automine", 0, true, false)
Im not super good at coding but I think this is right?? Tell me mah errors
never touch lua again
Quote Originally Posted by wearing8 View Post
never touch lua again
That's a bit harsh. Johntheawe you should become better at Lua before you offer help yourself. People appreciate the help, but it's useless if it just errors/doesn't do anything.
Posts 16–28 of 28 · Page 2 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us