Jump to content
  • 0

tool dealer with options


Question

5 answers to this question

Recommended Posts

  • 0
Posted (edited)
prontera,255,55,5	script	Tool Dealer#prt	125,{
	mes "What do you like to buy?";
	switch( select( "Ammunition Box", "Single Ammo", "Identify My Items", "Nothing" ) ) {
	next;
	case 1:
		callshop "AmmunitionBox",1;
		end;
	case 2:
		callshop "SingleAmmo",1;
		end;
	case 3:
		mes "Here you go";
		callfunc "identify123";
		end;
	case 4:
        mes "Okay, have a nice day";
        close;
        
	}
}

-	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 crazyarashi
  • Upvote 1
  • 0
Posted
On 9/21/2017 at 7:39 PM, crazyarashi said:

prontera,255,55,5	script	Tool Dealer#prt	125,{
	mes "What do you like to buy?";
	switch( select( "Ammunition Box", "Single Ammo", "Identify My Items", "Nothing" ) ) {
	next;
	case 1:
		callshop "AmmunitionBox",1;
		end;
	case 2:
		callshop "SingleAmmo",1;
		end;
	case 3:
		mes "Here you go";
		callfunc "identify123";
		end;
	case 4:
        mes "Okay, have a nice day";
        close;
        
	}
}

-	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;
}

 

thanks for this but how to make it into a bindatcmd like @shop then the category will shown thanks

  • 0
Posted
15 hours ago, Katakuri said:

thanks for this but how to make it into a bindatcmd like @shop then the category will shown thanks

prontera,255,55,5	script	Tool Dealer#prt	125,{
OnAtShopCmd:
	mes "What do you like to buy?";
	switch( select( "Ammunition Box", "Single Ammo", "Identify My Items", "Nothing" ) ) {
	next;
	case 1:
		callshop "AmmunitionBox",1;
		end;
	case 2:
		callshop "SingleAmmo",1;
		end;
	case 3:
		mes "Here you go";
		callfunc "identify123";
		end;
	case 4:
        mes "Okay, have a nice day";
        close;        
	}
end;

OnInit:
	bindatcmd "shop",strnpcinfo(0)+"::OnAtShopCmd",0,99;
end;

}

-	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;
}

to make the NPC invisible. change the first line to
 

	script	Tool Dealer#prt	-1,{
  • Upvote 1
  • 0
Posted

Hi there, Im trying to make it duplicate npc but it doesn't work.

Please guide me what to do.

Thanks!

-    script    Tools Dealer::Tools Dealer    -1,{
OnAtShopCmd:
	mes "How are you?";
	mes "What do you like to buy?";
	switch( select( "Ammunition Box", "Single Ammo", "Identify My Items", "Nothing" ) ) {
	next;
	case 1:
		callshop "AmmunitionBox",1;
		end;
	case 2:
		callshop "SingleAmmo",1;
		end;
	case 3:
		mes "Here you go";
		callfunc "identify123";
		end;
	case 4:
        mes "Okay, have a nice day";
        close;        
	}
end;

OnInit:
	bindatcmd "shop",strnpcinfo(0)+"::OnAtShopCmd",0,99;
end;

}

-	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;
}

prontera,163,188,5    duplicate(Tools Dealer)    Tools Dealer#prt    811
geffen,129,66,4    duplicate(Tools Dealer)    Tools Dealer#gef    811

 

  • 0
Posted
On 4/26/2020 at 12:30 AM, ahloi007 said:

Hi there, Im trying to make it duplicate npc but it doesn't work.

Please guide me what to do.

Thanks!


-    script    Tools Dealer::Tools Dealer    -1,{
OnAtShopCmd:
	mes "How are you?";
	mes "What do you like to buy?";
	switch( select( "Ammunition Box", "Single Ammo", "Identify My Items", "Nothing" ) ) {
	next;
	case 1:
		callshop "AmmunitionBox",1;
		end;
	case 2:
		callshop "SingleAmmo",1;
		end;
	case 3:
		mes "Here you go";
		callfunc "identify123";
		end;
	case 4:
        mes "Okay, have a nice day";
        close;        
	}
end;

OnInit:
	bindatcmd "shop",strnpcinfo(0)+"::OnAtShopCmd",0,99;
end;

}

-	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;
}

prontera,163,188,5    duplicate(Tools Dealer)    Tools Dealer#prt    811
geffen,129,66,4    duplicate(Tools Dealer)    Tools Dealer#gef    811

 

The NPC call use Command @shop do not need to be duplicate

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.

  • Recently Browsing   0 members

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