Forums » Community Projects
Hey,
I just wrote a quick hack that lets you turbo infinitely. It was actually Miharu's idea based on SuperMegaMynt's original alias and I think she's writing a better one that does real calculating. Until then, this should work for every ship/setup.
Just download http://sandbox.0x0b.de/infiturbo/main.lua to a folder named plugins/infiturbo.
Then you'll be able to do
/infiturbo (toggle)
/infiturbo on
/infiturbo off
That's it.
I just wrote a quick hack that lets you turbo infinitely. It was actually Miharu's idea based on SuperMegaMynt's original alias and I think she's writing a better one that does real calculating. Until then, this should work for every ship/setup.
Just download http://sandbox.0x0b.de/infiturbo/main.lua to a folder named plugins/infiturbo.
Then you'll be able to do
/infiturbo (toggle)
/infiturbo on
/infiturbo off
That's it.
Plugin > Bind.
dunno, whatever works better for you.
An effective plug in, and thank you as I will be replacing my bind with that. My linky was the fruits of my first introduction to 'programming' such as it was. The tears are because I tried to get Miharu to give me an example of what Miharu might do for such a bind, as I was still trying to learn how aliases and everything worked and wanted examples that worked with time cycling, and I got something along the lines of "I could if I wanted to, but no. Do it yourself.".
Miharu's idea my ass...
Miharu's idea my ass...
Did I ever say it was my idea? No. In fact, as slime would agree, it was your set of aliases and binds that made me think about how to go about it as a plugin. firsm may have missed that particular piece of information as he has only started spending time in the Lua IRC channel.
You're right -- I don't like you. That doesn't, however, preclude me from acknowledging that once in a while you actually write something meaningful and useful, such as the "Controlled Burn" set of aliases and binds. But do you know exactly *why* I don't like you?
First, you have a particularly bad habit of phrasing questions in such a manner that they are not the question you really want to ask -- and when people answer the question that they see, you always complain that no, that isn't the question that you asked, and that the other person is just stupid -- and you never fix the issue by providing the actual question that you want answered.
You also are very bad at accepting advice, despite what you say. Someone will provide you with a suggestion to make your code better, or even just a general tip and you frequently don't bother to even say "thanks, but no thanks" -- you normally just go and insult the person because they don't do things your way. Contributing to this problem is your absolutely horrid coding style; no linebreaks, no formatting, no comments, NOTHING. Then you expect us to look at your code in this massive chunk of text that makes Shakespeare look easy to a five-year-old that doesn't speak or read a word of English, and understand what it does. And, inevitably, when we don't understand what it does because it's impossible to read, you insult us for not being able to see what is supposedly clear as day and night. Well, I hate to break it to you, but a solid block of text is not readable, nor is it clear as day and night.
Furthermore, you go on and on about how you want to contribute to the community. How the hell is using trial account after trial account after trial account contributing to the community? The devs don't make a large amount of money from VO, and they need every subscription they can get. You're wasting their bandwidth, and their very hard-earned money. You're also wasting the time of a lot of other people who would normally be more than happy to help you in your endeavors, except for your attitude towards them.
And yet you wonder why we criticize you.
You're right -- I don't like you. That doesn't, however, preclude me from acknowledging that once in a while you actually write something meaningful and useful, such as the "Controlled Burn" set of aliases and binds. But do you know exactly *why* I don't like you?
First, you have a particularly bad habit of phrasing questions in such a manner that they are not the question you really want to ask -- and when people answer the question that they see, you always complain that no, that isn't the question that you asked, and that the other person is just stupid -- and you never fix the issue by providing the actual question that you want answered.
You also are very bad at accepting advice, despite what you say. Someone will provide you with a suggestion to make your code better, or even just a general tip and you frequently don't bother to even say "thanks, but no thanks" -- you normally just go and insult the person because they don't do things your way. Contributing to this problem is your absolutely horrid coding style; no linebreaks, no formatting, no comments, NOTHING. Then you expect us to look at your code in this massive chunk of text that makes Shakespeare look easy to a five-year-old that doesn't speak or read a word of English, and understand what it does. And, inevitably, when we don't understand what it does because it's impossible to read, you insult us for not being able to see what is supposedly clear as day and night. Well, I hate to break it to you, but a solid block of text is not readable, nor is it clear as day and night.
Furthermore, you go on and on about how you want to contribute to the community. How the hell is using trial account after trial account after trial account contributing to the community? The devs don't make a large amount of money from VO, and they need every subscription they can get. You're wasting their bandwidth, and their very hard-earned money. You're also wasting the time of a lot of other people who would normally be more than happy to help you in your endeavors, except for your attitude towards them.
And yet you wonder why we criticize you.
Indeed, Miharu did say she got her idea from Mynt when she first discussed her plugin. Firsm had logged off at that point.
Ok, I edited the original post. I didn't really know that there was a bind around as I didn't think something like that is possible with aliases. Don't get me wrong, I didn't think about anything when writing that plugin because it took me like 5 minutes to write and it was just a proof-of-concept.
Credit to Zyl who made me think of the idea, and incarnate who suggested a gradient turbo system might be nice.
http://www.vendetta-online.com/x/msgboard/3/13242?page=3#168178
http://www.vendetta-online.com/x/msgboard/3/13242?page=3#168178
are we done giving people credits now? :p
I think the link is wrong, but I like the idea ;D
-Thesp
-Thesp
wee-ooo-weee-ooo
Here comes the dramatruck!
Here comes the dramatruck!
Is that you inside?
Friday, May 23.
Ok, so it's during the last week of a given month that you'd better watch out, people.
But yeah, SMM's an ass.
Ok, so it's during the last week of a given month that you'd better watch out, people.
But yeah, SMM's an ass.
/me uses phoenix down to revive the thread.
ok i have no clue at lua, was wondering if theres an easy way to make this toggle-able for one joystick button.
ok i have no clue at lua, was wondering if theres an easy way to make this toggle-able for one joystick button.
Yes there is, I just updated the file to have a toggle function. All you have to do now is to simply bind "infiturbo" to a joystick button of your choice.
thanks firsm
If i'm using the plugin and i'm killed it crashes vo and i get the following error:
sent plugins/infiturbo/main.lua:15: attempt to compare number with nil
stack traceback:
plugins/infiturbo/main.lua:15: in function <plugins/infiturbo/main.lua:12>
sent plugins/infiturbo/main.lua:15: attempt to compare number with nil
stack traceback:
plugins/infiturbo/main.lua:15: in function <plugins/infiturbo/main.lua:12>
plugins/infiturbo/main.lua:15: attempt to compare number with nil
stack traceback:
plugins/infiturbo/main.lua:15: in function <plugins/infiturbo/main.lua:12>
plugins/infiturbo/main.lua:15: attempt to compare number with nil
stack traceback:
plugins/infiturbo/main.lua:15: in function <plugins/infiturbo/main.lua:12>
Code for the plugin is below. Can someone please tell me how to fix it?
start------------
local infiturbo = {}
infiturbo.running = false
infiturbo.timer = Timer()
infiturbo.timeout = 100
infiturbo.delta = 3
infiturbo.deltakeep = 10
local function turboon() gkinterface.GKProcessCommand('+turbo 1') end
local function turbooff() gkinterface.GKProcessCommand('+turbo 0') end
local function turbo()
if infiturbo.running then
local energy = GetActiveShipEnergy()
if energy > infiturbo.cell-infiturbo.delta then
turboon()
else
turbooff()
end
infiturbo.timer:SetTimeout(infiturbo.timeout, turbo)
end
end
local function infi(data, args)
if args and args[1] == "on" then
infiturbo.cell = GetActiveShipEnergy()-infiturbo.deltakeep+infiturbo.delta
infiturbo.running = true
infiturbo.timer:SetTimeout(infiturbo.timeout, turbo)
elseif args and args[1] == "off" then
infiturbo.running = false
turbooff()
else
if infiturbo.running then
infi(nil, {"off"})
else
infi(nil, {"on"})
end
end
end
RegisterUserCommand("infiturbo", infi)
----------------- end
Thanks in advance
sent plugins/infiturbo/main.lua:15: attempt to compare number with nil
stack traceback:
plugins/infiturbo/main.lua:15: in function <plugins/infiturbo/main.lua:12>
sent plugins/infiturbo/main.lua:15: attempt to compare number with nil
stack traceback:
plugins/infiturbo/main.lua:15: in function <plugins/infiturbo/main.lua:12>
plugins/infiturbo/main.lua:15: attempt to compare number with nil
stack traceback:
plugins/infiturbo/main.lua:15: in function <plugins/infiturbo/main.lua:12>
plugins/infiturbo/main.lua:15: attempt to compare number with nil
stack traceback:
plugins/infiturbo/main.lua:15: in function <plugins/infiturbo/main.lua:12>
Code for the plugin is below. Can someone please tell me how to fix it?
start------------
local infiturbo = {}
infiturbo.running = false
infiturbo.timer = Timer()
infiturbo.timeout = 100
infiturbo.delta = 3
infiturbo.deltakeep = 10
local function turboon() gkinterface.GKProcessCommand('+turbo 1') end
local function turbooff() gkinterface.GKProcessCommand('+turbo 0') end
local function turbo()
if infiturbo.running then
local energy = GetActiveShipEnergy()
if energy > infiturbo.cell-infiturbo.delta then
turboon()
else
turbooff()
end
infiturbo.timer:SetTimeout(infiturbo.timeout, turbo)
end
end
local function infi(data, args)
if args and args[1] == "on" then
infiturbo.cell = GetActiveShipEnergy()-infiturbo.deltakeep+infiturbo.delta
infiturbo.running = true
infiturbo.timer:SetTimeout(infiturbo.timeout, turbo)
elseif args and args[1] == "off" then
infiturbo.running = false
turbooff()
else
if infiturbo.running then
infi(nil, {"off"})
else
infi(nil, {"on"})
end
end
end
RegisterUserCommand("infiturbo", infi)
----------------- end
Thanks in advance
by reading the error messages of course!
it is trying to compare nubmer with nil, right?
make it not do that.
So i didn't test but this might work:
replace this:
if energy > infiturbo.cell-infiturbo.delta then
with this:
if energy and (energy > infiturbo.cell-infiturbo.delta) then
this might not be optimal solution but should stop crashes at least
you might want to handle the situation where it can't get energy (cause you have no ship prolly) in some specific manner
but i'm too lazy to figure out how, either way in that case you could do:
if not energy then
-- stuff
elseif energy > infiturbo.cell-infiturbo.delta then
-- rest
it is trying to compare nubmer with nil, right?
make it not do that.
So i didn't test but this might work:
replace this:
if energy > infiturbo.cell-infiturbo.delta then
with this:
if energy and (energy > infiturbo.cell-infiturbo.delta) then
this might not be optimal solution but should stop crashes at least
you might want to handle the situation where it can't get energy (cause you have no ship prolly) in some specific manner
but i'm too lazy to figure out how, either way in that case you could do:
if not energy then
-- stuff
elseif energy > infiturbo.cell-infiturbo.delta then
-- rest
Sorry, I did not think about the scenario where you have no ship.
Either do what Mick said or change line 13
from:
if infiturbo.running then
to
if infiturbo.running and HasActiveShip() then
I can't test it right now, but I think that should work, so I'll commit it to the repo from the first post.
firsm
Either do what Mick said or change line 13
from:
if infiturbo.running then
to
if infiturbo.running and HasActiveShip() then
I can't test it right now, but I think that should work, so I'll commit it to the repo from the first post.
firsm