Jump to content

Senos

Global Moderators
  • Content Count

    183
  • Joined

  • Last visited

  • Days Won

    8

Reputation Activity

  1. Upvote
    Senos got a reaction from Niunzin in Script Intermediário (Aula 3)   
    Script Intermediário! - 3
    Lista de Aulas:
    Aula 1: http://herc.ws/board/topic/199-script-intermedi%C3%A1rio-aula-1/
    Aula 2: http://herc.ws/board/topic/200-script-intermedi%C3%A1rio-aula-2/ Aula 3: http://herc.ws/board/topic/201-script-intermedi%C3%A1rio-aula-3/ Aula 4: http://herc.ws/board/topic/203-script-intermedi%C3%A1rio-aula-4/ Aula 5: http://herc.ws/board/topic/213-script-intermedi%C3%A1rio-aula-5/ Aula 6: http://herc.ws/board/topic/228-queries-sql-aula-6/ Aula 7: http://herc.ws/board/topic/239-script-intermedi%C3%A1rio-aula-7/  
    Como prometido, estarei começando com a terceira aula de script (Menu dinâmico e suas teorias).
     
    Primeiro assunto da aula:
    - Menus dinâmicos e suas teorias
     
    Menus dinâmicos são essenciais hoje em dia justamente pelo fato da necessidade de otimizações e dinâmismo que podemos dar aos scripts. 
    No meu método de seleção e aprendizado, utilizaremos uma string que será como se você estivesse digitando no select suas opções na hora, facilitando muito. Claro, existem diversas formas de fazer um menu dinâmico, porém essa é a mais simples e prática utilizada hoje em dia.   Então partiremos para criar um menu. Para começar, precisamos ter uma variável do tipo STRING, na qual guardaremos as intruções do select. //Faremos ela sem valor nenhum inicialmente, para deopis fazer um loop e adicionar as funções.//Observem que usei uma variável temporária do npc para essa função (mais simples e rápido)set .@cmd$,"";   Agora precisamos e setaremos uma lista de opções que serão usadas no seu menu (pode ser feito antes do .@cmd$, caso você queira): setarray .@opt$[0],"Comprar","Vender","Trocar";  
    Nunca coloque opção de cancelar nessa array, ela será posta mais tarde. Então iniciamos nosso loop que fará a linha de comando, vejamos: for(set @i,0; @i <= getarraysize(.@opt$); set @i,@i+1) set .@cmd$, .@cmd$+.@opt$[@i] + ":";  
    Entendendo: .@cmd$+.@opt$[@i]+":"  
    .@cmd$ = Prepara a variável que contém a linha do comando atual para adição de mais um item no menu. .@opt$[@i] = É a opção a ser adicionada na linha de comando. ":" = É o que separa as opções em um select. (Como qualquer select sem dinamização, só para exemplo).   Agora para finalizar, adicionaremos por último: set .@cmd$, .@cmd$+"Fechar"; //Esse fechar é a última opção de nosso (seu) menu.  
    Finalmente colocamos o select que usará a linha de comando, fazendo o código ficar desta maneira:
    set .@cmd$,"";setarray .@opt$[0],"Comprar","Vender","Trocar";for(set @i,0; @i <= getarraysize(.@opt$); set @i,@i+1) set .@cmd$, .@cmd$+.@opt$[@i] + ":";set .@cmd$, .@cmd$+"Fechar";select(.@cmd$);  
    Para utilizar o snippet utilize uma forma normal, com a variável retornada por todo tipo de menu, que é a @menu.   Para lembrarmos, veja um exemplo simples: select("Oi":"Tchau");if (@menu == 1) mes "Oi";if (@menu == 2) mes "Tchau";  
    É simplesmente isso, o uso é bem simples como o tutorial, em caso de dúvidas, mande uma PM que ajudarei com toda certeza!

    Um abraço, Wolf.
  2. Upvote
    Senos got a reaction from Niunzin in Queries SQL (Aula 6)   
    Script Intermediário! - 6
    Lista de Aulas:
    Aula 1: http://herc.ws/board/topic/199-script-intermedi%C3%A1rio-aula-1/
    Aula 2: http://herc.ws/board/topic/200-script-intermedi%C3%A1rio-aula-2/ Aula 3: http://herc.ws/board/topic/201-script-intermedi%C3%A1rio-aula-3/ Aula 4: http://herc.ws/board/topic/203-script-intermedi%C3%A1rio-aula-4/ Aula 5: http://herc.ws/board/topic/213-script-intermedi%C3%A1rio-aula-5/ Aula 6: http://herc.ws/board/topic/228-queries-sql-aula-6/ Aula 7: http://herc.ws/board/topic/239-script-intermedi%C3%A1rio-aula-7/   Bom galera, depois de aprendermos loops, arrays, menus dinâmicos e suas teorias, setd e getd, attachrid e detachrid, partiremos então para o Banco de Dados e aprenderemos então a maniuplar as Queries SQL, que é de suma importância para quem gosta de seus scripts mais seguros e com suas respectivas tabelas.   Assunto da aula: - Queries SQL
      Como de costume, começarei mostrando a sintaxe do comando, e em cima dela, trabalharemos: query_sql "sua query de MySQL", <variável> {,<variável>, ...};  
    Sua Query_SQL: Você colocará a query que você quer executar, você aprenderá neste tutorial como escrever sua query da maneira que quer. Variável: Nem sempre é preciso específicar a variável, depende do comando que você utilizará. Você quando for atualizar (update) ou deletar (delete) algo de seu Banco de Dados ou sua respectiva tabela, você não precisará utilizar, agora caso for pegar alguma informação (select), você precisará sim da variável, lembrando que ser for texto ou palavars, precisará da var. string ($) caso contrário for números, não precisará.  
    Bom, então começaremos a explicar os comandos, comando SELECT:
    SELECT <informacão> FROM <tabela>  
    informacão: Como podemos perceber no Banco de Dados, uma tabela é formada por vários campos, neste campo, você indica o nome do campo que você deseja ler. Você pode específicar vários campos para serem lidos, exemplo: SELECT <informacão>,<informação>,<informação> FROM <tabela>   Mas lembrando que teremos que específicar uma variável para cada campo no final da escrita da Querie, você pode substituir o nome dos campos por um (*), assim retornará todos os campos da tabela, sem precisar específicar um por um.
     
    tabela: Nome da tabela dentro do Banco de Dados que você gostaria de pegar a informação. 

    Agora vejamos um exemplo utilizando o comando SQL em uma sintaxe Querie: 
    query_sql ("SELECT `user_id` FROM `login`",@nome_do_usuario$);  
    No caso essa variável @nome_do_usuario$ se tornará uma array, pois não será apenas 1 valor, e sim vários valores pois serão retornados todos os nomes de usuários de jogadores do seu servidor. No caso ficará assim:
    @nome_do_usuario$[0]: Usuario 1@nome_do_usuario$[1]: Usuario 2// Ficará sempre assim, só mudando a index da array, [2], [3], [4], etc...
    Aproveitarei com o comando SELECT, para explicar o comando WHERE, iremos pegar o nome de usuário de um jogador com o ID 1 no Banco de Dados, faremos assim no caso:
    query_sql ("SELECT `user_id` FROM `login` WHERE `account_id`=1",@nome_do_usuario$);  
    Assim buscaremos uma conta específica e não todas as contas do jogo, simples, não?!

    Temos um conjunto de dois comandos chamados AND e OR, é utilizado junto com o WHERE, vejamos: query_sql ("SELECT `user_id` FROM `login` WHERE `level`=99 AND `sex`='M'",@nome_do_usuario$);
    Nesse caso só pegariamos o nome dos usuários dos jogadores que forem level 99 e (AND) do Sexo Masculino. Exemplo com o comando OR:
    query_sql ("SELECT `user_id` FROM `login` WHERE `level`=99 OR `sex`='F'",@nome_do_usuario$);  
    Agora só pegariamos o nome dos usuários dos jogadores que forem level 99 ou (OR) do Sexo Feminino. Os dois comandos são super simples! 
     
    Temos também o comando ASC (Ascendente) e DESC (Descendente), vejamos: query_sql ("SELECT `user_id` FROM `login` ASC"); // Retornaria a lista de nomes de usuários do servidor em ordem alfabética de A para o Z.query_sql ("SELECT `user_id` FROM `login` DESC"); // Retornaria a lista de nomes de usuários do servidor em ordem alfabética de Z para o A.  
    Comando INSERT INTO: Este comando é para que você possa criar uma nova linha de dados dentro de uma tabela, criando uma nova informação na sua tabela desejada, vejamos:
    INSERT INTO <tabela> (<campos>) VALUES (<valores>);  
    Vejamos um exemplo:
    query_sql ("INSERT INTO `login` (`account_id`, `user_id`, `user_pass`, `sex`, `email`) VALUES ('2000000', 'test', '12345', 'M','[email protected]')");  
    Nesta caso, estamos criando uma conta com o account_id 2000000, o nome de usuário test, a senha 12345, sexo masculino, e e-mail [email protected].

    Partiremos então pro comando UPDATE, sintaxe:
    UPDATE `<tabela>` SET `<campo1>`='<valor1>',`<campo2>`='<valor2>';  
    Não é um comando complicado, com o exemplo passará de complexo para super simples, vejamos: query_sql ("UPDATE `login` SET `level`=99 WHERE `user_id`='Wolf'");  
    Esta queria irá mudar o Nível de GM da conta Wolf para 99, preste atenção, pois caso você não específicasse com o comando WHERE, todas as contas do servidor poderiam ser mudadas para 99, causando um transtorno enorme.
     
    Comando DELETE: Simplesmente faz oque diz, deleta uma informação da tabela, sintaxe: DELETE FROM `<tabela>`   Se fizermos simplesmente DELETE FROM `login`, todas as informações da tabela login seriam deletadas, por isso iremos específicar, por exemplo: query_sql ("DELETE FROM `login` WHERE `userid`='Wolf'");  
    Neste caso a conta Wolf será deletada da tabela login do Banco de Dados. Porém não é recomendável deletar a conta desta maneira, pois as informações de chars, itens, e pets ainda ficariam ocupando espaços no Banco de Dados, no caso você teria que deletar tudo manualmente, porém serviu de exemplo.   Comando DROP: Deleta a tabela inteira, sintaxe: DROP TABLE `<tabela>`   Exemplo: query_sql ("DROP TABLE `login`");  
    Destrói a tabela login, ninguém mais consegue logar no servidor, e poderá arrecadar muitos problemas. Existe DROP DATABASE também, no caso você deletará uma Database, se você fizer DROP DATABASE `ragnarok`, acabará com o Banco de Dados ragnarok ò_ó.   _____________________________________________________________   Fim do tutorial, posteriormente irei editar esse tópico e adicionar uns exemplos utilizando Querie, mas talvez, pois adicionei diversos exemplos no tutorial. Abraços!!
  3. Upvote
    Senos reacted to Ind in Expanding: Int'l Communities   
    We at Hercules want to provide our users with as many international communities as we can, however in order to create a international community we first need someone to oversee it.
    Do you speak a language other than English that we don't have a community for?
    Be the first, join our team
    Do you speak a language other than English that we have a community for?
    Help us moderate it, join our team
     
    Notice however that our guidelines for wannabe moderators applies
  4. Upvote
    Senos got a reaction from Samael in Urgente pf ..... Atributos do char ...   
    Aprenda a teoria do statpoint, nesse arquivo você consegue configurar pontos ganhados por level, assim relevando os status que você quer no máximo. 
  5. Upvote
    Senos got a reaction from Jamaeeeeecah in Kagerou e oboro   
    battle.c source (danos) ou skill.c (fórmulas) 
  6. Upvote
    Senos reacted to Neo-Mind in NEMO - Client Patcher   
    N.E.M.O. - Neo Exe Modification Organizer

    Why another client patcher? well
    1) WeeDiffGen - isn't working for 2013 clients + it depends on dlls (not that its a bad thing but i like scripting )
    2) xDiffGen - yes its scripted but we need to depend on xdiff files.

    so i made a new one based on xDiffGen and here it is. The patches are written in QtScript format.
    Details of making a patch have already been written in a seperate topic - although now it needs to be updated with more details.
    I have already converted most of the patches from xDiffGen.

    Why this name? - well I didn't want it to be called * Gen No offense  
    plus someone keeps calling me Nemo in IRC which gave me the idea

    Snapshot
    -----------------


    How to use?
    ---------------------
    1) First you need to specify your client file in Input Exe file box. If you browse to select the file name, Output Patched box gets updated with a _patched suffix filename automatically. Ofcourse you can select your own name for the output.
     
    2) Next we need to load both the client and the scripts (patches & addons). so click Load Client button.
     
    3) Select the patches you want . In case you patched once before (for whatever date) they will be saved in your local and you can use the Select Previous button to select them again. Also you can try using the Select Rcomnded button to select all the Recommended patches.
     
    4) So your patches are selected and client is loaded what next but to Apply Patches  which will generate the output file. In 2.0 version , NEMO also generates a .secure.txt file containing the MD5, SHA1 and CRC32 values of the output exe file which you can use in various tools.
     
    5) You can use the Save Profile and  Load Profile buttons for saving/reloading a set of patches & input values, that you have selected (even if they are not applied) for future use.
     
    6) Whenever you apply patches to a client, NEMO updates the patchlist.log file (along with Inputlist.db) in the folder where NEMO.exe is. This file will contain the list of patches you have applied along with their IDs (do not tamper with either of them).
     
    Changes in 2.0:
    ----------------------
    1) I have made some obvious modifications to the interface (you can definitely see the change in case you have seen v1.0).
         i) Buttons have come downwards and is no longer strippable (toolbar has been fixed in position)
     
         ii) New status Label has been added which shows your currently loaded client date and how many patches are selected.
     
         iii) NEMO now has support for Addons - scripts that are meant to retrieve data from the client and do its own thing (not patch the client).
              All the Extract xDiff patches has been added here already. 1 extra addon will be coming soon once i can fix it.
     
         iv) New Filter box has been added which does live search (i.e. filter as you type) for filtering out only the patches u want to see.
               For e.g. if you type color, it will only show patches that have the string color in either it's name or the description.
              You can also use regular expression . Also you can sort the columns now
     
        v) An upcoming feature - Test Patches. this one you can use for testing a newly added patch for a variety of clients that you select.
     
    2) NEMO is no longer there in SVN. I have shifted it to GitHub . The rar file uploaded has the .git file so you should be able to directly pull to get updates. But just in case I have also provided the repository link below.
     
    Remember to pull for updates before using NEMO and let me know if you are facing any bugs or issues or if i have missed out on anything. Enjoy .
     
    Repository: https://github.com/MStr3am/NEMO.git
     
    Download Link: NEMO zip file 
  7. Upvote
    Senos got a reaction from Jamaeeeeecah in Duvida sobre Formulas e Scripts   
    Hercules -> rAthena -> eAthena -> Cronus -> jAthena e seja qual for o emulador tanto pre-re/re os scripts tem compatibilidade, até porque nenhum emulador tem comando customizado, e nada difere um do outro.
  8. Upvote
    Senos reacted to ossi0110 in Battleground script   
    here you go
     
     
    just remove the {  above the end on Line 25
     
     
     
     
    bat_room,160,150,3 script Erundek 109,{ callshop "ShopBG",1; npcshopattach "ShopBG";end;OnBuyItem:for(set @i,0; @i < getarraysize(.bg_item);set @i,@i+1){ if(@bought_nameid == .bg_item[@i]){ mes .n$; mes " "; if(.emb_bv[@i] > 0) mes (.emb_bv[@i]*@bought_quantity)+"x Emblemas de bravura."; if(countitem(7828) >= (.emb_bv[@i]*@bought_quantity)){ getitem .bg_item[@i],@bought_quantity; delitem 7828,(.emb_bv[@i]*@bought_quantity); mes .n$; mes "Troca bem sucedida"; close2; }else{ mes .n$; mes "^FF0000Você não tem emblemas suficientes^000000"; close2; } } }end;OnInit: set .n$,"[Erundek]"; npcshopdelitem "ShopBG", 503; setarray .bg_item[0], 13036,13411,1425,1632,1634,1543,1924,1978,1574,1824,1183,1380,13305,1279,1739,13108,13172,2538,2539,2540,2435,2436,2437,2376,2377,2378,2379,2380,2381,2382,2720,2721,2722,2723,2724,2725,2733; setarray .emb_bv[0], 100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,50,50,50,50,50,50,80,80,80,80,80,80,80,500,500,500,500,500,500,500; for(set .x,0; .x < getarraysize(.bg_item); set .x,.x+1) npcshopadditem "ShopBG", .bg_item[.x],0;end;}- shop ShopBG -1,503:500;
  9. Upvote
    Senos reacted to Yommy in RO2 Client Source Code <3   
    RO2 Client source codes
    https://mega.co.nz/#!V9VTgR7R!b2XpJnTVvs_Ps_OkuX1eDElPf7N85aXih4StuIJ8Omk
     
    and the Saga server emu
    https://mega.co.nz/#!1w0nwCDL!MpQTbSfrAhcTBnyy4pi1XTw29BgTUcadD7LoSe3ANhk
     
     
    let me know if you find some goodies
  10. Upvote
    Senos reacted to jaBote in ¡Bienvenidos a la sección en español de Hercules!   
    Me había permitido esta licencia acogiéndome a la tercera acepción de la palabra español según la RAE, aunque es cierto que no me había dado cuenta que suena un poco a que solo los españoles podemos participar. Voy a corregir el título del tema: como dice mi compañero Wolf, no es necesario ser español sino saber escribirlo en condiciones.
     
    ¡Un saludo!
  11. Upvote
    Senos reacted to Mystery in December Digest 2013   
    December Digest 2013
    The following digest covers the month of December 1st - December 31st 2013.
    Team Changes

      Dastgir Pojee has joined as a Community Contributor . Mhalicot has been moved from Community Contributor to Filipino International Moderator. Mumbles has been moved from Support Leader to Global Moderator. Beret has been moved from Community Contributor to High Council.

    Development Highlights

      Fixed an issue with items accidentally made equippable for every class (671d61a) Whitespace fixes in script.c (a9156de) Added support for string vars on commands that require a string (fefaf39) Christmas Patch! Gift'o (cf19b26) (Topic) Implementation of #define DEVOTION_REFLECT_DAMAGE (36d0c78) As requested by the community. Modified Xcodeproj, removed global tab/indentWidth override (46a9906) Fixed several compiler warnings (15a0f6d) Added support for non-aborting assertion (a23d072) Nullpo cleanup (853c5a3) Added Apple Xcode project files (4d13474) Introducing HPM Support for custom battle confs (0e25c60) Modified second 'infinity loop!' error (f19fb90) HPM mapindex interface (d4a58d2) Questlog fixes (6f55c00) Corrected Steal Coin formulas and battle log message (470ab15) Added Windows batch file for 'db2sql' plugin (9f210e1) Changed item Aegis ID and Mob Sprite ID lookups to case sensitive (6e9c385) Changed variables, labels, functions, and commands to case sensitive (c6c2ad1)

    Scripting Highlights

      Correctly removed persistent database entries for disabled NPC Market (c2f6086) Improved script builtin function parser (4d1f7cc) Changed builtin keywords in the script engine (49d2dff)

    Build System Highlights

      Improved plugins Makefile (3462866)

    NPC & Database Highlights

      Modernized syntax and fixed errors in sample scripts (21fa090) Update mob spawns in 13.1 quest to aegis info (16f474b) Bard Quest constant fix (9e22313) Different item bug fixes (0fd5a42)

    Skill Highlights

      Fixed crashing of GN_SPORE_EXPLOSION in certain systems (c3c5e31) Fixed Cell Basilica (Which was broken for 5 years) (813908c)

    FluxCP Branch Highlights

      Security Patch (86ba82d) Added Rebellion Job (7cf9d09)

    December Statistics

      During the period there were 49 Commits. Of these 49 commits, 13 included bug-fixes. 3 Commits from Pull Requests In this month, there were 60,318 Additions and 53,489 Deletions.
















  12. Upvote
    Senos reacted to Nameless2you in 23/12/2013 kRO Maintenance   
    ※ Inspection Time   - All Servers: 20:30 to 04:30 (Spain time GMT +1)   ** Maintenance date has been advanced to December 23th because of the upcoming holidays.   Main Servers:   Ragnarok Online 2013 EPISODE 15.2 메모리 레코드 (Memory Record)   * Verus is a dangerous city in which its historical vestiges fought for surviving to the last minute. You sure want to know about it. -> Experimento This-OPTATION is at 11 o'clock from verus (verus03) central square. [! 'Este' for 'East' or 'Este' for 'This'?] -> [investigation Building-WISH] is at 1 o'clock from verus (verus03) central square. -> Episode 15.1 showed new zones thanks to the "nerds" group that allowed the research to continue. Talk to the team leader.   * For more details please check promotional page of this new episode.   - Smelting Ore Box VI ite starts selling. -> Lapse: from 23/12/2013 until 08/01/2014 maintenance. -> Also, [sealed Turtle General Scroll] item event is started.   Sakray Server:   - MDEF/MATK information in the homunculus window has been modified for these cases in which it wasn't properly displayed.   ////////////////////////////////////// EPISODE 15.2 (BGM)!!! Ziu note: BGM 161 is AWESOME for me!!!! 161 (Forest of Despair) https://www.dropbox.com/s/uic72uzau0i7jdv/ziu-ro_161.mp3 162 (Dark Light) https://www.dropbox.com/s/06i7nnnm64p11ss/ziu-ro_162.mp3 163 (Lost souls) https://www.dropbox.com/s/hlcgu7w8usb03hl/ziu-ro_163.mp3 164 (From the Grave) https://www.dropbox.com/s/jm11w9wb1x91guj/ziu-ro_164.mp3   Translator notes:  The translation may be inaccurate at some points but I tried my best. Dates are in European format: day/month/year; Times are in Spanish time zone (GMT+1). Remember that [!] marked lines mean stronger possibility of inaccurate translation because I couldn't figure out an exact meaning for that. Also, text inside square brackets at the end of a sentences are just polite guesses I make from the patch. I might make some mistakes retranslating and I'm sorry for these, but this is just a quick translation (better than GTranslate) just to make you aware of the changes on kRO!   Big thanks to Ziu for the time and skills it takes to translate kRO patches from Korean to Spanish! Thanks to jaBote for giving his time up once again to translate this.
  13. Upvote
    Senos reacted to malufett in Thanatos Effect in Renewal   
    in 'src/map/battle.c' under 'battle_calc_defense' function we are already using the exact formula so the the higher the target's def the higher additional damage thanatos card will grant(1 atk per 2 def)..
     
    if( flag&2 ) // Thanatos Card Effect and a like  damage += def1 >> 1;if( !(flag&1) && !(flag&2) ) { // Both Thanatos and Enca Card ignore this damage reduction if( flag&4 )   damage -= (def1 + vit_def);  else damage = (int)((100.0f - def1 / (def1 + 400.0f) * 90.0f) / 100.0f * damage - vit_def);}  

  14. Upvote
    Senos reacted to Ind in Christmas Patch! Gift'o   
    Gift'o! From Hercules, to your server!
    We wish you happy holidays, and thank you for your support.
    May the New Year bring you happiness and peace.
     
    2013-12-23c Client Support
    Thanks to Yommy and Rytech! NPC Market Support A new type of NPC Shop where item availability is limited, for example you can have a vender start with 50x Red Potions and set mechanics for the red potions to be refurbished (for example could be as simple as a OnClock, where Red Potions are refurbished every y hour, or elaborate e.g. be connected with a game quest where players need to help a merchant npc get to the shop in order for it to be resupplied) Available as a NPC Trader subset (details will follow) @costume Oktoberfest NPC Trader
    A whole different way to set up shops, they're easier to read and flexible to customize. Previous format still supported (in the scenario we drop the previous we'll provide a conversion tool) To begin with, 'trader' is a phony name, its only purpose is to sign the parser that 'this npc will open the shop when clicked'. the trader npc is in fact a 'script' type (and thus script types can create/manipulate trader shops, and open them with the help of openshop()). Normal Zeny Shop moc_ruins,93,53,2    trader    Item Collector#moc1    4_M_03,{ OnInit:     sellitem Scell;     sellitem Monster's_Feed;     sellitem Animal's_Skin;     sellitem Bill_Of_Birds; } Custom Shop Script has full control over currency, which allows for scripts to use anything, from quests, to items, variables, etca. For Example: prontera,153,152,1    trader    TestCustom2    952,{ OnInit:     tradertype(NST_CUSTOM);     sellitem Red_Potion;     end;   /* allows currency to be Red_Potion */ OnCountFunds:     setcurrency(countitem(Red_Potion));     end;   /* receives @price (total cost) */ OnPayFunds:     if( countitem(Red_Potion) < @price )         end;     delitem Red_Potion,@price;     purchaseok();     end; } NPC Market ShopThis is the type I mentioned earlier, where item availability is limited prontera,150,160,6    trader    HaiMarket    952,{ OnInit:     tradertype(NST_MARKET);     sellitem Red_Potion,-1,50;     end;   OnClock0000://resupplies red potions on midnight OnMyResupply://instead of midnight, a event could trigger HaiMarket::OnMyResupply     if( shopcount(Red_Potion) < 50 )         sellitem Red_Potion,-1,50;     end; }The quantity data is disaster-safe, I mean it is persistent to @reloadscript and server restarts (If there were 39 Red Potions on sale upon restart/reloadscript, it continues to be 39 instead of resetting back to 50). 7 script commands to help control (documentation for all of them is present in script_commands.txt): openshop,sellitem,stopselling,setcurrency,tradertype,purchaseok,shopcount Trader Design by
    Yommy Haru jaBote mkbu95 Gepard Emistry Ind Special Thanks To
    Haru Yommy JaBote Muad_Dib Link'u~!
    Commit: https://github.com/HerculesWS/Hercules/commit/cf19b26d50ac96111e44c33a80afd1f1ea935cec NPC Trader Samples: https://raw.github.com/herculesWS/Hercules/master/doc/sample/npc_trader_sample.txt (Upcoming) GM Interface for Cash Shop Control

    Found that on the new client, support is being worked on (Data thanks to Yommy <3).
  15. Upvote
    Senos reacted to Emistry in Shortening the script   
    try...
    http://upaste.me/r/792e1d
    Case 0: if( BaseLevel >= 50 && BaseLevel <= 69 ){ setarray .@monster$,"Marc","Bongun","Dustiness","Driller","Wootan Fighter"; setarray .@questid,82006,82013,82020,82027,82034; }else if( BaseLevel >= 70 && BaseLevel <= 99 ){ setarray .@monster$,"Karakasa","Grand Peco","Pasana","Metaling","Dancing Dragon","Mavka","Uzhas","Poison Toad","Zombie Prisoner","Clock Tower Manager","Breeze","Bloody Injustice","Wicked Nymph"; setarray .@questid,82045,82052,82258,82065,82071,82079,82086,82093,82100,82107,82114,82121,82128; }else if( BaseLevel >= 100 && BaseLevel <= 125 ){ setarray .@monster$,"Assaulter","Hill Wind","Kobold (Shield & Hammer)","Diabolic","Muscipular","Dullahan","Aunoe","Venatu (Blue)","Hell Poodle","Dimik (Orange)","Plasma (Red)","Cornus","Remover"; setarray .@questid,82138,82145,82151,82159,82166,82171,82180,82187,82194,82201,82208,82215,82222; }else{ setarray .@monster$,"Shelter","Observation","Banshee","Erend","Antler Scaraba"; setarray .@questid,82232,82239,82246,82254,82261; } break;Case 1: if( BaseLevel >= 50 && BaseLevel <= 69 ){ setarray .@monster$,"Beetle King","Alligator","Rice Cake Boy","Jakk","Mantis","Dryad"; setarray .@questid,82000,82007,82014,82021,82028,82035; }else if( BaseLevel >= 70 && BaseLevel <= 99 ){ setarray .@monster$,"Sidewinder","Nine Tails","Argiope","Iara","Comodo","Punk","Raydric Archer","Penomena","Venomous","Permeter","Teddy Bear","Waste Stove","Stapo","The Paper"; setarray .@questid,82039,82046,82266,82059,82066,82073,82080,82087,82094,82101,82108,82115,82122,82129; }else if( BaseLevel >= 100 && BaseLevel <= 125 ){ setarray .@monster$,"Neraid","Quve","Drosera","Phendark","Sting","Deleter (Flying)","Kobold Archer","Ice Titan","Dark Pinguicula","Plasma(Blue)","Plasma (Green)","Gremlin","Owl Baron","Knight of Abyss"; setarray .@questid,82132,82139,82146,82153,82160,82167,82174,82181,82188,82195,82202,82209,82216,82223; }else{ setarray .@monster$,"Vanberk","Centipede","Frus","Acidus","Necromancer","Salamander"; setarray .@questid,82226,82233,82240,82248,82255,82262; } break;Case 2: if( BaseLevel >= 50 && BaseLevel <= 69 ){ setarray .@monster$,"Goblin Archer","Swordfish","Merman","Hunter Fly","Tri-Joint","Dokebi"; setarray .@questid,82001,82008,82015,82022,82029,82036; }else if( BaseLevel >= 70 && BaseLevel <= 99 ){ setarray .@monster$,"Toucan","Marduk","Dark Frame","Evil Druid","Clock","Les","Novus","Miyabi Doll","Siorova","Marionette","Demon Pungus","Enchanted Peach Tree","Roween","Obsidian"; setarray .@questid,82040,82047,82253,82060,82067,82074,82081,82088,82095,82102,82109,82116,82123,82130; }else if( BaseLevel >= 100 && BaseLevel <= 125 ){ setarray .@monster$,"Siroma","Gargoyle","Blazer","Desert Wolf","Fake Angel","Gazeti","Anolian","Aliza","Draco","Raydric","Plasma (Purple)","Centipede Larva","Beholder","Hodremlin"; setarray .@questid,82133,82140,82147,82154,82161,82168,82175,82182,82189,82196,82203,82210,82217,82224; }else{ setarray .@monster$,"Lady Solace","Echio","Agav","Incantation of Morrocc (Ground)","Rawrel","Rake Scaraba"; setarray .@questid,82227,82234,82241,82249,82256,82263; } break;Case 3: if( BaseLevel >= 50 && BaseLevel <= 69 ){ setarray .@monster$,"Greatest General","Minorous","Strouf","Hode","Steam Goblin","Curupira"; setarray .@questid,82009,82016,82023,82030,82037; }else if( BaseLevel >= 70 && BaseLevel <= 99 ){ setarray .@monster$,"Zerom","Tamruan","Parasite","Goat","Wood Goblin","Mi Gao","Stem Worm","Rafflesia","Noxious","Pitman","Skeleton Prisoner","Solider","Anopheles","Tengu"; setarray .@questid,82041,82048,82254,82061,82068,82075,82082,82089,82096,82103,82110,82117,82124,82131; }else if( BaseLevel >= 100 && BaseLevel <= 125 ){ setarray .@monster$,"Dark Priest","Explosion","Kobold (With Mace)","Lava Golem","Anubis","Nightmare Terror","Loli Ruri","Ancient Mimic","Ancient Mummy","Pot Dofle","King Dramoh","Plasma (Yellow)","Flame Skull","Hillslion"; setarray .@questid,82134,82141,82147,82155,82162,82167,82176,82183,82190,82197,82204,82211,82218,82225; }else{ setarray .@monster$,"Ragged Zombie","Ferus (Green)","Tatacho","Whikebain","Armania","Miming"; setarray .@questid,82228,82235,82242,82250,82257,82264; } break;Case 4: if( BaseLevel >= 50 && BaseLevel <= 69 ){ setarray .@monster$,"Mummy","Munak","Golems","Leaf Cat","Horong","Baby Leopard"; setarray .@questid,82003,82010,82017,82024,82031,82038; }else if( BaseLevel >= 70 && BaseLevel <= 99 ){ setarray .@monster$,"Jaguar","Geographer","Wraith","Headless Mule","Sleeper","Kapha","Cendrawasih","Witch","Spring Rabbit","Novus","Red Eruma","Deviruchi","Shinobi"; setarray .@questid,82042,82049,82255,82062,82068,82076,82083,82090,82097,82104,82111,82118,82125,82132; }else if( BaseLevel >= 100 && BaseLevel <= 125 ){ setarray .@monster$,"Heater","Anacondaq","Lude","Disguise","Deleter (Not Flying)","Kobold (With Axe)","Luciola Vespa","Sropho","Nepenthes","Dimik (Grey)","Naga","Succubus","Aqua Elemental"; setarray .@questid,82135,82142,82148,82156,82163,82168,82177,82184,82191,82198,82205,82212,82219; }else{ setarray .@monster$,"Seeker","Skogul","Imp","Incantation of Morrocc","Kavac","Little Fatum"; setarray .@questid,82229,82236,82243,82251,82258,82265; } break;Case 5: if( BaseLevel >= 50 && BaseLevel <= 69 ){ setarray .@monster$,"Metaller","Isis","Sandman","Stone Shooter","Grizzly"; setarray .@questid,82004,82011,82018,82025,82032; }else if( BaseLevel >= 70 && BaseLevel <= 99 ){ setarray .@monster$,"Requiem","Rideword","Orc Archer","Alnoldi","Raydric Archer","Ancient Worm","Mole","Dragon Tail","Firelock Soldier","Wild Ginseng","Elder","Freezer","Evil Cloud Hermit"; setarray .@questid,82043,82050,82256,82063,82069,82077,82084,82091,82098,82105,82112,82119,82126; }else if( BaseLevel >= 100 && BaseLevel <= 125 ){ setarray .@monster$,"Rybio","Alice","Medusa","Carat","Pinguicula","Majoruros","Magmaring","Venatu (Red)","Ancient Mummy","Dimik (Red)","Mini Demon","Wanderer","Retribution"; setarray .@questid,82136,82143,82149,82157,82164,82169,82178,82185,82192,82199,82206,82213,82220; }else{ setarray .@monster$,"Zombie Slaughter","Knocker","Acidus (Gold)","Dolomedes","Kasa"; setarray .@questid,82230,82237,82244,82252,82259; } break;Case 6: if( BaseLevel >= 50 && BaseLevel <= 69 ){ setarray .@monster$,"Green Iguana","Flora","Ghoul","Sohee","Wootan Shooter"; setarray .@questid,82005,82012,82019,82026,82033; }else if( BaseLevel >= 70 && BaseLevel <= 99 ){ setarray .@monster$,"Wooden Golem","Piranha","Petite","Jing Guai","Cramp","Harpy","Porcellio","Hyegun","Alarm","Zipper Bear","Owl Duke","Bloody Butterfly","Evil Cloud Hermit"; setarray .@questid,82044,82051,82257,82064,82070,82078,82085,82092,82099,82106,82113,82120,82127; }else if( BaseLevel >= 100 && BaseLevel <= 125 ){ setarray .@monster$,"Kaho","Galion","Heirozoist","Snowier","Gibbet","Arclouse","Sedora","Venatu (Grey)","Deathword","Dimik (Blue)","Violy","Incubus","Apocalypse"; setarray .@questid,82137,82144,82150,82158,82165,82170,82179,82186,82193,82200,82207,82214,82221; }else{ setarray .@monster$,"Isilla","Ferus (Red)","One Horned Scaraba","Bradium Golem","Ygnizem"; setarray .@questid,82231,82238,82245,82253,82260; } break;   
    set your quest up there ....the quest id is stored into a player variable "monster_quest" ....
     
    it can be even shorter than this ... just some simple trick + math calculation ..xD
    i believe you can try figure it out soon ...
  16. Upvote
    Senos reacted to Patskie in Shortening the script   
    To make this short, use a loop :
     
     
    Short version ( didn't try though ) : 
    @i = 82000;while ( @i < 82267 ) { if( checkquest(@i) ) goto N_Progress; @i++; }
  17. Upvote
    Senos reacted to JulioCF in [Guia Plataforma IPB] SSI: Últimos X Tópicos no seu site   
    Fonte: http://forum.sosinvision.com.br/index.php?app=tutorials&article=2604
  18. Upvote
    Senos got a reaction from Hideki in Ayuda con restricciones en NPC   
    Prueba este: 
    mes "["+strnpcinfo(1)+"]"; mes "Olá "+strcharinfo(0)+", estás indo para batalha?"; select ("Claro que si!:Que es esto?:Fin de la conversacion"); next; mes "["+strnpcinfo(1)+"]"; if (@menu == 1) { setarray .jobs, 0, 0, 0, 0, 0; // Jobs prohibido. set .level, 99; // Level necesario. for (set @i, 0; @i < getarraysize(.jobs); set @i, @i+1) { if (Class == .jobs[@i]) { mes "Usted no tiene Job requisitado."; close; } else { if (BaseLevel != .level) { mes "Usted no tiene level suficiente."; close; } mes "¡Buena suerte!"; close2; warp "tontera",666,666; end; } } } if (@menu == 2) { mes "Es una arena de batalha!"; close; } if (@menu == 3) close;  
    Creado por mí, configurar:
    setarray .jobs, 0, 0, 0, 0, 0; // Jobs prohibido. set .level, 99; // Level necesario.  

  19. Upvote
    Senos reacted to JulioCF in Adicionando custons no sistema .lua   
    Complemento:Créditos: http://rathena.org/board/topic/60728-adicionando-custons-no-sistema-lua/
  20. Upvote
    Senos reacted to Jaburak in Hercules Userbar   
    Hello,   Just want to share my Hercules Userbar, you can use this userbar if you want.  

  21. Upvote
    Senos reacted to c0nsumer in RObrew - The missing package manager for Ragnarok Online Emulator   
    Hello friends!
     
    this is interesting to you? can i continue the development? or it's not a good project? 
     
    Page: http://barrosfilipe.github.io/robrew/
    Github: https://github.com/barrosfilipe/robrew
     
     
    What is RObrew?
     
    It's a Linux (Debian Based OS / Red Hat Based OS) application that will provide you a simple life in ragnarok emulator management.
     
    Example without RObrew:
     
    You need to install package dependencies to your emulator manually, for example:
     
        * gcc
    * make
    * mysql
    * mysql-devel
    * mysql-server
    * pcre-devel
    * subversion
    * zlib-devel
     
    And then download the emulator from svn/repo and compile it manually!
     
    Example with RObrew:
     
    After install RObrew you just need to do that command in your terminal:
     
    $ robrew install <emulator>  
    For Hercules:
    $ robrew install hercules  
    Package Dependencies:   * gcc * make * mysql * mysql-devel * mysql-server * pcre-devel * subversion * zlib-devel  
    The robrew command will install all package dependencies automatically, download Hercules from official svn/repository.
     
    If you want to compile:
     
     
    $ robrew compile /path/to/downloaded/hercules/folder/  
    RObrew is now in development and the first release will have plugins. For example, a plugin named emulator-dropbox-backup that provide automatically daily backups from your emulator and database to a DropBox storage.
     
    if you are interested to get involved contact me (PM).
     
    Thanks! Let's make the world better 
     
    with Love <3,
    c0nsumer (Filipe Barros)
  22. Upvote
    Senos reacted to Yommy in Hercules WPE Free - June 14th Patch   
    for anyone who requires, the 3 keys are hardcoded to each client, you can search the keys in hex editor and modify for something unique.
    for those with IDA / OllyDBG, the keys are pushed just before the PACKET_CZ_ENTER reference (not the actual string)
     
    .text:007962A7 0F 84 77 FC FF FF jz loc_795F24 .text:007962AD 8B 0D 04 0F 98 00 mov ecx, dword_980F04 .text:007962B3 68 05 22 05 22 push 22052205h // key 3 .text:007962B8 68 05 22 05 22 push 22052205h // key 2 .text:007962BD 68 05 22 05 76 push 76052205h // key 1 .text:007962C2 E8 A9 64 E3 FF call sub_5CC770 .text:007962C7 68 6C 30 89 00 push offset aPacket_cz_ente ; "PACKET_CZ_ENTER" .text:007962CC E8 6F 19 C7 FF call nullsub_1 .text:007962D1 B9 2D 02 00 00 mov ecx, 22Dh .text:007962D6 83 C4 04 add esp, 4 .text:007962D9 66 89 4C 24 48 mov word ptr [esp+3ECh+cp+2], cx
  23. Upvote
    Senos reacted to Ind in Hercules WPE Free - June 14th Patch   
    Hercules WPE Free - June 14th Patch
     
    Made Possible Thanks to Yommy
    We're only able to provide you with this feature thanks to Yommy, Thank you very much! WPE Free - Official Packet Obfuscation Support Packet spamming is no longer possible by normal means, with this feature each packet sent has its own id, so spamming (by sending the same packet more than once) is impossible. For this feature to function you MUST NOT use the 'disable packet obfuscation' client diff. conf/battle/client.conf
    // Whether to enable the official packet obfuscation support (good vs WPE)// 0: disabled// 1: optional (not recommended) -- identifies whether it is required// 2: enabled (recommended)packet_obfuscation: <value>
    Currently functional for over 44 clients (Thanks to Shakto!): 2011-08-17 - 2015-05-13 Special Thanks to Yommy ..Yommy ...The all-awesome Yommy~! Thank you again! Shakto for the 44 PacketKeys! Also - SQL DB Updates & DB2SQL For logical and performance reasons we've modified the structure of the renewal item db tables, atk and matk no longer share the same column, equip_level was replaced by equip_level_min so that we could add equip_level_max which is required by new renewal items. Note however that because of the previous atk:matk format, it was not possible to provide a upgrade file that would save the matk data Item script errors from sql dbs used to point to a inexistent line number, it was modified to display the item id instead. This update has shrunk the sizes of the item db .sql files, making it possible for tools such as phpmyadmin to parse them, once again. With this patch we're also introducing a new official plugin, db2sql, its purpose is to make it easier for our developers to keep the .sql db files up to date (but you may use that to convert your own if you so desire, too), to use this plugin (when it is enabled in plugins.conf) type server tools db2sql in the console. Link~u! Commit 1 Commit 2
  24. Upvote
    Senos reacted to Jguy in rAthena devs/staff/members on Hercules   
    Hello,
     
    While we do not mind that rAthena developers, staff members and regular members register an account, post or send PM's on our forums, we do not take kindly to 'rAthena is better because x y and z' posts, or anything promoting rAthena as a superior emulator because of such and such. There is no such post on rAthena made by a Hercules staff member about Hercules and we intend to keep it that way, we would appreciate the same respect.
     
    Those who do not follow this simple clause listed above will have their post(s) deleted and/or hidden from view. Repeat offenders will be suspended from our forum with no further warnings or post manipulation.
     
    We do not appreciate, nor welcome drama here. While criticism is welcome in the form of 'why doesn't Hercules have such and such a feature', drama and belittling a project (hercules or not) will not be tolerated. This is a collaboration, not a drama infested 12 year old's contest.
     
    Thank you.
  25. Upvote
    Senos reacted to Mystery in Staff Changes   
    Hercules' Staff Changes
     
    Staff Changes

    As some of you may have noticed or will notice, Hercules as been going through some staff changes; especially between myself, Judas, and jaBote. As with every other change done to Hercules, we believe these changes between the staff will be more beneficial for the community at a large and with the staff. 
     
    Judas and I have been appointed to Forum Manager and no longer a Global Moderator. We were competent enough and proved ourselves that we were able to manage the community while the Administrators were busy with other things. Of course, we were excited to have taken this offer that was given to us!
     
    That's not all! Since jaBote joined the team as an International Moderator, he became very enthusiastic and has shown his capability of managing not just his own International Community, but also the rest of the forums. For this, we thought it was best for jaBote to get promoted to a Global Moderator! Also, not to fright! The Spanish Community will still be moderated by jaBote even though he is a Global Moderator.


    Staff Applications
     
    With the recent changes done, the Staff Applications have been moved under the tab "Others" rather than removed. For those who still wish to become part of Hercules' staff, you may do so by applying through the Staff Application process!

     
     
     
    We thank everyone for being a part of Hercules' community and as with other changes done towards Hercules, we hope these will help benefit and further grow the community!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.