ScriptShop

http://i48.tinypic.com/2rnhges.png

What is ScriptShop?
ScriptShop is a plugin that allows players to purchase 'items'. They wont actually obtain the item (Unless your write a script for it) but it will activate
some javascript to make something happend. Maybe a player buys a teleport home spell to get back home. Maybe that buy a enchantment or 25 xp levels.
JavaScript is an easy to learn, hard to master scripting language. It should allow most people with a brain to create and design their own custom buyable
scripts.

Brief Description
Just to make sure everyone understands everything here is a brief description of what ScriptShop does.
ScriptShop will allow players to actually click on the item they want, when they click on an item it will activate some javascript.
Just in-case you dont know or dont want to know how to script javascript ive included some pre-made scripts which should do just enough for anyone. You can download the pre-made scripts at https://github.com/bowser123467/ScriptShop/tree/master/scripts

Commands
/shop [shopname] - Opens a shop or if you do not supply a shop name will show you the list of shops.
/createshop [shop name] [slots] - Creates a new shop using the shops name. The amount of slots must be a multiple of 9, eg. 18, 36, 81
/editshop [shop name] [additem, addlore, itemname, changename, removeitem] - Does multiple things, for help on each one simply type it in like this: '/editshop [shop name] [an action]' and it should show you the help

Scripting API
Globals
The ScriptShop JavaScript engine has some custom global variables and functions you can use!
Below are the following global functions, to access them use the global object 'global' (eg 'global.getMoney("CoolMan");':
log(string); - Logs a message to the console
severe(string); - Logs an error to the console
warning(string); - Logs a warning to the console
getMoney(players name); - Returns the amount of money that player has. Requires vault and an economy plugin.
giveMoney(amount, player name); - Gives the specified player that amount of money
takeMoney(amount, player name); - Takes money from a player
format(amount); - Returns a string that your economy plugin formated, eg. 'global.format(500.50)' will return '500.50 Dollars' if your using iConomy.
Source Code
Source Code at https://github.com/bowser123467/ScriptShop


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    49702
  • Created
    Jan 9, 2013
  • Last Released File
    Never
  • Total Downloads
    862
  • License

Categories

Members

Recent Files