Ev3nt / war3_lua

War3 Lua is a modification that allows you to run lua scripts at the JASS level.
MIT License
33 stars 9 forks source link

where is native list? #2

Closed ximperial closed 2 years ago

ximperial commented 2 years ago

i can't see native list or function list

Ev3nt commented 2 years ago

You don't need this. War3 lua is parsing all natives of warcraft. Just use them, how you use another functions. If you need the list, open default common.j or type this script, to see all available functions.

for k, v in pairs(_G) do
    print(k.." - "..tostring(v))
end
ximperial commented 2 years ago

You don't need this. War3 lua is parsing all natives of warcraft. Just use them, how you use another functions. If you need the list, open default common.j or type this script, to see all available functions.

for k, v in pairs(_G) do
    print(k.." - "..tostring(v))
end

i see some native on lua.w3m from 1.1.4 (ashenvale) that is not on common.j 1.26, and how to properly use that script? ingame that script just print few function

Ev3nt commented 2 years ago

Create war3map.lua and type in it (replace print to printc, because it let you displaying text in console). Then just move script inside your map. Attention: start warcraft with parameter "-console".

ximperial commented 2 years ago

ok, its working. are this lua script can call jass code. i mean if i using custom function on jass and call it inside lua like memhack thing

Ev3nt commented 2 years ago

No, not yet. Perhaps I will add this in the near future.

Ev3nt commented 1 year ago

ok, its working. are this lua script can call jass code. i mean if i using custom function on jass and call it inside lua like memhack thing

Finally, we have added this feature so that you can access your jass variables (read only). Sample:

TimerStart( bj_volumeGroupsTimer, 5.00, false, function( )
    -- Where bj_volumeGroupsTimer is a jass variable
    print("5 seconds have passed!")
)