• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Dice problem

Havocbringer

Well-Known Member
Joined
Apr 28, 2010
Messages
1,687
Reaction score
90
Location
Ireland
Well i want a rl tibia DICE. that works perfectly. I have it scripted right But when u put it in your bp u can't roll it and when u put it down it rolls but you can't see numbers
Any idea's anyone?
Also. all animations are gone. like when u eat berries no "yum"
 
Last edited:
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(fromPosition.x ~= CONTAINER_POSITION) then
		doSendMagicEffect(fromPosition, CONST_ME_CRAPS)
	end

	local value = math.random(5792, 5797)
	doTransformItem(item.uid, value)
	doCreatureSay(cid, getCreatureName(cid) .. ' rolled a ' .. value - 5791 .. '.', TALKTYPE_ORANGE_1)
	return true
end
 
data/actions actions.xml
LUA:
<action fromid="5792" toid="5797" event="script" value="other/dice.lua"/>

and..
data/actions/other dice.lua
LUA:
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

?¿
 
Back
Top