Postado Julho 8, 2015 9 anos Olá pessoal do TK, alguém poderia me ajudar? Eu gostaria de quando acabasse o VIP, automáticamente ele iria para o templo(pode ser ao logar). Minha storage do VIP: 13500 Obrigado desde já. Baiak Thunder New TFS Downgrade [TFS 1.5 - 8.60] Gesior Ferobra Downgrade Evento Monster Hunt [TFS 1.X] Evento SafeZone [TFS 1.X] Online Bonus System [TFS 1.X] Dodge & Critical [TFS 1.X] Nova moeda, funcionando com NPCs [TFS 1.X] Square System [TFS 1.X] Loot Channel [TFS 1.X] Gerenciador de Quests [All TFS] NPCs comprando vial/flasks por storage [TFS 1.X] AntiBot [TFS 1.X] Como compilar TFS 0.X
Postado Julho 8, 2015 9 anos Manda os scripts do vip. Life is so meaningless, there is nothing worth a smile So goodbye, I'll miss you sugestões?
Postado Julho 8, 2015 9 anos Autor function onUse(cid, item, fromPosition, itemEx, toPosition) local config={ removeOnUse = "yes" -- remover quando usar ("yes" or "no") } local days = 30 -- coloque os dias que serão a VIP! local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 13500) local timenow = os.time() if getPlayerStorageValue(cid, 13500) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de Donate no seu character.") setPlayerStorageValue(cid, 13500, time) local quantity = math.floor((getPlayerStorageValue(cid, 13500) - timenow)/(24 * 60 * 60)) doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de Donate restantes.") if (config.removeOnUse == "yes") then doRemoveItem(item.uid, 1) end return TRUE end Baiak Thunder New TFS Downgrade [TFS 1.5 - 8.60] Gesior Ferobra Downgrade Evento Monster Hunt [TFS 1.X] Evento SafeZone [TFS 1.X] Online Bonus System [TFS 1.X] Dodge & Critical [TFS 1.X] Nova moeda, funcionando com NPCs [TFS 1.X] Square System [TFS 1.X] Loot Channel [TFS 1.X] Gerenciador de Quests [All TFS] NPCs comprando vial/flasks por storage [TFS 1.X] AntiBot [TFS 1.X] Como compilar TFS 0.X
Postado Julho 8, 2015 9 anos Ah pera, tenho que editar Cria um creaturescript, não sei se vai funfar, peguei como base um que o luanluciano fez: local STORAGE_PREMIUM = 13500 local TEMPLE_ID = 1 local storage2 = 13501 function onLogin(cid) local player = Player(cid) if player:getStorageValue(STORAGE_PREMIUM) < 1 and player:getStorageValue(storage2) == 1 then player:setStorageValue(storage2, 0) player:teleportTo(Town(TEMPLE_ID):getTemplePosition()) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:setTown(TEMPLE_ID) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Sua vip acabou!") end return true end E muda o seu vip: function onUse(cid, item, fromPosition, itemEx, toPosition) local storage2 = 13501 local config={ removeOnUse = "yes" -- remover quando usar ("yes" or "no") } local days = 30 -- coloque os dias que serão a VIP! local daysvalue = days * 24 * 60 * 60 local storageplayer = getPlayerStorageValue(cid, 13500) local timenow = os.time() if getPlayerStorageValue(cid, 13500) - os.time() <= 0 then time = timenow + daysvalue else time = storageplayer + daysvalue end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Foram adicionados ".. days .." dias de Donate no seu character.") setPlayerStorageValue(cid, 13500, time) setPlayerStorageValue(cid, storage2, 1) local quantity = math.floor((getPlayerStorageValue(cid, 13500) - timenow)/(24 * 60 * 60)) doSendMagicEffect(getPlayerPosition(cid), math.random(28,30)) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. quantity .." dias de Donate restantes.") if (config.removeOnUse == "yes") then doRemoveItem(item.uid, 1) end return TRUE end Testa isso ai. Editado Julho 8, 2015 9 anos por rogaforyn2 (veja o histórico de edições) Life is so meaningless, there is nothing worth a smile So goodbye, I'll miss you sugestões?
Postado Julho 8, 2015 9 anos Autor Precisa registrar no login.lua? Deu erro: Editado Julho 8, 2015 9 anos por moviebr (veja o histórico de edições) Baiak Thunder New TFS Downgrade [TFS 1.5 - 8.60] Gesior Ferobra Downgrade Evento Monster Hunt [TFS 1.X] Evento SafeZone [TFS 1.X] Online Bonus System [TFS 1.X] Dodge & Critical [TFS 1.X] Nova moeda, funcionando com NPCs [TFS 1.X] Square System [TFS 1.X] Loot Channel [TFS 1.X] Gerenciador de Quests [All TFS] NPCs comprando vial/flasks por storage [TFS 1.X] AntiBot [TFS 1.X] Como compilar TFS 0.X
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.