Postado Março 19, 2016 9 anos Autor Em 23/02/2016 at 15:55, lenardo88 disse: Mas o XP n ta dando pq n ta verificando a storage do player tira o if setplayerstoragevalue.... E deixa só o dosetextrarate... Eu n lembro a função e vê se ele pelo menos aumenta o rate do player
Postado Março 19, 2016 9 anos 55 minutos atrás, SkywalkerJr disse: vai no arquivo login.lua dentro de creaturescript e em baixo da linha que está: function login(cid) coloque isso: if (getPlayerStorage(cid, storagevip) - os.time() > 0) then doPlayerSetExperienceRate(cid, 1.5) end ficando assim: function login() if (getPlayerStorage(cid, storagevip) - os.time() > 0) then doPlayerSetExperienceRate(cid, 1.5) end ... .. ...
Postado Março 19, 2016 9 anos 1 hora atrás, lenardo88 disse: vai no arquivo login.lua dentro de creaturescript e em baixo da linha que está: function login(cid) coloque isso: if (getPlayerStorage(cid, storagevip) - os.time() > 0) then doPlayerSetExperienceRate(cid, 1.5) end ficando assim: function login() if (getPlayerStorage(cid, storagevip) - os.time() > 0) then doPlayerSetExperienceRate(cid, 1.5) end ... .. ... não existe essa função no tfs 1.2, mudaram todas elas. ela vai ser escrita de forma diferente, por isso não funciona.
Postado Março 20, 2016 9 anos Autor 7 horas atrás, lenardo88 disse: vai no arquivo login.lua dentro de creaturescript e em baixo da linha que está: function login(cid) coloque isso: if (getPlayerStorage(cid, storagevip) - os.time() > 0) then doPlayerSetExperienceRate(cid, 1.5) end ficando assim: function login() if (getPlayerStorage(cid, storagevip) - os.time() > 0) then doPlayerSetExperienceRate(cid, 1.5) end ... .. ... -- ordered as in creaturescripts.xml local events = { 'TutorialCockroach', 'ElementalSpheresOverlords', 'BigfootBurdenVersperoth', 'BigfootBurdenWarzone', 'BigfootBurdenWeeper', 'BigfootBurdenWiggler', 'SvargrondArenaKill', 'NewFrontierShardOfCorruption', 'NewFrontierTirecz', 'ServiceOfYalaharDiseasedTrio', 'ServiceOfYalaharAzerus', 'ServiceOfYalaharQuaraLeaders', 'InquisitionBosses', 'InquisitionUngreez', 'KillingInTheNameOfKills', 'MastersVoiceServants', 'SecretServiceBlackKnight', 'ThievesGuildNomad', 'WotELizardMagistratus', 'WotELizardNoble', 'WotEKeeper', 'WotEBosses', 'WotEZalamon', 'PlayerDeath', 'AdvanceSave', 'AdvanceRookgaard', 'PythiusTheRotten', 'DropLoot' } local function onMovementRemoveProtection(cid, oldPosition, time) local player = Player(cid) if not player then return true end local playerPosition = player:getPosition() if (playerPosition.x ~= oldPosition.x or playerPosition.y ~= oldPosition.y or playerPosition.z ~= oldPosition.z) or player:getTarget() then player:setStorageValue(Storage.combatProtectionStorage, 0) return true end addEvent(onMovementRemoveProtection, 1000, cid, oldPosition, time - 1) end function onLogin(player) local loginStr = 'Welcome to ' .. configManager.getString(configKeys.SERVER_NAME) .. '!' if player:getLastLoginSaved() <= 0 then loginStr = loginStr .. ' Please choose your outfit.' player:sendTutorial(1) else if loginStr ~= '' then player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr) end loginStr = string.format('Your last visit was on %s.', os.date('%a %b %d %X %Y', player:getLastLoginSaved())) end player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr) local playerId = player:getId() -- Stamina nextUseStaminaTime[playerId] = 0 -- Promotion local vocation = player:getVocation() local promotion = vocation:getPromotion() if player:isPremium() then local value = player:getStorageValue(Storage.Promotion) if not promotion and value ~= 1 then player:setStorageValue(Storage.Promotion, 1) elseif value == 1 then player:setVocation(promotion) registerCreatureEvent(cid, "tkexp") end elseif not promotion then player:setVocation(vocation:getDemotion()) end -- Events for i = 1, #events do player:registerEvent(events) player:registerEvent("RewardLoot") end if player:getStorageValue(Storage.combatProtectionStorage) <= os.time() then player:setStorageValue(Storage.combatProtectionStorage, os.time() + 10) onMovementRemoveProtection(playerId, player:getPosition(), 10) 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.