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

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

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

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

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

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

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

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

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

Подробнее

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

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

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

FittingRoom


Barut

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

How can I manually add item ID so it displays inside fitting room?

Example "/ FR 13 553" and it displays item with ID 13553

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

Watch what happens when you click a text object.

Code:
onEvent  [ "EVENT_TEXT_OBJECT_CLICKED" ]  = function( params )

local IId = params.object:GetId()

if params.object:GetType() == 1 then

mission.DressCharacterScene( 1, IId )

end

end

So basically to display an item in a fitting room you need to use

Code:
mission.DressCharacterScene( 1, IId )

Where IId is an item ID.

So if you really know that a number is an item ID, you may use

Code:
mission.DressCharacterScene( 1, aNumber )

If you want to enter a number through the chat, you may want to track EVENT_UNKNOWN_SLASH_COMMAND event.

This event is already tracked by FittingRoom, so all you need is add next code to that function that tracks that event:

Code:

local a, b, aNumber = string.find( userMods.FromWString(params.text ), "/FR (%d+)" )

if aNumber ~= nil then 

mission.DressCharacterScene( 1, aNumber )

end

That's all. but BE SURE that you enter an ItemID, or it may result in an error!

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

You may also want to use a check GetType( self ) to ensure that you try to dress an equipment part, but i don't know what happens if you try to get type of some random number.

Code:
if params.object:GetType() == VAL_OBJ_TYPE_ITEM then

I don't think that you are able to check if a "ValuedObject" "IsExist". So, basically, be sure that you enter an actual ItemID.

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

Thank you Setras :)

Yes I have correct item ID, I added a line to log them.

local IId = params.object:GetId()

LogInfo( "Item ID=", IId )

This allows me to better guess the Item ID's in same category.

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

I'm not so sure that it is usefull at all.

Item IDs may be randomly generated when you encounter items.

I don't really think that they are pre-generated. Do you?

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

They're not pre-generated. All IDs in this game are dynamic to a single client generation at an instance of time. So an ID at one point could be a completely different ID if you walk away and come back again.

So knowing the ID at one instance of time for an item doesn't mean you'll know it at another, and definitely does not mean that someone else that sees that exact item at that exact time will see the same ID.

Picture the ID system as if you've given birth to identical twins at a single instance. (Sounds painful.) They look similar, but as time goes on they become more and more unique from each other and are never truly the same.

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

Well, concerning the "Random ID idea", two people watchng at the same object with random ID will see different IDs for sure.

I don't know any of the "unique inter-clients" IDs. Maybe the "Guild member ID" stays same during some time, but everything else is totally random and differs between people or their "encounters".

If you encounter an object, then loose sight of it, and then encounter it again - you see a totally different ID.

By some reason i have some big tables in my user.cfg:

Quote:
t_b ScriptLocal_BulletinBoard

t_b GuildMessages

t_b isnew

i_k_b isnew

6530=1

6589=0

..........................

......................... Tons of them!

So, maybe message IDs stay same. But that's not a gift at all.

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

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

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

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

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

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

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

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

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

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