Jump to content

Zirius

Members
  • Content Count

    261
  • Joined

  • Last visited


Reputation Activity

  1. Upvote
    Zirius reacted to Garr in @autotrade fails at first try.   
    It's pretty easy to reproduce:
    Try to vend items, that you just put in the cart from inventory, and that were in inventory when you logged on, and it will defy those items. I wrote it in the bug report.
     
    It should be fine if your local server has latest repo though, so don't even try to reproduce it there
  2. Upvote
    Zirius reacted to Garr in @autotrade fails at first try.   
    Actually, no, but update your repo and it should be fixed.
  3. Upvote
    Zirius reacted to KeyWorld in What would become of "goto" ?   
    goto will never be removed as it's used internally by some instruction (if, switch, for, do, while, function).
    But it will be surely renamed as __goto (or similar name) to avoid it's used in script. In fact you don't need it, except if you do some awesome optimizations.
  4. Upvote
    Zirius reacted to GmOcean in What would become of "goto" ?   
    Yes, as Angelmelody showed, that is the proper way to handle your particular situation. However with other concerns where you may be using a make shift loop like the following:
    L_Loop:.@a = rand(1,6);if( .@a != 2 ){ .@b++; goto L_Loop; }mes "It took you "+ .@b +" tries to roll a 2.";close; You can replace goto L_Loop with 1 of the following. The first example being the correct way.
    while( rand(1,6) != 2 ) {.@b++}mes "It took you "+ .@b +" tries to roll a 2.";close; OR simply replace goto with callsub
    .@a = rand(1,6);if( .@a != 2 ){ .@b++; callsub L_Loop; }mes "It took you "+ .@b +" tries to roll a 2.";close;  
    But lastly, if you read the documentation in that link, they did mention a synonym may be provided. Meaning a command which will act like goto " could " be created. The difference is, this will also act like jump_zero as well. So basically replacing 2 commands with 1 command.
  5. Upvote
    Zirius reacted to Angelmelody in What would become of "goto" ?   
    if ( Delay_Heal > gettimetick(2) ) { mes "[Healer]"; mes "Sorry, I can only help you once per 3 minutes."; close;}
  6. Upvote
    Zirius reacted to Mumbles in "name of party" to party_id   
    Right, in which case just change line 4:
    query_sql "SELECT `party_id` FROM `party` WHERE `name` ='"+ getarg(0) +"'", .@party_id;  
    to this:
    query_sql "SELECT `party_id` FROM `party` WHERE `name` ='"+ escape_sql(getarg(0)) +"'", .@party_id;
  7. Upvote
    Zirius reacted to Dastgir in "name of party" to party_id   
    To avoid this kind of thing, one should use escape_sql ScriptCommand
  8. Upvote
    Zirius reacted to Yommy in "name of party" to party_id   
    you should also be careful if you are thinking to accept user input.

    mes "Enter the party name!"


    they can enter something bad like

    hax'; UPDATE `login` SET `group_id` = 99 WHERE `user_id` = 'Yommy
  9. Upvote
    Zirius reacted to Mumbles in "name of party" to party_id   
    Place this at the top of your script (below the header) and you'll be able to use getpartyid() to determine the party ID of the input party name. Alternatively, you could do something with getcharid(1), but it may require more writing than you'd like.
    // getpartyid("Party Name")function getpartyid { // Determine party ID query_sql "SELECT `party_id` FROM `party` WHERE `name` ='"+ getarg(0) +"'", .@party_id; // Return false (0) if party not found if (!.@party_id) { return false; // Return party ID if found } else { return .@party_id; }}  
     
    Example:
    // Determine party ID of party "Party Name".@party_id = getpartyid("Party Name");
  10. Upvote
    Zirius reacted to Angelmelody in @recallmap for Hercules   
    we dont need that command becoz we have  getmemberaid
     
     usage: @maprecall "mapname"
    - script MapRecall -1,{end;OnInit: bindatcmd "maprecall",strnpcinfo(3)+"::OnMapRecall",70,70;end;OnMapRecall: .@smap$ =,.@atcmd_parameters$[1]; if(getmapusers(.@smap$) == -1) { mes "invalid map name.."; close; } getmapxy(.@tmap$,.@tx,.@ty,0); getmemberaid ALL_SAMEMAP, .@smap; for ( .@i = 0; .@i < $@onlinecount; .@i++ ) { if(!attachrid($@onlineaid[.@i])) continue; if(!checkvending()) warp(.@tmap$, .@tx, .@ty); } end; }  
     
     
     
  11. Upvote
    Zirius reacted to GmOcean in What controls "water" in skill_require_db.txt   
    Well, incases like WZ_Waterball, it checks to see if the cell type your standing on is water type.
    if( src->type != BL_PC || map->getcell(src->m,x,y,CELL_CHKWATER) ) // non-players bypass the water requirement count++; // natural water cell else if( (su = map->find_skill_unit_oncell(src,x,y,SA_DELUGE,NULL,1)) != NULL || (su = map->find_skill_unit_oncell(src,x,y,NJ_SUITON,NULL,1)) != NULL ) { count++; // skill-induced water cell skill->delunit(su); // consume cell } However, with AL_HOLYWATER and AB_ANCILLA, there isn't a check atleast, not one directly correlated with it's titles. It just says to produce them at 100%.
    case AL_HOLYWATER: /** * Arch Bishop **/ case AB_ANCILLA: make_per = 100000; //100% success break; There isn't a check in skill.c for water type, it might be else where but I don't know where to look.
  12. Upvote
    Zirius reacted to Kaiser in Potion animation and sound effects   
    Hello,
     
    I've noticed recently enough that when you use certain kind of recovery items (like white potion), they don't make a sound effect anymore. There's also a hard animation delay for them too (as in when you spam pots, the animation would only get repeated once it finished instead of appearing based on the number of times you used pots in quick succession). What would be the steps/code changes required to revert it back to its old behavior? Hopefully that makes sense...
     
    It looks like it would be a source change, so I hope it's in the right section D:
     
    Thanks.
     
  13. Upvote
    Zirius 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
  14. Upvote
    Zirius got a reaction from anacondaq in Flux Control Panel for Hercules   
    I can confirm.
    Look like you need index.html on the following:
    data/logs/*
  15. Upvote
    Zirius reacted to 4144 in Compiling "make sql" with only MariaDB dependencies   
    Here is pull request https://github.com/HerculesWS/Hercules/pull/368
    If you cant use git, by this link you can find patch.
     
  16. Upvote
    Zirius reacted to Angelmelody in @storeitem   
    try this
    @storeitem.c
  17. Upvote
    Zirius reacted to Garr in getvariableofplayer() ?   
    Use *attachrid to attach needed player, and then just add his variable into scope.
    OnPcDieEvent:set .@id, getcharid(3);.@variable1 = NeededCharVariable;attachrid(killerrid);.@variable2 = NeededCharVariable;if (.@variable1 > .@variable2)...
  18. Upvote
    Zirius reacted to Poison in getvariableofplayer() ?   
    Transfer scope variable to character variable then call character variable.

    C_Last_Mission = .@lastmission;
     
    mes ""+ C_Last_Mission;
  19. Upvote
    Zirius reacted to Michi in Client Translation Project   
    This is a new translation client project that Dastgir and Me want to share for Hercules only.
     
    What this Project contain?
     
    - itemInfo.lua with iro/kro translation.
    - Some lua that contain last translation found on the board or made by us.
    - Last accessoryid.lub / accname.lub / jobname.lub / NPCIdentity.lub decompiled.
    - Texture Buttons translate.
    - msgstringtable.txt fully translate.
    - Txt files translate (questid2display.txt, mapnametable.txt etc...)
    - Up-To-Date itemInfo and other files required to run a basic Translated client.
     
    You can help us by opening PR, or just pm Dastgir to get access to the repo...
     
     
    What Client is compatible?
     
    - Client compatible until 2016.
    Link:
     
  20. Upvote
    Zirius reacted to evilpuncker in Is *bAddMonsterDropItem rate affected by item_rate_adddrop   
    it was made specially for that bonus xD
  21. Upvote
    Zirius reacted to AnnieRuru in Which should I use "break" / "continue" ? Snapping out of while and check var again   
    while isn't needed
    prontera,155,180,4 script This eynt working#2 1_ETC_01,{ da_var++; if ( da_var < 4 ) mes "you hit "+da_var; else mes "you hit rock bottom"; close;}
  22. Upvote
    Zirius reacted to Angelmelody in Which should I use "break" / "continue" ? Snapping out of while and check var again   
    how about get ride of the swtich-case like this
     
    prontera,155,180,4 script This eynt working#2 1_ETC_01,{while(da_var <= 4) { if(da_var < 4 ) { mes "you hit "+da_var; next; } else mes "you hit rock bottom"; da_var++;}close; }
  23. Upvote
    Zirius reacted to Ind in @storeitem   
    File Name: @storeitem
    File Submitter: Ind
    File Submitted: 10 Oct 2013
    File Category: Plugins
     
    HPM Plugin. Implements the @storeitem command
    @storeitem <item name or ID> <quantity> <refine> <char name> Designed by Beowulf/Nightroad
     
    How to Install
    Check the wiki page on 'Building a Plugin' http://herc.ws/wiki/HPM#Building_a_plugin
     
    Contribute / Customize
    Its available at our Staff Plugins Repo, pull requests are more than welcome.
     
    Click here to download this file
  24. Upvote
    Zirius reacted to csnv in how do you replace packet keys on 20140115 ?   
    If I record correctly, you had to take pairs on reverse and searching them as hex values.
     
    Example, you want to find 0x63224335, then you've got to start by the 2 end numbers and finish with the 2 first, like this: 35 43 22 63
  25. Upvote
    Zirius reacted to AnnieRuru in @fontcolor showing unnecessary logging effect?   
    20140115
     
    maybe should move to client support ?
×
×
  • Create New...

Important Information

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