Помощь - Поиск - Пользователи - Календарь
Полная версия: Переменные из других скриптов(lua) / Variable from other scripts(lua)
UoKit.com Форумы > Кликер > UO Pilot
neves
I have the following script:
Код
--lua
local randomName = 'Kayla'

I am trying to use that variable in other script. The normal pilot syntax has similar function (Переменные из других скриптов), but sadly couldn't find same for lua syntax.
The first thing I got on my mind is to write the variable in .txt file and then to read the same file in other script, but that won't be very fast solution in case the string is dynamic.
Do you have any suggestions?
Thank you.
FREEON
Цитата(neves @ 29.4.2020, 17:40) *

I have the following script:
Код
--lua
local randomName = 'Kayla'

I am trying to use that variable in other script. The normal pilot syntax has similar function (Переменные из других скриптов), but sadly couldn't find same for lua syntax.
The first thing I got on my mind is to write the variable in .txt file and then to read the same file in other script, but that won't be very fast solution in case the string is dynamic.
Do you have any suggestions?
Thank you.

random lua
I think if you sit and think for a while you can create a lua name generator
random
neves
Цитата(FREEON @ 30.4.2020, 0:55) *

I think if you sit and think for a while you can create a lua name generator

Это не совсем то, что я пытаюсь сделать. Я хочу использовать randomName в другом сценарии. пример: Использовать переменную из сценария 3 в сценарии 4 с использованием синтаксиса lua.
Cockney
I don'tt think that this can be done simply in lua. Maybe something can be done with the chain: lua ffi, writemem / readmem. But you must remember about access synchronization to the variable, because each script is executed in its own thread.
Это текстовая версия — только основной контент. Для просмотра полной версии этой страницы, пожалуйста, нажмите сюда.
Русская версия Invision Power Board © 2001-2024 Invision Power Services, Inc.