Jump to content
  • 0

Tool Dealer Sell Function


Pacman360

Question


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  30
  • Reputation:   1
  • Joined:  04/25/14
  • Last Seen:  

Hello! How can I make this first option trigger selling window rather than buy? Thanks in Advance.

crystilia,72,88,3    script    Tool Dealer#prt    125,{
    mes "What do you like to buy?";
    switch( select( "Sell", "Ammunition Box", "Single Ammo", "Identify My Items", "Nothing" ) ) {
    next;
    case 1:
        callshop "Sell",1;
        end;

    case 2:
        callshop "AmmunitionBox",1;
        end;
    case 3:
        callshop "SingleAmmo",1;
        end;
    case 4:
        mes "Here you go";
        callfunc "identify123";
        end;
    case 5:
        mes "Okay, have a nice day";
        close;
        
    }
}
-    shop    Sell#shop::Sell    -1,501:-1
-    shop    Tool Dealer#shop::AmmunitionBox    -1,501:-1 // Add ammo box here
-    shop    Tool Dealer#shop::SingleAmmo    -1,502:-1 //single ammo add here

function    script    identify123    {
        getinventorylist;
            while( .@idn < @inventorylist_count ){
                if ( !@inventorylist_identify[.@idn] ){
                    delitem2 @inventorylist_id[.@idn],1,0,0,0,0,0,0,0;
                    getitem @inventorylist_id[.@idn],1;
                }
                .@idn++;
            }
close;
}

 

Edited by Mael
Use a codebox
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • -1

  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  355
  • Reputation:   34
  • Joined:  02/09/12
  • Last Seen:  

26 minutes ago, Pacman360 said:

....

Try looking in the script_commands.txt file in the docs folder

*callshop "<name>",<option>;

These are a series of commands used to create dynamic shops.
The 'callshop' function calls an invisible shop (view -1) as if the player clicked on it.

The options are:
    0 = The normal window (buy, sell and cancel)
    1 = The buy window
    2 = The sell window

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  30
  • Reputation:   1
  • Joined:  04/25/14
  • Last Seen:  

56 minutes ago, M45T3R said:

Try looking in the script_commands.txt file in the docs folder


*callshop "<name>",<option>;

These are a series of commands used to create dynamic shops.
The 'callshop' function calls an invisible shop (view -1) as if the player clicked on it.

The options are:
    0 = The normal window (buy, sell and cancel)
    1 = The buy window
    2 = The sell window

 

Thank you! Solved this case. regards. xx

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
Answer this question...

×   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...