kalcazar Posted October 2, 2013 Posted October 2, 2013 (edited) Can someone create a line script for me? I need player to purchase license from shop in order to enable crafting, trading,and house. I know I can use the shop module to create a license item with expire date but i need a line script in the craft,trading,and house, enable player to open it until a license purchase in the shop. Maybe something like this: 1) Craft-"License is required to open" 2) Shop-" Craft License for sale= 50gold (license will last for 30days) Edited October 2, 2013 by kalcazar Quote
KyleMassacre Posted October 2, 2013 Posted October 2, 2013 I not understanding what you want. You want to limit the crafting module until they buy a license? Quote
kalcazar Posted October 3, 2013 Author Posted October 3, 2013 Yes! They can't use the crafting module until they purchase a license from the shop. I can create the license from the object module Quote
a_bertrand Posted October 3, 2013 Posted October 3, 2013 Then why simply not add an if on top of the content.php file and if the player doesn't have the license with him/her state "you must purchase a license" and return? Quote
kalcazar Posted October 3, 2013 Author Posted October 3, 2013 (edited) HAHAHA! YES! I knew it was "IF" something "ELSE" display message. I was about to copy the "IF" for jail script but i just don't know what variable to set for the object. Can you set an example for me to start me off? Edited October 3, 2013 by kalcazar Quote
a_bertrand Posted October 3, 2013 Posted October 3, 2013 Have a good look at: http://nw-engine.com/index.php?c=extract_doc Anyhow that should do the trick if your item is called "craft license", otherwise replace with the ID or the item name. if(Item::OwnedNumber('craft license') < 1) { TableHeader("You don't own the license"); echo Translate("Purchase a crafting license first!"); TableFooter(); return; } And indeed HauntedDawg is right, please create a new thread for your issues, do not re-cyle other people thread with your own problems which are not even related. Quote
kalcazar Posted October 3, 2013 Author Posted October 3, 2013 oops! sorry I have never use a forum before. I thought this was a categorize topic. Quote
KyleMassacre Posted October 3, 2013 Posted October 3, 2013 Here's my suggestion: I personally wouldn't make it an item in game but make it a user variable because it would IMHO be easier to handle for example removing it after 30 days or so. If you check my blog on here (too lazy to link ya) there is a small tutorial that shows a basic web form and the usage of user variables there. And when a user buys a "license" you can just set their variable to + 86400 *30 for each purchase. psuedo code: amount = post[amount] * 86400 * 30 (86, 400 secs in 1 day, 30 days to expire) setuservar (license,amount) if getuservar (license) < time () get out of here Pretty simple huh? Now with that said, the good thing about making it an item in game is you can have players sell to other players but then you need to figure out how to make it expire and TBH I haven't touched really anything to do with items Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.