Jump to content

Recommended Posts

Posted (edited)

Example:

12935,Infiltrator_Box,Infiltrator Box,18,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ rentitem 1267,604800; },{},{}

rentitem <itemID>,<duration>;

rentitem 1267,604800;

read this for more info about rentitem

[spoiler=rentitem]*rentitem <item id>,<time>;
*rentitem "<item name>",<time>;

Creates a rental item in the attached character's inventory. The item will expire
in seconds and be automatically deleted. When receiving a rental item,
the character will receive a message in their chat window. The character will
also receive warning messages in their chat window before the item disappears.

This command can not be used to rent stackable items. Rental items cannot be
dropped, traded, sold to NPCs, or placed in guild storage. (i.e. trade mask 75)
Note: 'delitem' in an NPC script can still remove rental items.

Edited by LuLu
  • Upvote 1
Posted

yes. it's using iteminfo.lua.add mo dun ung mga clientside data.pra d unknown item

no need na ung itemslotcounttalbe and itemslottable.

Posted

I have made a simple dynamic shop last time. You can use this and post if any error occur : 

-    shop    dynamicshop    -1,501:20000
prontera,150,150,0    script    Dynamic Shop    100,{
    callshop "dynamicshop",1;
    npcshopattach "dynamicshop";
    end;
    
    OnBuyItem:
        for ( set .@j, 0; .@j < getarraysize(.items); set .@j, .@j + 2 ) {
            for ( set .@k, 0; .@k < getarraysize(@bought_nameid); set .@k, .@k + 1 ) {
                if ( @bought_nameid[.@k] == .items[.@j] ) {
                    if ( checkweight( @bought_nameid[.@k], @bought_quantity[.@k] ) ) {
                        if ( countitem(.currency) < .items[.@j+1] || countitem(.currency) < ( .items[.@j+1] * @bought_quantity[.@k] ) )
                            dispbottom "You don't have enough " +getitemname(.currency)+ " to purchase this item.";
                        else {
                            delitem .currency, .items[.@j+1] * @bought_quantity[.@k];
                            getitem @bought_nameid[.@k], @bought_quantity[.@k];
                        }
                    } else dispbottom "You cannot carry out more items with you";
                }
            }
        }
        deletearray @bought_quantity, getarraysize(@bought_quantity);
        deletearray @bought_nameid, getarraysize(@bought_nameid);
        end;


    OnInit:
        set .currency, 7227; // TCG is used to buy items
        setarray .items, 4001,5,7227,100; // Usage : <item id>,<price>
        npcshopitem "dynamicshop",0,0;
        for ( set .@i, 0; .@i < getarraysize(.items); set .@i, .@i + 2 )
            npcshopadditem "dynamicshop",.items[.@i],.items[.@i+1];
        end;
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...