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

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

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

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

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

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

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

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

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

Подробнее

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

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

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

Setras

Разработчик аддонов
  • Постов

    1703
  • Зарегистрирован

  • Посещение

Весь контент Setras

  1. if common.MyUsefullFunctionChecks if that function exists or not. If not - it will return nil which is same as false to "if" function, so the code after "then" will not be executed, else will trigger instead. Here's an example: Once upon a time a function common.GetLocalTime() was moved to mission.GetLocalTime(). Here's how to fix that: if common.GetLocalTime then mission.GetLocalTime = common.GetLocalTime end So if you use this script in a 4.0.0 - it will work with no common.GetLocalTime at all. And if you run this in an older version, it will create mission.GetLocalTime and mission.GetLocalTime in your script will work as common.GetLocalTime does. You may download SetMyFPS and look at first couple of lines. I think you'll understand how does that work.
  2. Для получения более подробной информации по каждому предмету можно пользоваться функциями вроде avatar.GetItemInfo( itemId ) avatar.GetItemMetaInfo( itemId ) enchant.GetEnchantInfo( enchantId ) и т.п. и т.д. в зависимости от того что конкретно нужно получить.
  3. You want it not without a reason. So the reason will give you the answer. Say, if you want to know if it has a certain function to use it, or not, just check if that function does exist. if common.MyUsefullFunction then DoStuff() else DoOtherStuff() end
  4. Полный, мать его, вынос мозга. function LogTab(atab, PrefiX) if type(atab) ~= "table" then LogInfo("Not a table, ", atab, " but ", type(atab)) return end for n,v in pairs(atab) do if type(v) == "table" and n ~= "_G" then LogInfo(PrefiX,n, " is a table.") local prefx = PrefiX..n.."." LogTab(v,prefx) else LogInfo(PrefiX, n, " = " ,v, " , type: ",type(v) ) end end end for k, v in {{1, 2},{3, 4, 5},{6,7,8,9,0}} do for kk, vv in {10, 11, 12} do tbl[n] = v LogInfo("--------ДО ПРИСВАИВАНИЯ----------") LogTab(tbl, "tbl.") tbl[n][4] = vv LogInfo("------ПРИСВОИЛИ-----tbl."..n..".4 =", tbl[n][4]) LogTab(tbl, "tbl.") n = n + 1 end end LogTab(tbl, "tbl.") Вывод этого кода просто ломает все представления о его работе. Работает крайне непонятно.
  5. Экспортируются любые доступные данный весьма просто.
  6. По моему я опять ошибся в string.find. Если там будет мусор в начале/конце строки, то функция все равно отработает и вернет некое число в виде строки текста если оно там будет.
  7. Ручное редактирование всех мест с текстом и изменение шрифта.
  8. А если использовать мною предложенный вариант, то он вернет число целиком. Точнее в качестве фильтра надо использовать не "%s([0-9]*)" (Зачем там вообще пробел?) а "([0-9]+)". Это гарантирует то, что функция вернет строку, содержащую число, а если в поле будут другие символы - вернет nil. Эта функция возвращает: Начало подстроки, Конец подстроки, Captures по порядку. В данном случае capture это ([0-9]+). Capture это то что заключено в круглые скобки, например в фильтре: (ВЫР(выр)ЙЦ(У)й(ц(у))) Captures по порядку будут: 1) ВЫРвырЙЦУйцу 2) выр 3) У 4) цу 5) у В моём случае я предложил использовать local a, b, number = string.find(string, "%s([0-9]*)") Таким образом в переменных a и b будут записаны начало и конец найденной подстроки (ненужная для нас информация), а в третью переменную - nil или содержимое скобок, т.е. 0 или более символов 0-9, т.е. некое число к которому можно применить tonumber(number). Также можно использовать "([0-9]+)", т.е. вместо звездочки (0 и более символов) использовать плюс (1 и более символов), что гарантирует нам результат только когда будет хотя бы одна цифра, т.к. под [0-9]* подходит и "пустое место". Нет, ты неправильно понял. Не "выводить лог в другой файл", а "выводить В ЛОГ путь ДО АДДОНА". Т.е. что-то типа "Error: Addon /data/mods/addons/MyAddon: syntax error".
  9. It's up to addon's developer (each and any) to support different game versions and/or game localizations. Supporting different game version is not hard at all, but it can be complicated by the absence of required EU/NA client "on hands", but isn't hard if there are any players that want to cooperate in adding such complaitability and fixing errors, as "fixes" usually consist of replacing and/or renaming missing/added functions to work in both versions. As for english/other versions, adding multilingual support is not hard at all, but most of current addon developers do not know english. However, google translate and other usefull tools can help us out. If you want to buy some addon (now or in the future), you may ask the author if he has english/deutsch/francais etc support or not. Also, some of the addons do not require language files at all. Target marker and such, for example. Each paid addon has payment option description. Some of them are "buy once and you are free to download updates forever". Some of them are "Pay once for a limited acces, and then pay again same/other amount of money for access prolongation". Here's an example of potential addon's payment options: 1) Pay 1$ for initial access, and get 6 months of acces time. After 6 months your access terminates and you will need to update your subscription to download new versions by paying additional 1$. 2) Pay 5$ for initial access and get 3 months of access time. After 3 months your access terminates and you will need to update your subscription to download new versions by paying additional 1$. 3) Pay 1$ and get permanent access to addon and it's updates (well, permanent does not mean that author will not abandon allods or addons after some time, so it may come that at some point noone will fix that addon). For every addon, it's only author's decision to make it free or paid, and to choose payment amounts and options. Also an author can change them at any time. One thing you should know, is that once you've bought an addon you may stay with current payscheme even if the author changes one. E.g. if he increases cost or decreases subscription duration, you will keep your old payment scheme and will keep your acces to addon's updates and new versions. At the moment, there are no "limited-use" addons, so even if you've bought an addon and don't want to access new versions and/or fixes you may use it as long as it works. Later on, however, subscription addons may appear(but not guaranteed, at the moment). E.g. addons that work only for character you bought it for, and/or that work for limited time only, requiring mandatory subscription update for it to continue working and/or separate/individual purchases for different characters.
  10. Я перепутал string.gfind и string.find. Используй второе.
  11. function это функция. local a, b, number = string.gfind(string, "%s([0-9]*)") и local textEditLine = string.gfind (textEditLine, '%s([0-9]*)') Это совершенно разные вещи. Что такое textEditLine ? Откуда ты это взял?
  12. local a, b, number = string.gfind(string, "%s([0-9]*)") А по-хорошему надо настроить фильтр.
  13. http://www.lua.org/manual/5.0/manual.html#1 В Lua 5.0 нету функции string.match
  14. Ты конченый слоупок.
  15. Hi. Unfortunately it's currently impossible to buy something on this website using out-of-ex-ussr payment options (non-ussr Visa/Mastercard, PayPal). Webmoney is an exception, but it isn't very popular. As for exchange rate, international USD -> RUR exchange rate is 1:30.1 atm (may vary a little bit), So yes, 20 russian roubles is something around 0.67 USD. Alloder.pro does not update your addon subscription automatically unless you have some credits on your alloder.pro account, so it does not charge your credit card when your subscription ends. But you can buy some credits and have your subscription automatically updated when it expires if you have enough credits on your alloder.pro account.
  16. Нет, не бред. т.к. так и было. Доказательства тебе предоставили. Будешь отнекиваться что "так не было, скрины сляпаны в фотошопе"? Если варишь из корней мандрагоры то вообще не надо видеть её компоненты.
  17. Сперва думать научись, потом пиши, ок?
  18. Совсем дура шоле? Ему нужно аддоном определить есть ли у человека КМВ, вехи данаса, свитки на умения и т.п. Подобные вещи называются Unlocks и получаются по avatar.GetUnlocks().
×
×
  • Создать...

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

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