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

Дайджесты за январь-февраль

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

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

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

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

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

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

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

Подробнее

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

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

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

Developing SpamProtect


Гость Carnifex

Рекомендуемые сообщения

not i == 1 - two parts

not i - always false and 1 - always true

false == true? -> false

(not (1==2))

1==2 - always false

not false - true

Ссылка на комментарий
Поделиться на другие сайты

Is there a possibility to get a substring from a wstring in opur game version (before 1.1.03)?

(goldseller changes their spam very often, but the urls are always the same...)

Ссылка на комментарий
Поделиться на другие сайты

Unfortunately, impossible in AO 1.1.00. But starting from NEXT big patch, AO 1.1.01, you will be able to do so:

MySubstring = string.sub( userMods.FromWString( MyWString ), iStart, iLength )

Ссылка на комментарий
Поделиться на другие сайты

-one little bugfix

-update detection txt (new goldseller messages)

-->give me substrings, plssssss

BTW: If someone from allods us or the other eu communities reads this: Use your goldsellery other messages than these in the txt files or have we all the "same" goldsellers. I think the eu goldsellers are the same (why should say use other messages in english or french version, if they use english shouts by us (german version)). But use us- and eu-goldsellers the same messages? pls let me know

Ссылка на комментарий
Поделиться на другие сайты

Quote:
BTW: is it possible to make that "/Schlachtzug text here" automaticly call "/raid text here" (our gm's have translated raid with schlachtzug, but they do not have added an new slashcommand dor it...)

I think it's possible if you always use mission.GetChatInput(), check if params.cmdArg is equal to (stored in a text file?) /Schlachtzug (or any of it's aliases like maybe... /schl ?) and use mission.SetChatInputType( sysCmdType ) with "raid" and after - clearing text input field by running mission.SetChatInputText( text ) which contains empty wstring.....


Well all this stuff seems very complicated for a single-way usability.
Ссылка на комментарий
Поделиться на другие сайты

this does not work, because of cmdName (cmdArg is always nil) has the right value "Raid" and not "Schlachtzug" and mission.SetChatInputType("raid") do not solve the error with the unknown slash comman "/Schlachtzug"

Ссылка на комментарий
Поделиться на другие сайты

боюсь встрять в ваш английский разговор, но что вы тут обсуждаете, какой аддон, и если мона порусски))))

Ссылка на комментарий
Поделиться на другие сайты

SpamProtect - аддон для защиты от спама. Позволяет добавить в Игнор любого, кто пишет что-то в чат. В русской версии АО это не актуально, т.к. у нас нет спамеров. А вот, для иностранцев, это актуально, и ещё как.

P.S. Carnifex, I got your PM, but I was very busy to answer. I will help you to post SpamProtect on UI9, today or tomorrow.

Ссылка на комментарий
Поделиться на другие сайты

Here is a preview of the next version of Spam Protect (note, that it start working with the 1.1.01 patch, don't run it at version 1.1.00 !)

New features:

-now it checks if a msg contains a typically Goldseller url and marke such messages as goldsellermsg (-->SpamProtect continue workink after a change of the beginning or ending of a goldsellermsg without any update)

-type "/f [name]" to add [name] to the friendslist

-type "/i [name]" to add [name] to the ignorelist

-removed internal error handling (not necessary in version 1.1.01) (-->synchronisation of the ignorelist now immediately after login)

Ссылка на комментарий
Поделиться на другие сайты

Some features of SpamProtect are broken for Russian player since version 1.1.04 because of the API Changes with the friendslist, which also had broken GuildGui1b. Maybe I fix this in a later version, unless it is not realy needed.

BTW: loot.SelectWinnerForLoot(rollId,winnerId) --> Can you really manipulate the Roll of the loot and choice any character as the winner? o.O

Quote:
P.S. Carnifex, I got your PM, but I was very busy to answer. I will help you to post SpamProtect on UI9, today or tomorrow.

I think in time of the realse of 1.1.01 (5.10.2010) would be create, because of the big no feature of checking substring with UserMods.FromWString.

Ссылка на комментарий
Поделиться на другие сайты

Quote:
loot.SelectWinnerForLoot(rollId,winnerId) --> Can you really manipulate the Roll of the loot and choice any character as the winner? o.O

No, this is only for a LootMaster. There are really 3 looting themes in AO. First one is "free for all" (the one who takes loot first, takes everything), Second one is "Need/Greed/Pass", and third one is "LootMaster". LootMaster is a special member of the Raid (RaidLeader can make anyone a LootMaster), who decides how to distribute looted items. Btw, all those functions for LootMaster do exist in API, but there is no LootMaster option in the game! Probably game devs not implemented it yet :)) Maybe we can make an ADDON to make it work? =)

