• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

How to create Item in GUI

Dubler

PHP, LUA, C++
Joined
Aug 3, 2009
Messages
268
Reaction score
11
Location
Poland
Could somebody tell me how to create a virtual item in GUI?
Code:
  UIItem
    id: skillItem1
    phantom: true
    size: 34 34
    padding: 1
    font: verdana-11px-rounded
    border-color: white
    margin-top: 6
    margin-left: 6
or
Code:
  Item
    id: skillItem1
    phantom: true
    size: 34 34
    padding: 1
    font: verdana-11px-rounded
    border-color: white
    margin-top: 6
    margin-left: 6

connected with:
Code:
	selectedItem = skillsPanel:getChildById('skillItem1')
	--selectedItem.item = {}
	--local item = {}
	--item.ptr:setCount(1) -- reset item count for image
	selectedItem:setStyle('UIItem')
	selectedItem:setVirtual(true)
    selectedItem:setItemId(7367)
doesn't work for me
 
in OTUI

Code:
  Item
    id: itemView
    anchors.top: parent.top
    anchors.left: parent.left

In LUA:

Code:
itemPanel:getChildById('itemView'):setItemId(3456)


NOTE: ItemId should be the CLIENT ID not the SERVER ID
 
Doesn't work for me: slot is still empty, no errors in console

try yourself: http://www.speedy*****malware.localhost/EJYG9/itemTest.zip

- - - Updated - - -

solved, i had to log in
 
Last edited:
Back
Top