TH

gente upando muita ml

Por thiagotop, 02 de mar. de 2013 em Scripts

resolvido
53
5.9k
SkymagnumS
12 de março de 2013 às 23:22

usa o meu

phardoleP
12 de março de 2013 às 23:27

o seu não esta dando erro.

mais não funciona o ml continua a subir :(

SlicerS
13 de março de 2013 às 10:42

achu q return false n funciona no onAdvance '--' e acredito q n tenha como limitar o ml.. talvez soh nas sourcers...

phardoleP
13 de março de 2013 às 11:57

Slicer fala isso não :(

13 de março de 2013 às 12:25

tenta ai:

 

function onAdvance(cid, skill, oldlevel, newlevel)
local maxMl = 100
if skill == 7 then
if newlevel >= maxMl then
 doPlayerSetMagicRate(cid, 0)
end
end
return true
end

13 de março de 2013 às 12:38

Galera nao adianta quantas vezes vcs tentarem o poblema é na sources,o mapa que ele ta usando é o Nto Shinobi,so da pra arruma mechendo na sources

phardoleP
13 de março de 2013 às 17:23

Demon não funcionou.

13 de março de 2013 às 17:35

Eu testei aqui e funcionou...

 

Você adicionou em login.lua e no creaturescripts.xml?

 

ps: responde o outro tópico da spell.

Editado Março 13 por Demonbholder

phardoleP
13 de março de 2013 às 20:37

adicionei assim

 

Agora em creaturescripts.xml adicione essa tag:

<event type="advance" name="mlmax" event="script" value="maxml.lua"/>

 

E no arquivo login.lua da pasta scripts, mais ou menos no final adicione:

 

registerCreatureEvent(cid, "mlmax")

 

e nada :(

13 de março de 2013 às 20:56

hmm, você configurou a variável certinha no código? eu coloquei 100, mas você tem que mudar né.

 

posta o seu login.lua.

13 de março de 2013 às 21:02

Demonholder

 

Nao adianta,vc pode tentar quantas vezes quiser,man o poblema é na sources

13 de março de 2013 às 21:15

Demonholder

 

Nao adianta,vc pode tentar quantas vezes quiser,man o poblema é na sources

 

O problema não é nas sources. É possível fazer com lua, to falando que aqui funcionou.

 

Acho engraçado que quando não conseguem fazer algo em lua as pessoas falam direto "Ah, o problema é na source." rsrsrs.

Junior001J
13 de março de 2013 às 21:34

Opa testei aqui e funcionou vlws :)

phardoleP
13 de março de 2013 às 21:45

demon obrigado por ajudar :D

ta aqui o login.lua

local config = {

loginMessage = getConfigValue('loginMessage'),

useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))

}

 

function onLogin(cid)

local loss = getConfigValue('deathLostPercent')

if(loss ~= nil) then

doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)

end

 

local accountManager = getPlayerAccountManager(cid)

if(accountManager == MANAGER_NONE) then

local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage

if(lastLogin > 0) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)

str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."

end

 

doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)

elseif(accountManager == MANAGER_NAMELOCK) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")

elseif(accountManager == MANAGER_ACCOUNT) then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")

else

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")

end

 

if(not isPlayerGhost(cid)) then

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)

end

 

registerCreatureEvent(cid, "Mail")

registerCreatureEvent(cid, "GuildMotd")

 

registerCreatureEvent(cid, "Idle")

if(config.useFragHandler) then

registerCreatureEvent(cid, "SkullCheck")

end

registerCreatureEvent(cid, "ProtDeath")

registerCreatureEvent(cid, "Biohazard")

registerCreatureEvent(cid, "ZombieAttack")

registerCreatureEvent(cid,"mlmax") registerCreatureEvent(cid, "WeaponMana")

registerCreatureEvent(cid, "showVoc") registerCreatureEvent(cid, "Death") registerCreatureEvent(cid, "ReportBug")

registerCreatureEvent(cid, "ChangeCorpse") registerCreatureEvent(cid, "AdvanceSave")

return true

end

 

o meu editei assim

function onAdvance(cid, skill, oldlevel, newlevel)
local maxMl = 10
if skill == 7 then
if newlevel >= maxMl then
 doPlayerSetMagicRate(cid, 0)
end
end
return true
end

mas passa do 10 facil

Kaiser05K
13 de março de 2013 às 21:47

Testei aqui funcionou sim , Pessoal Só cupa A tadinha da source?