Quote:
I think in time of the realse of 1.1.01 (5.10.2010) would be create, because of the big no feature of checking substring with UserMods.FromWString.

OK. I have to either create a step-by-step tutorial in English ("How to post addons on UI9"), or (better) translate all those interfaces into English and ask Skillcoder to build-in it into the English website translation. This can take a longer time, because Skillcoder (the owner of UI9) is very busy with other project, and he can't spend much time on UI9. But anyway, this have to be done earlier or later.

P.S. BTW, constantly forget to tell you, that if you took AOClassLibrary just to add Drag&Drop support into SpamProtect, then you don't need AOClassLibrary at all. There is a much simpler solution for Drag&Drop - LibDnD library (English guide included).

Using LibDnD, you can build your addon in standard way, using only generic API functions, without TWidget class, CreateNewObject(), MakeMovable(), GetChildByName(), SetHeight(), SetWidth(), Show(), Hide(), SetPosition() - all those functions are from AOClassLibrary, not from generic API.

Or, if you want to use AOClassLibrary, then you have to avoid making the same mistake as you did in addon manager - don't use TWidget:CreateNewObjectByDesc() every time you want to access a widget :) Because you are creating an infinite number of widgets (!), and there is no Destroy() function in AOClassLibrary :))) Use TWidget:CreateNewObjectByDesc() ONLY during addon initialization, nowhere else!, just like it is done in DarkDPSMeter. Create all your widgets ONLY ONCE (in Init() function), and then use those widgets everywhere in your addon.
Ссылка на комментарий
Поделиться на другие сайты

Quote:
Btw, all those functions for LootMaster do exist in API, but there is no LootMaster option in the game! Probably game devs not implemented it yet :)) Maybe we can make an ADDON to make it work? =)


And how do you want to get in the LootMaster mode?

Quote:
Create all your widgets ONLY ONCE (in Init() function), and then use those widgets everywhere in your addon.


But how shall I know, how many of the widget I will need?

BTW:

if not DelGSTextList then
local wtName="DelGSText"..i
DelGSTextList=TWidget:CreateNewObjectByDesc(wtName,DelGSTextPrototype:GetDesc(),DelGSPanel)
end

and i do not think, that I create with this code a infinite number of widgets, because I check, if the Widget is still created and if so i do not create one more widget, because I only use the old one again. I ONLY create new widgets if I need one more, because the widget of this index does not excist.
Ссылка на комментарий
Поделиться на другие сайты

Quote:
if not DelGSTextList then

Yes, this will work.

Also, specially for you :) and, as well, it will be included in the next DarkDPSMeter's AOClassLibrary.lua update:

Code:
function TWidget:Destroy()
if self.Widget then
self.Widget:DestroyWidget()
self = nil
end
end

Now AOClassLibrary have not only Create() functions, but also Destroy() function :)
So, now you can destroy the unused widgets this way:

WidgetName:Destroy()
Ссылка на комментарий
Поделиться на другие сайты

thx, I have added this to my new preview version

new features:

-removed the userMods.GetGlobalConfigSection=common.GetGlobalConfigSection (not needed in Ao 1.1.02)

-not needed Wifgets are now destroyed and not only hided

-now it works in AO 1.1.04

@SLA: Is there in AO 1.1.04 also a social.GetIgnoreInfo or can I access the ignore list as before?

Ссылка на комментарий
Поделиться на другие сайты

  • 2 недели спустя...

Hey, hey, you shouldn't have social.GetIgnoreInfo() in EU/US versions yet, because it was added in AO 1.1.04 !

In AO 1.1.04, social.GetIgnoreList() have changed, just like social.GetFriendList().

Now, social.GetIgnoreList() returns NOT a table, but a list of IgnoreId's (list starts from index [0]). And to get data about any ignoreId, you have to use a new function - social.GetIgnoreInfo( IgnoreId )

