Postado Abril 4, 2015 10 anos Ola Galera DO Tk Tenho uma script de um dice event. como funciona?? tipo ele eu coloquei no server todos final de evento ele cai na sala ai quando clica nele ele roda ou numero 1 ou 5 ou seja de 1 a 6 dando o valor q cair em token ai auto teleporta player para temple... mais o erro esta que tipo se eu cliquei uma vez e tiver com o token na backpack ele da essa mensagem "You do not have enough capacity" sendo que tenho cap mais do mesmo jeito pega o item que rolou a contia, mais ele n teletransporta para templo ai fica clicando e ganhando token sem teleportamais lembando do da isso se eu tiver com token na bp ai vai script local config = { reward = 15515, --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,false) then doTransformItem(item.uid, value) doSendMagicEffect(toPosition, 2) doTeleportThing(cid,config.depot,false) doSendMagicEffect(config.depot, 10) setPlayerStorageValue(cid,1000,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
Postado Abril 4, 2015 10 anos Tenta: local config = { reward = 15515, --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) setPlayerStorageValue(cid,1000,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
Postado Abril 4, 2015 10 anos Autor não deu amigo sera que podia fazer outro script n precisa da maioria dos storage q tem nesse script somente da item na quantia q o dado roda obg
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.