amr shalapy
Banned User
- Joined
- Aug 28, 2014
- Messages
- 122
- Reaction score
- 8
Hi OTLanders! i wanna make some script like random items but i can't
i have made the random from dice script the idea is i have some unique item like poem scroll
we will say if we press right click or "use" at the unique items it gets one item from (5876 to 5886)
just one items and the unique items "poem scroll" remove i have made the dice script sorry for bad english
the actions.xml
and here is the script demi parts.lua
i created this script but it's working on the current items from (5876 to 5886) i want unique items to use it
and get one items from (5876 to 5886)
thanks~
i have made the random from dice script the idea is i have some unique item like poem scroll
we will say if we press right click or "use" at the unique items it gets one item from (5876 to 5886)
just one items and the unique items "poem scroll" remove i have made the dice script sorry for bad english
the actions.xml
Code:
<action itemid="5876" script="others/demi parts.lua" />
<action itemid="5877" script="others/demi parts.lua" />
<action itemid="5878" script="others/demi parts.lua" />
<action itemid="5879" script="others/demi parts.lua" />
<action itemid="5880" script="others/demi parts.lua" />
<action itemid="5881" script="others/demi parts.lua" />
<action itemid="5882" script="others/demi parts.lua" />
<action itemid="5883" script="others/demi parts.lua" />
<action itemid="5884" script="others/demi parts.lua" />
<action itemid="5885" script="others/demi parts.lua" />
<action itemid="5886" script="others/demi parts.lua" />
Code:
function onUse(cid, item, frompos, item2, topos)
rand = math.random(5876, 5886)
doSendMagicEffect(cid, frompos, 26)
number = rand-5875
local name = getCreatureName(cid)
doPlayerSay(cid, ""..name.." rolled a ".. number ..".", TALKTYPE_ORANGE_1)
doTransformItem(item.uid, rand)
return 1
end
end
and get one items from (5876 to 5886)
thanks~