Pacman360 Posted June 1, 2021 Share Posted June 1, 2021 (edited) 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( [email protected] < @inventorylist_count ){ if ( [email protected]_identify[[email protected]] ){ delitem2 @inventorylist_id[[email protected]],1,0,0,0,0,0,0,0; getitem @inventorylist_id[[email protected]],1; } [email protected]++; } close; } Edited June 1, 2021 by Mael Use a codebox Quote Link to comment Share on other sites More sharing options...
0 M45T3R Posted June 1, 2021 Share Posted June 1, 2021 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 Quote Link to comment Share on other sites More sharing options...
0 Pacman360 Posted June 1, 2021 Author Share Posted June 1, 2021 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 Quote Link to comment Share on other sites More sharing options...
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( [email protected] < @inventorylist_count ){ if ( [email protected]_identify[[email protected]] ){ delitem2 @inventorylist_id[[email protected]],1,0,0,0,0,0,0,0; getitem @inventorylist_id[[email protected]],1; } [email protected]++; } close; }
Edited by MaelUse a codebox
Link to comment
Share on other sites