Jump to content
  • 0

[VIP System] When VIP is Expired, When user not DC, user still in VIP Mode Account.


dikapramantya

Question


  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  216
  • Reputation:   9
  • Joined:  07/12/12
  • Last Seen:  

Hello Rathena.

I want to ask ...
When i tried use VIP System, is WORK all. Thanks :D.
But i have a problem when user VIP Account is Finish/Expired. User not auto back to Normal Account (Need Disconnect to Back Premium Account.)

So, my question is, how to make User back to Normal Account automatic after VIP Account Period is Finish / Expired ??

 

Example to explain:

59299f7f6f749_screenUnofficialRO021.thumb.jpg.4305e268b0517e09eb3100303521b5aa.jpg

 

So account in the picture is Expired in 22:33...
But when server time is 22:35, The account is Still VIP Mode and can Use Premium Agent NPC (NPC Special only can access by VIP Account).
Need make user disconnect to make account normal again.

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  161
  • Reputation:   31
  • Joined:  12/06/11
  • Last Seen:  

Assuming the date is stored as a timetick:
 

if(gettimetick(2) > YOUR_VARIABLE_HOLDING_TIME)
{
	mes "<Expiration message>";
	close;
}



If you need more support, kindly provide us with more information about the script (or the script itself)
 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  216
  • Reputation:   9
  • Joined:  07/12/12
  • Last Seen:  

//PremiumNPC IDRO Version
//Made by Dhika Pramantya

-	shop	Premium Item	-1,17229:35000,12591:35000,12274:25000,12275:25000

-	script	PremiumFUNC	-1,{

mes "[Premium Agent]";
mes "Hallo.";
mes "Hanya untuk pemain yang menggunakan Premium Service,";
mes "Kami menawarkan beberapa layanan.";
mes "Saya akan periksa";
mes "Jika kamu adalah pemain yang menggunakan Premium Service.";
next;
if(vip_status(1) < 1) goto l_raktjatdjelata;
else if(vip_status(1) > 0) goto l_premium;

l_raktjatdjelata:
mes "[Premium Agent]";
mes "Kamu tidak bisa mendapatkan";
mes "premium service.";
mes "datang lagi setelah";
mes "mendapatkan premium account.";
end;

l_premium:
mes "[Premium Agent]";
mes "Kamu adalah orang yang tepat";
mes "Premium accountmu Expired : "+vip_status(2);	//Checking Expired Time VIP Account
next;
mes "[Premium Agent]";
mes "Untuk mendapat layanan ini.";
mes "Silahkan periksa layanan";
mes "Yang kamu mau";
next;
menu
	"Membeli barang.",buyitem,
	"Dapatkan Special Buff.",buffp,
	"Batal",-;
mes "[Premium Agent]";
mes "Kapan saja kamu membutuhkan layanan,";
mes "kamu dapat datang kembali.";
end;

buyitem:
close2;
callshop "Premium Item",1;
end;

buffp:
specialeffect2 EF_HEAL2;
percentheal 100,100;
sc_start SC_FOOD_STR_CASH,1800000,3;
	sc_start SC_FOOD_AGI_CASH,1800000,3;
	sc_start SC_FOOD_VIT_CASH,1800000,3;
	sc_start SC_FOOD_INT_CASH,1800000,3;
	sc_start SC_FOOD_DEX_CASH,1800000,3;
	sc_start SC_FOOD_LUK_CASH,1800000,3;
mes "[Premium Agent]";
mes "saya harap buff ini";
mes "berguna untukmu.";
end;

}

 

Hello this is my Own Premium / VIP Script for Player who want get special buff / check time left.

Its a basic from Official Gravindo / Indonesia Ragnarok Online.

So maybe anyone help to make it if vip_status(2) = expired , its make user disconnect / change account group_id to Normal user  ??

if work i will add the credit in the script to you :D 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  161
  • Reputation:   31
  • Joined:  12/06/11
  • Last Seen:  

It's something that has been programmed in I wasn't aware about. I've tried it out, only to discover that it does change for me.

My sincerest apologies as for I am unable to reproduce your issue. The check in your code should work as how it is intended to be (No relog required). What version of rA are you running? 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  1167
  • Reputation:   159
  • Joined:  06/12/12
  • Last Seen:  

On 5/29/2017 at 4:23 AM, dikapramantya said:

//PremiumNPC IDRO Version
//Made by Dhika Pramantya

-	shop	Premium Item	-1,17229:35000,12591:35000,12274:25000,12275:25000

