Jump to content

miyakee

Members
  • Posts

    25
  • Joined

  • Last visited

Posts posted by miyakee

  1. I have this error when im going to recompile the server (Make SQL)

    I edit the script.c, added this function

    BUILDIN_FUNC(failedrefitemR) // by jakeRed

    {

    int i=-1,num;

    TBL_PC *sd;

    num=script_getnum(st,2);

    sd = script_rid2sd(st);

    if( sd == NULL )

    return 0;

    if (num > 0 && num <= ARRAYLENGTH(equip))

    i=pc_checkequip(sd,equip[num-1]);

    if(i >= 0) {

    //Logs items, got from (N)PC scripts [Lupus]

    if(log_config.enable_logs&0x40)

    log_pick_pc(sd, "N", sd->status.inventory.nameid, -1, &sd->status.inventory);

    sd->status.inventory.refine = sd->status.inventory.refine - 3;

    pc_unequipitem(sd,i,2); // status calc will happen in pc_equipitem() below

    clif_refine(sd->fd,0,i,sd->status.inventory.refine);

    clif_delitem(sd,i,1,2);

    if(log_config.enable_logs&0x40)

    log_pick_pc(sd, "N", sd->status.inventory.nameid, 1, &sd->status.inventory);

    clif_additem(sd,i,1,0);

    clif_misceffect(&sd->bl,2);

    }

    return 0;

    }

    Btw, im using Rathena server. Hope you could help me..

    > r/include -c -o obj_sql/script.o script.c

    > script.c: In function âbuildin_failedrefitemRâ

    > :script.c:7045: error: incompatible type for argument 2 of âlog_pick_pc

    > âscript.c:7045: warning: passing argument 4 of âlog_pick_pcâ makes pointer from integer without a cast

    > script.c:7045: error: too many arguments to function âlog_pick_pc

    > âscript.c:7054: error: incompatible type for argument 2 of âlog_pick_pc

    > âscript.c:7054: warning: passing argument 4 of âlog_pick_pcâ makes pointer from integer without a cast

    > script.c:7054: error: too many arguments to function âlog_pick_pc

  2. [ Update ] : Updated Refine Function Script :

    Description :

    It is a Function Script for Refine Equipment without Failure Rate. The script are now able to use indenpendently in a NPC or an Item. Which mean, you can create multiple or numerous NPC Script + Items Script for Refining in your server. All of the Setting are independent..will not affect each others.

    This Script will be able to answer / solve those below problems.

    Please make me 1 100% Refiner +1 until +7.......

    Please make me 1 100% Refiner +1 until + 10 .......

    Please make me a Refine Ticket .....

    and so on......


    The BitMask Table :

    //--- Bitmasks ----
    // 1 - Top Headgear
    // 2 - Armor
    // 4 - Left Hand
    // 8 - Right Hand
    // 16 - Garment
    // 32 - Shoes
    // 64 - Left Accessory
    // 128 - Right Accessory
    // 256 - Middle Headgear
    // 512 - Lower Headgear

    If you want to allow the refine on those part....then just put in the Number ( for Single Part Refiner ) or Add in all the Number ( for Multiple Part Refiner )

    For Example :

    A Refiner that can refine Top Headgear Only ( BitMask = 1 )

    A Refiner that can refine Both Left / Right Accessory Only ( BitMask = 126 + 64 = 190 )

    A Refiner that can refine Armor / Garment / Shoes Only ( BitMask = 2 + 16 + 32 = 50 )

    and etc.....


    Function Script Calling :

    callfunc( "RefineFunc",<itemID>,<BitMasks>,<MaxRefine>,<CheckEquip>,<RefineMode> );

    Explaination on Each Argument :

    // itemID -> Item that will be used.
    // BitMask -> Refer to above bitmask table.
    // MaxRefine -> What is the Max Refine. [ Can Bypass Default Server Max Refine ]
    // CheckEquip -> Check Equipments is Refineable or not. [ 0 = Disable / 1 = Enable ]
    // RefineMode -> +1 / Max Refine. [ 0 = +1 Refine / 1 = Max Refine ]


    Sample Script :

    Use as Item ( Refine Ticket ) :

    501,Red_Potion,Red Potion,11,50,,70,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc( "RefineFunc",501,63,10,1,1 ); },{},{}

    Caution : Change Item Type to 11

    Use as NPC Script ( Custom 100% Refiner ) :

    prontera,155,181,5 script Refiner 757,{
    callfunc( "RefineFunc",501,63,10,1,1 );
    }
    

    You can create as many NPC / Items for refine as you want to...

    just make sure youprovide the correct Settings.

    With this script, you can create several NPC that can allow users to refine items 100% success using certain items and different max refine level.

    So, that your server wont need to focus on using 1 NPC. You can make 1 NPC for refine +5 / +6 / +7 using Elunium without fail, then you can further the refine to +8 / +9 using another NPC with different Items, and lastly +10 another NPC. It is all up to you.

    Refine Function [ Version 4 ]

    Changelog :

    • [ Version 1 ] - Cleaner and Compact than previous version.
    • [ Version 2 ] - Enable simple Customization on script.
    • [ Version 3 ] - Fixed some mistake typo and bug.
    • [ Version 4 ] - More Customized and able to apply on Multi NPC / Items with Independent Settings.

    Scripts : View Download

    Please spend your time to read all the things i have write / mentioned in the post before you asking any questions.

    if got bug / problems please do report to me. ani_heh.gif

    Good Morning Emistry,

    Im looking for an NPC refiner that if it refine fails, it will still get the item and does not destroyed

×
×
  • Create New...