Ir para conteúdo

jhon992

Conde
  • Total de itens

    631
  • Registro em

  • Última visita

  • Dias Ganhos

    12

Tudo que jhon992 postou

  1. Queria um sistema inovador para otserv! Estou criando um otserv, algo mais moderno onde os player's não precisacem usar necessariamente uma "weapon" e um shield. Queria algo mais ou menos assim: Que os player's podessem usar duas swords de uma mão ao mesmo tempo, ou dois clubs, ou até mesmo uma sword e um club. E que os hit's desses itens somasem causando um dano maior e fornecendo skills. Mais ou menos assim, se usasse 2 swords o skill de sword almentase mais rapido, e se eu usase uma sword e um club almentace tanto o skill de sword como o de club também. Isso seria utilizados em muitos otserv's, principalmente os mais modernos assim simulando uma luta mais moderna, distanciando um pouco a era medieval. Não fasso idéia como fazer isso, se alguem tiver alguma sugestão, ja me ajuda. Vlw aew desde ja. Comentem! :smile_positivo:
  2. Vlw aew pela sua opnião. :positive: poise também acho essa idéia realmente boa, mais pelo visto ninguem ta muito afim de ajudar :confused:
  3. Queria algo inovador para um otserv! Estou criando um otserv, algo mais moderno onde os player's não precisacem usar necessariamente uma "weapon" e um shield. Queria algo mais ou menos assim: Que os player's podessem usar duas swords de uma mão ao mesmo tempo, ou dois clubs, ou até mesmo uma sword e um club. E que os hit's desses itens somasem causando um dano maior e fornecendo skills. Mais ou menos assim, se usasse 2 swords o skill de sword almentase mais rapido, e se eu usase uma sword e um club almentace tanto o skill de sword como o de club também. Isso seria utilizados em muitos otserv's, principalmente os mais modernos assim simulando uma luta mais moderna, distanciando um pouco a era medieval. Não fasso idéia como fazer isso, se alguem tiver alguma sugestão, ja me ajuda. Vlw aew desde ja. Comentem! :smile_positivo:
  4. tenta getPlayerPosition(target), algo assim com target!
  5. queria que quando o player estivese com uma certa storage ele não podese atacar ninguem. Nem player e nem monstros. RESOLVIDO!!
  6. quem que por os unique ID do depot de acordo com o ID da city. Exemplo: a Sky Village tem o ID 1, então todos os deposts dessa city tens que mudar o uniqueID para 1. Se ajudei da +REP.
  7. tenta tira esse "return TRUE" do final. E poem o "return" no "doCombat(cid, combat, var)". function onCastSpell(cid, var) if getResets(cid) >= reset_min then doPlayerAddMana(cid, math.random(45000, 55000)) return doCombat(cid, combat, var) else doPlayerSendCancel(cid, "Sorry, you need "..reset_min.." reset's or more to use this spell.") end
  8. vai no script do Addoner e cole isso: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 buyAddons(cid, message, keywords, parameters, node) --TODO: buyAddons function in modules.lua if(not npcHandler:isFocused(cid)) then return false end local addon = parameters.addon local cost = parameters.cost local premium = (parameters.premium ~= nil and parameters.premium) if isPlayerPremiumCallback == nil or (isPlayerPremiumCallback(cid) and premium) then if doPlayerRemoveMoney(cid, cost) then doPlayerAddAddons(cid, addon) npcHandler:say('There, you are now able to use all addons!', cid) else npcHandler:say('Sorry, you do not have enough money.', cid) end else npcHandler:say('I only serve customers with premium accounts.', cid) end keywordHandler:moveUp(1) return true end local node1 = keywordHandler:addKeyword({'first addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the first addons set for 5000 gold coins?'}) node1:addChildKeyword({'yes'}, buyAddons, {addon = 1, cost = 5000, premium = true}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Too expensive, eh?'}) local node2 = keywordHandler:addKeyword({'second addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to buy the second addons set for 10000 gold coins?'}) node2:addChildKeyword({'yes'}, buyAddons, {addon = 2, cost = 10000, premium = true}) node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, moveup = 1, text = 'Too expensive, eh?'}) keywordHandler:addKeyword({'addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I sell the first addons set for 5000 gold coins and the second addons set for 10000 gold coins.'}) npcHandler:addModule(FocusModule:new())
  9. jhon992

    [Help] Script Onuse

    meu script: function onUse(cid, item, fromPosition, itemEx, toPosition) local effect = 30 local pos = getPlayerPosition(cid) local exhaustionInSeconds = 70 local storage = 34539 if(exhaustion.check(cid, storage) == TRUE) then if (exhaustion.get(cid, 34539) >= 60) then doPlayerSendCancel(cid, "Voçê só pode invocar após [" .. math.floor(exhaustion.get(cid, 34539) / 60 + 1) .."] minutos.") end if (exhaustion.get(cid, 34539) <= 60) then doPlayerSendCancel(cid, "Voçê só pode invocar após [" .. exhaustion.get(cid, 34539).."] segundos.") end return TRUE end exhaustion.set(cid, storage, exhaustionInSeconds) doPlayerRemoveItem(cid, 5809, 1) doSendMagicEffect(pos, effect) pid = doSummonCreature("DEMON", getPlayerLookPos(cid)) return TRUE end //////////////////////////////////////////////////////////////// Oque acontece é que quando eu clico no item 5809, cria um demon na minha frente e somo o item 5809. Isso acontece sóh quando o item esta na backpack. Exemplo: se eu ponho o item 5809 no chão, eu posso clicar avontade e vai criando varios demons e o item não some. Queria uma solução para isso. Queria que o item sumise ao ser clicado. Vlw aew! RESOLVIDO era sóh usar: doRemoveItem(item.uid, 1) no lugar.
  10. esse é o meu action: function onUse(cid, item, fromPosition, itemEx, toPosition) local effect = 30 local pos = getPlayerPosition(cid) local exhaustionInSeconds = 70 local storage = 34539 if(exhaustion.check(cid, storage) == TRUE) then if (exhaustion.get(cid, 34539) >= 60) then doPlayerSendCancel(cid, "Voçê só pode invocar após [" .. math.floor(exhaustion.get(cid, 34539) / 60 + 1) .."] minutos.") end if (exhaustion.get(cid, 34539) <= 60) then doPlayerSendCancel(cid, "Voçê só pode invocar após [" .. exhaustion.get(cid, 34539).."] segundos.") end return TRUE end exhaustion.set(cid, storage, exhaustionInSeconds) doPlayerRemoveItem(cid, 5809, 1) doSendMagicEffect(pos, effect) pid = doSummonCreature("ARMADILHA", getPlayerLookPos(cid)) return TRUE end /////////////// Ele serve para remover um item quando clicado e invocar um npc. Esse é o script do npc: 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 local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, 'inferno') then selfSay('Você não está com medo de mim? Para entrar terá que me responder uma pergunta. Quer tentar quando? Diga: {agora} ou {nunca}.', cid) talkState[talkUser] = 2 elseif talkState[talkUser] == 2 then if msgcontains(msg, 'agora') then selfSay('Qual a cor do cavalo branco de napoleão?', cid) talkState[talkUser] = 3 elseif msgcontains(msg, 'nunca') then selfSay('Okay, então diga {bye}.', cid) talkState[talkUser] = 1 end elseif talkState[talkUser] == 3 then if msgcontains(msg, 'branca') then if getPlayerStorageValue(cid,313131) == -1 then setPlayerStorageValue(cid,31313,1) selfSay('Você acertou, continue a quest! Vá para o Sul!', cid) else selfSay('Você já pode entrar. Não precisava vir aqui denovo.', cid) end else doRemoveCreature(cid) selfSay('Você errou, mate esse monstro. Depois tente denovo! haha!', cid) end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) //////////////////////// Funciona da seguinte forma eu falo hi, inferno, agora, branco, dae ele executa "doRemoveCreature(cid)" , dae o player desloga. Mais eu queria que ao invez do player deslogar o npc sumise. Se nãe for possivel fazer isso, teria como ao executar o primeiro script de conjuração, apos alguns minutos o npc sumise? Espero que tenham entendido, agradeço desde ja a ajuda. Vlw Se ajudar +Rep concerteza!
  11. Vodkart, tenta da uma olhadinha no meu problema > http://www.xtibia.com/forum/topic/163886-preciso-script-npc-ao-falar-bye-sumir/ < sei que você deve ta muito ocupado, mais espero que ajude. Agradeço desde ja, vlw.
  12. DemonBH, eu sei que vc é muito ocupado + queria te pedir pra da uma olhadinha no meu problema > http://www.xtibia.com/forum/topic/163886-preciso-script-npc-ao-falar-bye-sumir/ <. Tenta ajuda aew, Agradeço desde ja.
  13. Preciso de um script que ao falar bye o ficar longe do npc, ele sumise. Tenta ajuda aew plx. Vlw.
  14. nem funfo velho. Mais vlw a ajuda. Resolvi fazer com spell msm. RESOLVIDO!
  15. tenho esse script: function onSay(cid, words, param) local outfit = {lookType=2} local outfitTime = 10 local pos = getPlayerPosition(cid) if getCreatureOutfit(cid).lookType == 32 then doSetCreatureOutfit(cid, outfit, outfitTime) doSendMagicEffect(pos, 30) doChangeSpeed(cid, -390) doPlayerSendTextMessage(cid,27,'Normal form!') else doPlayerSendCancel(cid,"Você não esta transformado!") end return 1 end ///////////////////////////////////////// Precisso que alem de remover a velocidade, que ele remove-se tambem skills por um determinado tempo. Ja pesquisei por tudo e não encontrei como fazer. Se ajudar rep++ concerteza!
  16. se a sua internet for compartilhada, seus amigos so poderão entrar via hamachi. se não for, voce precissa liberar as portas 7171, 7172 no seu modem e no seu firewall, pegar seu ip no meuip.com.br e colocar no config.lua que se encontra na pasta principal do seu otserv. para liberar a portas no seu firewall, vai em iniciar, painel de controle, firewall e adiciona essas duas portas e para adicionar as mesmas em seu modem voce deve procura algum tutorial de como adicinar portas no modelo de seu modem. apos isso creio que seus amigos poderão entrar. se não conseguir pesquise aqui no xtibia msm que tem muitos tutoriais de como resolver isso.
  17. function onSay(cid, words) local voc = getPlayerVocation(cid) --Obter Vocação do Player local pos = getCreaturePosition(cid) --Obter Posição do Player local lvl = getPlayerLevel(cid) --Obter LvL do Player local minutos = 465656565 -- Quanto tempo depois em minutos a transformação vai sumir? if voc == 0 then doSendMagicEffect(pos,32) doPlayerSendCancel(cid, "Você não pode se transformar") end if lvl >= 50 then -- LvL necessario para se transformar if voc == 369 then doSendMagicEffect(pos,32) doPlayerSetVocation(cid,voc +380) doSetCreatureOutfit(cid,{lookType=280,lookHead=20,lookAddons=0,lookLegs=40,lookBody=30,lookFeet=50},4 * 60 * 1000) doCreatureSay(cid, "Transform...UaaaaaaAaahHhhh!!!", TALKTYPE_ORANGE_1) addEvent(returnTransform, minutos*9999*60, cid) end if voc == 380 then doSendMagicEffect(pos,2) dolvlPlayerSetVocation(cid,voc +50) doSetCreatureOutfit(cid,{lookType=120,lookHead=20,lookAddons=0,lookLegs=40,lookBody=30,lookFeet=50},4 * 60 * 1000) doCreatureSay(cid, "Transform...UaaaaaaAaahHhhh!!!", TALKTYPE_ORANGE_1) addEvent(returnTransform, minutos*9999*60, cid) end if voc == 3 then doSendMagicEffect(pos,2) doPlayerSetVocation(cid,voc +4) doSetCreatureOutfit(cid,{lookType = 440, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons},4 * 60 * 1000) doCreatureSay(cid, "Transform...UaaaaaaAaahHhhh!!!", TALKTYPE_ORANGE_1) addEvent(returnTransform, minutos*9999*60, cid) end if voc == 4 then doSendMagicEffect(pos,2) doPlayerSetVocation(cid,voc +4) doSetCreatureOutfit(cid,{lookType = 440, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons},4 * 60 * 1000) doCreatureSay(cid, "Transform...UaaaaaaAaahHhhh!!!", TALKTYPE_ORANGE_1) addEvent(returnTransform, minutos*9999*60, cid) end else doPlayerSendCancel(cid, "Você não possui o lvl necessario!") end end
  18. jhon992

    Ajuda Com Talkaction?

    tenta assim : Obs. Nem testei aqui. Se não funcionar me avisa. function onSay(cid, words, param, var) local pos = getPlayerPosition(cid) if (getPlayerVocation(cid) == 1) and (getPlayerLevel(cid) >= 50) then doPlayerSetVocation(cid, 2) local outfit = {lookType = 30} doCreatureChangeOutfit(cid, outfit) doPlayerSendCancel(cid, "Voce se Transformou!") elseif getPlayerLevel(cid) < 50 then doPlayerSendCancel(cid, "Nao foi possivel!") elseif getPlayerVocation(cid) == 1 then doPlayerSendCancel(cid, "Nao foi possivel!") end if (getPlayerVocation(cid) == 2) and (getPlayerLevel(cid) >= 50) then doPlayerSetVocation(cid, 3) local outfit = {lookType = 37} doSendMagicEffect(pos,18) doCreatureChangeOutfit(cid, outfit) doPlayerSendCancel(cid, "Voce se Transformou!") elseif getPlayerLevel(cid) < 50 then doPlayerSendCancel(cid, "Nao foi possivel!") elseif getPlayerVocation(cid) ==1 then doPlayerSendCancel(cid, "Nao foi possivel!") end if (getPlayerVocation(cid) == 3) and (getPlayerLevel(cid) >= 100) then doPlayerSetVocation(cid, 4) local outfit = {lookType = 71} doSendMagicEffect(pos,18) doCreatureChangeOutfit(cid, outfit) doPlayerSendCancel(cid, "Voce se Transformou!") elseif getPlayerLevel(cid) < 100 then doPlayerSendCancel(cid, "Nao foi possivel") elseif getPlayerVocation(cid) ==3 then doPlayerSendCancel(cid, "Nao foi possivel!") end if (getPlayerVocation(cid) == 4) and (getPlayerLevel(cid) >= 150) then doPlayerSetVocation(cid, 5) local outfit = {lookType = 70} doSendMagicEffect(pos,18) doCreatureChangeOutfit(cid, outfit) doPlayerSendCancel(cid, "Voce se Transformou!") elseif getPlayerLevel(cid) < 150 then doPlayerSendCancel(cid, "Nao foi possivel!") elseif getPlayerVocation(cid) ==4 then doPlayerSendCancel(cid, "Nao foi possivel!") end if (getPlayerVocation(cid) == 6) and (getPlayerLevel(cid) >= 30) then doPlayerSetVocation(cid, 7) local outfit = {lookType = 205} doCreatureChangeOutfit(cid, outfit) doPlayerSendCancel(cid, "Voce se Transformou!") elseif getPlayerLevel(cid) < 30 then doPlayerSendCancel(cid, "Nao foi possivel!") end if (getPlayerVocation(cid) == 7) and (getPlayerLevel(cid) >= 40) then doPlayerSetVocation(cid, 8) local outfit = {lookType = 165} doCreatureChangeOutfit(cid, outfit) doPlayerSendCancel(cid, "Voce se Transformou!") elseif getPlayerLevel(cid) < 40 then doPlayerSendCancel(cid, "Nao foi possivel!") end if (getPlayerVocation(cid) == 8) and (getPlayerLevel(cid) >= 50) then doPlayerSetVocation(cid, 9) local outfit = {lookType = 166} doCreatureChangeOutfit(cid, outfit) doPlayerSendCancel(cid, "Voce se Transformou!") elseif getPlayerLevel(cid) < 50 then doPlayerSendCancel(cid, "Nao foi possivel!") end if (getPlayerVocation(cid) == 9) and (getPlayerLevel(cid) >= 75) then doPlayerSetVocation(cid, 10) local outfit = {lookType = 7} doCreatureChangeOutfit(cid, outfit) doPlayerSendCancel(cid, "Voce se Transformou!") elseif getPlayerLevel(cid) < 75 then doPlayerSendCancel(cid, "Nao foi possivel!") end if (getPlayerVocation(cid) == 10) and (getPlayerLevel(cid) >= 100) then doPlayerSetVocation(cid, 11) local outfit = {lookType = 164} doCreatureChangeOutfit(cid, outfit) doPlayerSendCancel(cid, "Voce se Transformou!") elseif getPlayerLevel(cid) < 100 then doPlayerSendCancel(cid, "Nao foi possivel!") end if (getPlayerVocation(cid) == 11) and (getPlayerLevel(cid) >= 150) then doPlayerSetVocation(cid, 12) local outfit = {lookType = 4} doCreatureChangeOutfit(cid, outfit) doPlayerSendCancel(cid, "Voce se Transformou!") elseif getPlayerLevel(cid) < 150 then doPlayerSendCancel(cid, "Nao foi posivel!") end if (getPlayerVocation(cid) == 12) and (getPlayerLevel(cid) >= 200) then doPlayerSetVocation(cid, 13) local outfit = {lookType = 54} doCreatureChangeOutfit(cid, outfit) doPlayerSendCancel(cid, "Voce se Transformou!") elseif getPlayerLevel(cid) < 200 then doPlayerSendCancel(cid, "Nao foi possivel!") end
  19. o problema éh que de uma hra pra outra não ta mais compativel com o win7, o win7 deve ter dado alguma atualização seila. Consigo abri usando modo de compatibilidade, + o char fica deslogando sozinho, muito estranho =/
  20. o server não é dedicado. Abro ele aqui em ksa msm sóh pra teste. As portas 7171, 7172 jah estão liberadas e nem possui site. Minha internet é compartilhada. Como seria isso de abrir a porta de novo com o novo IP local? E vlw aew pela ajuda vc's, qualquer ajuda é bem vinda!
  21. Até ontem eu entrava no meu servidor normalmente, mas hoje abri o servidor, cliente e ao tentar logar abre a character list normalmente mais não consigo entrar em nenhum character. Ja tentei mudar database de accounts, ja pesquisei em tudo quante forum mais não achei nada. Todas as minhas portas estão desbloqueadas, ja tentei utilizar o ip padrão, como eu disse loguei normalmente ontem e hoje jah não consigo logar. O unico geito que deu pra logar foi assim: abro o server, abro cliente, abro character list, dae eu feixo o servidor e abro denovo e depois aperto enter no cliente que eu não tinha feichado, sóh assim conseigo logar. Estou precisando muito de ajuda, todos que puderem me ajudar darei rep+++. Eu uso tfs 8.54.
  22. Talkaction: function onSay(cid, words, param) local config = { pz = "no", -- players precisam estar em protection zone para usar? ("yes" or "no"). battle = "no", -- players deve estar sem battle ("yes" or "no") custo = "no", -- se os teleport irão custa ("yes" or "no") premium = "no" -- se precisa ser premium account ("yes" or "no") } -------------Config Lugares---------------- local lugar = { ["sul"] = {{x=2461, y=2419, z=7}, 1, 2000}, ["west"] = {{x=2269, y=2264, z=7}, 10, 1000}, ["east"] = {{x=2997, y=2163, z=7}, 1, 2000}, ["nort"] = {{x=2577, y=2086, z=7}, 1, 2000} } -------------/Config Checkar não mecha---------------- local lugar = lugar[param] if (param == "check") then for name, pos in pairs(lugar) do text = "Destino: "..name..", Level necessario: "..pos[2].."," if(config.battle == "yes") then text = text.." Voce pode usar estando battler: SIM" else text = text.." Voce pode usar estando battler: Não" end if(config.pz == "yes") then text = text.." Voce DeVe Usar estando PZ: SIM" else text = text.." Voce DeVe Usar estando PZ: Não" end if (pos[3] == TRUE) then text = text..", Cost: "..pos[4]..";" end doPlayerSendTextMessage(cid, 20, ""..text.."") end return TRUE end if(config.pz == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"você precisa estar em protection zone pra poder teleportar.") return TRUE end if(config.premium == "yes") and (not isPremium(cid)) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "apenas players com premium account podem teleportar.") return TRUE end if(config.battle == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você precisa estar sem battler pra poder teleportar.") return TRUE end if not(lugar) then doPlayerSendTextMessage(cid, 22, "desculpe,este lugar não existe") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return TRUE end if (getPlayerLevel(cid) <= lugar[2]) then doPlayerSendTextMessage(cid, 22, "Desculpe,Voce não tem level. voce precisa "..lugar[2].." level ou mais para ser teleportado.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return TRUE end if(config.custo == "yes") and (doPlayerRemoveMoney(cid, lugar[3]) == FALSE) then doPlayerSendTextMessage(cid, 22, "Desculpe,voce nao tem dinheiro suficiente. Voce precisa "..lugar[3].." gp para ser teleportado.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return TRUE end doTeleportThing(cid, lugar[1]) doSendMagicEffect(lugar[1], 46) doPlayerSendTextMessage(cid, 22, "" .. getPlayerName(cid) .. " foi teleportado para: " .. param .. ".") return TRUE end /////// Por favor da um help aew.
  23. Otimo tutorial, parabens! Me ajudo muito, pesquisei por tudo e não encontrava ate agora. Com isso pudo alterar as infos do cliente que não estava conseguindo com um hex editor. Rep+
  • Quem Está Navegando   0 membros estão online

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