Permamently
New Member
- Joined
- Jul 23, 2015
- Messages
- 34
- Reaction score
- 3
Hello, so I'm thinking about adding a percent chance to this script:
Could someone help me adding this?
This should work like this:
-30 % chance,
-if success the item is transformed from id 7385 to 8209(like in the script),
-if fail the item about number 2382 which is specified here:
should be removed.
Thanks in advance.
Code:
function onUse (cid, item, fromPosition, itemEx, toPosition)
if(itemEx.itemid == 7385) then
doRemoveItem(item.uid)
doTransformItem(itemEx.uid, 8209)
doSendMagicEffect(toPosition, 28)
return true
end
end
This should work like this:
-30 % chance,
-if success the item is transformed from id 7385 to 8209(like in the script),
-if fail the item about number 2382 which is specified here:
Code:
<action itemid="2382" event="script" value="upgrade.lua"/>
Thanks in advance.