Postado Outubro 18, 2015 9 anos Aaa esqueci, fiz um negócio pra testar e esqueci de tirar.Mude isso: if getPlayerPremiumDays(cid) >= 0 thenPara isso:if getPlayerPremiumDays(cid) > 0 then Irá funcionar do jeito que você quer... Editado Outubro 20, 2015 9 anos por Caronte (veja o histórico de edições) Se quiser sua dúvida tirada, mande PM com os links, e não com a dúvida (outros podem ter a mesma dúvida, e o fórum serve para ser usado). Tópicos: [FAQ] BBCODE [LIB] Constant [RME] Administrando bordas. [TALK] Broadcast Editável. [TALK] Sugest. [TALK] Checkpoint. [MOVE] Pântano pegajoso. [ACTION] Piggy Bank. (Cassino). [GLOBAL] Uptime Ad. [C0DE] Consertando 'Invalid Password' [PROGRAM] Quest Maker
Postado Outubro 20, 2015 9 anos Autor Aaa esqueci, fiz um negócio pra testar e esqueci de tirar.Mude isso: if getPlayerPremiumDays(cid) >= 0 then Para isso: if getPlayerPremiumDays(cid) > 0 then Irá funcinar do jeito que você quer... cara vc é fera, de todos os forums vc foi o unico que conseguiu, funcionoua unica coisa é que até lvl 8 está podendo comprar, em vez de lvl 20+ mas creio que não tem como arrumar isso ou tem? Editado Outubro 20, 2015 9 anos por telefonesemfio (veja o histórico de edições)
Postado Outubro 20, 2015 9 anos Solução function onSay(cid, words, param) local vocs = { [1] = 5, -- master sorcerer [2] = 6, -- elder druid [3] = 7, -- royal paladin [4] = 8, -- elite knight } local newvoc = vocs[getPlayerVocation(cid)] local price = 20000 local level = 20 if getPlayerLevel(cid) < level then return doPlayerSendCancel(cid, 'Voce precisa ser level '.. level ..' comprar promotion'.) and true end if getPlayerPremiumDays(cid) >= 0 then if getPlayerMoney(cid) >= price then if vocs[getPlayerVocation(cid)] then doPlayerSetVocation(cid, newvoc) doPlayerRemoveMoney(cid, price) doPlayerSendCancel(cid, "Parabens voce foi promovido.") else doPlayerSendCancel(cid, "Voce nao pode ser promovido.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) end else doPlayerSendCancel(cid, "Voce nao tem dinheiro suficiente.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) end else doPlayerSendCancel(cid, "Voce precisa ser premium para usar esse comando.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) end return true end ➥ Regras | Seções OTServ | Seções BOT
Postado Outubro 21, 2015 9 anos Autor function onSay(cid, words, param) local vocs = { [1] = 5, -- master sorcerer [2] = 6, -- elder druid [3] = 7, -- royal paladin [4] = 8, -- elite knight } local newvoc = vocs[getPlayerVocation(cid)] local price = 20000 local level = 20 if getPlayerLevel(cid) < level then return doPlayerSendCancel(cid, 'Voce precisa ser level '.. level ..' comprar promotion'.) and true end if getPlayerPremiumDays(cid) >= 0 then if getPlayerMoney(cid) >= price then if vocs[getPlayerVocation(cid)] then doPlayerSetVocation(cid, newvoc) doPlayerRemoveMoney(cid, price) doPlayerSendCancel(cid, "Parabens voce foi promovido.") else doPlayerSendCancel(cid, "Voce nao pode ser promovido.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) end else doPlayerSendCancel(cid, "Voce nao tem dinheiro suficiente.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) end else doPlayerSendCancel(cid, "Voce precisa ser premium para usar esse comando.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) end return true end vlw =)
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.