Jump to content
Alloder.pro: about Allods with love
Search In
  • More options...
Find results that contain...
Find results in...

New program for writers

We turn from quantity to quality and tell you how we will supplement the Allods Team program with rewards in rubles.

More

The new Updater

Let us to introduce the new addon updater software and to share the details

Read more

Alloder 2.0

We have started the process of project evolve, and this relates not only, and not even primarily of the site's view

Read more

FittingRoom


Barut
 Share

Recommended Posts

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

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.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

 Share

×
×
  • Create New...

Important Information

By using our site you agree to the Terms of Use