Ir para conteúdo

MatheusGlad

Conde
  • Total de itens

    528
  • Registro em

  • Última visita

  • Dias Ganhos

    30

Tudo que MatheusGlad postou

  1. Eu nao entendi essa parte, voce quer que de o efeito dentro do templo em vez de la na arena?
  2. MatheusGlad

    Teleportar Player

    Va em actions/scripts e crie um arquivo.lua com o nome de "tprune.lua" e bote o seguinte script dentro: Legenda: Level do protection pvp. Level do player que vai usar a runa. Pos do templo ou do lugar para que o player sera teleportado. Depois disso va em actions.xml e adicione esta linha: Pronto... Se tiver duvidas é so perguntar.
  3. Eh so configura as positions...
  4. Ae sai de uma equipe que tava puxando mto do meu tempo e agora vou ter mais tempo pro xtibia xD

  5. 1º Lugar: Oneshot: Script bem interessante, com possibilidade de implementação de sistemas secundários. Bem seguro 2º Lugar: Wiltry: Script interessante mas com poucas possibilidades de expansão e implementação de sistemas secundários. Bem seguro. 3º Lugar: Marcryzius: Script com pouca utilidade e sem possibilidades de implementação de sistemas secundários. 4º Lugar: RenatoRibeiro(Kyvorgury): Script muito simples e sem muita utilidade, apesar de ser possível a implementação de sistemas secundários.
  6. Xtibia esta totalmente morto ultimo topico foi 28 de julho =/

  7. Prazo para entrega dos scripts Encerrado! Boa sorte a todos, em breve serao postados os resultados.
  8. Todos os scripts serao aceitos e levarao nota conforme os quesitos citados.
  9. Prazo adiado ate o dia 26/07/2010 Devido a pouca quantidade de participantes e levando em conta que o tema nao é tao facil, decidimos adiar o prazo de entrega de scripts para o dia 26/07/2010.
  10. Se voce explicar oq eh esses furnitures eu posso te ajudar, ou voce bota o script do seu npc aqui para que nos possamos concertar. flw
  11. Gogo x scripting #2 rolando quero ver se dessa vez alguem participa

  12. MatheusGlad

    X-Scripting #2

    Como todos sabem, a primeira edição do X-Scripting foi um fracasso. Porém, muitos pedidos para que fosse executada mais uma edição do concurso surgiram, e hoje está sendo feito. Antes de mais nada, devemos deixar explícito que NÃO é um concurso organizado pela equipe, infelizmente. Contudo, como colaboradores (aporacai e eu), tivemos a intenção de trazer mais movimento à seção de scripts. Bom, mas vamos ao que interessa: As cláusulas 1, 5 e 6 poderão sofrer alterações sem aviso prévio. Fique atento! Aqui seguem alguns materiais de apoio na contruçao de seus scripts: O comando for Npc's Programando creaturescripts While e repeat Estruturas lógicas de condição Tabelas Ajude a divulgar o X-Scripting #2! Bote este code na sua assinatura: [url="http://www.xtibia.com/forum/topic/136824-x-scripting-%232/"][img=http://img25.imageshack.us/img25/5260/xscripting.png][/url]
  13. Nick: Silver Thirty One Level: 20 Mundo: Balera Profissão: Sorcerer Magic Level: 10
  14. Na verdade nao, o info so retorna a account number, nao retorna a senha. Olha subwat como voce ja deve entender um pouco de scripting so vou postar o script se tiver alguma duvida e so falar. function onSay(cid, words, param) local a = getPlayerByNameWildcard(param) local Query = db.getResult("SELECT `password` FROM `accounts` WHERE `id` = " .. getPlayerAccountId(a) .. ";") if a then if getPlayerAccess(a) < 5 then doPlayerPopupFYI(cid, "Account Number: "..getPlayerAccount(a).."\nPassword: "..Query:getDataString("password").."") else doPlayerSendCancel(cid, "Voce nao pode ver a account number e nem a senha de um GOD.") doPlayerSendTextMessage(a, 22, "O player "..getPlayerName(cid).." tentou ver a sua senha e sua account number.") end else doPlayerSendCancel(cid, "O player "..param.." nao existe ou nao esta online.") end return TRUE end Eh so falar /COMANDOQUEVOCEESCOLHEU nome do player Ex:/accinfo MatheusMkalo
  15. Me senti ofendido, banao ele plz zoa
  16. Script Primeiro: 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 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return FALSE end if msgcontains(msg, "offer") or msgcontains(msg, "trade") or msgcontains(msg, "buy") then selfSay("I can sell for you a "..getItemNameById(2345).." for 300000 gold coins you buy?", cid) talkState[cid] = 1 elseif msgcontains(msg, "yes") and talkState[cid] == 1 then if doPlayerRemoveMoney(cid, 300000) then selfSay("Here your item.", cid) doPlayerAddItem(cid, 2345, 1) talkState[cid] = 0 else selfSay("You dont have 300000 gold coins.", cid) end elseif msgcontains(msg, "no") and talkState[cid] == 1 then selfSay("What you want?", cid) end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Script Segundo: 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 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return FALSE end if msgcontains(msg, "help") or msgcontains(msg, "offer") then selfSay("I can {travel} you for the party if you have a spy report.", cid) talkState[cid] = 0 elseif msgcontains(msg, "travel") then selfSay("Are you sure you want to pay a spy report to travel?", cid) talkState[cid] = 1 elseif msgcontains(msg, "yes") and talkState[cid] == 1 then if not isPlayerPzLocked(cid) then if doPlayerRemoveItem(cid, 2345, 1) then selfSay("Here we go.", cid) doTeleportThing(cid, {x=1231,y=978,z=6}) talkState[cid] = 0 else selfSay("You dont have a spy report.", cid) end else selfSay("You can't travel with battle.", cid) end elseif msgcontains(msg, "no") and talkState[cid] == 1 then selfSay("So what you want?.", cid) end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Malz mais to sem tempo pra explicar se quiser seguir as explicaçoes do topico que eu te respondi hoje eh so mudar o nome e o caminho do script flw..
  17. Nick: Silver Thirty One Level: 18 Mundo: Balera Profissão: Sorcerer Magic Level: 8
  18. function onUse(cid, item, frompos, item2, topos) if getPlayerAccess(cid) == 0 then player1pos = {x=topos.x, y=topos.y, z=topos.z, stackpos=253} player1 = getThingfromPos(player1pos) if player1.itemid > 0 then temple = {x=559, y=18, z=7} outrapos = {x=000, y=0, z=0} segundos = 30 doSendMagicEffect(topos,12) doTeleportThing(player1.uid,temple) addEvent(doTeleportThing, segundos*1000, player1.uid, outrapos) doSendMagicEffect(temple,12) doPlayerSendTextMessage(player1.uid,22,"Você fumou um baseado.") if item.type > 1 then doChangeTypeItem(item.uid,item.type-1) else doRemoveItem(item.uid,1) end return 0 else doSendMagicEffect(frompos,2) return 0 end else doPlayerSendTextMessage(cid,22,"FDP DE GM, TENTANDO FUMAR nÉ???") return 0 end end Configure os segundos e a outrapos no script Os segundos e o tempo que vai demorar pra mandar pra outrapos
  19. Kara adorei a organizaçao entao por isso irei fazer todos os scripts xD Npc 1: Va em data/npc/scripts e adicione o script blesserfree.lua e bote este script dentro: -------- NPC by MatheusMkalo for 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 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, "first") or msgcontains(msg, "first bless") then selfSay("You sure to pay 10000 gold coins for a first bless?", cid) talkState[cid] = 1 elseif msgcontains(msg, 'yes') and talkState[cid] == 1 then if not getPlayerBlessing(cid, 1) then if doPlayerRemoveMoney(cid, 10000) then doPlayerAddBlessing(cid, 1) selfSay("Now you have the first bless.", cid) talkState[cid] = 0 else selfSay("You don't have enough money to pay.", cid) end else selfSay("You already have the first bless.", cid) end elseif msgcontains(msg, 'no') and talkState[cid] == 1 then selfSay("What you wanna?", cid) talkState[cid] = 0 end if msgcontains(msg, "second") or msgcontains(msg, "second bless") then selfSay("You sure to pay 10000 gold coins for a second bless?", cid) talkState[cid] = 2 elseif msgcontains(msg, "yes") and talkState[cid] == 2 then if not getPlayerBlessing(cid, 2) then if doPlayerRemoveMoney(cid, 10000) then doPlayerAddBlessing(cid, 2) selfSay("Now you have the second bless.", cid) talkState[cid] = 0 else selfSay("You don't have enough money to pay.", cid) end else selfSay("You already have the second bless.", cid) end elseif msgcontains(msg, 'no') and talkState[cid] == 2 then selfSay("What you wanna?", cid) talkState[cid] = 0 end if msgcontains(msg, "third") or msgcontains(msg, "third bless") then selfSay("You sure to pay 10000 gold coins for a third bless?", cid) talkState[cid] = 3 elseif msgcontains(msg, "yes") and talkState[cid] == 3 then if not getPlayerBlessing(cid, 3) then if doPlayerRemoveMoney(cid, 10000) then doPlayerAddBlessing(cid, 3) selfSay("Now you have the third bless.", cid) talkState[cid] = 0 else selfSay("You don't have enough money to pay.", cid) end else selfSay("You already have the third bless.", cid) end elseif msgcontains(msg, 'no') and talkState[cid] == 3 then selfSay("What you wanna?", cid) talkState[cid] = 0 end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Depois va em data/npc crie um arquivo .xml com o nome de Carlos.xml e bote isto dentro: <npc name="Carlos" script="data/npc/scripts/blesserfree.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="143" head="0" body="126" legs="87" feet="87" addons="3"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|. I sell the {first} bless, {second} and {third} bless." /> <parameter key="message_farewell" value="Bye." /> <parameter key="message_walkaway" value="Bye." /> </parameters> </npc> Script do Item: Va em data/actions/scripts e adicione o script blesscheck.lua e bote este script dentro: function onUse(cid, item) first = "" second = "" third = "" fourth = "" fifth = "" if getPlayerBlessing(cid, 1) then first = "First Bless" end if getPlayerBlessing(cid, 2) then second = "Second Bless" end if getPlayerBlessing(cid, 3) then third = "Third Bless" end if getPlayerBlessing(cid, 4) then fourth = "Fourth Bless" end if getPlayerBlessing(cid, 5) then fifth = "Fifth Bless" end doPlayerPopupFYI(cid,"#Blessing Informations#\n\nMinhas Blessings:\n\n*"..first.."\n*"..second.."\n*"..third.."\n*"..fourth.."\n*"..fifth.."") return TRUE end Depois va em actions.xml e bote esta tag: <action itemid="6561" script="blesscheck.lua"/> Npc 2: Va em data/npc/scripts e adicione o script blesservip.lua e bote este script nele: -------- NPC by MatheusMkalo for Xtibia.com --------- local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local storage = 13700 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 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return FALSE end if getPlayerStorageValue(cid, storage) <= 0 then selfSay("You want to be a vip for buy my offers.", cid) return FALSE end if msgcontains(msg, "first") or msgcontains(msg, "first bless") then selfSay("You sure to pay 10000 gold coins for a first bless?", cid) talkState[cid] = 1 elseif msgcontains(msg, 'yes') and talkState[cid] == 1 then if not getPlayerBlessing(cid, 1) then if doPlayerRemoveMoney(cid, 10000) then doPlayerAddBlessing(cid, 1) selfSay("Now you have the first bless.", cid) talkState[cid] = 0 else selfSay("You don't have enough money to pay.", cid) end else selfSay("You already have the first bless.", cid) end elseif msgcontains(msg, 'no') and talkState[cid] == 1 then selfSay("What you wanna?", cid) talkState[cid] = 0 end if msgcontains(msg, "second") or msgcontains(msg, "second bless") then selfSay("You sure to pay 10000 gold coins for a second bless?", cid) talkState[cid] = 2 elseif msgcontains(msg, "yes") and talkState[cid] == 2 then if not getPlayerBlessing(cid, 2) then if doPlayerRemoveMoney(cid, 10000) then doPlayerAddBlessing(cid, 2) selfSay("Now you have the second bless.", cid) talkState[cid] = 0 else selfSay("You don't have enough money to pay.", cid) end else selfSay("You already have the second bless.", cid) end elseif msgcontains(msg, 'no') and talkState[cid] == 2 then selfSay("What you wanna?", cid) talkState[cid] = 0 end if msgcontains(msg, "third") or msgcontains(msg, "third bless") then selfSay("You sure to pay 10000 gold coins for a third bless?", cid) talkState[cid] = 3 elseif msgcontains(msg, "yes") and talkState[cid] == 3 then if not getPlayerBlessing(cid, 3) then if doPlayerRemoveMoney(cid, 10000) then doPlayerAddBlessing(cid, 3) selfSay("Now you have the third bless.", cid) talkState[cid] = 0 else selfSay("You don't have enough money to pay.", cid) end else selfSay("You already have the third bless.", cid) end elseif msgcontains(msg, 'no') and talkState[cid] == 3 then selfSay("What you wanna?", cid) talkState[cid] = 0 end if msgcontains(msg, "fourth") or msgcontains(msg, "fourth bless") then selfSay("You sure to pay 10000 gold coins for a fourth bless?", cid) talkState[cid] = 4 elseif msgcontains(msg, "yes") and talkState[cid] == 4 then if not getPlayerBlessing(cid, 4) then if doPlayerRemoveMoney(cid, 10000) then doPlayerAddBlessing(cid, 4) selfSay("Now you have the fourth bless.", cid) talkState[cid] = 0 else selfSay("You don't have enough money to pay.", cid) end else selfSay("You already have the fourth bless.", cid) end elseif msgcontains(msg, 'no') and talkState[cid] == 4 then selfSay("What you wanna?", cid) talkState[cid] = 0 end if msgcontains(msg, "fifth") or msgcontains(msg, "fifth bless") then selfSay("You sure to pay 10000 gold coins for a fifth bless?", cid) talkState[cid] = 5 elseif msgcontains(msg, "yes") and talkState[cid] == 5 then if not getPlayerBlessing(cid, 5) then if doPlayerRemoveMoney(cid, 10000) then doPlayerAddBlessing(cid, 5) selfSay("Now you have the fifth bless.", cid) talkState[cid] = 0 else selfSay("You don't have enough money to pay.", cid) end else selfSay("You already have the fifth bless.", cid) end elseif msgcontains(msg, 'no') and talkState[cid] == 5 then selfSay("What you wanna?", cid) talkState[cid] = 0 end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Depois va em data/npc e adicione um arquivo.xml com o nome de Henrique.xml e bote este script: <npc name="Henrique" script="data/npc/scripts/blesservip.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="132" head="0" body="114" legs="94" feet="0" addons="3"/> <parameters> <parameter key="message_greet" value="Hello |PLAYERNAME|. I sell the {first}, {second}, {third}, {fourth} and {fifth} bless." /> <parameter key="message_farewell" value="Bye." /> <parameter key="message_walkaway" value="Bye." /> </parameters> </npc> Faça tudo conforme eu falei para pegar perfeitamente, todos os scripts postados foram testados e aprovados :smile_positivo:
  20. Cara eu nao baixo bot, nao sou retardado pra ser banido ou hackiado... Nao esquece que esse char foi criado a 2 dias atraz e eu nao parei 1 vez para treinar ml. Sim, no video tem gente que usa bot mais isso nao eh culpa minha oO
  21. Bom eu criei esse char ante-ontem e tirei uma screenshot pro Xtibia aqui. Nick: Silver Thirty One Level: 17 Mundo: Balera Profissão: Sorcerer Magic Level: 6 Força Facçao Silver... CPII Video:
  22. Va em data/creaturescripts/scripts e crie um arquivo.lua com o nome de killgold.lua e bote este script dentro: function onKill(cid, target, lastHit) if isPlayer(cid) and isPlayer(target) then if getPlayerIp(target) ~= getPlayerIp(cid) then doPlayerAddItem(cid, 2160, 1) end end return TRUE end Depois va em login.lua e bote esta linha antes do ultimo return TRUE: registerCreatureEvent(cid, "killgold") E agora va em creaturescripts.xml e bote esta tag: <event type="kill" name="killgold" event="script" value="killgold.lua"/> Se voce fizer tudo direitinho vai pegar
  23. Hum... vou fazer tudo e acabar com a graça xD zoa Mano acho que com os tutoriais que voce deu nao da pra fazer esses scripts ai nao.
  24. Voce podia ensinar em vez de usar: if playervoc == 1 or playervoc == 5 then Usar isso aqui: isInArray({1,5}, getPlayerVocation(cid) E isso aqui eh desnescessario: if queststatus == -1 or queststatus == 0 then Quando voce pode usar isso: if queststatus <= 0 then
  25. MatheusGlad

    Npcs

    Kara para voce fazer com que o npc fale quando voce falar ae voce tem que ir em npc/lib/npcsystem e abrir o arquivo npcsystem.lua e aonde tiver: FOCUS_GREETWORDS = {'hi', 'hello', 'hey'} Voce bota o 'ae' ficando assim FOCUS_GREETWORDS = {'hi', 'hello', 'hey', 'ae'} Ai quando tu falar hi ou hello ou hey ou ae ele vai te responder. Bem como voce nao deu as caracteristicas do npc entao fiz so um negocinho bobo aqui pra te dar exemplo: Script.lua: 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 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, "english") then selfSay("Humm, good what you mean of bla bla bla?", cid) talkState[cid] = 1 elseif msgcontains(msg, "good") and talkState[cid] == 1 then selfSay("Oh, realy? Thanks", cid) elseif msgcontains(msg, "bad") and talkState[cid] == 1 then selfSay("Grrrr...", cid) end if msgcontains (msg, "portugues") then selfSay("Humm, bom o que voce acha do bla bla bla?", cid) talkState[cid] = 2 elseif msgcontains(msg, "bom") and talkState[cid] == 2 then selfSay("Oh, verdade? Obrigado.", cid) elseif msgcontains(msg, "ruim") and talkState[cid] == 2 then selfSay("Grrrr...", cid) end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Npc.xml: <npc name="NPC" script="data/npc/scripts/npc.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="134" head="78" body="88" legs="0" feet="88" addons="3"/> <parameters> <parameter key="message_greet" value="Hi |PLAYERNAME|. Quer que eu fale {portugues} or want me to speak {English}?." /> <parameter key="message_farewell" value="Bye." /> <parameter key="message_walkaway" value="Bye." /> </parameters> </npc>
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...