Jump to content

Utility: Dynamic Shop Template


Ehwaz

Recommended Posts


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  50
  • Reputation:   9
  • Joined:  01/09/12
  • Last Seen:  

Utility: Dynamic Shop Template


Script functions help you easy to create and edit dynamic shop.

Only support Zeny and Item as currency and OnBuy

Install:

1. Load file traderFunctions.txt

2. Copy template from file sample_templ_shop.txt

3. Edit shop name, list items and business logic you want

4. Load shop you edited.

 

guide.png


  • Submitter
  • Submitted
    06/01/2018
  • Category
  • Video
  • Content Author
    Ehwaz

 

Edited by Ehwaz
Edit title
  • Upvote 2
  • Love 1
Link to comment
Share on other sites

  • 1 year later...

  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  704
  • Reputation:   16
  • Joined:  01/07/12
  • Last Seen:  

hye is it possible to add 2 or more as item currency, as current only shown only 1 item can be set as currency

Edited by dolphincute
Link to comment
Share on other sites

  • 1 year later...

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  29
  • Reputation:   2
  • Joined:  08/11/12
  • Last Seen:  

hi, thank you for the script, really use full, but I dont know why the shop doesn't work after I put 8 items.

there is an option to add more than 8 items?

I dont know if is because I clone it in the same script.

//	Author: Ehwaz
//	Version: 2018/06/01

// Dummy shop to insert items into:
-	shop	templ_shop	-1,501:50.

prontera,147,158,5	script	Templ Shop	20610,{
	dispbottom DisplayCurrency(.currency);
	callshop .shop_name$,1;
	npcshopattach .shop_name$;
	end;
OnBuyItem:
	BuyProcess(.priceList, .currency);
OnInit:
	.shop_name$ = "templ_shop";
	.npcName$ 	= strnpcinfo(1);	//Visiable name
	.currency 	= 7517;				// 0: Zeny, else Item

	setarray .items,18119,1,	//Thanos_Bow
					15380,5, //Lava_Leather_Robe
					15378,5, //Lava_Leather_Armor
					15379,3, //Lava_Leather_Suits
					20935,3, //Lava_Leather_Manteau
					20936,3, //Lava_Leather_Muffler
					20937,2, //Lava_Leather_Hood
					5658,20; //Imp_Hat
					
	InitItemShop(.items,.shop_name$,.npcName$);
	end;
}
-	shop	templ_shop1	-1,501:50.


prontera,147,155,5	script	Templ Shop2	1_M_WIZARD,{
	dispbottom DisplayCurrency(.currency);
	callshop .shop_name$,1;
	npcshopattach .shop_name$;
	end;
OnBuyItem:
	BuyProcess(.priceList, .currency);
OnInit:
	.shop_name$ = "templ_shop1";
	.npcName$ 	= strnpcinfo(1);	//Visiable name
	.currency 	= 0;				// 0: Zeny, else Item

	setarray .items,523,rand(11111,22222),	//Holy_Water
					19935,200000000, //C_Hunting_Cap_Of_Gust
					2860,rand(1200,5999999),	//Aqua_Orb
					15026,rand(2400,5999999),	//Aqua_Robe	
					2468,rand(2400,5999999),	//Aqua_Shoes	
					6456,15000000,	//Guarantee_Weapon_5Up
					6457,18000000,	//Guarantee_Armor_5Up
					15117,12000000,	//Felock_Armor
					20744,12000000,	//Felock_Cape
					22047,12000000,	//Felock_Boots
					2581,18000000,	//Black_Wing_Manteau
					2480,18000000,	//Black_Wing_Boots
					20373,10000000;	//C_Watermelon_Hat
					
	InitItemShop(.items,.shop_name$,.npcName$);
	end;
}

 

Edited by ffman22
add code
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
Reply to this topic...

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