-	script	PremiumFUNC	-1,{

mes "[Premium Agent]";
mes "Hallo.";
mes "Hanya untuk pemain yang menggunakan Premium Service,";
mes "Kami menawarkan beberapa layanan.";
mes "Saya akan periksa";
mes "Jika kamu adalah pemain yang menggunakan Premium Service.";
next;
if(vip_status(1) < 1) goto l_raktjatdjelata;
else if(vip_status(1) > 0) goto l_premium;

l_raktjatdjelata:
mes "[Premium Agent]";
mes "Kamu tidak bisa mendapatkan";
mes "premium service.";
mes "datang lagi setelah";
mes "mendapatkan premium account.";
end;

l_premium:
mes "[Premium Agent]";
mes "Kamu adalah orang yang tepat";
mes "Premium accountmu Expired : "+vip_status(2);	//Checking Expired Time VIP Account
next;
mes "[Premium Agent]";
mes "Untuk mendapat layanan ini.";
mes "Silahkan periksa layanan";
mes "Yang kamu mau";
next;
menu
	"Membeli barang.",buyitem,
	"Dapatkan Special Buff.",buffp,
	"Batal",-;
mes "[Premium Agent]";
mes "Kapan saja kamu membutuhkan layanan,";
mes "kamu dapat datang kembali.";
end;

buyitem:
close2;
callshop "Premium Item",1;
end;

buffp:
specialeffect2 EF_HEAL2;
percentheal 100,100;
sc_start SC_FOOD_STR_CASH,1800000,3;
	sc_start SC_FOOD_AGI_CASH,1800000,3;
	sc_start SC_FOOD_VIT_CASH,1800000,3;
	sc_start SC_FOOD_INT_CASH,1800000,3;
	sc_start SC_FOOD_DEX_CASH,1800000,3;
	sc_start SC_FOOD_LUK_CASH,1800000,3;
mes "[Premium Agent]";
mes "saya harap buff ini";
mes "berguna untukmu.";
end;

}

 

Hello this is my Own Premium / VIP Script for Player who want get special buff / check time left.

Its a basic from Official Gravindo / Indonesia Ragnarok Online.

So maybe anyone help to make it if vip_status(2) = expired , its make user disconnect / change account group_id to Normal user  ??

if work i will add the credit in the script to you :D 

@dikapramantya

How you give VIP status to any character, it's by script or command?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  216
  • Reputation:   9
  • Joined:  07/12/12
  • Last Seen:  

On 8/8/2017 at 7:52 AM, hendra814 said:

@dikapramantya

How you give VIP status to any character, it's by script or command?

by a command use item like a vip voucher..

 

25016,VIP_1D_coupon,VIP 1day coupon,18,20,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ atcommand "@vip +1d "+strcharinfo(0)+""; dispbottom "Your account privillege Premium Now."; dispbottom "You can use Premium Agent NPC to Get Special Buff."; dispbottom "Your Premium Service will Expired : "+vip_status(2);},{},{}


 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  1167
  • Reputation:   159
  • Joined:  06/12/12
  • Last Seen:  

1 hour ago, dikapramantya said:

by a command use item like a vip voucher..

 


25016,VIP_1D_coupon,VIP 1day coupon,18,20,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ atcommand "@vip +1d "+strcharinfo(0)+""; dispbottom "Your account privillege Premium Now."; dispbottom "You can use Premium Agent NPC to Get Special Buff."; dispbottom "Your Premium Service will Expired : "+vip_status(2);},{},{}


 

@dikapramantya

i already tried it too, but not using item, but by gm command direct to player,

same with you, the character still in game even the VIP status already expire.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  216
  • Reputation:   9
  • Joined:  07/12/12
  • Last Seen:  

22 minutes ago, hendra814 said:

@dikapramantya

i already tried it too, but not using item, but by gm command direct to player,

same with you, the character still in game even the VIP status already expire.

maybe added this to issue? make a suggest if vip status already expire . account will disconnected ?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  283
  • Reputation:   76
  • Joined:  06/13/13
  • Last Seen:  

why not add the condition in your script as the script docs says

*vip_status(<type>,{"<character name>"})

Returns various information about a player's VIP status.

Valid types:
 VIP_STATUS_ACTIVE - VIP status: true if the player is a VIP or false if not
 VIP_STATUS_EXPIRE - VIP expire timestamp if the player is VIP or 0 if not
 VIP_STATUS_REMAINING - VIP time remaining in seconds

add the condition before the service menu appear

l_premium:
mes "[Premium Agent]";
mes "Kamu adalah orang yang tepat";
mes "Premium accountmu Expired : "+vip_status(2);	//Checking Expired Time VIP Account
if (vip_status(VIP_STATUS_REMAINING) <= 0) {
	mes " ";
	mes "Premium telah expire, Layanan tidak dapat di gunakan";
	close;
}
next;

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  14
  • Reputation:   0
  • Joined:  08/19/18
  • Last Seen:  

@dikapramantya do you get a solution for this bug ?? i got same problem with my script after i check if i give 1 minute it will dissapear after 4minute its like server source bug 
 

 

Edited by babysmile
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.02
  • Content Count:  115
  • Reputation:   7
  • Joined:  05/09/19
  • Last Seen:  

How to set account user to vip

 

thank you.

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