Barter shop doubt

Tio Akima

New member
Messages
349
Points
0
Age
36
Discord
TioAkima#0636
Github
Tio Akima
Emulator
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?

 
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

 
try this way:

Code:
-	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;
}
 
@4144 
@Hyroshima

Thank you for your help! it worked. ty

[SOLVED]

 
Back
Top