RigBy 285 Postado Março 5, 2014 Share Postado Março 5, 2014 (editado) Akatsuki System + Heart System Introdução - tava vendo muitas pessoas precisando desses dois sistema então resolvi criar o meu próprio. - Não ta igual ao do NTOUltimate pois nunca joguei esse servidor. O que tem no Akatsuki system 1.0? - Verifica se sua vocação pode fazer parte da akatsuki - Verificar sua vocação e adiciona outra diferente? - Troca de outfit dependendo da sua vocação - Da bonus de hp e mp - Adicionar o nome [Akatsuki] no seu nick exemplo [Akatsuki] RigBy - Aplica uma storage quando você entra pra akatsuki (com isso da pra você fazer bonusXp) - storage é 85798723243 valor 1 O que tem no Heart System - Ele só te da o coração se você for acima de tal level - adiciona o nome da pessoa no coração Vamos la a script Npc.xml <?xml version="1.0" encoding="UTF-8"?> <npc name="[Akatsuki] Tobi" script="data/npc/scripts/AkatsukiSystem.lua" walkinterval="2000" speed="0" floorchange="0"> <health now="100" max="100"/> <look type="128" head="0" body="0" legs="0" feet="0" addons="0"/> <parameters> <parameter key="message_greet" value="Hello You who joins {akatsuki}?"/> </parameters> </npc> Npc/Script/AkatsukiSystem.lua -- Do not remove the credits -- -- [NPC] Akatsuki System -- -- developed by Rigby -- -- Especially for the Xtibia.com -- local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local level = 1 -- Level preciso pra entra para akatsuki local itemid = 5943 -- id do coração local quantidade = 6 -- quantos hearts e preciso local bonushp = 300000 -- quanto de bonus de life vai ganha local bonusmp = 30000 -- quanto de bonus de mana vai ganha local config = { --[Vocation] = ( Nova Vocation, New Outfit ) [1] = { 5, 128}, [2] = { 6, 129}, [3] = { 7, 130}, [4] = { 8, 131}, } function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, 'akatsuki') then if getPlayerVocation(cid) ~= config then if getPlayerStorageValue(cid, 85798723243) == -1 then if getPlayerLevel(cid) >= level then selfSay('Are you sure you want to join the Akatsuki?.', cid) talkState[talkUser] = 1 else selfSay('You there and very weak, vain talk to you when you have level '..level..'.', cid) end else selfSay('You already part of the akatsuki!', cid) end else selfSay('Do not need you now!', cid) end end if talkState[talkUser] == 1 and msgcontains(msg, 'yes') then selfSay('To prove their loyalty, you have to bring '..quantidade..' {hearts}.', cid) talkState[talkUser] = 2 end if talkState[talkUser] == 2 and msgcontains(msg, 'hearts') then if getPlayerItemCount(cid, 5943) >= 6 then local voc = config[getPlayerVocation(cid)] doPlayerSetVocation(cid, voc[1]) local outfit = {lookType = voc[2]} doCreatureChangeOutfit(cid, outfit) setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+bonushp) setCreatureMaxMana(cid, getCreatureMaxMana(cid)+bonusmp) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)) doPlayerRemoveItem(cid, 5943, 6) doCreatureAddMana(cid, getCreatureMaxMana(cid)) setPlayerStorageValue(cid,85798723243,1) db.executeQuery("UPDATE `players` SET `name` = '[Akatsuki] "..getCreatureName(cid).."' WHERE `id` = "..getPlayerGUID(cid)..";") addEvent(doRemoveCreature, 5*1000, cid, true) doPlayerSendTextMessage(cid,25,'You will be kicked in 5 seconds to enter the akatsuki!') selfSay('Congratulations now you are part of akatsuki.', cid) talkState[talkUser] = 0 else selfSay('No use to fool me, you do not have '..quantidade..' hearts, goes behind.', cid) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Heart System Creaturescript/script/heartsystem -- Do not remove the credits -- -- [CREATURESCRIPT] Heart System -- -- developed by Rigby -- -- Especially for the Xtibia.com -- function onKill(cid, target, lastHit) local item = 5943 -- id do coração local level = 300 -- level necessário para tira o coração if isPlayer(cid) and isPlayer(target) then if getPlayerLevel(target) >= level then local add = doPlayerAddItem(cid, item, 1) doItemSetAttribute(add, "description","Esse coração é de "..getPlayerName(target).." que foi morto no level "..getPlayerLevel(target).." por "..getPlayerName(cid)..".") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Voce Mato " ..getPlayerName(target).. ".") doSendMagicEffect(getPlayerPosition(cid),12) end end return true end Creaturescript.xml Tag <event type="kill" name="HeartSys" event="script" value="heartsystem.lua"/> Podem comenta duvidas, opiniões ou melhoramento para que haja a versão 2.0 Editado Junho 26, 2015 por RigBy Link para o comentário https://xtibia.com/forum/topic/229599-akatsuki-system-advance-10-heart-system/ Compartilhar em outros sites More sharing options...
Junior001 362 Postado Março 5, 2014 Share Postado Março 5, 2014 Se tornando um ótimo scripter em parabéns script muito bom vou testar aqui Link para o comentário https://xtibia.com/forum/topic/229599-akatsuki-system-advance-10-heart-system/#findComment-1619548 Compartilhar em outros sites More sharing options...
DuuhCarvalho 327 Postado Março 5, 2014 Share Postado Março 5, 2014 Boa ! continue assim trazendo ótimos conteúdos pro fórum. Link para o comentário https://xtibia.com/forum/topic/229599-akatsuki-system-advance-10-heart-system/#findComment-1619606 Compartilhar em outros sites More sharing options...
Creatserv 0 Postado Março 5, 2014 Share Postado Março 5, 2014 (editado) Ae ate que fim system akatsuki igual nto ultimate ele esta pensando que só ele saber fazer kkkkkkk. Duas pergunta esse script ganha 20% exp a mais. A outra cê pode ajuda com o system edo tensei iguail ntoultimate se puder eu agradeço. Vamos acaba com esse negocio de arruma system e não complatilha. Editado Março 5, 2014 por Creatserv Link para o comentário https://xtibia.com/forum/topic/229599-akatsuki-system-advance-10-heart-system/#findComment-1619624 Compartilhar em outros sites More sharing options...
RigBy 285 Postado Março 5, 2014 Autor Share Postado Março 5, 2014 @Junior 001 Vlw, totalmente funcional. @DuuhCarvalho Obrigado. @Creatserv Nunca joguei Nto ,eu sique tenho o tibia 8.54 no PC então não sei se fico totalmente igual ao do nto. Pois eu fiz esse me baseando nos pedidos de script Não da bonus de xp mais se você criar uma script que cheque a storage que eu pois la em cima vai funciona. Cria um topico la no pedido e duvidas que eu vejo como funciona e tento fazer. Link para o comentário https://xtibia.com/forum/topic/229599-akatsuki-system-advance-10-heart-system/#findComment-1619642 Compartilhar em outros sites More sharing options...
HeltonMuniz2 10 Postado Março 5, 2014 Share Postado Março 5, 2014 =) Você evoluiu muito desde quando começou a frequentar o fórum, Ótimo script amigo, sucesso ai. Link para o comentário https://xtibia.com/forum/topic/229599-akatsuki-system-advance-10-heart-system/#findComment-1619644 Compartilhar em outros sites More sharing options...
Creatserv 0 Postado Março 6, 2014 Share Postado Março 6, 2014 (editado) Eu jah crie la topico edo tensei em pedidos e duvidas. Outra coisa tem como coloka pra quando da look mostra que é membro akatsuki. Tipo uma graduaçaõ. É pq mano eu ñ queria que fica-se o nome akatsuki no nick e sim na hora que desse look. Pra ñ atrapalha o nome do pl ayer. Eu penso assim, mim descupe se estou abusando d+. Agora se pode ajuda, só falta isso msm pra o script fica ótimo pra min, vlw. Editado Março 6, 2014 por Creatserv Link para o comentário https://xtibia.com/forum/topic/229599-akatsuki-system-advance-10-heart-system/#findComment-1619715 Compartilhar em outros sites More sharing options...
RigBy 285 Postado Março 7, 2014 Autor Share Postado Março 7, 2014 Hmm, ok passei 2 dias sem net então daqui pra segunda eu posto a versão 2.0 com algumas modificações. Link para o comentário https://xtibia.com/forum/topic/229599-akatsuki-system-advance-10-heart-system/#findComment-1620169 Compartilhar em outros sites More sharing options...
Creatserv 0 Postado Março 7, 2014 Share Postado Março 7, 2014 espero que vc coloke pra ficar monstrando que é da akatsuki Link para o comentário https://xtibia.com/forum/topic/229599-akatsuki-system-advance-10-heart-system/#findComment-1620181 Compartilhar em outros sites More sharing options...
HeltonMuniz2 10 Postado Março 14, 2014 Share Postado Março 14, 2014 (editado) Rigby ta dando um erro no npc, algo envolvido com callback, depois que fala hearts. Editado Março 14, 2014 por ErenJaeger Link para o comentário https://xtibia.com/forum/topic/229599-akatsuki-system-advance-10-heart-system/#findComment-1623046 Compartilhar em outros sites More sharing options...
RigBy 285 Postado Março 14, 2014 Autor Share Postado Março 14, 2014 Eu testei no TFS 0.4(8.60) e não deu nenhum erro mas se você informa o erro depois eu tento resolver pra você. Link para o comentário https://xtibia.com/forum/topic/229599-akatsuki-system-advance-10-heart-system/#findComment-1623135 Compartilhar em outros sites More sharing options...
Creatserv 0 Postado Março 15, 2014 Share Postado Março 15, 2014 eu testeii tb mas essas mensagem n aparece. Link para o comentário https://xtibia.com/forum/topic/229599-akatsuki-system-advance-10-heart-system/#findComment-1623303 Compartilhar em outros sites More sharing options...
Dbko 120 Postado Março 28, 2014 Share Postado Março 28, 2014 Aki pego Normal Vai Ajudar a Muito Systema Igual Do Notultimate KKK Saiu Igualzinho Link para o comentário https://xtibia.com/forum/topic/229599-akatsuki-system-advance-10-heart-system/#findComment-1630222 Compartilhar em outros sites More sharing options...
istreek 1 Postado Setembro 22, 2015 Share Postado Setembro 22, 2015 Perdoe-me por reviver o tópico mas, o que eu ponho aqui? --[Vocation] = ( Nova Vocation, New Outfit )[1] = { 5, 128},[2] = { 6, 129},[3] = { 7, 130},[4] = { 8, 131},} Link para o comentário https://xtibia.com/forum/topic/229599-akatsuki-system-advance-10-heart-system/#findComment-1669781 Compartilhar em outros sites More sharing options...
caiovinibc 2 Postado Outubro 18, 2015 Share Postado Outubro 18, 2015 To prescisando da mesma coisa /\ e o Heart System não tá funcionando... Link para o comentário https://xtibia.com/forum/topic/229599-akatsuki-system-advance-10-heart-system/#findComment-1673415 Compartilhar em outros sites More sharing options...
Posts Recomendados