tiag0_bn
Well-Known Member
- Joined
- Dec 8, 2011
- Messages
- 181
- Reaction score
- 50
Hello, someone to tweak this script, make it work like this.
system function:
1 vip item and 2 aol, onUse vipitem in aol transforms into a new aol with attributes.
1.1 -> When using itemid: 6943 in itemid: 2173 -> it will create itemid: 6485 and it will have the attributes of that new item
1.2 -> when dying with itemid: 6485 it will revert to itemid: 6943
my script, no work because my itemid: 6943 is multi use, and need 1.2 too.
system function:
1 vip item and 2 aol, onUse vipitem in aol transforms into a new aol with attributes.
1.1 -> When using itemid: 6943 in itemid: 2173 -> it will create itemid: 6485 and it will have the attributes of that new item
1.2 -> when dying with itemid: 6485 it will revert to itemid: 6943
my script, no work because my itemid: 6943 is multi use, and need 1.2 too.
Lua:
local t = {
useOn = 6943,
newId = 6485
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if doPlayerRemoveItem(cid,2173,1) then
doRemoveItem(item.uid, 1)
doPlayerAddItem(cid, 6485, 1)
doCreatureSay(cid, 'You recharged your ' .. getItemNameById(item.itemid), TALKTYPE_ORANGE_1)
else
doCreatureSay(cid, 'You must use it on a ' .. getItemNameById(t.useOn), TALKTYPE_ORANGE_1)
end
return true
end
Last edited: