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
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 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
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
so does god/ohk works? also can you give me an example of a code for the command that didn't work before?
Yeah it works, I'm working up updating my Fiona script as an example of how to do some new stuff
Nice cant wait for this to get approved to test it , oh one more thing form what i read in other topics not all commands work on towns/cities , but it's safer to lock/stop console work on town/city also when you alt-tab your console still retrieve the Hotkeys and excute the commands which i encountered @ first version , so my question this version has the same thing or u make it safe to use when you alt-tab or toggle out from Vindictus
Thanks alot
Any command that would normally work on another console should work with this.
But since that is a CVar you can always just use setCVar("ѕk_рlr_lеthіtа_ѕtаmіna_fаst_restоration_t іme_cоndіtiоn","-1")
Originally Posted by Nowayz
Any command that would normally work on another console should work with this.
But since that is a CVar you can always just use setCVar("ѕk_рlr_lеthіtа_ѕtаmіna_fаst_restоration_t іme_cоndіtiоn","-1")
maybe thats why it didn't work before? because on all my commands i use cmd, idk which ones CVar and which are not.
thank you^^
would I be able to auto bot with this? if I were able to write all the scripts?
as I can do to run a command? for example god/ohk, (sorry for my english D
Possibly, although I don't have any engine interface as of yet.
Originally Posted by chopo15
as I can do to run a command? for example god/ohk, (sorry for my english D
don't be afraid of reading all the posts. he said that they should work.
Invalid Attachment specified. If you followed a valid link, please notify the administrator.