Jump to content

Digest January-March

We talk about what was done and updated in the past month. We help keep abreast of events.

March February January

Servers monitoring and the Addons Editor

We present you two legends. All dreams come true.

Servers monitoring The Addons Editor

A statistics bot for Telegram

Convenient analytics right on your phone.

Read more

Game tooltips

Tooltips provide a way for 3rd party fansites and extensions to display detailed information on mouseover.

Read more

The Addons Updater

Let us to introduce the addons updating software and to share the details

Read more Download

Минимальный аддон


Guest KentAVr57

Recommended Posts

Guest KentAVr57

Доброго вам дня..

У меня просьба пожелание..

сделайте пожалуйста минимальный аддон HelloWord .. например с выводом в чат..

и описанием какие файлы для чего нужны и какие теги функции и почему используются..

в общем и целом с програмированием я знаком)) .. но с луа и аддонами не работал никогда.. дайте основу минимальную пожалуйста..

буду очень благодарен..

Link to comment
Share on other sites

там 2 файла

в AddonDesc.(UIAddon).xdb

просто описан список скриптов (если без форм) както так:

Code:
<?xml version="1.0" encoding="UTF-8" ?>

<UIAddon>

  <AutoStart>true</AutoStart>

   <Name>Mob</Name>

  <ScriptFileRefs>

    <Item href="ScriptMob.lua" />

  </ScriptFileRefs>

  <author>Merlok</author>

  <revision>1</revision>

 <update>2010-02-24 05:15:41</update>

 <www>http://ui9.ru/forum/Mob</www>

</UIAddon>

а в скрипте (ScriptMob.lua):

Code:

function Init()

  common.LogInfo(common.GetAddonName(), "------ Hi ------------")

end

--------------------------------------------------------------------------------

Init()

--------------------------------------------------------------------------------

и все....

Link to comment
Share on other sites

Guest KentAVr57

Спасибо большое буду пробовать)

Link to comment
Share on other sites

В папке SampleAddons лежит вроде как 4 аддона которые можно покопать и поковырять, также в документации написана маленькая "статейка" для новичков - как создавать аддоны.

Link to comment
Share on other sites

Guest KentAVr57

ятак понял при заходе в АО должна появится надпись в чате "------ Hi ------------"?

если да то ее не появилось.. почему? заранее спс

Link to comment
Share on other sites

П.С. функция common.LogInfo() выведет строку в файл Allods Online\Personal\Logs\mods.txt

Link to comment
Share on other sites

Чтобы вывести строку в чат надо использовать group.ChatSay(x)

где х это WString

Link to comment
Share on other sites

Guest KentAVr57

спс модс.тхт я проверял такого файла нет.. думается мне что в минимальном аддоне всетки 3 файла должно быть..

Link to comment
Share on other sites

Guest KentAVr57

и еще вопрос а можно както переинициализировать аддон? чтобы из игры не выходить и не заходить каждый раз?

Link to comment
Share on other sites

Guest KentAVr57

спс

Link to comment
Share on other sites

мини "хавту" како-то получился... ленивый народ пошел...

Link to comment
Share on other sites

Хавту писать всёравно придётся. Я уже собираю инфу для новой версии статьи "Как написать аддон".

Разработчики обидели нас своим скудным учебником, придётся делать свой.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using our site you agree to the Terms of Use