Postado Outubro 12, 2014 10 anos OKS EU tenho um ot ot barão so q tah com problema eu faço o char upa ele dai quando deslogo e volto pro jogo nao salva os leveis dele volta pro level 8 como se eu tivesse recem criado a conta alguem pode me ajudar por favor =[!!!
Postado Outubro 12, 2014 10 anos Procure pelo arquivo advancesave.lua em data/creaturescripts/scripts e abra ele. Provavelmente deve estar como abaixo: savePlayersOnAdvance = false Apenas mude o false para true, ficando assim: local config = { savePlayersOnAdvance = true } function onAdvance(cid, skill, oldLevel, newLevel) if(config.savePlayersOnAdvance) then doPlayerSave(cid, true) end return true end Verifique se há uma tag habilitada para esse arquivo.lua que você configurou a tabela. Senão tiver nenhuma tag relacionada ao arquivo, então apenas adicione-a em creaturescripts.xml: <event type="advance" name="AdvanceSave" event="script" value="advancesave.lua"/> Se você nem ao menos encontrou o arquivo, então basta apenas criar um e adicionar o script a ele. Não se esqueça de adicionar a tag também. Editado Outubro 12, 2014 10 anos por Suicide (veja o histórico de edições)
Postado Outubro 12, 2014 10 anos Autor no advancesave.lua tem isso local multiplier = {} local counter = 0 function onStatsChange(cid, attacker, type, combat, value) if getPlayerStorageValue(cid, 10094) >= 1 and attacker ~= 0 and combat ~= COMBAT_HEALING then if isPlayer(attacker) == TRUE then multiplier = 4 else multiplier = 10 end function doAttack(attacker) if isCreature(attacker) == TRUE and getTilePzInfo(getCreaturePosition(cid)) == false and getTilePzInfo(getCreaturePosition(attacker)) == false then if counter < 5 then local damage = math.floor((value * multiplier) / 5) doTargetCombatHealth(cid, attacker, COMBAT_DROWNDAMAGE, -damage, -damage, 129) doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(attacker), 24) counter = counter + 1 addEvent(doAttack,1000,attacker) else stopEvent(attacker,doAttack) counter = 0 end else stopEvent(attacker,doAttack) counter = 0 end end addEvent(doAttack, 0, attacker) if isCreature(attacker) == TRUE then doSendMagicEffect(getCreaturePos(attacker), 66) end doSendAnimatedText(getCreaturePos(cid), 'REFLECT', TEXTCOLOR_DARKYELLOW) if isCreature(attacker) == true and isPlayer(attacker) == false then local addSoul = 40 if (getPlayerSoul(cid) + 40) > 250 then addSoul = 250 - getPlayerSoul(cid) end doPlayerAddSoul(cid, addSoul) end --if getPlayerStorageValue(cid, 10094) == 1 then --setPlayerStorageValue(cid, 10094, 2) --elseif getPlayerStorageValue(cid, 10094) == 2 then doRemoveCondition(cid, CONDITION_FOOD) setPlayerStorageValue(cid, 10094, 0) --end return false else return true end end
Postado Outubro 13, 2014 10 anos tenta isto : local multiplier = {} local counter = 0 function onStatsChange(cid, attacker, type, combat, value) if getPlayerStorageValue(cid, 10094) >= 1 and attacker ~= 0 and combat ~= COMBAT_HEALING then if isPlayer(attacker) == TRUE then multiplier = 4 else multiplier = 10 end function doAttack(attacker) if isCreature(attacker) == TRUE and getTilePzInfo(getCreaturePosition(cid)) == true and getTilePzInfo(getCreaturePosition(attacker)) == true then if counter < 5 then local damage = math.floor((value * multiplier) / 5) doTargetCombatHealth(cid, attacker, COMBAT_DROWNDAMAGE, -damage, -damage, 129) doSendDistanceShoot(getCreaturePosition(cid), getCreaturePosition(attacker), 24) counter = counter + 1 addEvent(doAttack,1000,attacker) else stopEvent(attacker,doAttack) counter = 0 end else stopEvent(attacker,doAttack) counter = 0 end end addEvent(doAttack, 0, attacker) if isCreature(attacker) == TRUE then doSendMagicEffect(getCreaturePos(attacker), 66) end doSendAnimatedText(getCreaturePos(cid), 'REFLECT', TEXTCOLOR_DARKYELLOW) if isCreature(attacker) == true and isPlayer(attacker) == true then local addSoul = 40 if (getPlayerSoul(cid) + 40) > 250 then addSoul = 250 - getPlayerSoul(cid) end doPlayerAddSoul(cid, addSoul) end --if getPlayerStorageValue(cid, 10094) == 1 then --setPlayerStorageValue(cid, 10094, 2) --elseif getPlayerStorageValue(cid, 10094) == 2 then doRemoveCondition(cid, CONDITION_FOOD) setPlayerStorageValue(cid, 10094, 0) --end return false else return true end 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.