Jump to content
Diconfrost VaNz

[v2.0]Basic Premium System

Recommended Posts

Reference: http://rathena.org/board/topic/79116-helppremium-system/?view=getnewpost

 

 

I've made a basic premium system.

It will give exp/drop boost to all vip/premium users and even change your group_id.

How to use it:

1st) make a custom item that will serve as "VIP Ticket". must be a usable item.
item script:
 

 callfunc "getPremium", <# of Days> * 24 * 3600; 

 

2nd) Install the npc script in your svn.

 

http://upaste.me/9a5e54350fc1eb32

 

 

3rd) Try it :D

 

 

2.0 Feature Added: @premium command

 

 

 

Special Thanks to Jezu, clydelion and Dastgr

vip.txt

Edited by Diconfrost VaNz
  • Upvote 1
Link to comment
Share on other sites

how does it work?

can you explain detail.

 

i already make the custom vip card

 

18103,VIP Ticket,Vip Ticket,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ set #Premium,#Premium + ( <# of days> * 24 * 3600 ); },{},{}

 

Thanks

Link to comment
Share on other sites

how does it work?

can you explain detail.

 

i already make the custom vip card

18103,VIP Ticket,Vip Ticket,2,2,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ set #Premium,#Premium + ( <# of days> * 24 * 3600 ); },{},{}
 

Thanks

 

You have to set the number of days in order for the item to work. The example below will make you a Premium user for 7 days once you use it.

 

{ set #Premium,#Premium + ( 7 * 24 * 3600 ); }
This example is also the same thing as above except it doesn't use the mathematical formula.
{ set #Premium,#Premium + 604800; }
Edited by arzzzae
Link to comment
Share on other sites

{ set #Premium,#Premium + ( 7 * 24 * 3600 ); }  <<<this was set for 7 days :D

 

 

 

the format was like this

 

7 days * 24hours a day * 3600 secondes per hour



v1.3 released

 

thread updated*

Link to comment
Share on other sites

just a question, if you use 1 vip ticket you will have 7 days right, what if your vip ticket is not yet expired then you use another one, will it stack? will it add more days?

Edited by Thanna
Link to comment
Share on other sites

just a question, if you use 1 vip ticket you will have 7 days right, what if your vip ticket is not yet expired then you use another one, will it stack? will it add more days?

Yup, it'll stack because the set command is adding more time to the 'Premium' variable.

Link to comment
Share on other sites

[suggestions]

 

This would be cool if you add a status icon and an aura determining that you are a premium user

 

For the aura features you can use the auraset mod... /no1

Link to comment
Share on other sites

Well, this is just a basic premium system, if you want to set it like that, well you can do it yourself :)

 

But any suggestions are welcome :D

 

If you wanna help me on adding or optimizing the script, you're more than welcome :D

Link to comment
Share on other sites

Is it possible to add in this script wherein you can use bindatcmd to call the getpremiumtime function?

 

like for example.

 

@premium = shows how much time you still have before the premium expires..

Link to comment
Share on other sites

Yeah. What if the player isn't near on the NPC. like for example to a different map and wants to know the duration of the activated premium.. by using @command he/she can know immediately. :D

Link to comment
Share on other sites

OnAtcommand:
dispbottom "Your Premium Time Left : "+getPremiumTime( #Premium );
end;

OnInit:	bindatcmd "premium",strnpcinfo(3)+"::OnAtcommand"; end; 

Add this somewhere inside that script. Probably at the bottom.

 

You can use @premium then.

 

  • Upvote 1
Link to comment
Share on other sites

Example:

Normal Member rate EXP/JOB: 1.0 (Group = 0)

VIP Member defaults are increasing EXP/JOB rate EXP/JOB: 2.0 (Group = 1)

 

Use Battle Manual:

Normal Member rate EXP/JOB: 1.5

VIP Member defaults are increasing EXP/JOB rate EXP/JOB: 3.5

 

You can help me. Thx

Edited by maxROVN
Link to comment
Share on other sites

i think this is possible but in src modification way i think? or another way around, i'm gonna research about this.

 

Sorry i'm just a begginer xD

 

i'll post it right away after i discovered about it.

Link to comment
Share on other sites

I'm Looking for this. but it's seems not working on latest revisions. would you please update it ?



Any solution for this? 

[Error]:
script error on npc/vips.txt line 63
    expect ';' or '{' at function syntax
    58 : mes "[^FF0000Clahador^000000]";
    59 : mes "Thank you!";
    60 : mes "Come Again!";
    61 : close;
    62 :
*   63 : function       script' 'getPremium     {
    64 :        set [email protected], getarg(0);
    65 :        if ([email protected] <= 0) {
    66 :                debugmes "getPremium - tried to set a timer in the past"
;
    67 :                end;
    68 :        }
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
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...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.