Hidroponica
Member
- Joined
- Feb 16, 2016
- Messages
- 75
- Reaction score
- 8
local conf = {
maxSlotCount=1,
ignoredIds={}
}
function choose(...)
local arg = {...}
return arg[math.random(1,#arg)]
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isInArray({26040}, itemEx.itemid) then
return false
end
if isCreature(itemEx.uid) then
return false
end
local nam = Item(itemEx.uid):getAttribute(ITEM_ATTRIBUTE_DESCRIPTION)
function getSlotCount(nam)
local c = 0
for _ in nam:gmatch('%[(.-)%]') do
c = c+1
end
return c
end
if getSlotCount(nam) < conf.maxSlotCount then
local l = choose('supreme')
local p = (30)
local armors = {2463,2464,2465,25662,25663,25664,25674,25670,25665,25666,25667,25675,25671}
if isInArray(armors, itemEx.itemid) then
doSendMagicEffect(toPosition,30)
nam = nam..' ['..l..'.+'..p..'%]'
doPlayerSendTextMessage(cid, 20,l..'.+'..p..'%')
doSetItemSpecialDescription(itemEx.uid, nam)
doRemoveItem(item.uid,1)
else
doPlayerSendTextMessage(cid, 20,"Slot limit reached.")
end
end
return true
end
help in this script when the player uses it in x item it looks like this:
You see a dragon scale mail (Arm:15).
It can only be wielded properly by knights and paladins.
It weighs 114.00 oz.
[supreme.+30%]
Iwanted to help the script and add the attribute and also add the belong name
You see a SUPREME dragon scale mail (Arm:15).
It can only be wielded properly by knights and paladins.
Its Belong NOMEDOPLAYER
It weighs 114.00 oz.
Last edited: