Jump to content
  • 0
Tio Akima

Barter shop doubt

Question

Hi
I wanted to do a Barter shop

however, in the same npc, put a menu for the player to choose which Barter shop he wants to enter ....
How can I do this?

 

exmp:
 

switch(select("- Shop 1:- Shop 2:- Shop 3:- not..thanks.."))
{

        case 1: 
        callshop " Shop 1",1;
        end;

        case 2: 
        callshop " Shop 2",1;
        end;

        case 3: 
        callshop " Shop 3",1;
        end;

        case 4: 
        end;

}

OnInit: {
            sellitem White_Herb, 100, Red_Potion, 2;
            sellitem Blue_Herb, 200, Red_Potion, 3;
            sellitem Green_Herb, 100, Red_Potion, 4;
            sellitem White_Herb, 100, Red_Potion, 1;
             end;
                        
    }

How to call Barter shop and separate items in shop ?

it's possible?

 

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 2

try this way:

-	trader	Shop1	FAKE_NPC,{

OnInit:
	tradertype(NST_BARTER);
	sellitem White_Herb, 100, Red_Potion, 2;
	sellitem Blue_Herb, 200, Orange_Potion, 3;
	end;
}

-	trader	Shop2	FAKE_NPC,{

OnInit:
	tradertype(NST_BARTER);
	sellitem Green_Herb, 100, Red_Potion, 4;
	sellitem White_Herb, 100, Orange_Potion, 1;
	end;
}

-	trader	Shop3	FAKE_NPC,{

OnInit:
	tradertype(NST_BARTER);
	sellitem Apple, -1, Orange_Potion, 1;
	sellitem Praetorian_Shield, 100, Berserk_Potion, 10;
	end;
}


prontera,159,284,4	trader	Barter Shop	4_M_KID1,{

	mes "Select the shop for open!";
	switch(select("Shop 1:Shop 2:Shop 3"))
	{
		case 1: close2; openshop "Shop1"; break;				
		case 2: close2; openshop "Shop2"; break;
		case 3: close2; openshop "Shop3"; break;
	}
	end;
}

 

Share this post


Link to post
Share on other sites
  • 0

try use two or more npcs. Even at same position if you want shops hidden.

 

also for barter shops you must set shop type. in your example type is missing

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

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