Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MessageData=Info[0].replace(`=`,`%20`).split(`%20`);
- PlusMinus=MessageData[2];
- PlusMinusTotal=MessageData[3];
- Message=Info[1];
- ItemName=Info[2];
- TotalReward=Info[3];
- ShopItems=``;
- ShopItemsPrice=``;
- R=`If you see this your not supposed to.`;
- for(x in Settings.Shop.Items)
- {ShopItems+=`,`+x};
- ShopList=ShopItems.toLowerCase().slice(1).split(`,`);
- ShopListU=ShopItems.slice(1).split(`,`);
- for(a in Settings.Shop.Items)
- {ShopItemsPrice+=` | `+Settings.Shop.Items[ShopListU[ShopListU.indexOf(a)]].Name+`-`+Settings.Shop.Items[ShopListU[ShopListU.indexOf(a)]].Price};
- ShopListW=ShopItemsPrice.slice(3);
- if(Message==`Description`)
- {R=`${Settings.Shop.Items[ShopListU[ShopList.indexOf(ItemName)]].Name} || Price: ${Settings.Shop.Items[ShopListU[ShopList.indexOf(ItemName)]].Price} | BuyLimit: ${Settings.Shop.Items[ShopListU[ShopList.indexOf(ItemName)]].BuyLimit==0?`Infinity`:Settings.Shop.Items[ShopListU[ShopList.indexOf(ItemName)]].BuyLimit} | Description: ${Settings.Shop.Items[ShopListU[ShopList.indexOf(ItemName)]].Description}`};
- if(Message==`ItemList`)
- {R=`The items in the shop are: ${ShopListW}`};
- if(Message==`Points`)
- {R=`You have ${TotalReward} points.`};
- if(Message==`Help`)
- {R=`Possible arguments are (Help,Shop,Points,Buy,{Item Name})`};
- if(Message==`BuySuccess`)
- {R=`You bought ${ItemName} for ${PlusMinus==`Plus`?`-`:``}${PlusMinusTotal}!`};
- if(Message==`TooMany`)
- {R=`You can only buy ${Settings.Shop.Items[ShopListU[ShopListU.indexOf(ItemName)]].BuyLimit} of those.`};
- if(Message==`BuyFail`)
- {R=`That costs ${Settings.Shop.Items[ShopListU[ShopListU.indexOf(ItemName)]].Price} and you only have ${TotalReward}.`};
- if(Message==`BuyFail`)
- {R=`${ItemName==`NoItem`?`Please put an items name after “buy”`:`Sorry there is no “${ItemName}” in the shop`}`};
- if(Message==`Error`)
- {R=`Please contact next if you see this`};
- R
Add Comment
Please, Sign In to add comment