Jump to content
  • 0

Need Help


Dev Blaze

Question


  • Group:  Members
  • Topic Count:  68
  • Topics Per Day:  0.02
  • Content Count:  212
  • Reputation:   5
  • Joined:  01/24/12
  • Last Seen:  

Change this into "Proof of donation" Pods only because the default setup is cashpoint

 

 

 

// Settings: -----------------------------

set .@Cost, 10000; // Cash Points required
set .@Time, 4 * 7 * 24 * 60 * 60; // Time in Seconds = 4 weeks, 7 days per week, 24 hours per day, 60 minutes per day, 60 seconds per minute. = 1 month in this sample.
set .@Time$, "1 month";
// ---------------------------------------
 
mes "[Premium Account]";
mes "I am the Premium Account seller.";
if( isPremium() == 1 )
mes "Your Premium Account expires in ^FF0000" + callfunc("Time2Str",#Premium_Tick) + "^000000.";
mes "What can I do for you?";
next;
 
// isPremium() returns 1 if the current user Account is Premium and it have not expired.
// It works together with #Premium_Tick, which is a Account Var set with a Unix Time value, representing when the Premium Account expires.
// isPremium() is the same as #Premium_Tick > gettimetick(2)
 
switch( select("Pay for Premium Time:About Premium Account") )
{
case 1:
mes "[Premium Account]";
if( isPremium() == 1 )
mes "Do you really want to extend your Premium Time?";
else
mes "You do really want to convert your account to premium?";
 
mes "Premium Time is ^FF0000" + .@Time$ + "^000000";
mes "Value is ^FF0000" + .@Cost + "^000000 Cash Points.";
next;
if( select("Yes:No") == 2 )
{
mes "[Premium Account]";
mes "Come back if you change your mind.";
close;
}
 
if( #CASHPOINTS < .@Cost )
{
mes "[Premium Account]";
mes "You don't have enough Cash Points.";
close;
}
 
set #Premium_Tick, gettimetick(2) + .@Time; // New Premium Account
set #CASHPOINTS, #CASHPOINTS - .@Cost;
 

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  177
  • Reputation:   21
  • Joined:  01/31/12
  • Last Seen:  

1) Not sure what you're asking for. Do you want the NPC to activate a premium account without charging cashpoints, if the player has donated?

 

2) Use a codebox!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

Maybe like this?

// Settings: -----------------------------
set .@ITEM, 7179;
set .@Cost, 1; // Proof of Donation is required
set .@Time, 4 * 7 * 24 * 60 * 60; // Time in Seconds = 4 weeks, 7 days per week, 24 hours per day, 60 minutes per day, 60 seconds per minute. = 1 month in this sample.
set .@Time$, "1 month";
// ---------------------------------------
 
mes "[Premium Account]";
mes "I am the Premium Account seller.";
if( isPremium() == 1 )
mes "Your Premium Account expires in ^FF0000" + callfunc("Time2Str",#Premium_Tick) + "^000000.";
mes "What can I do for you?";
next;
 
// isPremium() returns 1 if the current user Account is Premium and it have not expired.
// It works together with #Premium_Tick, which is a Account Var set with a Unix Time value, representing when the Premium Account expires.
// isPremium() is the same as #Premium_Tick > gettimetick(2)
 
switch( select("Pay for Premium Time:About Premium Account") )
{
case 1:
mes "[Premium Account]";
if( isPremium() == 1 )
mes "Do you really want to extend your Premium Time?";
else
mes "You do really want to convert your account to premium?";
 
mes "Premium Time is ^FF0000" + .@Time$ + "^000000";
mes "Value is ^FF0000" + .@Cost + "^000000 " + .@ITEM + ".";
next;
if( select("Yes:No") == 2 )
{
mes "[Premium Account]";
mes "Come back if you change your mind.";
close;
}
 
if(countitem(7179) < .@Cost )
{
mes "[Premium Account]";
mes "You don't have enough Proof of Donation";
close;
}
 
set #Premium_Tick, gettimetick(2) + .@Time; // New Premium Account
delitem .@ITEM, .@Cost;
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  68
  • Topics Per Day:  0.02
  • Content Count:  212
  • Reputation:   5
  • Joined:  01/24/12
  • Last Seen:  

Thank you Ford  /ic  /ic

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
Answer this question...

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