Anuudek 3 Postado Janeiro 24, 2016 Share Postado Janeiro 24, 2016 Então galera, quero fazer um pedido desses scripts Free Bless até x level e Runas e Ammos infinitas. Porfavor é urgente Link para o comentário https://xtibia.com/forum/topic/239039-ajuda-com-alguns-scripts/ Compartilhar em outros sites More sharing options...
0 Danihcv 335 Postado Janeiro 26, 2016 Share Postado Janeiro 26, 2016 Ah, entendi. Deixa assim: login.lua: -- ordered as in creaturescripts.xml local events = { 'pythiusDead', 'bossesGrayIsland', 'ElementalSpheres', 'ElementalSpheresKill', 'ElementalSpheresLogin', 'WarzoneThree', 'WarzoneTwo', 'bossesWarzone', 'SvargrondArenaKill', 'PharaoKillPortal', 'inServiceOfYalaharQuestsDiseased', 'inServiceOfYalaharQuestsMorik', 'inServiceOfYalaharQuestsQuara', 'inquisitionQuestBosses', 'inquisitionQuestUngreez', 'killingInTheNameOfQuestKills', 'TaskCustom', 'Yielothax', 'Energized', 'Raging', 'MastersVoiceServants', 'wrathBoss', 'wrathZalamon', 'PlayerDeath', 'ThievesGuildNomad', 'AdvanceSave', 'SpikeDrillworm', 'SecretServiceBlackKnight' 'advanceBless' 'loginBless' 'deathBless' 'advanceBless' 'loginBless' 'deathBless' } function onLogin(cid) local player = Player(cid) 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())) db.query("UPDATE `players` SET `cast` = 0 WHERE `id` = " .. getPlayerGUID(cid) .. ";") end player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr) for i = 1, #events do player:registerEvent(events[i]) end for b = 1, 5 do if player:getLevel(cid) <= 80 then player:addBlessing(cid, b) end end return true end creaturescripts.xml: <?xml version="1.0" encoding="UTF-8"?> <creaturescripts> <!-- Secret Service Quest --> <event type="kill" name="SecretServiceBlackKnight" script="others/blackKnight.lua"/> <!-- Spike Task: Drillworm --> <event type="kill" name="SpikeDrillworm" script="spike task/drillworm.lua"/> <!-- Thieves Guild Quest --> <event type="kill" name="ThievesGuildNomad" script="others/nomad.lua"/> <!-- Pythius The Rotten --> <event type="kill" name="pythiusDead" script="pythius the rotten/pythiusDead.lua" /> <!-- Gray Island --> <event type="kill" name="bossesGrayIsland" script="gray island/bossesgrayisland.lua"/> <!-- The Elemental Spheres --> <event type="death" name="ElementalSpheres" script="elemental spheres quest/the_elemental_spheres.lua"/> <event type="kill" name="ElementalSpheresKill" script="elemental spheres quest/the_elemental_spheres.lua"/> <event type="login" name="ElementalSpheresLogin" script="elemental spheres quest/the_elemental_spheres.lua"/> <!-- Gnomebase --> <event type="kill" name="WarzoneTwo" script="gnomebase/warzone2.lua"/> <event type="kill" name="WarzoneThree" script="gnomebase/warzone3.lua"/> <event type="kill" name="bossesWarzone" script="gnomebase/bossesWarzone.lua"/> <!-- Svargrond Arena: Killing a boss --> <event type="kill" name="SvargrondArenaKill" script="svargrond arena quest/arena_kill.lua"/> <!-- Pharaos: Portal to reward room --> <event type="kill" name="PharaoKillPortal" script="others/pharaoPortal.lua"/> <!-- In Service Of Yalahar Quest --> <event type="kill" name="inServiceOfYalaharQuestsDiseased" script="in service of yalahar quest/inServiceOfYalaharQuestsDiseased.lua"/> <event type="kill" name="inServiceOfYalaharQuestsMorik" script="in service of yalahar quest/inServiceOfYalaharQuestsMorik.lua"/> <event type="kill" name="inServiceOfYalaharQuestsQuara" script="in service of yalahar quest/inServiceOfYalaharQuestsQuara.lua"/> <!-- Inquisition Quest --> <event type="kill" name="inquisitionQuestBosses" script="inquisition quest/inquisitionQuestBosses.lua"/> <event type="kill" name="inquisitionQuestUngreez" script="inquisition quest/inquisitionQuestUngreez.lua"/> <!-- Killing In The Name Of Quest --> <event type="kill" name="killingInTheNameOfQuestKills" script="killing in the name of quest/killingInTheNameOfQuestKills.lua"/> <event type="kill" name="TaskCustom" script="killing in the name of quest/taskcustom.lua"/> <!-- Raging Mage Tower --> <event type="kill" name="Yielothax" script="raging mage tower/yielothax.lua"/> <event type="kill" name="Energized" script="raging mage tower/energized.lua"/> <event type="kill" name="Raging" script="raging mage tower/raging.lua"/> <!-- The Masters Voice Quest --> <event type="kill" name="MastersVoiceServants" script="their master's voice quest/ServantsKill.lua"/> <!-- Wrath of Emperor --> <event type="kill" name="wrathBoss" script="wrath of the emperor quest/wrathOfTheEmperorQuestBoss.lua"/> <event type="kill" name="wrathZalamon" script="wrath of the emperor quest/wrathOfTheEmperorQuestZalamon.lua"/> <!-- Others --> <event type="advance" name="advanceBless" event="script" value="playerBless.lua"/> <event type="login" name="loginBless" event="script" value="playerBless.lua"/> <event type="death" name="deathBless" event="script" value="playerBless.lua"/> <event type="logout" name="Cast" script="others/cast.lua"/> <event type="login" name="PlayerLogin" script="others/login.lua"/> <event type="death" name="PlayerDeath" script="others/playerdeath.lua"/> <event type="advance" name="AdvanceSave" script="others/advance_save.lua"/> <event type="advance" name="AdvanceRook" script="others/advance_rook.lua"/> <event type="advance" name="Recompense" script="others/recompense.lua"/> <event type="login" name="AddonsMounts" script="others/addons-montarias.lua"/> <event type="advance" name="advanceBless" script="playerBless.lua"/> <event type="login" name="loginBless" script="playerBless.lua"/> <event type="death" name="deathBless" script="playerBless.lua"/> </creaturescripts> Tópico movido para dúvidas / pedidos resolvidos. Link para o comentário https://xtibia.com/forum/topic/239039-ajuda-com-alguns-scripts/#findComment-1683278 Compartilhar em outros sites More sharing options...
0 gabriel28 60 Postado Janeiro 24, 2016 Share Postado Janeiro 24, 2016 Runas e ammos infinitas, deve já ter essa opção no config.lua. Link para o comentário https://xtibia.com/forum/topic/239039-ajuda-com-alguns-scripts/#findComment-1683105 Compartilhar em outros sites More sharing options...
0 Anuudek 3 Postado Janeiro 24, 2016 Autor Share Postado Janeiro 24, 2016 Mano, eu sou muito BURRO e LERDO. Fiquei horas procurando no config.lua não achei, agora que fui achar! Vou te da REP+... Você sabe onde acho o script de free bless? Link para o comentário https://xtibia.com/forum/topic/239039-ajuda-com-alguns-scripts/#findComment-1683106 Compartilhar em outros sites More sharing options...
0 Danihcv 335 Postado Janeiro 24, 2016 Share Postado Janeiro 24, 2016 Aqui. Vá em data\creaturescripts no arquivo creaturescripts.xml e adicione essas tags: <event type="advance" name="advanceBless" event="script" value="playerBless.lua"/> <event type="login" name="loginBless" event="script" value="playerBless.lua"/> <event type="death" name="deathBless" event="script" value="playerBless.lua"/> Agora vá em data\creaturescripts\scripts no arquivo login.lua e adicione isso antes do ultimo return true: registerCreatureEvent(cid, "advanceBless") registerCreatureEvent(cid, "loginBless") registerCreatureEvent(cid, "deathBless") Agora vá em data\creaturescripts\scripts e crie um arquivo chamado playerBless.lua e coloque isso dentro: local maxLevel = 10 --level maximo pro player ganhar bless function onAdvance(cid, skill, oldLevel, newLevel) if player:getLevel(cid) <= maxLevel then for i = 1, 5 do player:addBlessing(cid, i) end end return true end function onDeath(cid) if player:getLevel(cid) <= maxLevel then for i = 1, 5 do player:addBlessing(cid, i) end end return true end function onLogin(cid) if player:getLevel(cid) <= maxLevel then for i = 1, 5 do player:addBlessing(cid, i) end end return true end #CASO ESSE SCRIPT Ñ PEGUE, TENTE ASSIM: local maxLevel = 10 --level maximo pro player ganhar bless function onAdvance(cid, skill, oldLevel, newLevel) if getPlayerLevel(cid) <= maxLevel then for i = 1, 5 do doPlayerAddBlessing(cid, i) end end return true end function onDeath(cid) if getPlayerLevel(cid) <= maxLevel then for i = 1, 5 do doPlayerAddBlessing(cid, i) end end return true end function onLogin(cid) if getPlayerLevel(cid) <= maxLevel then for i = 1, 5 do doPlayerAddBlessing(cid, i) end end return true end Link para o comentário https://xtibia.com/forum/topic/239039-ajuda-com-alguns-scripts/#findComment-1683112 Compartilhar em outros sites More sharing options...
0 frank008 1 Postado Janeiro 24, 2016 Share Postado Janeiro 24, 2016 mano tenta isso Em "Data/creaturescripts/scripts" no arquivo login.lua, adicione isso antes do ultimo return true: for b = 1, 5 do if player:getLevel(cid) <= 50 then player:addBlessing(cid, b) endend Aqui. Vá em data\creaturescripts no arquivo creaturescripts.xml e adicione essas tags: <event type="advance" name="advanceBless" event="script" value="playerBless.lua"/> <event type="login" name="loginBless" event="script" value="playerBless.lua"/> <event type="death" name="deathBless" event="script" value="playerBless.lua"/> Agora vá em data\creaturescripts\scripts no arquivo login.lua e adicione isso antes do ultimo return true: registerCreatureEvent(cid, "advanceBless") registerCreatureEvent(cid, "loginBless") registerCreatureEvent(cid, "deathBless") Agora vá em data\creaturescripts\scripts e crie um arquivo chamado playerBless.lua e coloque isso dentro: local maxLevel = 10 --level maximo pro player ganhar bless function onAdvance(cid, skill, oldLevel, newLevel) if player:getLevel(cid) <= maxLevel then for i = 1, 5 do player:addBlessing(cid, i) end end return true end function onDeath(cid) if player:getLevel(cid) <= maxLevel then for i = 1, 5 do player:addBlessing(cid, i) end end return true end function onLogin(cid) if player:getLevel(cid) <= maxLevel then for i = 1, 5 do player:addBlessing(cid, i) end end return true end #CASO ESSE SCRIPT Ñ PEGUE, TENTE ASSIM: local maxLevel = 10 --level maximo pro player ganhar bless function onAdvance(cid, skill, oldLevel, newLevel) if getPlayerLevel(cid) <= maxLevel then for i = 1, 5 do doPlayerAddBlessing(cid, i) end end return true end function onDeath(cid) if getPlayerLevel(cid) <= maxLevel then for i = 1, 5 do doPlayerAddBlessing(cid, i) end end return true end function onLogin(cid) if getPlayerLevel(cid) <= maxLevel then for i = 1, 5 do doPlayerAddBlessing(cid, i) end end return true end Teria como subir a msg quando o o player morrer e avisar q a bless e ate o lvl ditado? Link para o comentário https://xtibia.com/forum/topic/239039-ajuda-com-alguns-scripts/#findComment-1683113 Compartilhar em outros sites More sharing options...
0 Danihcv 335 Postado Janeiro 24, 2016 Share Postado Janeiro 24, 2016 @@frank008, botei pra qnd o player morre e pra qnd o player loga: local maxLevel = 10 --level maximo pro player ganhar bless local msg = "Você atualmente tem o bless gratuito. Ele durará até o level "..maxLevel.."" function onAdvance(cid, skill, oldLevel, newLevel) if getPlayerLevel(cid) <= maxLevel then for i = 1, 5 do doPlayerAddBlessing(cid, i) end end return true end function onDeath(cid) if getPlayerLevel(cid) <= maxLevel then for i = 1, 5 do doPlayerAddBlessing(cid, i) doPlayerSendTextMessage(cid,18, msg) end end return true end function onLogin(cid) if getPlayerLevel(cid) <= maxLevel then for i = 1, 5 do doPlayerAddBlessing(cid, i) doPlayerSendTextMessage(cid,18, msg) end end return true end Link para o comentário https://xtibia.com/forum/topic/239039-ajuda-com-alguns-scripts/#findComment-1683121 Compartilhar em outros sites More sharing options...
0 Anuudek 3 Postado Janeiro 25, 2016 Autor Share Postado Janeiro 25, 2016 Vlw! Eu configurei pra ser até level 80. E como coloca aquela mensagem que quando o player loga e ele ta level 80- aparece "FREE BRESS" Link para o comentário https://xtibia.com/forum/topic/239039-ajuda-com-alguns-scripts/#findComment-1683129 Compartilhar em outros sites More sharing options...
0 Danihcv 335 Postado Janeiro 25, 2016 Share Postado Janeiro 25, 2016 (editado) Confira o ultimo script que eu mandei aqui. Tem logo no inicio dele uma parte pra vc colocar a mensagem que vc quer que apareça pro player que está com o free bless. Vc pode colocar o que vc quiser, apenas deixe a mensagem entre as aspas duplas. Mas caso tenha dado erro, é por causa das functions que eu usei... Aqui está outra versão, que provavelmente funcionará pra tfs 1.1/1.2: local maxLevel = 10 --level maximo pro player ganhar bless local msg = "FREE BLESS" --mensagem dizendo que o player tem free bless. DEIXE ELA ENTRE ASPAS DUPLAS! local msgType = 18 --tipo de mensagem function onAdvance(cid, skill, oldLevel, newLevel) if player:getLevel(cid) <= maxLevel then for i = 1, 5 do player:addBlessing(cid, i) doPlayerSendTextMessage(cid, msgType, msg) end end return true end function onDeath(cid) if player:getLevel(cid) <= maxLevel then for i = 1, 5 do player:addBlessing(cid, i) end end return true end function onLogin(cid) if player:getLevel(cid) <= maxLevel then for i = 1, 5 do player:addBlessing(cid, i) doPlayerSendTextMessage(cid, msgType, msg) end end return true end Editado Janeiro 25, 2016 por Danihcv script adicionado Link para o comentário https://xtibia.com/forum/topic/239039-ajuda-com-alguns-scripts/#findComment-1683133 Compartilhar em outros sites More sharing options...
0 Anuudek 3 Postado Janeiro 25, 2016 Autor Share Postado Janeiro 25, 2016 (editado) Pelo que me deparei no meu creaturescripts.xml <event type="advance" name="advanceBless" event="script" value="playerBless.lua"/><event type="login" name="loginBless" event="script" value="playerBless.lua"/><event type="death" name="deathBless" event="script" value="playerBless.lua"/> essa parte ai o "event="script" não tem nos outros scripts, tem problema se eu colocar? @EDIT Não funcionou! Meu login.lua -- ordered as in creaturescripts.xml local events = { 'pythiusDead', 'bossesGrayIsland', 'ElementalSpheres', 'ElementalSpheresKill', 'ElementalSpheresLogin', 'WarzoneThree', 'WarzoneTwo', 'bossesWarzone', 'SvargrondArenaKill', 'PharaoKillPortal', 'inServiceOfYalaharQuestsDiseased', 'inServiceOfYalaharQuestsMorik', 'inServiceOfYalaharQuestsQuara', 'inquisitionQuestBosses', 'inquisitionQuestUngreez', 'killingInTheNameOfQuestKills', 'TaskCustom', 'Yielothax', 'Energized', 'Raging', 'MastersVoiceServants', 'wrathBoss', 'wrathZalamon', 'PlayerDeath', 'ThievesGuildNomad', 'AdvanceSave', 'SpikeDrillworm', 'SecretServiceBlackKnight' 'advanceBless' 'loginBless' 'deathBless' } function onLogin(cid) local player = Player(cid) 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())) db.query("UPDATE `players` SET `cast` = 0 WHERE `id` = " .. getPlayerGUID(cid) .. ";") end player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr) for i = 1, #events do player:registerEvent(events) end for b = 1, 5 do if player:getLevel(cid) <= 80 then player:addBlessing(cid, b) end end return true end Creaturescripts.xml <?xml version="1.0" encoding="UTF-8"?> <creaturescripts> <!-- Secret Service Quest --> <event type="kill" name="SecretServiceBlackKnight" script="others/blackKnight.lua"/> <!-- Spike Task: Drillworm --> <event type="kill" name="SpikeDrillworm" script="spike task/drillworm.lua"/> <!-- Thieves Guild Quest --> <event type="kill" name="ThievesGuildNomad" script="others/nomad.lua"/> <!-- Pythius The Rotten --> <event type="kill" name="pythiusDead" script="pythius the rotten/pythiusDead.lua" /> <!-- Gray Island --> <event type="kill" name="bossesGrayIsland" script="gray island/bossesgrayisland.lua"/> <!-- The Elemental Spheres --> <event type="death" name="ElementalSpheres" script="elemental spheres quest/the_elemental_spheres.lua"/> <event type="kill" name="ElementalSpheresKill" script="elemental spheres quest/the_elemental_spheres.lua"/> <event type="login" name="ElementalSpheresLogin" script="elemental spheres quest/the_elemental_spheres.lua"/> <!-- Gnomebase --> <event type="kill" name="WarzoneTwo" script="gnomebase/warzone2.lua"/> <event type="kill" name="WarzoneThree" script="gnomebase/warzone3.lua"/> <event type="kill" name="bossesWarzone" script="gnomebase/bossesWarzone.lua"/> <!-- Svargrond Arena: Killing a boss --> <event type="kill" name="SvargrondArenaKill" script="svargrond arena quest/arena_kill.lua"/> <!-- Pharaos: Portal to reward room --> <event type="kill" name="PharaoKillPortal" script="others/pharaoPortal.lua"/> <!-- In Service Of Yalahar Quest --> <event type="kill" name="inServiceOfYalaharQuestsDiseased" script="in service of yalahar quest/inServiceOfYalaharQuestsDiseased.lua"/> <event type="kill" name="inServiceOfYalaharQuestsMorik" script="in service of yalahar quest/inServiceOfYalaharQuestsMorik.lua"/> <event type="kill" name="inServiceOfYalaharQuestsQuara" script="in service of yalahar quest/inServiceOfYalaharQuestsQuara.lua"/> <!-- Inquisition Quest --> <event type="kill" name="inquisitionQuestBosses" script="inquisition quest/inquisitionQuestBosses.lua"/> <event type="kill" name="inquisitionQuestUngreez" script="inquisition quest/inquisitionQuestUngreez.lua"/> <!-- Killing In The Name Of Quest --> <event type="kill" name="killingInTheNameOfQuestKills" script="killing in the name of quest/killingInTheNameOfQuestKills.lua"/> <event type="kill" name="TaskCustom" script="killing in the name of quest/taskcustom.lua"/> <!-- Raging Mage Tower --> <event type="kill" name="Yielothax" script="raging mage tower/yielothax.lua"/> <event type="kill" name="Energized" script="raging mage tower/energized.lua"/> <event type="kill" name="Raging" script="raging mage tower/raging.lua"/> <!-- The Masters Voice Quest --> <event type="kill" name="MastersVoiceServants" script="their master's voice quest/ServantsKill.lua"/> <!-- Wrath of Emperor --> <event type="kill" name="wrathBoss" script="wrath of the emperor quest/wrathOfTheEmperorQuestBoss.lua"/> <event type="kill" name="wrathZalamon" script="wrath of the emperor quest/wrathOfTheEmperorQuestZalamon.lua"/> <!-- Others --> <event type="advance" name="advanceBless" event="script" value="playerBless.lua"/><event type="login" name="loginBless" event="script" value="playerBless.lua"/><event type="death" name="deathBless" event="script" value="playerBless.lua"/> <event type="logout" name="Cast" script="others/cast.lua"/> <event type="login" name="PlayerLogin" script="others/login.lua"/> <event type="death" name="PlayerDeath" script="others/playerdeath.lua"/> <event type="advance" name="AdvanceSave" script="others/advance_save.lua"/> <event type="advance" name="AdvanceRook" script="others/advance_rook.lua"/> <event type="advance" name="Recompense" script="others/recompense.lua"/> <event type="login" name="AddonsMounts" script="others/addons-montarias.lua"/> </creaturescripts> O meu ot é global 10.90 (harmonia.ddns.net) e não tem essa Free Bless Editado Janeiro 25, 2016 por Anuudek Link para o comentário https://xtibia.com/forum/topic/239039-ajuda-com-alguns-scripts/#findComment-1683236 Compartilhar em outros sites More sharing options...
Pergunta
Anuudek 3
Então galera, quero fazer um pedido desses scripts Free Bless até x level e Runas e Ammos infinitas.
Porfavor é urgente
Link para o comentário
https://xtibia.com/forum/topic/239039-ajuda-com-alguns-scripts/Compartilhar em outros sites
9 respostass a esta questão
Posts Recomendados