Postado Maio 13, 2014 11 anos Este é um post popular. Fala galera do TK, hoje vim compartilhar com vocês um sistema que eu comecei a fazer com a ajuda de um amigo ... Bem, ele é viciado em Skyrim e esses dias a gente ficou quase 10 horas sem internet , e foi nesse meio tempo de tédio que eu decidi fazer um sistema baseado nas Bold Weapons do Skyrim e ele foi me dando uns toques pra eu poder melhorar o script. Se você nunca jogou Skyrim ou não se lembra eu vou explicar oque é: Um sistema que você conjura uma arma feita de magia referente a sua classe mas se vc tentar tirar ela da mão, ela some. O Script em si é bem simpleszinho mas vc tem que fazer diversas alterações no server pra que ele fique 100% então aqui vamos nós: Antes de tudo eu gostaria de dizer que eu altamente recomendo que você crie novos itens no seu Item Editor pra evitar problemas futuros mas use as sprites dos itens que eu irei passar aqui nesse tópico. Abra seu weapons.xml e adicione as seguintes linhas (note que vc deve procurar os id's antes pra ver se já não existe ele declarado, caso haja, delete as linhas antigas e adicione as novas): <!-- Aura items --> <wand id="7773" level="0" mana="15" min="79" max="250" type="ice" event="function" value="default"/> <wand id="7774" level="0" mana="15" min="79" max="250" type="ice" event="function" value="default"/> <wand id="7424" level="0" mana="15" min="149" max="250" type="ice" event="function" value="default"/> <wand id="7451" level="0" mana="15" min="149" max="250" type="ice" event="function" value="default"/> <melee id="7775" level="0" unproperly="1" event="function" value="default"/> <melee id="7766" level="0" unproperly="1" event="function" value="default"/> <melee id="7772" level="0" unproperly="1" event="function" value="default"/> <melee id="7407" level="0" unproperly="1" event="function" value="default"/> <melee id="7450" level="0" unproperly="1" event="function" value="default"/> <melee id="7455" level="0" unproperly="1" event="function" value="default"/> <distance id="8854" level="0" unproperly="1" event="function" value="default"/> <distance id="8858" level="0" unproperly="1" event="function" value="default"/> lembrando que aqui são os ID's dos itens que serão criados e no caso das wands/rods também está configurado o dano que cada uma dará e o custo de mana por hit. Agora em movements.xml adicione isso: <!-- AURA ITEMS --> <movevent type="DeEquip" itemid="7773" slot="right-hand" event="script" value="item.lua"/> <movevent type="DeEquip" itemid="7774" slot="right-hand" event="script" value="item.lua"/> <movevent type="DeEquip" itemid="8854" slot="right-hand" event="script" value="item.lua"/> <movevent type="DeEquip" itemid="7775" slot="right-hand" event="script" value="item.lua"/> <movevent type="DeEquip" itemid="7766" slot="right-hand" event="script" value="item.lua"/> <movevent type="DeEquip" itemid="7772" slot="right-hand" event="script" value="item.lua"/> <movevent type="DeEquip" itemid="7424" slot="right-hand" event="script" value="item.lua"/> <movevent type="DeEquip" itemid="7451" slot="right-hand" event="script" value="item.lua"/> <movevent type="DeEquip" itemid="8858" slot="right-hand" event="script" value="item.lua"/> <movevent type="DeEquip" itemid="7450" slot="right-hand" event="script" value="item.lua"/> <movevent type="DeEquip" itemid="7407" slot="right-hand" event="script" value="item.lua"/> <movevent type="DeEquip" itemid="7455" slot="right-hand" event="script" value="item.lua"/> aqui temos todos os ids dos items e o slot da função como sendo a mão esquerda (direita da tela >>) eu fiz utilizando esse slot porque os itens são criados lá diretamente e evita erros na distro e na pasta movements\scripts adicione o arquivo item.lua que deverá conter o seguinte: -- Scheme of Night Wolf for Aurum System function onDeEquip(cid, item, position, fromPosition) if doRemoveItem(item.uid, 1) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The magic that created the item disappear as you remove it from your hands...") doSendMagicEffect(getCreaturePos(cid), 10) return false end end Agora em Spells.xml adicione essa linha aqui: <instant name="Weapon Aura" words="Aurum" lvl="100" manapercent="60" aggressive="0" exhaustion="2000" needlearn="0" event="script" value="especiais/weaponaura.lua"> </instant> aqui vc vai configurar a palavra que vc diz pra conjurar a magia, o level dela e a porcentagem de mana que vai consumir ao usar a spell.Ainda na pasta spells vá em scripts e crie uma nova pasta chamada especiais e crie um arquivo chamado weaponaura.lua que deverá conter o seguinte: ---- Made by Night Wolf local weapons = { [1] = 7773, [2] = 7774, [3] = 8854, [14] = 7775, -- club de kina [19] = 7766, -- sword de kina [34] = 7772, -- axe de kina [5] = 7424, [6] = 7451, [7] = 8858, [18] = 7450, --- club de elit kina [23] = 7407, ---- sword de elit kina [38] = 7455 --- axe de elit kina } local config = { place = 5, place2 = 6 } function onCastSpell(cid, var) if (getPlayerSlotItem(cid, config.place).itemid == 0 ) and (getPlayerSlotItem(cid, config.place2).itemid == 0) then if isInArray({4,8}, getPlayerVocation(cid)) then local club, sword, axe = getPlayerSkillLevel(cid, 1), getPlayerSkillLevel(cid, 2), getPlayerSkillLevel(cid, 3) if club > sword and club >= axe then skillid = 10 elseif sword >= axe and sword >= club then skillid = 15 elseif axe > sword and axe > club then skillid = 30 return skillid end doPlayerAddItem(cid, weapons[(getPlayerVocation(cid)+skillid)], 1 , false) doSendMagicEffect(getCreaturePos(cid), 65) else doPlayerAddItem(cid, weapons[getPlayerVocation(cid)], 1 , false) doSendMagicEffect(getCreaturePos(cid), 65) end else doPlayerSendCancel(cid, "You must leave your both hands free in order to cast this spell.") return false end return true end aqui são os ID's das armas que serão criadas, a posição que vai ser criada, efeitos, mensagens e etc. Note que a primeira table representa a vocação de 1 até 8 mas as vocações 4 e 8 estão divididas entre outras 3 (porque knight pode usar club, sword ou axe) Agora você tem que garantir que o player não irá dar trade nos itens, para isso vá em creaturescripts\scripts e crie um arquivo chamado untrade.lua e coloque isso dentro dele: local untradeable = { 7773, 7774, 8854, 7775, -- club de kina 7766, -- sword de kina 7772, -- axe de kina 7424, 7451, 8858, 7450, --- club de elit kina 7407, ---- sword de elit kina 7455 --- axe kina } function onTradeRequest(cid, target, item, targetItem) if (isInArray(untradeable, item.itemid)) then doPlayerSendCancel (cid, "You can't trade an item that is made of your Aura...") return false end return true end aqui você muda os id's tb pra caso use novos itens (oque eu recomendo pra vc não ter que ficar rodando as suas actions e seus monstros pra garantir que nenhum vai dropar as Aura Weapons) Feito isso você deve ir no creaturescripts.xml e adicionar essa linha aqui: <event type="traderequest" name="UntradeAura" event="script" value="untrade.lua"/> agora abra o login.lua que fica em creaturescripts\scripts e antes do ultimo return true adicione isso daqui: ---- AURA ITENS ---- registerCreatureEvent(cid, "UntradeAura") ______________________________________________________________________Se você conseguiu fazer tudo até agora isso significa que você sabe ler. Se alguma coisa deu merda volte ao início e releia tudo com atenção! _______________________________________________________________________ Agora vem a parte mais chatinha, abra seu items.xml e edite um por um todos os id's abaixo: <item id="7407" article="the" name="Aura Blade"> <attribute key="description" value="an item made of Aura, it will disappear upon removing." /> <attribute key="weight" value="0" /> <attribute key="defense" value="0" /> <attribute key="attack" value="120" /> <attribute key="weaponType" value="sword" /> </item> <item id="7424" article="the" name="Aura Staff"> <attribute key="description" value="an item made of Aura, it will disappear upon removing." /> <attribute key="weight" value="0" /> <attribute key="weaponType" value="wand" /> <attribute key="shootType" value="ice" /> <attribute key="range" value="7" /> </item> <item id="7450" article="the" name="Aura Hammer"> <attribute key="description" value="an item made of Aura, it will disappear upon removing." /> <attribute key="weight" value="0" /> <attribute key="defense" value="0" /> <attribute key="attack" value="120" /> <attribute key="weaponType" value="club" /> </item> <item id="7451" article="an" name="Aura Sceptre"> <attribute key="description" value="an item made of Aura, it will disappear upon removing." /> <attribute key="weight" value="0" /> <attribute key="weaponType" value="wand" /> <attribute key="shootType" value="ice" /> <attribute key="range" value="7" /> </item> <item id="7455" article="the" name="Aura Axe"> <attribute key="description" value="an item made of Aura, it will disappear upon removing." /> <attribute key="weight" value="0" /> <attribute key="defense" value="0" /> <attribute key="attack" value="120" /> <attribute key="weaponType" value="axe" /> </item> <item id="7766" article="an" name="Aura Sword"> <attribute key="description" value="an item made of Aura, it will disappear upon removing." /> <attribute key="weight" value="0" /> <attribute key="defense" value="0" /> <attribute key="attack" value="80" /> <attribute key="weaponType" value="sword" /> <attribute key="slotType" value="two-handed" /> </item> <item id="7772" article="an" name="Aura Axe"> <attribute key="description" value="an item made of Aura, it will disappear upon removing." /> <attribute key="weight" value="0" /> <attribute key="defense" value="0" /> <attribute key="attack" value="80" /> <attribute key="weaponType" value="axe" /> <attribute key="slotType" value="two-handed" /> </item> <item id="7773" article="an" name="Aura Wand"> <attribute key="description" value="an item made of Aura, it will disappear upon removing." /> <attribute key="weight" value="0" /> <attribute key="weaponType" value="wand" /> <attribute key="shootType" value="ice" /> <attribute key="range" value="7" /> </item> <item id="7774" article="an" name="Aura Rod"> <attribute key="description" value="an item made of Aura, it will disappear upon removing." /> <attribute key="weight" value="0" /> <attribute key="weaponType" value="wand" /> <attribute key="shootType" value="ice" /> <attribute key="range" value="7" /> </item> <item id="7775" article="an" name="Aura Club"> <attribute key="description" value="an item made of Aura, it will disappear upon removing." /> <attribute key="weight" value="0" /> <attribute key="defense" value="0" /> <attribute key="attack" value="80" /> <attribute key="weaponType" value="club" /> <attribute key="slotType" value="two-handed" /> </item> <item id="8854" article="an" name="Aura Bow"> <attribute key="description" value="an item made of Aura, it will disappear upon removing." /> <attribute key="weight" value="0" /> <attribute key="slotType" value="two-handed" /> <attribute key="weaponType" value="distance" /> <attribute key="ammoType" value="arrow" /> <attribute key="range" value="5" /> <attribute key="attack" value="5" /> </item> <item id="8858" article="the" name="Aura Bow"> <attribute key="description" value="an item made of Aura, it will disappear upon removing." /> <attribute key="weight" value="0" /> <attribute key="slotType" value="two-handed" /> <attribute key="weaponType" value="distance" /> <attribute key="ammoType" value="arrow" /> <attribute key="range" value="7" /> <attribute key="attack" value="10" /> </item> Eu pessoalmente achei o sistema super bacana, ainda mais pra servidores sérios.. Testei aqui no meu TFS 0.3.6 (Crying Damson) e rodou tudo perfeitamente... quaisquer erros poste aqui no tópico que eu tento ajudar a resolver, mas é claro que na medida do possível, to sem tempo pra viver então não me peça pra adaptar o script pra sua versão 7.6 ou 10.1... ele foi feito pra 8.54! Espero que pelo menos alguém use esse sistema pq deu uma trabalheira danada pra fazer, e claro, se te ajudei, fortaleça com um REP que eu vou saber que você gostou do sistema. Grato. Mais uma coisa e talvez a mais importante do tópico: Esse script foi feito por mim, Night Wolf ou White Wolf (como vcs preferirem), e é conteudo >>> EXCLUSIVO <<<< do TIBIA KING. Não postem sem minha permissão que eu prometo continuar fazendo coisas legais pra vocês :angry2:. Abraço do Night. PS: Pra que o sistema funcione vc deve deixar as duas mãos vazias e falar Aurum, o script vai checar sua classe e te dar a weapon referente, caso vc seja Knight ele vai te dar a arma do tipo cujo sua proficiência seja a melhor.. (Em outras palavras: pegar a sua maior skill, se for sword vai te dar sword e assim por diante.. No caso de empate ele vai te dar sword e no caso de empate entre axe e club ele vai te dar club.) Note que não vai ser possível remover o item nem pra BP nem pra outro slot e nem pro chão... e também não é possível dar trade no item. Vou anexar umas imagens aqui pro pessoal ver melhor: Efeito ao soltar a magia Oque acontece quando remove o item da mão Mensagem de erro Todos os itens utilizados
Postado Maio 13, 2014 11 anos Autor kkkk que isso mano, é mó script simples. Um amigo veio falar que o Fox World tem esse sistema também mas o deles é uma magia pra cada arma, também é bem legal a ideia deles mas sendo uma magia só você não precisa criar 13 outros scripts
Postado Maio 24, 2014 10 anos Cara Da Pra Vc Me Ajudar ?? Ja Faz Hrs Q Estou Procurando um Script Assim Para Cada Char Correr A Msm Velocidade Tipo Um Lvl 10 Correr Na Msm Velocidade De um Lvl 150 ou 200 Todos Correr Igual Me Ajuda Por Favor
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.