In AO 1.1.02, social.GetIgnoreList() returns a table, filled with data, so you don't have to use social.GetIgnoreInfo() at all.

Or am I wrong? I can be wrong, because I have just discovered that your API 1.1.02 differs from our API 1.1.02. I have noticed that your latest EU/US API (1.1.02) got a function from Russian API 1.1.03 (!!!) - object.IsFar(). And this fact makes my GetGameVersion() function wrong, because it returns 1103 in the laters English version :( I have to post an updated GetGameVersion() function. UPD: Done.

For example, this is how I did backwards-compatibility in GuildGui1b, and it works in both 1.1.04 and EU/US 1.1.02:

Code:
local members = social.GetFriendList()

for i = 0, GetTableSize( members ) - 1 do

-- Hack for AO 1.1.04+:

if social.GetFriendInfo then

members  = social.GetFriendInfo( members  )

end

-- Now we can use members   in both AO 1.1.04 and 1.1.02:

BaseList  .name = members  .name

BaseList  .level = members  .level

BaseList  .class = members  .raceClass.name

end

Ссылка на комментарий
Поделиться на другие сайты

and what's the problem of having 1.1.04+ support in the addon version?

Code:
for _,entry in ipairs(tab) do

if social.GetIgnoreInfo then -- AO 1.1.04+

if common.CompareWString(social.GetIgnoreInfo(entry).name,item)==0 then return true end

else

if common.CompareWString(entry.name,item)==0 then return true end

end

end

return false

in 1.1.02 "social.GetIgnoreInfo(entry)" is not called, because "social.GetIgnoreInfo" should be wrong

Here is Version 2.0 (for AO 1.1.02+ with checking substrings):

Ссылка на комментарий
Поделиться на другие сайты

  • 2 недели спустя...

I don't know if you still need french spam message, however I have a question : spammer alters characters to avoid detection (o->0, l -> 1, etc.) but all their message start with "Welcome to" in plain text. What don't you use that substring to detect spam?

Ссылка на комментарий
Поделиться на другие сайты

I like this idea and downloaded the file. How is a US player suppose to use this? Just copy into data > Mods > Addons like any other addon?

Ссылка на комментарий
Поделиться на другие сайты

Edit the url1.txt and url2.txt ... to the substring you want to block or use ingame /gsaddmsg after a spammsg in the chat.

Ссылка на комментарий
Поделиться на другие сайты

  • 2 недели спустя...

@SLA: can you give me pls an russian short discription for SpamProtect. It should say, that it looks in chat msg after several typical words and ban goldsellers (and if it is short possible, that it is not s usefull for russian players, because there are no goldsellers on russian servers, but if it would be s lange, you can also leav this out).

Ссылка на комментарий
Поделиться на другие сайты

Of course, here it is, "Short Description":

Code:
Ищет в чат-сообщених слова из чёрного списка, и если находит, игнорирует их авторов.

It translates to English as:

Looks for a blacklisted words in chat-messages, and if found, ignores its authors.

Is it OK?

Then, you can white more detailed info in a "Long Description", there you can mention that it is dedicated mainly to fight goldsellers on EU/US servers.

P.S. social.AddIgnore() have two parameters - Name and Description. The description is meant to be visible in IgnoreList window, but you simply use the name as a description:

Code:
social.AddIgnore( sender, sender )

Isn't it better to replace it with:

Code:
social.AddIgnore( sender, userMods.ToWString( "Banned by SpamProtect" ) )

This way, description is more informative.

Ссылка на комментарий
Поделиться на другие сайты

Further discussion - in SpamProtect forum:

Дальнейшее обсуждение - в форуме SpamProtect:

http://ui9.ru/forum/spamprotect/topic/992/t992-SpamProtect-Development

Ссылка на комментарий
Поделиться на другие сайты

Гость
Ответить в этой теме...

×   Вставлено с форматированием.   Восстановить форматирование

  Разрешено использовать не более 75 эмодзи.

×   Ваша ссылка была автоматически встроена.   Отображать как обычную ссылку

×   Ваш предыдущий контент был восстановлен.   Очистить редактор

×   Вы не можете вставлять изображения напрямую. Загружайте или вставляйте изображения по ссылке.

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

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

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