Postado Abril 20, 2013 12 anos Seguinte, peguei um script de double xp potion que dobre sua XP durante 15 minutos depois esse efeito acabe. Mas aconteceu seguinte, quando eu uso ela , ela nunca acaba e fica assim quando vc tenta usar denovo : "Você ainda está sob o efeito da Double Exp Potion, espere acabar o tempo para usa-la novamente." Ajuda ae por favor !! algum outro script OU se alguem souber o que ta errado.
Postado Abril 20, 2013 12 anos Autor local config = { rate = 2, time = 15, -- AQUI É QUANTOS MINUTOS VAI FICAR O DOUBLE storage = 21002 } local function endExpRate(cid) if isPlayer(cid) == TRUE then doPlayerSetRate(cid, SKILL__LEVEL, 1) setPlayerStorageValue(cid, config.storage, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "O efeito da Double Exp Potion acabou!") end end function onUse(cid, item, fromPosition, itemEx, toPosition) if(getPlayerStorageValue(cid, config.storage) < 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Sua experiencia foi dobrada durante ".. config.time .." minutos.") doSendMagicEffect(getPlayerPosition(cid), 28) doCreatureSay(cid,'Double Experience Actived!', TALKTYPE_ORANGE_1) doPlayerSetRate(cid, SKILL__LEVEL, config.rate) setPlayerStorageValue(cid, config.storage, os.time() + config.time * 60) addEvent(endExpRate, config.time * 60 * 1000, cid) doRemoveItem(item.uid, 1) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você ainda está sob o efeito da Double Exp Potion, espere acabar o tempo para usa-la novamente.") end return TRUE end
Postado Janeiro 26, 2018 7 anos Em 20/04/2013 em 10:22, Adrianoxd2013 disse: local config = { rate = 2, time = 15, -- AQUI É QUANTOS MINUTOS VAI FICAR O DOUBLE storage = 21002 } local function endExpRate(cid) if isPlayer(cid) == TRUE then doPlayerSetRate(cid, SKILL__LEVEL, 1) setPlayerStorageValue(cid, config.storage, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "O efeito da Double Exp Potion acabou!") end end function onUse(cid, item, fromPosition, itemEx, toPosition) if(getPlayerStorageValue(cid, config.storage) < 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Sua experiencia foi dobrada durante ".. config.time .." minutos.") doSendMagicEffect(getPlayerPosition(cid), 28) doCreatureSay(cid,'Double Experience Actived!', TALKTYPE_ORANGE_1) doPlayerSetRate(cid, SKILL__LEVEL, config.rate) setPlayerStorageValue(cid, config.storage, os.time() + config.time * 60) addEvent(endExpRate, config.time * 60 * 1000, cid) doRemoveItem(item.uid, 1) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você ainda está sob o efeito da Double Exp Potion, espere acabar o tempo para usa-la novamente.") end return TRUE end Amigão, conseguiu arrumar? é possivel alterar o X exp? exp : de 2x para 7x? onde fica!? Grato, desde já agradeço! Editado Janeiro 26, 2018 7 anos por Yang Good (veja o histórico de edições)
Postado Janeiro 26, 2018 7 anos 1 hora atrás, Yang Good disse: Amigão, conseguiu arrumar? é possivel alterar o X exp? exp : de 2x para 7x? onde fica!? Grato, desde já agradeço! Tenta usar essa cal config = { rate = 7, time = 15, -- AQUI É QUANTOS MINUTOS VAI FICAR O DOUBLE storage = 21002 } local function endExpRate(cid) if isPlayer(cid) == TRUE then doPlayerSetRate(cid, SKILL__LEVEL, 1) setPlayerStorageValue(cid, config.storage, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "O efeito da Double Exp Potion acabou!") end end function onUse(cid, item, fromPosition, itemEx, toPosition) if(getPlayerStorageValue(cid, config.storage) < 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Sua experiencia foi dobrada durante ".. config.time .." minutos.") doSendMagicEffect(getPlayerPosition(cid), 28) doCreatureSay(cid,'Double Experience Actived!', TALKTYPE_ORANGE_1) doPlayerSetRate(cid, SKILL__LEVEL, config.rate) setPlayerStorageValue(cid, config.storage, os.time() + config.time * 60) addEvent(endExpRate, config.time * 60 * 1000, cid) doRemoveItem(item.uid, 1) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você ainda está sob o efeito da Double Exp Potion, espere acabar o tempo para usa-la novamente.") end return TRUE end
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.