Jump to content
  • 0

tool dealer with options


Quesooo

Question


  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.08
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

hi good day can i request a tool dealer with options like this

 

image.png.7a14369744b31559cd031cf601fd0e87.png

 

thank you

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  50
  • Topics Per Day:  0.02
  • Content Count:  763
  • Reputation:   227
  • Joined:  02/11/17
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  110
  • Reputation:   56
  • Joined:  05/29/18
  • Last Seen:  

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

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  477
  • Reputation:   269
  • Joined:  06/13/17
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  78
  • Reputation:   1
  • Joined:  10/15/12
  • Last Seen:  

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

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  491
  • Reputation:   19
  • Joined:  11/19/11
  • Last Seen:  

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

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