Jump to content

plankt

Members
  • Posts

    130
  • Joined

  • Last visited

Posts posted by plankt

  1. *setcell "<map name>",<x1>,<y1>,<x2>,<y2>,<type>,<flag>;

    Each map cell has several 'flags' that specify the properties of that cell.

    These include ... no vending ...

    Examples:

    setcell "arena",0,0,300,300,cell_basilica,1;
    setcell "arena",140,140,160,160,cell_basilica,0;
    setcell "arena",135,135,165,165,cell_walkable,0;
    setcell "arena",140,140,160,160,cell_walkable,1;
    

    From const.txt:

    cell_walkable 0
    cell_shootable 1
    cell_water 2
    cell_npc 3
    cell_basilica 4
    cell_landprotector 5
    cell_novending 6
    cell_nochat 7
    

    • Upvote 1
  2. You can actually have quotes (') around integers, it's not recommended but often easier if you don't know if you're using strings or integers. Often with dynamic content.

    The delete statement in MySQL is

    "DELETE FROM <table> WHERE <where condition>"

    So you would not get (adding extra spaces for clarity)

    "DELETE `" + .@b$[.@c] + "` FROM `" + .@g$ + "` WHERE `id` = ' " + .@f + " ' "
    

    But rather (not totally sure what the variables are but I'm guessing .@b$ is the field)

    "DELETE FROM `" + .@g$ + "` WHERE `" + .@b$[.@c] + "` = ' " + .@f + " ' "
    

    • Upvote 1
  3. Inside "src\map\status.h" you will find this section:

    /**
    * Max Refine available to your server
    * Changing this limit requires edits to refine_db.txt
    **/
    #ifdef RENEWAL
    # define MAX_REFINE 20
    #else
    # define MAX_REFINE 10
    #endif
    

    What it says is, if you have renewal, max refine rate will be 20, otherwise it'll be 10. You can change this for any value you want above 10.

    You will need to re-compile after changing this.

    • Upvote 1
  4. If you're looking for the refiner scripts, they are in the folder "npc\merchants\"

    If you want to know the commands required for refining:

    *successrefitem <equipment slot>;

    This command will refine an item in the specified equipment slot of the invoking

    character by +1. For a list of equipment slots see 'getequipid'. This command

    will not only add the +1, but also display a 'refine success' effect on the

    character and put appropriate messages into their chat window. It will also give

    the character fame points if a weapon reached +10 this way, even though these

    will only take effect for blacksmith who will later forge a weapon.

    The official scripts seems to use the 'successrefitem' command as a function

    instead: 'successrefitem(<number>)' but it returns nothing on the stack.

    This is since jAthena, so probably nobody knows for sure why is it so.

    ---------------------------------------

    *failedrefitem <equipment slot>;

    This command will fail to refine an item in the specified equipment slot of the

    invoking character. The item will be destroyed. This will also display a 'refine

    failure' effect on the character and put appropriate messages into their chat

    window.

    The official scripts seems to use the 'failedrefitem' command as a function

    instead: 'failedrefitem(<number>)' but it returns nothing on the stack. This is

    since jAthena, so probably nobody knows for sure why is it so.

    ---------------------------------------

    *downrefitem <equipment slot>;

    This command will downgrade an item by - 1 in the specified equipment slot of the

    invoking character. So the item will not be destroyed unlike in the failedrefitem script command.

    This will also display a 'refine failure' effect on the character and put appropriate

    messages into their chat window.

    The official scripts seems to use the 'downrefitem' command as a function

    instead: 'downrefitem(<number>)' but it returns nothing on the stack. This is

    since jAthena, so probably nobody knows for sure why is it so.

  5. *specialeffect2 <effect number>{,<send_target>{,"<Player Name>"}};

    This command behaves identically to the 'specialeffect', but the effect will be

    centered on the invoking character's sprite.

    <Player name> parameter will display <effect number> on another Player than the

    one currently attached to the script. Like with specialeffect, when specifying

    a player, <send_target> must be supplied, specifying AREA will retain the default

    behavior of the command.

    Example:

    prontera,159,189,4 script Test 123,{
       specialeffect2 12;
    }
    

  6. You can put that message above:

    Line 31: close;
    

    Here's simplified what lines 21 -> 33 does:

    21: for( each item ){
    22:   if( you dont have enough of an item ){
    23:	 mes "Reward : <item id> x <item amount>";
    24:	 <filler line>
    25:	 mes "then bring me those items :";
    26:	 <filler line>
    27:	 mes < zeny required >
    28:	 for( each required item ){
    29:	   mes < items required >
    30:	 }
     :	 // Here you want to print your message
    31:	 close;
    32:   }
    33: }
    

  7. Just to clarify. The color code consists of 3 hex numbers.

    The first is how much red, the second is how much green and the last for blue.

    ^XXXXXX

    You can change the amount of each color to make different colors.

    The values goes from 00 to FF (255) using hexadecimal numbers (1-9, A-F)

    • Upvote 1
  8. As item script:

    set .@hp, MaxSp-MaxHp; set .@sp, MaxHp-MaxSp; bonus bMaxHP, .@hp; bonus bMaxSP, .@sp;

    Will bug a bit if you put stats while the item is equipped. Solved by re-equipping the item.

  9. I just started my time off for summer which means I'll have plenty of time, which means that if there's interest in this I could bring it up again. I won't start it unless at least 3 members show interest to join.

    @peopleperson49,

    All scripts will be private until rated, then the thought was to publicly release them, with full credits to the scripter of course.

    This is because the contest itself is for coders to improve by working with/against others on similar codes. Maybe catch up on a smart way someone solved an issue you had.

    And how do you know the judge won't steal your work? ;)

×
×
  • Create New...