Jump to content

Recommended Posts

Posted (edited)

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
Posted

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

Posted (edited)

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
Posted

{ 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*

Posted (edited)

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
Posted

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.

Posted

[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

Posted

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

Posted

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

Posted

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

Posted
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
Posted (edited)

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
Posted

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.

  • 4 weeks later...
  • 2 months later...
Posted

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 .@ticks, getarg(0);
    65 :        if (.@ticks <= 0) {
    66 :                debugmes "getPremium - tried to set a timer in the past"
;
    67 :                end;
    68 :        }

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...