Ir para conteúdo

Hokograma

Membro
  • Registro em

  • Última visita

Tudo que Hokograma postou

  1. Inicie por LUA, é uma lingua mais simples de se aprender, procure por playlists se você não tem noção alguma de programação inicie procurando entender a lógica, dentro da maioria das linguagens, (exceto html), as linguagens de programação tem palavras chaves que servem para todas, por exemplo: if(se), elseif(e se) ou else if(e se), or(ou), and(e), then(então), print(imprimir) tambem compartilham tipos de variaveis, por exemplo: int(inteiro), char(texto simples), varchar(texto grande), entre varias outras exemplo em php $variavel = 'essa é uma variavel'; $variavel2 = true; $variavel3 = 3; if($variavel1 == variavel3){ echo $2; } else{ echo 'não é igual'; } exemplo de PL: introdução LUA
  2. testa ai <?php if(!defined('INITIALIZED')){ exit; } class ConfigLUA extends Errors{ private $config; public function __construct($path = false) { if($path) $this->loadFromFile($path); } public function loadFromFile($path) { if(Website::fileExists($path)) { $content = Website::getFileContents($path); $this->loadFromString($content); } else { new Error_Critic('#C-2', 'ERROR: <b>#C-2</b> : Class::ConfigLUA - LUA config file doesn\'t exist. Path: <b>' . $path . '</b>'); } } public function fileExists($path) { return Website::fileExists($path); } public function loadFromString($string) { $lines = explode("\n", $string); if(count($lines) > 0) foreach($lines as $ln => $line) { $tmp_exp = explode('=', $line, 2); if(count($tmp_exp) >= 2) { $key = trim($tmp_exp[0]); if(substr($key, 0, 2) != '--') { $value = trim($tmp_exp[1]); if(is_numeric($value)) $this->config[ $key ] = (float) $value; elseif(in_array(substr($value, 0 , 1), array("'", '"')) && in_array(substr($value, -1 , 1), array("'", '"'))) $this->config[ $key ] = (string) substr(substr($value, 1), 0, -1); elseif(in_array($value, array('true', 'false'))) $this->config[ $key ] = ($value == 'true') ? true : false; else { foreach($this->config as $tmp_key => $tmp_value) // load values definied by other keys, like: dailyFragsToBlackSkull = dailyFragsToRedSkull $value = str_replace($tmp_key, $tmp_value, $value); $ret = @eval("return $value;"); if((string) $ret == '') // = parser error { new Error_Critic('', 'ERROR: <b>#C-1</b> : Class::ConfigLUA - Line <b>' . ($ln + 1) . '</b> of LUA config file is not valid [key: <b>' . $key . '</b>]'); } $this->config[ $key ] = $ret; } } } } } public function getValue($key) { if(isset($this->config[ $key ])) return $this->config[ $key ]; else new Error_Critic('#C-3', 'ERROR: <b>#C-3</b> : Class::ConfigLUA - Key <b>' . $key . '</b> doesn\'t exist.'); } public function isSetKey($key) { return isset($this->config[ $key ]); } public function getConfig() { return $this->config; } }
  3. 80% de chance na sql o valor 'Key' estar setado como auto-incremento (levando isso em consideração não precisa setar uma string ou numero) que esta saindo do seu php
  4. Hokograma respondeu ao post em um tópico de Jonathan005 em Suporte Tibia OTServer
    @Jonathan005 Ja olhou na script do bless, provalvemente ele da uma bless baseada em quantidade não em porcentagem, outra ipotese seria ele dar a bless de exatamente 5%
  5. Eu tava moscando em trazer emojis pro serve.., o script até ta ok, mas o unico modo que encontrei ali foi pra cobrir as letras com a imagem, no caso fazendo "<3", ficou bugado.. Alguém sabe alguma maneira de quando setar os caracteres do emoji, as letras nao aparecerem juntas? script mod:
  6. Não entendi direito bem, "Quando alguém vai se potar, não pota o aliado, pota a si mesmo" se o cara ta se potando é obvio que ele pota a si mesmo ._. .. Oq tu quer dizer é que quando vai usar a pot, ele usa automaticamente em si em vez de abrir opçoes pra potar quem ele quiser?
  7. cara, e uma pessoa que joga a 20 anos poder ser ultrapassada por um cara que começou ontem tbm nao é meio desanimador
  8. Hokograma respondeu ao post em um tópico de Jonathan005 em Suporte Tibia OTServer
    Testa assim: xml:
  9. @unknownbeats Pode ligar seu servidor normalmente, vai no 2 cliente (oq tu quer testar) e vai em Pokemon Client\modules\client_entergame\entergame.lua agora em e entra no novo client normal pra ver a situação que esta, questão da bag bugada que tu não consegue abrir, vai em Procura pelo ID da sua bag, e joga essas tags abaixo dela E no seu item editor, procure pela bag e marque a caixinha "Container" abraço
  10. @unknownbeats Por nada bem, o troféu consta que a pergunta foi respondida, é bem importante, coisa que os membros deviam fazer +, abro muitos topicos ja repondidos que a galera nao marcou isso .. em resposta a rep tu pode dar a um membro clicando no icone do canto inferior direito
  11. Script: Xml: creaturescripts\scripts\login.lua: xml: creaturescripts\scripts\invencible.lua
  12. Esse erro acontece quando tem alguma incompatibilidade na biblioteca do Visual Studio, devido a uma diferença entre os módulos de 32 e 64 bits. Pra resolver acessa "\Windows\System" e "\Windows\System32" deleta as dll msvcr100.dll e MSVCP100.dll Depois deleta elas tambem da pasta do seu jogo. Baixe o Microsoft Visual C++ 2010 Redistributable Package (x86) ou (x64) se for o seu caso.. e instale, não esqueça de pegar as dll novas no System32 e copiar pra sua pasta do jogo depois tambem, abraço
  13. @unknownbeats Se os dois forem da mesma versao da até da jovem, porem as sprites podem ficar bugadas, mesmo que tu copie o .spr de um pra outro, e pode acarretar alguns problemas de comunicação com o servidor, por exemplo algumas dlls sao injetadas diretamente no client, alem de alguns codigos que podem ter modificado quando tavam compilando o client e tals, eu nao sugiro ficar trocando de client, mas se tu achar mesmo necessario, pega e liga o servidor, e tenta entrar com esse seu 2 client pra ver como fica
  14. @unknownbeats Talvez seja seu caso marcar as caixinhas de Transparency e Extended nas opçoes do rme, abraço
  15. function onCastSpell(cid, var) local storage = 17127 if(exhaustion.make(cid, storage, time) == true) then if getPlayerSlotItem(cid, 10).itemid > 0 then doPlayerSendTextMessage(cid, 22, "Nop") else doPlayerAddItem(cid,13216, 1, SLOT_AMMO) time = 10 -- Tempo em segundos addEvent(doRemoveItem, time*1000, item.uid, 1) end return true else doPlayerSendCancel(cid, "Cooldown: "..exhaustion.get(cid, storage)+1) return false end end
  16. @Drakon21 só tacar a url e deixar rodando mesmo, é bem simples de se utilizar
  17. Hokograma respondeu ao post em um tópico de Magalhaes92 em Suporte Tibia OTServer
    Assim então function onSay(cid, words, param, channel) local config = { storage = 102598, } local tmp = param:explode(" ") if not(tmp[1]) then return doPlayerSendCancel(cid, "Parameters needed") end if tmp[1] == "on" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cast has started.") doPlayerSetCastState(cid, true) doPlayerSave(cid) elseif getPlayerCast(cid).status == false then return doPlayerSendCancel(cid, "Your cast has to be running for this action.") elseif tmp[1] == "off" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cast has ended.") doPlayerSetCastState(cid, false) doPlayerSave(cid) elseif isInArray({"pass", "password", "p"}, tmp[1]) then if not(tmp[2]) then return doPlayerSendCancel(cid, "You need to set a password") end if tmp[2]:len() > 10 then return doPlayerSendCancel(cid, "The password is too long. (Max.: 10 letters)") end if tmp[2] == "off" then doPlayerSetCastPassword(cid, "") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cast password has been removed.") else doPlayerSetCastPassword(cid, tmp[2]) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cast password was set to: " .. tmp[2]) end elseif isInArray({"desc", "description", "d"}, tmp[1]) then local d = param:gsub(tmp[1]..(tmp[2] and " " or ""), "") if not(d) or d:len() == 0 then return doPlayerSendCancel(cid, "You need to specify a description.") end if d:len() > 50 then return doPlayerSendCancel(cid, "The description is too long. (Max.: 50 letters)") end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Cast description was set to: ") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, d) doPlayerSetCastDescription(cid, d) elseif tmp[1] == "ban" then if not(tmp[2]) then return doPlayerSendCancel(cid, "Specify a spectator that you want to ban.") end if doPlayerAddCastBan(cid, tmp[2]) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' has been banned.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' could not be banned.") end elseif tmp[1] == "unban" then if not(tmp[2]) then return doPlayerSendCancel(cid, "Specify the person you want to unban.") end if doPlayerRemoveCastBan(cid, tmp[2]) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' has been unbanned.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' could not be unbanned.") end elseif param == "bans" then local t = getCastBans(cid) local text = "Cast Bans:\n\n" for k, v in pairs(t) do text = text .. "*" .. v.name .. "\n" end if text == "Cast Bans:\n\n" then text = text .. "No bans." end doShowTextDialog(cid, 5958, text) elseif tmp[1] == "mute" then if not(tmp[2]) then return doPlayerSendCancel(cid, "Specify a spectator that you want to mute.") end if doPlayerAddCastMute(cid, tmp[2]) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' has been muted.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' could not be muted.") end elseif tmp[1] == "unmute" then if not(tmp[2]) then return doPlayerSendCancel(cid, "Specify the person you want to unmute.") end if doPlayerRemoveCastMute(cid, tmp[2]) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' has been unmuted.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Spectator '" .. tmp[2] .. "' could not be unmuted.") end elseif param == "mutes" then local t = getCastMutes(cid) local text = "Cast Mutes:\n\n" for k, v in pairs(t) do text = text .. "*" .. v.name .. "\n" end if text == "Cast Bans:\n\n" then text = text .. "No mutes." end doShowTextDialog(cid, 5958, text) elseif param == "viewers" then local t = getCastViewers(cid) local text, count = "Cast Viewers:\n#Viewers: |COUNT|\n\n", 0 for _,v in pairs(t) do count = count + 1 text = text .. "*" .. v.name .."\n" end if text == "Cast Viewers:\n#Viewers: |COUNT|\n\n" then text = "Cast Viewers:\n\nNo viewers." end text = text:gsub("|COUNT|", count) doShowTextDialog(cid, 5958, text) elseif param == "status" then local t, c = getCastViewers(cid), getPlayerCast(cid) local count = 0 for _,v in pairs(t) do count = count + 1 end doShowTextDialog(cid, 5958, "Cast Status:\n\n*Viewers:\n " .. count .. "\n*Description:\n "..(c.description == "" and "Not set" or c.description).."\n*Password:\n " .. (c.password == "" and "Not set" or "Set - '"..c.password.."'")) elseif param == "update" then if getPlayerStorageValue(cid, 656544) > os.time() then return doPlayerSendCancel(cid, "You used this command lately. Wait: " .. (getPlayerStorageValue(cid, 656544)-os.time()) .. " sec.") end doPlayerSave(cid) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "The cast settings have been updated.") doPlayerSetStorageValue(cid, 656544, os.time()+60) end return true end
  18. @Drakon21 Ko aqui é que to usando explorador de arquivos pra ver o texto, nem um bloco de notas tenho instalado kk, ai ta foda achar as linhas pq nem mostra em qual eu estou, tem que contar uma por uma, mas faz o seguinte, vai aonde tu viu esse esquema de shop system e usa o programa HTTrack, e só copia ele pra vc e edita como quiser, abraço
  19. function onCastSpell(cid, var) local storage = 17127 local time = 3 if(exhaustion.make(cid, storage, time) == true) then if getPlayerSlotItem(cid, 10).itemid > 0 then doPlayerSendTextMessage(cid, 22, "Nop") else local key = doCreateItem(13216, 1, SLOT_AMMO) local doPlayerAddItem(cid, Key, true) local doDecayitem(Key) end else doPlayerSendCancel(cid, "Cooldown: "..exhaustion.get(cid, storage)+1) return false end end Eu to com 4g ai nao da pra mim testar os bgl, e é pra substituir
  20. Tu diz essa caixinha de "Like" ali, isso é um plugin, o próprio facebook disponibiliza a personalizaçao pra cada tipo de caso de uma olhada https://developers.facebook.com/docs/plugins
  21. @Drakon21 tira a linha 3 "<?php", deixei sem querer, to fazendo pelo celular ._.
  22. <Movements> loginaura.lua unction onLogin(cid) aurastr = 25950 -- storage da aura setPlayerStorageValue(cid, aurastr, -1) return TRUE end Tag: <event type="login" name="AuraLogin" script="loginaura.lua"/> <Actions> aura.lua -- CONFIGURAÇÕES aurastr = 25950 -- storage da aura estr = 25951 -- storage para o exhaust porcentagem = 100 -- chance de curar em cada volta da aura, em porcentagem quantheal = 90 -- porcentagem do hp máximo que cada cura irá curar. (No caso, irá curar 10% do hp máximo cada cura) tempo = 5000 -- tempo para dar uma volta no player (este tempo foi o que achei mais agradável visualmente, é recomendável não mudar) tipoaura = 59 -- número do efeito da aura (efeito de distância, pode ser identificado com /x no jogo) efeitocura = 53 -- número do efeito quando a cura chega ao player (efeito de posição fixa, pode ser identificado com /z no jogo) -- Função que chama a aura function efeitosAura(i,tm,cid) if(isCreature(cid)) then local atual = getCreaturePosition(cid) local posaura = { {x=(atual.x)-1, y=(atual.y)-1, z=atual.z}, {x=atual.x, y=(atual.y)-1, z=atual.z}, {x=(atual.x)+1, y=(atual.y)-1, z=atual.z}, {x=(atual.x)+1, y=atual.y, z=atual.z}, {x=(atual.x)+1, y=(atual.y)+1, z=atual.z}, {x=atual.x, y=(atual.y)+1, z=atual.z}, {x=(atual.x)-1, y=(atual.y)+1, z=atual.z}, {x=(atual.x)-1, y=atual.y, z=atual.z}, } local chances = math.random(100) if(chances<=porcentagem/8 and getCreatureHealth(cid)<getCreatureMaxHealth(cid)) then doCreatureAddHealth(cid, getCreatureMaxHealth(cid)/quantheal) if(i<=8 and i>1) then doSendMagicEffect(atual, tipoaura) else doSendMagicEffect(atual, tipoaura) end doSendMagicEffect(atual, efeitocura) end if(i==8) then doSendMagicEffect(atual, tipoaura) elseif(i<8) then doSendMagicEffect(atual, tipoaura) end if(i<=8 and getPlayerStorageValue(cid, aurastr)==2) then i = i+1 tm = tempo/8 return addEvent(efeitosAura,tm,i,tm,cid) elseif(i>8 and getPlayerStorageValue(cid, aurastr)==2) then return efeitosAura(1,0,cid) else return TRUE end else return TRUE end end function onUse(cid, item, fromPosition, itemEx, toPosition) if(getPlayerStorageValue(cid, aurastr)==2) then setPlayerStorageValue(cid, estr, os.time()+2) setPlayerStorageValue(cid, aurastr, -1) doPlayerSendCancel(cid,"Você desligou a Aura!") else doPlayerSendCancel(cid,"Você ligou a Aura!") setPlayerStorageValue(cid, aurastr, 2) efeitosAura(1,tempo/8,cid) end return TRUE end Tag: <action itemid="11253" event="script" value="aura.lua"/>

Informação Importante

Confirmação de Termo