Перейти к содержанию

Дайджест за январь-март

Обновления гайдов и аддонов

Март Февраль Январь

Мониторинг серверов и редактор аддонов

Представляем вам две легенды. То, о чем можно было только мечтать, стало реальностью.

Мониторинг серверов Редактор аддонов

Подсказки из игры на вашем сайте

Теперь вы можете отображать сведения о внутриигровых элементах простым наведением курсора мыши.

Подробнее

Апдейтер аддонов

Представляем вам программу для автообновления аддонов и делимся подробностями.

Подробнее Скачать


1 изображение

Информация о файле

LibTimer is a library that allows the use of a timer function. This is intended for developers, not general players.

The Allods API does not provide a way to call a function after a certain time, at least not without freezing the thread. So I've used something that the API does provide: animation of a widget. To be more exact, when we animate a widget, we can specify the duration of the animation. My library uses that.

Usage is simple. First, include the file in AddonDesc.(UIAddon).xdb, in the <Scripts> section, but before your main script file.

You can use the timer function like so:

StartTimer(functionName,duration,arguments[...])

functionName is the name of the function that you want to execute.

duration is the duration in milliseconds after wich the function will execute

arguments is a list of the arguments that you want to pass to your function. You can pass any number of arguments

This is an example that will run the function TestTimer 2 seconds after writing "Test Start". 

function TestTimer(param1, param2, param3)
  common.LogInfo("",param1.." "..param2.." "..param3)
end

common.LogInfo("","Test Start")
StartTimer(TestTimer,2000,"First String","Second String","Third String")
common.LogInfo("","Test End??")

The result will be the following

Test Start
Test End??
First String Second String Third String

 


×
×
  • Создать...

Важная информация

Пользуясь сайтом, вы принимаете Условия использования