Postado Julho 14, 2012 12 anos Eae bom galerinha, td bom ? Aqui, eu fiz um script e ta pegando certim, só que é o seguinte, ele nao tem storage, ou seja, o player pode usar quantas vezes ele quiser. O script ta assim: --By Slaake For Tibia King-- function onSay(cid, words, param) if getPlayerLevel (cid) <= 100 then doPlayerAddPremiumDays(cid, 7) elseif getPlayerLevel (cid) >= 200 then doPlayerAddPremiumDays(cid, 15) elseif getPlayerLevel (cid) >= 300 then doPlayerAddPremiumDays(cid, 20) return true end return true end Alguem poderia me ajudar? Eu preciso que o script tenha uma storage em casa vez, tipo, o comando vai se !viptest ai quando ele falar primeiro e tiver menor ou igual a 100 ele recebe 7 dias de premium, e nao pode usar mais, ai quando ele tiver no level 200 ou mais, ele pode usar novamente, e assim no 300 tmbm, mas ai as storages tem de ser diferentes para poder usar, alguem pode me ajudar? Editado Julho 14, 2012 12 anos por Slaake (veja o histórico de edições) De boua na lagoa ? *-* Entrada ao Tibia King:27/05/2012 (02:14)
Postado Julho 14, 2012 12 anos setPlayerStorageValue(uid, key, value) getPlayerStorageValue(uid, key) -"Supra Omnes Lux Lucis" - Acima de todos brilha a Luz -
Postado Julho 14, 2012 12 anos Autor setPlayerStorageValue(uid, key, value) getPlayerStorageValue(uid, key) Mas onde eu boto isso ? De boua na lagoa ? *-* Entrada ao Tibia King:27/05/2012 (02:14)
Postado Julho 14, 2012 12 anos getPlayerStorageValue vai retornar quanto vale a storage com uma key x dá uma olhada aqui pra entender melhor as storages: http://tibiaking.com...9489#entry79489 ai só é verificar if (getPlayerStorageValue(cid, key) < 1) then return true end setPlayerStorageValue(cid, key, 1) Editado Julho 14, 2012 12 anos por MaXwEllDeN (veja o histórico de edições) -"Supra Omnes Lux Lucis" - Acima de todos brilha a Luz -
Postado Julho 14, 2012 12 anos function onSay(cid, words, param) if getPlayerLevel (cid) <= 100 then doPlayerAddPremiumDays(cid, 7) if (getPlayerStorageValue(cid, key) < 1) then return true end setPlayerStorageValue(cid, key, 1) elseif getPlayerLevel (cid) >= 200 then doPlayerAddPremiumDays(cid, 15) elseif getPlayerLevel (cid) >= 300 then doPlayerAddPremiumDays(cid, 20) return true end return true end ve se funfa. Créditos : Maxuellden e Slaake
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.