Jump to content
gyroguevarra

Paano ba gumawa ng rental box

Recommended Posts

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
Link to comment
Share on other sites

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

no need na ung itemslotcounttalbe and itemslottable.

Link to comment
Share on other sites

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 [email protected], 0; [email protected] < getarraysize(.items); set [email protected], [email protected] + 2 ) {
            for ( set [email protected], 0; [email protected] < getarraysize(@bought_nameid); set [email protected], [email protected] + 1 ) {
                if ( @bought_nameid[[email protected]] == .items[[email protected]] ) {
                    if ( checkweight( @bought_nameid[[email protected]], @bought_quantity[[email protected]] ) ) {
                        if ( countitem(.currency) < .items[[email protected]+1] || countitem(.currency) < ( .items[[email protected]+1] * @bought_quantity[[email protected]] ) )
                            dispbottom "You don't have enough " +getitemname(.currency)+ " to purchase this item.";
                        else {
                            delitem .currency, .items[[email protected]+1] * @bought_quantity[[email protected]];
                            getitem @bought_nameid[[email protected]], @bought_quantity[[email protected]];
                        }
                    } 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 [email protected], 0; [email protected] < getarraysize(.items); set [email protected], [email protected] + 2 )
            npcshopadditem "dynamicshop",.items[[email protected]],.items[[email protected]+1];
        end;
}
Link to comment
Share on other sites

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.



×
×
  • Create New...

Important Information

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