Jump to content

jaBote

Community Contributors
  • Content Count

    2037
  • Joined

  • Last visited

  • Days Won

    43

Reputation Activity

  1. Upvote
    jaBote got a reaction from diieg0 in Entregar item 1 vez por cuenta   
    Soy consciente de que Ziu en rAthena también te ha comentado algo similar, aunque hay un punto muy grande de diferencia: simplemente Ziu dice que no deberías tener un servidor y yo te he comentado que deberías saber de esto antes de llevar un servidor (con garantías). No obstante, no deberías pasar por alto el resto del primer párrafo, en el cual no solo he comentado que todos siempre hemos sido principiantes alguna vez sino que además era un intento de animarte, y es verdad: yo mismo aprendí a través de la paciencia de otra persona. No deberías tomarte tal cosa como una falta de respeto sino como un comentario constructivo, a título personal.
     
    El scripting comporta el 90% de las necesidades (excluyendo aquellas derivadas de su web y sus añadidos o modificaciones gráficas, si tiene) que tendrás como administrador de cualquier servidor de Ragnarok Online y muchas veces es lo que marca la diferencia de un servidor que dura solo unos pocos meses (con el consiguiente enfado de sus usuarios) de uno que se mantiene durante años, y hablo tristemente desde la experiencia.
     
    Muchas otras personas no se habrían tomado siquiera el tiempo de responderte, o en caso de hacerlo lo habrían hecho de mala gana (con un RTFM) y/o yendo directamente al grano. Yo te he considerado una persona aún no iniciada en scripting y te he enlazado a multitud de recursos que te servirán para aprender el scripting y (como comenté anteriormente) ayudarte a que seas tú mismo quien sepa construir sus propios scripts.
     
    Para tu información, con una experiencia de más de cuatro años en scripting a avanzado he necesitado consultar el manual yo mismo para hacerte ese script porque no me sé de memoria todos los comandos. Ser bueno o experimentado no implica saber todo de memoria: Google y el manual de referencia (doc/script_commands.txt) son tus amigos y están ahí para que siempre puedas consultarlos. Probablemente hubieras recibido una respuesta más rápida y directa a tu problema si lo hubieses buscado tú mismo.
     
    No eres estúpido: tienes potencial. Para desarrollar ese potencial necesitarás seguir preguntando a alguien que sepa más que tú o experimentar tú mismo. Como persona absolutamente capaz como considero que eres he dedicado mi tiempo no solo a responderte (como Ziu), sino a tratar de enseñarte un poco más de scripting y animarte a que seas tú mismo quien experimente y responda a tus propias dudas siempre que puedas.
     
    Por último, me alegro de haber podido ser de ayuda, que a fin de cuentas para eso estoy.
     
    ¡Un saludo!
  2. Upvote
    jaBote reacted to Kenta in [Showcase] Happy Halloween! (HF_Town)   
    This is my 2nd Map i made
    Please rate, maybe i will release 
    By the way searching a Scripter for my free Release Maps and my own RO Project. Pm me for more information.


  3. Upvote
    jaBote reacted to Garr in NPC masking   
    File Name: npcmask
    File Submitter: Garr
    File Submitted: 10 Oct 2014
    File Category: Plugins
     
    Masks NPCs on player's client based on his/her variables. Will need to leave NPC sight range/@refresh for it to trigger (if you change variable while NPC is still in sight nothing will change, but @refresh/leaving screen and entering again will trigger mask).
     
    Usage:
    npcmask <new sprite>,<int variable name>,<compare method>,<value1>,{<value 2>,{<new size>,{<new name>,{<npc name>}}}}npcunmask {<npc name>}  
    Applies and removes NPC masking, accordingly.

    <new sprite> - sprite NPC will show if conditions are met

    <int variable name> - variable name to check, only integer character variables.

    <compare method> - compare method, based on following masks (v - variable, a- value1, b - value2)
    0x01 - Less, uses value1 (v < a)
    0x02 - Equal, uses value1 (v == a)
    0x04 - More, uses value1 (v > a)
    0x10 - "BETWEEN" - Between value1 and value2, including values 1 and 2 (a <= v <= b )
    0x20 - "EXCLUDE" - Excluding between value1 and value2, values 1 and 2 are excluded also. (v < a OR v > b )
    Example: 0x03 - same as less or equal, makes a check (v <= a)
    "BETWEEN" and "EXCLUDE" methods overwrite anything else, "EXCLUDE" will take precedence over all other methods.

    <value1> - value1 to compare too, used in all compare methods.

    <value2> - value2, used in "BETWEEN" and "EXCLUDE" modes. Optional parameter, if it won't be provided
    while using "BETWEEN" or "EXCLUDE" methods, those methods will be skipped.

    <new size> - size masking, defaults to medium size.

    <new name> - name masking, if not provided will use NPC's original name.

    <npc name> - NPC name to use masking on. If not provided, will be used on NPC script is running from.
     
    This plugin appeared from the idea of hiding NPCs from some players, while it still being visible to others. It's just added in functionality.
     
    You can download the file here.
     
    OR
     
    You can copy it from here.
  4. Upvote
    jaBote reacted to GmOcean in Script Error : script:set_reg: failed to set param 'Zeny' to -100.   
    Find this:
    if ( Zeny < $rent_cost ) close; Change to:
    if ( Zeny < $rental_cost ) close;  
    Was just a small typo. It was checking to see if your Zeny was less than the variable, if so do nothing. However, the variable it was checking was 0. So it'd say you had enough zeny and then attempted to subtract some. Easy mistake, easy fix.
  5. Upvote
    jaBote reacted to Samuel in Query to wipe everything except login details   
    Just make sure to backup login table then you could delete everything, then just re-run the main.sql then copy the insert from your backup and run it
  6. Upvote
    jaBote reacted to Angelmelody in No Buff when you die   
    OnPcDieEvent + sc_end
  7. Upvote
    jaBote reacted to Ai4rei in GRF Diet Plan, v1.0.0.0 - last updated 2014/10/05   
    GRF Diet Plan


    About
    This tool is a feature test of RO Patcher Lite's GRF library. It reduces GRF archive size by eliminating duplicated data, with non-shared palettes giving the best ratios. No client modifications are needed. See readme.txt for more details.

    Known Issues
    Using the "use best compression" option (off by default) might cause the client being unable to read certain files or degrade performance.

    Download & Website
    http://nn.ai4rei.net/dev/rotools/

    License

    This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License.
  8. Upvote
    jaBote got a reaction from Helena in Partymember unequal reward distribution   
    The script Dastgir made has a small mistake on the code:
    if (attachrid($@partymemberaid[.@i]){ getitem 969,1; warp "prontera",156,184; end; } This means that when one gets the prizes, others won't since the execution of the script will get stopped there.
     
    Try placing that end; at the end of the script, like this:
    OnMobKilled3: if(!mobcount("que_qaru01",strnpcinfo(0)+"::OnMobKilled3")) { sleep2 2000; mapannounce "que_qaru01","Boss-Monster is now dead!",0; sleep2 2000; announce "Your party finished this monster battle, good job!",0; sleep2 2000; getpartymember getcharid(1),2; for(.@i = 0; .@i<$@partymembercount; .@i++){ if (attachrid($@partymemberaid[.@i]){ getitem 969,1; warp "prontera",156,184; } } } end;  
    Test and comment please
  9. Upvote
    jaBote got a reaction from luis.seifert in [Help] Battleground script   
    Oh, true. You get respawned because you still belong to a BG team.
     
    Look on your src/map/pc.c for something like this inside your pc_dead function:
     
    //GvG if( map_flag_gvg2(sd->bl.m) ) { timer->add(tick+1, pc->respawn_timer, sd->bl.id, 0); return 1|8; } else if( sd->bg_id ) { struct battleground_data *bgd = bg->team_search(sd->bg_id); if( bgd && bgd->mapindex > 0 ) { // Respawn by BG timer->add(tick+1000, pc->respawn_timer, sd->bl.id, 0); return 1|8; } }  
    Comment the following lines:
     
    } else if( sd->bg_id ) { struct battleground_data *bgd = bg->team_search(sd->bg_id); if( bgd && bgd->mapindex > 0 ) { // Respawn by BG timer->add(tick+1000, pc->respawn_timer, sd->bl.id, 0); return 1|8; }  
    And recompile. Now none of your BGs will do the automatic warp out, but you should ask them not to "go back to savepoint" because that will cause them to abandon BG.
  10. Upvote
    jaBote got a reaction from Only4fun in [Help] Battleground script   
    Oh, true. You get respawned because you still belong to a BG team.
     
    Look on your src/map/pc.c for something like this inside your pc_dead function:
     
    //GvG if( map_flag_gvg2(sd->bl.m) ) { timer->add(tick+1, pc->respawn_timer, sd->bl.id, 0); return 1|8; } else if( sd->bg_id ) { struct battleground_data *bgd = bg->team_search(sd->bg_id); if( bgd && bgd->mapindex > 0 ) { // Respawn by BG timer->add(tick+1000, pc->respawn_timer, sd->bl.id, 0); return 1|8; } }  
    Comment the following lines:
     
    } else if( sd->bg_id ) { struct battleground_data *bgd = bg->team_search(sd->bg_id); if( bgd && bgd->mapindex > 0 ) { // Respawn by BG timer->add(tick+1000, pc->respawn_timer, sd->bl.id, 0); return 1|8; }  
    And recompile. Now none of your BGs will do the automatic warp out, but you should ask them not to "go back to savepoint" because that will cause them to abandon BG.
  11. Upvote
    jaBote got a reaction from luis.seifert in [Help] Battleground script   
    Mapflags gvg, battlegrounds and gvg_castle cause this behavior. Once you're dead, you're immediately teleported back to savepoint (BG savepoint if on BG).
  12. Upvote
    jaBote reacted to Neo-Mind in [Guide] How to use a secondary ItemInfo file   
    Introduction
    Well this idea came up when evilpunker asked about the possibility of having a patch which loads a second file which overrides the iteminfo file. But there is a better way to do that with lua itself.
     
    How to do it?
    The key idea is that the item information is added using the main function by the client. so in your custom file you just need to modify the main function to accept your items. Here is how it can be done.
     
    -- Load the original file. As you might have guessed you can also load your translated file here instead -- (just make sure the "tbl" array contains your item info) dofile("System/iteminfo.lub") -- Now as a simple example . I am simply going to change name of Red Potion to Crimson Potion. -- But you can add anything in the same way. Format is same as the original one, just -- the table name is different tbl_custom = { [501] = { unidentifiedDisplayName = "Crimson Potion", unidentifiedResourceName = "»¡°£Æ÷¼Ç", unidentifiedDescriptionName = { "A potion made from", "grinded Red Herbs that", "restores ^000088about 45 HP^000000.", "^ffffff_^000000", "Weight: ^7777777^000000" }, identifiedDisplayName = "Crimson Potion", identifiedResourceName = "»¡°£Æ÷¼Ç", identifiedDescriptionName = { "^000088HP Recovery Item^000000", "A potion made from", "grinded Red Herbs that", "restores ^000088about 45 HP^000000.", "^ffffff_^000000", "Weight: ^7777777^000000" }, slotCount = 0, ClassNum = 0 }, } -- Now for a helper function because i hate repetitions -- It adds items from curTable if it is not present in refTable function itemAdder(curTable, refTable) for ItemID,DESC in pairs(curTable) do if refTable == nil or refTable[ItemID] == nil then result, msg = AddItem(ItemID, DESC.unidentifiedDisplayName, DESC.unidentifiedResourceName, DESC.identifiedDisplayName, DESC.identifiedResourceName, DESC.slotCount, DESC.ClassNum) if not result then return false, msg end for k,v in pairs(DESC.unidentifiedDescriptionName) do result, msg = AddItemUnidentifiedDesc(ItemID, v) if not result then return false, msg end end for k,v in pairs(DESC.identifiedDescriptionName) do result, msg = AddItemIdentifiedDesc(ItemID, v) if not result then return false, msg end end end end return true, "good" end -- And the newly designed main function function main() result, msg = itemAdder(tbl_custom, nil) -- add custom items (including official overrides) if result then result, msg = itemAdder(tbl, tbl_custom) -- add non-overridden official items end return result, msg end  
    How is it useful?
    Think how item_db2.txt is useful for adding custom items in a server. Its the same strategy here.
     
    You can keep your official items  in a base file (or you can just use the official iteminfo.lub file if you want the korean names)
           and keep your custom items in a different file (make sure the first dofile function calls the base file).
     
    The above code is error free, so feel free to copy and add your items . Hope the topic was not too confusing 
    The lua code can be further expanded for overriding only parts of an official item. But i will leave that update for the future
     
    P.S. The client should be patched to accept your custom file not the base file.   
     
    Screenshot 

     
  13. Upvote
    jaBote got a reaction from evilpuncker in Add two "missing" skills   
    Problem with RateMyServer is that it isn't an official source. Actually, it's based on rAthena's data, which we should take with a reasonable amount of grains of salt.
  14. Upvote
    jaBote got a reaction from Hadou Kaen in @whodrops full list?   
    No configs can change that AFAIK. @whodrops is limited by MAX_SEARCH constant in source, which is set in src/map/itemdb.h if I recall correctly. Either change that value from that file (which could also change any other feature in which it's used) or go to src/map/atcommand.c and go change MAX_SEARCH parameter to whatever number you want.
  15. Upvote
    jaBote reacted to KeyWorld in [Question] what kind of panel or source code is this?   
    WordPress.
  16. Upvote
    jaBote got a reaction from JulioCF in [RESOLVIDO]Game Master   
    Vocè deve adicionar o permiso "any_warp" para o grupo dos GMs no arquivo conf/groups.conf.
  17. Upvote
    jaBote got a reaction from Kian in [RESOLVIDO]Game Master   
    Vocè deve adicionar o permiso "any_warp" para o grupo dos GMs no arquivo conf/groups.conf.
  18. Upvote
    jaBote got a reaction from nakatto in [RESOLVIDO]Vip Grátis   
    Tente usã-lo nesta estrutura:
    - script VipGratis -1,{OnPCLoginEvent: if (#vipUsado) end; $nivelVip = 1; $diasVip = 7; query_sql("UPDATE `login` SET `group_id` = "+$nivelVip+", `data_vip` = DATE_ADD(CURDATE(),INTERVAL "+$diasVip+" DAY) WHERE `account_id` = "+getcharid(3)); #vipUsado = 1; end;}
  19. Upvote
    jaBote got a reaction from JulioCF in [RESOLVIDO]Vip Grátis   
    Tente usã-lo nesta estrutura:
    - script VipGratis -1,{OnPCLoginEvent: if (#vipUsado) end; $nivelVip = 1; $diasVip = 7; query_sql("UPDATE `login` SET `group_id` = "+$nivelVip+", `data_vip` = DATE_ADD(CURDATE(),INTERVAL "+$diasVip+" DAY) WHERE `account_id` = "+getcharid(3)); #vipUsado = 1; end;}
  20. Upvote
    jaBote got a reaction from Zirius in if (.@string$) fails, any alternative?   
    if(.@string$ != "") <this will be run for empty strings>
     
     
     
     
    strlen() script command doesn't exist. I assume you mean getstrlen().
     
    It's used like this:
    getstrlen("mystring"); // For fixed stringsgetstrlen(.@my_string_var$); // For strings in variables//You can even mix them up:getstrlen("Hello " + strcharinfo(0));  
    Just make sure you close all the brackets you open
  21. Upvote
    jaBote reacted to AnnieRuru in Guildmate position on minimap lags?   
    https://github.com/HerculesWS/Hercules/blob/master/src/map/guild.h#L16
  22. Upvote
    jaBote got a reaction from Nebraskka in Yommy is back?   
    I hate you both.
  23. Upvote
    jaBote got a reaction from Nebraskka in Yommy is back?   
    You mean something HERCsome?
  24. Upvote
    jaBote got a reaction from JulioCF in [RESOLVIDO]WoE   
    Por padrão, tudo castelo inicia o modo woe se não há nenhum clã em possessão desse castelo.
  25. Upvote
    jaBote got a reaction from Kian in [RESOLVIDO]WoE   
    Por padrão, tudo castelo inicia o modo woe se não há nenhum clã em possessão desse castelo.
×
×
  • Create New...

Important Information

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