Jump to content
MakeWebGames

Recommended Posts

Posted (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 by kalcazar
Posted (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 by kalcazar
Posted

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.

Posted

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

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