kimokimo
Kimo
PHP:
local config = {
reward = 9020, --Vampire Token
teamStore = 1000,
flagStore = 2015,
depot = {x=1000, y=1000, z=7}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(cid) == TRUE then
doSendMagicEffect(fromPosition, CONST_ME_CRAPS)
end
local plural=''
local value = math.random(5792, 5797)
local outcome = value - 5791
if doPlayerAddItem(cid,config.reward,outcome,true) then
doTransformItem(item.uid, value)
doSendMagicEffect(toPosition, 2)
doTeleportThing(cid,config.depot,false)
doSendMagicEffect(config.depot, 10)
doRemoveCondition(cid,CONDITION_INFIGHT)
doRemoveCondition(cid, CONDITION_OUTFIT)
setPlayerStorageValue(cid,1001,0)
setPlayerStorageValue(cid,config.teamStore,0)
setPlayerStorageValue(cid,config.flagStore,0)
doCreatureSay(cid, getCreatureName(cid) .. ' rolled a ' .. outcome .. '.', TALKTYPE_ORANGE_1)
if outcome > 1 then
plural = 's'
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,'You were rewarded with '.. outcome ..' event token'..plural..'.')
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,'You were rewarded with '.. outcome ..' event token'..plural..'.')
end
else
doCreatureSay(cid,'You do not have enough capacity.', TALKTYPE_ORANGE_1)
end
return true
end
i have found this in frozen-hell datapack but it dont work when i click on the item it keep saying you dont have nough cap and i already have empty bp and 10k cap :S can anyone check if there is anything wrong?