Postado Janeiro 13, 2012 13 anos Função: Após você upar o level, você aprende novas magias. Muito útil para servidor lowl level. Esse script eu achei na pasta do meu servidor, porém não sei quem é os créditos crie um arquivo no formato .lua na pasta creaturescript/scripts com o nome spellup.lua e cole o script local s = { --SETUP repeatAfterDeath = false, detailedInfo = true, Storage = 10000, messageType = 'channel', channelClass = MESSAGE_EVENT_ORANGE } function onAdvance(cid, skill, oldlevel, newlevel) if skill ~= SKILL__LEVEL or not s.repeatAfterDeath and getCreatureStorage(cid, s.Storage) >= newlevel then return true end local t = {} for i = 0, getPlayerInstantSpellCount(cid) - 1 do local spell = getPlayerInstantSpellInfo(cid, i) if(spell.level ~= 0) and spell.level == newlevel then if(spell.manapercent > 0) then spell.mana = spell.manapercent .. '%' end table.insert(t, spell) end end table.sort(t, function(a, b) return a.level < b.level end) local text, prevLevel = '', -1 for i, spell in ipairs(t) do local line = '' if(prevLevel ~= spell.level) then if(i ~= 1) then line = '\n' end line = line .. 'You have just advanced to level '..newlevel..' and learned new spells!\n' prevLevel = spell.level end text = text ..line..' ['..spell.name..'] "'..spell.words..'" '..(s.detailedInfo and 'Mana['..spell.mana..']'..(spell.mlevel > 0 and ' ML['..spell.mlevel..']' or '') or '')..'\n' end if text == '' then return true end doCreatureSetStorage(cid, s.Storage, newlevel) if s.messageType == 'popUp' then doShowTextDialog(cid, 2175, text) elseif s.messageType == 'channel' then doPlayerSendTextMessage(cid, s.channelClass, text) end return true end registerCreatureEvent(cid, "SpellUp") <event type="advance" name="SpellUp" event="script" value="spellup.lua"/> False: Receberá uma mensagem de level up True: Receberá a mensagem sempre quando upar de level detailedInfo = true, False: Jogador só receberá o nome da magia e o nome da spell True: Jogador receberá nome da magia, nome da spell e porcentagem de mana que gasta. messageType = 'channel', Channel: A mensagem aparecerá no default. PopUp: Abrirá uma caixa de mensagem. registre o evento no login.lua e cole a tag no creaturescripts.xml FOTO Instalando repeatAfterDeath = false Editado Janeiro 13, 2012 13 anos por skydangerous (veja o histórico de edições) http://baiakuza.com/IP: baiakuza.com TIBIA: 10.96 Baiak Custom [ High Exp Rate ]
Postado Janeiro 13, 2012 13 anos O Script serve mas para fazer mostrar para o player que ele aprendeu a tal spell, é mas pratico coloca no spells.xml o level pra usar enfim obrigado www.patronum.online
Postado Janeiro 15, 2012 13 anos Nossa Sky massa em boa ideia mostrar isso para nós Reputada. ------ Deu erro no meu server eu upo n aparece a msg e tbm n aprende as magias no console fica calado meu server é yourots 8.50~8.52 Ae ajudei? Rep+
Postado Janeiro 16, 2012 13 anos Eu juntei os post, use o botão editar pra proxima vez, Da algum erro no console? quando o player upa um level ?
Postado Janeiro 21, 2012 13 anos script interessante gostei talvez eu use ele' Editado Janeiro 21, 2012 13 anos por RsuxX (veja o histórico de edições)
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.