hey please i need script for dice work with talkaction by every number only dice not casino system i have this but not work fine and no action with numbers you understand me i made roll but didn't see the numbers!!!
where is the problem here !!??
function onUse(cid, item, fromPosition, itemEx, toPosition)
local value = math.random(5792, 5797)
if fromPosition.x ~= CONTAINER_POSITION then
doSendMagicEffect(fromPosition, CONST_ME_CRAPS)
end
doTransformItem(item.uid, value)
doCreatureSay(cid, getCreatureName(cid) .. ' rolled a ' .. value - 5791 .. '.', TALKTYPE_ORANGE_1)
return TRUE
end
where is the problem here !!??
function onUse(cid, item, fromPosition, itemEx, toPosition)
local value = math.random(5792, 5797)
if fromPosition.x ~= CONTAINER_POSITION then
doSendMagicEffect(fromPosition, CONST_ME_CRAPS)
end
doTransformItem(item.uid, value)
doCreatureSay(cid, getCreatureName(cid) .. ' rolled a ' .. value - 5791 .. '.', TALKTYPE_ORANGE_1)
return TRUE
end