Ir para conteúdo

Roksas

Herói
  • Total de itens

    3611
  • Registro em

  • Última visita

  • Dias Ganhos

    60

Tudo que Roksas postou

  1. Roksas

    Duvida com Stages

    Substitua seu stages.xml por esse: <?xml version="1.0" encoding="UTF-8"?> <stages> <world id="0" multiplier="100"> <stage minlevel="1" maxlevel="100" multiplier="100"/> <stage minlevel="101" maxlevel="120" multiplier="80"/> <stage minlevel="121" maxlevel="140" multiplier="70"/> <stage minlevel="141" maxlevel="160" multiplier="60"/> <stage minlevel="161" maxlevel="220" multiplier="40"/> <stage minlevel="221" maxlevel="400" multiplier="30"/> <stage minlevel="401" multiplier="14"/> </world> </stages> @MUDANDO DE ASSUNTO Vi outro erro no seu config.lua, procure por: displayCriticalHitNotify = truel Troque por: displayCriticalHitNotify = true
  2. @Corrigindo, desculpe não é dele o Sistema. Mas irei passar mesmo assim: Crie um arquivo chamado antibot.lua na pasta data/talkactions/scripts e cole isso dentro: -- local variables local storages = {first_num = 20123, second_num = 20124, result = 20125, answer = 20126, prisioned = 20127, prisiontime = 20128, wrong_answers = 20129} -- end local variables function onSay(cid, words, param) local first_num = getPlayerStorageValue(cid,storages.first_num) local second_num = getPlayerStorageValue(cid,storages.second_num) local result = getPlayerStorageValue(cid,storages.result) local answer = getPlayerStorageValue(cid,storages.answer) local prisioned = getPlayerStorageValue(cid,storages.prisioned) param = tonumber(param) if (prisioned ~= 1 and answer ~= 1 and result > 0) then if (param == result) then if (getPlayerStorageValue(cid,storages.wrong_answers) <= 3) then doPlayerSendTextMessage(cid, 20, "Yunie Anti Bot System: Right answer, thank you for answering.") setPlayerStorageValue(cid,storages.wrong_answers,0) setPlayerStorageValue(cid,storages.answer,1) setPlayerStorageValue(cid,storages.first_num,0) setPlayerStorageValue(cid,storages.second_num,0) setPlayerStorageValue(cid,storages.result,0) else doPlayerSendTextMessage(cid, 20, "Yunie Anti Bot System: Right answer, but you had already answered more than 3 wrong times.") end else doPlayerSendTextMessage(cid, 20, "Yunie Anti Bot System: Wrong answer!") wrong_answers_now = getPlayerStorageValue(cid,storages.wrong_answers) setPlayerStorageValue(cid,storages.wrong_answers,wrong_answers_now+1) doPlayerSendTextMessage(cid, 20, "Yunie Anti Bot System: You had already got ".. getPlayerStorageValue(cid,storages.wrong_answers).." wrong answers! The limit is 3.") end end end Agora na pasta data/creaturescripts/scripts crie um arquivo com o mesmo nome, antibot.lua e adicione isso dentro: -- configs local mintoanswer = 2 -- A CADA QUANTOS MINUTOS IRÁ PERGUNTAR local delayAntiBot = 30 -- MINUTOS DE DELAY local maxgroupid = 1 -- ATÉ QUE GROUP ID O ANTI BOT FUNCIONARA, 1 = SO PRA PLAYERS local prisionpos = {x=83,y=122,z=7} -- SE NAO RESPONDER A PERGUNTA, PRENDERÁ (CONFIGURE) local prisionminutes = 10 -- MINUTOS DENTRO DA CADEIA local templepos = {x=95, y=117, z=7} -- COLOQUE POSIÇÃO DO TEMPLO -- end configs -- local variables local storages = {first_num = 20123, second_num = 20124, result = 20125, answer = 20126, prisioned = 20127, prisiontime = 20128, wrong_answers = 20129} -- end local variables function onLogin(cid) local prisioned = getPlayerStorageValue(cid,storages.prisioned) if (prisioned == 1) then local prisiontime = getPlayerStorageValue(cid,storages.prisiontime) local timenow = os.time() if (timenow >= prisiontime) then setPlayerStorageValue(cid,storages.prisiontime,0) setPlayerStorageValue(cid,storages.prisioned,0) doTeleportThing(cid, templepos) else prisionEvent = addEvent(checkprisioned,1000,{cid=cid}) doTeleportThing(cid, prisionpos) end end if (delayAntiBot <= mintoanswer) then debugPrint("Error! Anti Bot System debugs: variable delayAntiBot need to be higher than mintoanswer.") else if (getPlayerGroupId(cid) <= maxgroupid) then antiBotEvent = addEvent(antiBot,1000,{cid=cid}) else doPlayerSendTextMessage(cid, 20, "People with group ID higher than ".. maxgroupid .." don't have this system.") end end return TRUE end function onLogout(cid) stopEvent(prisionEvent) stopEvent(antiBotEvent) stopEvent(checkAnswerEvent) setPlayerStorageValue(cid,storages.first_num,0) setPlayerStorageValue(cid,storages.second_num,0) setPlayerStorageValue(cid,storages.result,0) setPlayerStorageValue(cid,storages.answer,0) setPlayerStorageValue(cid,storages.wrong_answers,0) return TRUE end function antiBot(parameters) local cid = parameters.cid local playerpos = getCreaturePosition(cid) local playerpz = getTilePzInfo(playerpos) local playername = getPlayerName(cid) local prisioned = getPlayerStorageValue(cid,storages.prisioned) if (playerpz ~= 1 and prisioned ~= 1) then local first_num = math.random(1,9) local second_num = math.random(1,9) local result = first_num+second_num setPlayerStorageValue(cid,storages.first_num,first_num) setPlayerStorageValue(cid,storages.second_num,second_num) setPlayerStorageValue(cid,storages.result,result) doPlayerSendTextMessage(cid, 20, "Yunie Anti Bot System: Hello, "..playername.."! You have ".. mintoanswer .." minute(s) to answer how much is ".. first_num .." + ".. second_num ..". To answer say: !antibot \"number.") doPlayerSendTextMessage(cid, 20, "Yunie Anti Bot System: Example: 20+20 = 40, then you would say !antibot \"40.") checkAnswerEvent = addEvent(checkAnswer,mintoanswer*60*1000,{cid=cid}) end antiBotEvent = addEvent(antiBot,delayAntiBot*60*1000,{cid=cid}) end function checkAnswer(parameters) local cid = parameters.cid local first_num = getPlayerStorageValue(cid,storages.first_num) local second_num = getPlayerStorageValue(cid,storages.second_num) local result = getPlayerStorageValue(cid,storages.result) local answer = getPlayerStorageValue(cid,storages.answer) local prisioned = getPlayerStorageValue(cid,storages.prisioned) local wrong_answers = getPlayerStorageValue(cid,storages.wrong_answers) if (wrong_answers > 3) then doTeleportThing(cid, prisionpos) setPlayerStorageValue(cid,storages.wrong_answers,0) setPlayerStorageValue(cid,storages.first_num,0) setPlayerStorageValue(cid,storages.second_num,0) setPlayerStorageValue(cid,storages.result,0) setPlayerStorageValue(cid,storages.answer,0) setPlayerStorageValue(cid,storages.prisioned,1) setPlayerStorageValue(cid,storages.prisiontime,os.time()+(prisionminutes*60)) doPlayerSendTextMessage(cid, 20, "Time limit! You had been prisioned for ".. prisionminutes .." minute(s) because answered many wrong times.") prisionEvent = addEvent(checkprisioned,1000,{cid=cid}) else if (answer ~= 1 and prisioned ~= 1 and result > 0) then doTeleportThing(cid, prisionpos) setPlayerStorageValue(cid,storages.first_num,0) setPlayerStorageValue(cid,storages.second_num,0) setPlayerStorageValue(cid,storages.result,0) setPlayerStorageValue(cid,storages.answer,0) setPlayerStorageValue(cid,storages.prisioned,1) setPlayerStorageValue(cid,storages.wrong_answers,0) setPlayerStorageValue(cid,storages.prisiontime,os.time()+(prisionminutes*60)) doPlayerSendTextMessage(cid, 20, "Time limit! You had been prisioned for ".. prisionminutes .." minute(s).") prisionEvent = addEvent(checkprisioned,1000,{cid=cid}) else setPlayerStorageValue(cid,storages.first_num,0) setPlayerStorageValue(cid,storages.second_num,0) setPlayerStorageValue(cid,storages.result,0) setPlayerStorageValue(cid,storages.answer,0) setPlayerStorageValue(cid,storages.prisioned,0) setPlayerStorageValue(cid,storages.wrong_answers,0) doPlayerSendTextMessage(cid, 20, "Yunie Anti Bot System: You are ok, but in some minutes you are going to be asked again.") end end end function checkprisioned(parameters) local cid = parameters.cid local prisioned = getPlayerStorageValue(cid,storages.prisioned) local prisiontime = getPlayerStorageValue(cid,storages.prisiontime) local timenow = os.time() if (prisioned == 1) then if (timenow >= prisiontime) then doPlayerSendTextMessage(cid, 20, "You had completed your time here in the prision! You may now relog to go to the city.") else prisionEvent = addEvent(checkprisioned,1000,{cid=cid}) end end end Agora as tags, creaturescripts.xml: <event type="login" name="AntiBotLogin" script="antibot.lua"/> <event type="logout" name="AntiBotLogout" script="antibot.lua"/> Agora em talkactions.xml: <talkaction words="!antibot" script="antibot.lua"/> @CREDITOS = YUNIE
  3. Oque seria esse script? é uma magia? Explique melhor sua situação por favor. Oque você gostaria que acontecesse?
  4. Creio que haja uma função, ou algo parecido. Mas não as conheço, aguarde alguém de nível mais avançado em Scripting ler o tópico e veremos o resultado!
  5. Abra sua pasta data/talkactions, lá dentro crie um arquivo chamado banplayer.lua e cole isto dentro: local default_comment = "" local default_lenght = 1 -- ban time in hours function onSay(cid, words, param) local parametres = string.explode(param, ",") if(parametres[1] ~= nil) then local accId = getAccountIdByName(parametres[1]) if(accId > 0) then local lenght = default_lenght local comment = default_comment if(parametres[2] ~= nil and tonumber(parametres[2]) > 0) then lenght = tonumber(parametres[2]) end if(parametres[3] ~= nil) then comment = parametres[3] end doAddBanishment(accId, lenght * 3600, 23, ACTION_BANISHMENT, comment, getPlayerGUID(cid), comment) local player = getPlayerByNameWildcard(parametres[1]) if(isPlayer(player) == TRUE) then doRemoveCreature(player) end else doPlayerSendCancel(cid, "Player with name " .. parametres[1] .. " doesn't exist.") end else doPlayerSendCancel(cid, "You must enter name.") end return true end Abra o arquivo talkactions.xml e insira essa tag: <talkaction log="yes" words="/ban" access="3" event="script" value="banplayer.lua"/> Agora para banir faça o seguinte, exemplo: /ban Nome,Tempo,Razão /ban Roksas, 1 , Desrespeitou as regras Caso não funcione, mostre o erro. Diga oque aconteceu e tentarei lhe ajudar! BENÇA ) @EDIT Baseando-me no que o Slicer disse, se não der certo meu Script, irei anexar o groups.xml e você tenta substituir! Me fale o resultado. groups.xml
  6. Tudo bem, Obrigado! Reportado, dúvida sanada ) BENÇA, QUALQUER DÚVIDA ENTRAR EM CONTATO
  7. Quando você muda algo no SQL, ou Executa uma função no Mysql, ela não acontece de imediato com o Player Online, é certo ele ter de relogar!
  8. Já tentou utilizar o do Vodkart para seu poketibia?
  9. Qual era o problema? Poste para que alguém que tiver o mesmo problema também possa resolver! Obrigado, desculpe eu por não encontrar o problema! BENÇA )
  10. Creio que seja essa a tag, está no meio do script: <talkaction words=".h" case-sensitive="no" hide="yes" event="script" value="hold pos.lua"/> Mude para: <talkaction words="!teleport" case-sensitive="no" hide="yes" event="script" value="hold pos.lua"/>
  11. Cara, da look na bolt e manda aqui o look para eu ver!
  12. Não entendi, informe-nos melhor. Não tem o comando? Não funciona, ou oque? Dê + detalhes.
  13. Tente assim e me diga oque acontece: function onKill(cid, target) local continue = true if ehMonstro(target) then for i = 91001, 91000 do local sto = getPlayerStorageValue(cid, i) if type(sto) == "string" then local array = getArrayFromStorage(cid, i) if arrayHasContent(array) then for e, f in pairs(array) do for a = 1, #f do local name = tostring(f[a][1]) if name == getCreatureName(target) and tonumber(f[a][2]) >= 1 then if getDamageMapPercent(cid, target) < 0.5 then continue = false elseif (pokes[getPlayerStorageValue(cid, 854787)] and getCreatureName(getCreatureSummons(cid)[1]) ~= getPlayerStorageValue(cid, 854787)) then if npcsTask[tostring(e).."_1"] then continue = false --task clan end end if continue then f[a][2] = f[a][2]-1 if f[a][2] == 0 then sendMsgToPlayer(cid, 20, tostring(e)..": Quest Done!") else sendMsgToPlayer(cid, 20, tostring(e)..": You need to kill more "..f[a][2].." "..name..(f[a][2] == 1 and "." or "s.")) end setStorageArray(cid, i, array) end continue = true end end end end end end end return true end
  14. Para ligar o site você deve ativar o Xampp, ou o Apache. Qual você usa?
  15. Passe para mim o arquivo task.lua Ou é esse que você postou? Oo
  16. Bom, basta ir no arquivo data/talkactions/talkactions.xml, abra com o bloco de notas e procure pela talkaction "h" , do jeito que escrevi com aspas e tudo apertando CTRL+F, após isso. basta apagar o comando que estiver selecionado de azul e escrever o comando que você quiser!
  17. Como assim mostrar? Mostrar quando der look? @EDIT Acho que entendi, adicione isso junto as tags: <attribute key="showattributes" value="1" />
  18. Muito bom, gostei da Spell! Continue assim ^^
  19. Mesmo esquema, procura dentro do Script a palavra IDDOITEM e lá você coloca quantidade, o ID e tals. BENÇA ) local focus = 0 local max_distance = 8 local talk_start = 0 local conv = 0 local fighting = false local challenger = 0 local afk_limit_time = 30 -- seconds local afk_time = 0 -- don't change local battle_turn = 1 -- don't change local challenger_turn = 0 -- don't change local pokemons = { {name = "Pikachu", optionalLevel = 65, sex = SEX_MALE, nick = "", ball = "normal"}, {name = "Pikachu", optionalLevel = 65, sex = SEX_FEMALE, nick = "", ball = "normal"}, {name = "Pikachu", optionalLevel = 80, sex = SEX_MALE, nick = "", ball = "normal"}, {name = "Pikachu", optionalLevel = 75, sex = SEX_FEMALE, nick = "", ball = "normal"}, {name = "Pikachu", optionalLevel = 120, sex = SEX_MALE, nick = "", ball = "normal"}, {name = "Raichu", optionalLevel = 115, sex = SEX_MALE, nick = "", ball = "normal"}, } local function doSummonGymPokemon(npc) local this = npc if #getCreatureSummons(this) >= 1 or focus == 0 then return true end local it = pokemons[battle_turn] doSummonMonster(this, it.name) local summon = getCreatureSummons(this)[1] local balleffect = pokeballs["normal"].effect if it.ball and pokeballs[it.ball] then balleffect = pokeballs[it.ball].effect end doSendMagicEffect(getThingPos(summon), balleffect) setPlayerStorageValue(summon, 10000, balleffect) setPlayerStorageValue(summon, 10001, gobackmsgs[math.random(#gobackmsgs)].back:gsub("doka", it.nick ~= "" and it.nick or it.name)) setPlayerStorageValue(summon, 1007, it.nick ~= "" and it.nick or it.name) doSetMonsterGym(summon, focus) addEvent(adjustWildPoke, 15, summon, it.optionalLevel) local name = it.nick ~= "" and it.nick or getCreatureName(this).."s "..it.name doCreatureSay(this, gobackmsgs[math.random(#gobackmsgs)].go:gsub("doka", getPlayerStorageValue(summon, 1007)), 1) fighting = true battle_turn = battle_turn + 1 end local function doWinDuel(cid, npc) if not isCreature(cid) then return true end local this = npc local a = gymbadges[getCreatureName(this)] + 13 doCreatureSay(npc, "You won the duel! Congratulations, take this "..getItemNameById(a - 13).." as a prize.", 1) doPlayerAddItem(cid, IDDOITEM, 1) -- AQUI VOCE COLOCA O ID DO ITEM, QUANTIDADE local b = getPlayerItemById(cid, true, a) if b.uid > 0 then doTransformItem(b.uid, b.itemid - 13) end end function onCreatureSay(cid, type, msg) local msg = string.lower(msg) if focus == cid then talk_start = os.clock() end if msgcontains(msg, 'hi') and focus == 0 and getDistanceToCreature(cid) <= 4 then focus = cid talk_start = os.clock() conv = 1 selfSay("Olá "..getCreatureName(cid)..", sou Elesa líder do ginásio de Nimbasa, posso ajudar?") return true end if isDuelMsg(msg) and conv == 1 and focus == cid then --if getPlayerItemCount(cid, gymbadges[getCreatureName(getThis())]) >= 1 then -- selfSay("Leve uma Bolt Badge como prova de que você me derrotou.") -- focus = 0 --return true --end if not hasPokemon(cid) then selfSay("Para lutar você precisa de pokemon.") return true end selfSay("Você usará apenas "..#pokemons.." pokemon limit battle, Vamos começar?") conv = 2 return true end if isConfirmMsg(msg) and conv == 2 and focus == cid then challenger = focus setPlayerStorageValue(cid, 990, 1) selfSay("Yea, let's fight!") talk_start = os.clock() addEvent(doSummonGymPokemon, 850, getThis()) conv = 3 return true end if isNegMsg(msg) and conv == 2 and focus == cid then focus = 0 selfSay("It is better for you to refuse a battle against me!") return true end if msgcontains(msg, 'bye') and focus == cid then selfSay('Bye and do your best trainer!') setPlayerStorageValue(focus, 990, -1) focus = 0 return true end end local afk_warning = false function onThink() --doSendAnimatedText(getThingPos(getThis()), getCreatureName(getThis()), 215) if focus == 0 then selfTurn(2) fighting = false challenger = 0 challenger_turn = 0 battle_turn = 1 afk_time = 0 afk_warning = false if #getCreatureSummons(getThis()) >= 1 then setPlayerStorageValue(getCreatureSummons(getThis())[1], 1006, 0) doCreatureAddHealth(getCreatureSummons(getThis())[1], -getCreatureMaxHealth(getCreatureSummons(getThis())[1])) end return true else if not isCreature(focus) then focus = 0 return true end if fighting then talk_start = os.clock() if not isCreature(getCreatureTarget(getThis())) then if #getCreatureSummons(challenger) >= 1 then if getCreatureOutfit(getCreatureSummons(challenger)[1]).lookType ~= 2 then --alterado v1.6 selfAttackCreature(getCreatureSummons(challenger)[1]) challenger_turn = challenger_turn + 1 afk_time = 0 end else afk_time = afk_time + 0.5 end end if afk_time > afk_limit_time then setPlayerStorageValue(focus, 990, -1) focus = 0 selfSay("I have waited too long, come back when you are ready!") return true end if not afk_warning and afk_time > afk_limit_time / 2 then selfSay("Where's your pokemon? Let's fight!") afk_warning = true end if #getCreatureSummons(getThis()) == 0 then if battle_turn > #pokemons then addEvent(doWinDuel, 1000, focus, getThis()) setPlayerStorageValue(focus, 990, -1) focus = 0 return true end addEvent(doSummonGymPokemon, 1000, getThis()) end if not hasPokemon(challenger) or challenger_turn >= 7 or challenger_turn > #pokemons then selfSay("You lost our duel! Maybe some other time you'll defeat me.") setPlayerStorageValue(focus, 990, -1) focus = 0 return true end end local npcpos = getThingPos(getThis()) local focpos = getThingPos(focus) if npcpos.z ~= focpos.z then setPlayerStorageValue(focus, 990, -1) focus = 0 selfSay("Bye then.") return true end if (os.clock() - talk_start) > 30 then selfSay("Good bye and keep training!") setPlayerStorageValue(focus, 990, -1) focus = 0 end if getDistanceToCreature(focus) > max_distance then setPlayerStorageValue(focus, 990, -1) focus = 0 return true end local dir = doRedirectDirection(getDirectionTo(npcpos, focpos)) selfTurn(dir) end return true end
  20. Isso aconteceu quando você substituiu o meu pelo seu, ou já estava assim?
  21. Roksas

    Duvida com Stages

    Sim, então resolvi suas dúvidas? Vou reportar para que fechem o tópico!
  22. Multiplicar por quanto cara?
  23. Tente substituir as tags no movements.xml por essas : <movevent type="Equip" itemid="2127" slot="ring" event="function" value="chaosbangle.lua"/> <movevent type="DeEquip" itemid="2127" slot="ring" event="function" value="chaosbangle.lua"/> Se não funcionar, tente essas: <movevent type="Equip" itemid="2127" slot="ring" event="function" value="onEquipItem"/> <movevent type="DeEquip" itemid="2127" slot="ring" event="function" value="onDeEquipItem"/>
  24. Qual a versão do server?
  • Quem Está Navegando   0 membros estão online

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