Summary: VLSE Is a Lua implementation inside of Vindictus that allows users to run scripts which perform console commands, set CVars and be free to customize the game to their liking.
Features:
Run console commands on the game
Force the setting of a ConVar
Get the value of any ConVar
And detect which keys are being pressed
Added some anti-detection code that I forgot to un-comment for the last release!! (Oops)
This might prevent the VLSE from being detected on the next hackshield update (Cross your fingers)
Should work on XP now
Has a working console similar to Pub-console, but without the inconvenience
More to come!
API Reference:
Code:
print(str msg) --Prints a string into the stdout handle, which is typically the built in console.
cmd(str cmd) --Executes a console command on the game engine
wait(int ms) --Waits for a specified number of miliseconds; useful for accurate attack command sequences
keyDown(int keycode) --Checks if a specific key is currently being held. (Wrapper around GetAsyncKeyState)
keyDown_Press(int keycode) --Checks if a specific key is currently being pressed. (Wrapper around GetAsyncKeyState&1)
getCVar(str cvarname) --Gets the string value of a specified console variable
setCVar(str cvarname, str value) --Sets a console variable to a certain value regardless of replication or other flags
Examples:
print("hello world")
cmd("sv_gravity 0") --turn off gravity
wait(100) --Waits for 100miliseconds, or 1/10th of a second
--Checks if a key is pressed and changes the difficulty
if keyDown_Press(0xC0)~=0 then
print("difficulty modified!")
cmd("current_combat_difficulty 1")
end
-Checks if F10 is pressed, and turns on a speedhack if it is
if keyDown_Press(0x79)~=0 then --F10
if getCVar("host_timescale")=="1" then
setCVar("host_timescale","3")
else
setCVar("host_timescale","1")
end
end
Since I fixed the way commands execute, certain commands might crash the game
So here's what you do:
Code:
--I wrote a function to make keybinds easy, since some commands only work when bound
--Just include this at the top of your script and you will be able to use it too!
function bind(key,command)
print("Bound "..key.." to "..command)
cmd("bind \""..key.."\" \""..command.."\"")
end
--Set all the binds we want when we press F11
if keyDown_Press(0x7A)~=0 then
bind(";","cc_change_start_game_message")
bind("/","changemap_to_current_random_sector")
--etc...
end
How to load binds from loadcommands.txt:
Code:
if keyDown_Press(0x7B)~=0 then --Reload all binds on F12 key press
for line in io.lines(getWorkingDir().."loadcommands.txt") do
print(line)
cmd(line)
end
end
How to use?:
Unzip the archive to the folder with your injector
Modify the auto.lua script to your liking
Check console for lua errors if you're script isn't working
Have fun scripting!
Readme:
The current version of VLSE only runs a single script auto.lua every 20ms, in the future I will implement threaded support for multiple scripts.
If you have any additional questions, or feel I didn't provide enough information on a topic please post about it.
I will be providing a few short scripts that I use as examples of what is possible.
Some commands will crash your game when you try to execute them, such commands only work when bound to keys!
So If you're crashing after running a command, (changemap_to_current_random_sector) for instance, then bind it to a key instead!
--Nowayz(HaloShadoW)'s Fiona Lua Script
function bind(key,command)
print("bind \""..key.."\" \""..command.."\"")
cmd("bind \""..key.."\" \""..command.."\"")
end
--Set all the binds we want when we press F11
if keyDown_Press(0x7A)~=0 then
bind(";","cc_enter_rochest_from_colhen")
bind("/","changemap_to_current_random_sector")
--etc...
end
--Spam the hammer finish attack with perfect wait time
if keyDown(0x47)~=0 then -- G
cmd("plr_play_overlay_sequence battle_hammer_attack_strong_04_finish_d")
wait(370)
end
--Use heavystander infinitely while holding Q
if keyDown(0x51)~=0 then -- Q
cmd("plr_play_overlay_sequence heavystander_during")
end
--Wait for ; to be pressed and repair all my items
if keyDown_Press(0xBA)~=0 then -- ; Key
cmd("campfire_repair")
end
--Fill all quickbar items with ' or F key (This means infinite spears)
if (keyDown_Press(0xDE)~=0)or(keyDown_Press(0x46)~=0) then -- ' or F key
cmd("bind \";\" \"cc_change_start_game_message\"")
cmd("cc_fill_all_items")
end
--Turn on godmode and one hit kill, and make us glow
if keyDown_Press(0xC0)~=0 then --Tilda key (~)
cmd("cc_efx effects/player/fiona_paladin_body_loop.efx")
cmd("god")
cmd("ohk")
end
--Wait for F10 to be pressed and enable/disable speedhacks
if keyDown_Press(0x79)~=0 then --F10
if getCVar("host_timescale")=="1" then
setCVar("host_timescale","3")
else
setCVar("host_timescale","1")
end
end
Picture:
Useful Code Samples:
Restore full SP:
Code:
--Thanks do DanK
if keyDown_Press(0xBA)~=0 then --;
for v=0,50 do
cmd("plr_play_overlay_sequence dead_resist")
wait(50)
end
end
load all the binds in loadcommands.txt:
Code:
if keyDown_Press(0x7B)~=0 then --Reload all binds on F12 key press
for line in io.lines(getWorkingDir().."loadcommands.txt") do
print(line)
cmd(line)
end
end
Razorx2010's auto.lua Script (Evie):
Code:
--I wrote a function to make keybinds easy, since some commands only work when bound
--Just include this at the top of your script and you will be able to use it too!
function bind(key,command)
print("Bound "..key.." to "..command)
cmd("bind \""..key.."\" \""..command.."\"")
end
--Set all the binds we want when we press F11
if keyDown_Press(0x7A)~=0 then
bind(",","cc_enter_rochest_from_colhen")
bind(".","cc_enter_colhen_from_rochest")
bind("'","changemap_to_current_random_sector")
end
if keyDown_Press(0x23)~=0 then --end
print("GodMode enabled!")
cmd("god")
end
if keyDown_Press(0x22)~=0 then --pgdn
print("Normal difficulty enabled!")
cmd("current_combat_difficulty 1")
end
if keyDown_Press(0x21)~=0 then --pgup
print("One Hit Kill enabled!")
cmd("ohk")
end
if keyDown_Press(0x24)~=0 then --home
print("trans level one enabled!")
cmd("plr_play_overlay_sequence paladin_transformation_begin_1")
end
if keyDown_Press(0xDC)~=0 then --\
print("trans level two enabled!")
cmd("plr_play_overlay_sequence paladin_transformation_begin_2")
end
if keyDown_Press(0x4F)~=0 then --o
print("skip level enabled!")
cmd("changelevel 2")
end
if keyDown_Press(0xBF)~=0 then --?
print("sticky bomb enabled!")
cmd("cc_set_sub_weapon sticky_bomb 999")
end
if keyDown_Press(0x26)~=0 then --up
print("spears enabled!")
cmd("cc_set_sub_weapon javelin_lvl2 999")
end
if keyDown_Press(0x25)~=0 then --left
print("mine bombs enabled!")
cmd("cc_set_sub_weapon mining_bomb 999")
end
if keyDown_Press(0x27)~=0 then --right
print("palala bombs enabled!")
cmd("cc_set_sub_weapon flashbang 999")
end
if keyDown_Press(0x28)~=0 then --down
print("bombs enabled!")
cmd("cc_set_sub_weapon handbomb_lvl2 999")
end
if keyDown_Press(0x50)~=0 then --p
print("shield repair enabled!")
cmd("plr_play_overlay_sequence sp_shield_repair")
end
if keyDown_Press(0x4C)~=0 then --l
print("reverse gravity enabled!")
cmd("plr_play_overlay_sequence reverse_gravity")
end
if keyDown_Press(0x4B)~=0 then --k
print("blind arrow enabled!")
cmd("plr_play_overlay_sequence magic_blind_arrow")
end
Approved dat
hehe on> load all the binds in loadcommands.txt:< I get attempt to call global getWorkingDir (a nil value)
I might have uploaded the wrong file, give me 5 minutes.
---------- Post added at 04:00 PM ---------- Previous post was at 03:52 PM ----------
I just recompiled, and made sure it was working -- which it is -- so try downloading the new one after it's approved.
Re-approved.
Nico the beast approver.
Great job. I'll have to check this out to see what I can make it do.
Previous threads have snippets of code if you look hard enough, I haven't take the time to drag it all into my post.
Nowayz - you rock your console is universal for ppl whose not lazy ;D (just nuke and it would be perfect) loading commands from other file workin' fine now just need to put up some lvl'in bot
Well this version lets you type into the actual console window if you want to execute a command quickly, so that makes it a little bit more lazy friendly.
If you want to do anything that's advanced though you have to take some time and learn how
Can this kind of scripting mouse click at x / y, without the game being a active window?
Originally Posted by antfuentes87
Can this kind of scripting mouse click at x / y, without the game being a active window?
VLSE in its current evolution isn't able to do this.
Although the concept of what you're talking about is not very hard; all you need to do is wrap most of the directinput functions that receive input tables, etc, and give them the information in order to macro. Processes on modern computers use virtual address space which is a very cool feature because it diminishes the labor in doing something like this. The thing that you need to watch out for however would be hackshield as it would be significantly easier to detect a user-mode hook on several common procedures.
All of this being said, it is not something which I have the time to pursue right now.
If somebody decided to write a module that does what I suggested however, I would be glad to add it in.
on XP it opens the console with Vindictus, then the console closes/crashes but Vindictus keeps running...
lol I'm thinking to upgrade to Windows 7 but I heard it sucks the RAM, I've 4GB of RAM... what do you guys think?
Originally Posted by kakkola_ch
lol I'm thinking to upgrade to Windows 7 but I heard it sucks the RAM, I've 4GB of RAM... what do you guys think?
Err. 4 GB is more than enough for Win 7. It runs on 2 GB.
On XP console waits game client to start and then closes.. But the binds work if you set them
I have a question, what do i type if I want to bind NUMPAD keys to commands, for example: bind(";","cc_enter_rochest_from_colhen") if instead of ; button I wish it to bind to NUMPAD6 ? I tried everything form virtual key code list and it didnt work...