• 0
zodiacro

KAFRA POINT

Question

I have a script for Houly rewards which gave my player Kafra Points. and now I need NPC for my player to exchange item by using the Kafra Points. Please forgive me if i dupplicate the post.

Quote

-    script    hourlypoints3    -1,{
   
OnPointGet:
    //Check for idle.
    while(checkvending() >= 1 || checkchatting() == 1 || checkidle() >= .idle) {
        if( [email protected]$ == "" ) {
            dispbottom set( [email protected]$, "The hourly points event stopped because you were vending, chatting, or idle!" );
            set @hourly_points_timer, 0;
        }
        sleep2 .delay;
    }
    
    @consecutive_timer++;
    [email protected]_string$ = Time2Str( @consecutive_timer * ( .timer / 1000 ) );
    dispbottom "You received "+.points+" Free Point(s) by staying ingame for 1 hour.";
    #KAFRAPOINTS = #KAFRAPOINTS + .points;
    dispbottom "Current Balance = "+#KAFRAPOINTS+" Free Point(s)";
    @consecutive_bonus++;

    //Check for consecutive timer.
    if(@consecutive_bonus == .cdelay) {
        @consecutive_bonus = 0;
        #KAFRAPOINTS = #KAFRAPOINTS + .cpoints;
        dispbottom "You receive a bonus "+.cpoints+" Free Point(s) by playing for minimum 3 hours consecutively!!!";
        dispbottom "Current Balance = "+#KAFRAPOINTS+" Free Point(s)";
    }
    
OnPCLoginEvent:
    addtimer .timer,"hourlypoints3::OnPointGet";
    @hourly_points_timer = gettimetick(2) + ( .timer / 1000 );
    end;
    
OnCheck:
    message strcharinfo(0),@hourly_points_timer ? Time2Str( @hourly_points_timer )+" Remaining.":"Something went wrong relog!";
    end;

OnInit:
    bindatcmd "check","hourlypoints3::OnCheck"; //@check to view time till next point.
    .timer   = 1000*60*60; //Timer in milliseconds. ( Default: 1000*60*60 [ = 1 Hour ] )
    .cdelay  = 3;          //Delay before receiving the consecutive bonus. ( Default: 3 [ { ~ 3 Hours } *Using default timer ] )
    .cpoints = 10;         //Points gained for consecutive time online. ( Default: 10 )
    .points  = 1;          //Normal points gained. ( Default: 1 )
    .delay   = 1000;       //Delay for idle re-check check. ( Default: 1000 [ = 1 Second ] )
    .idle    = 60*5;       //Player is idle after not moving for this many seconds. ( Default: 60*5 [ = 5 Minutes ] )
}

This is my script. Kindly assist.. Thanks

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0
6 hours ago, zodiacro said:

I have a script for Houly rewards which gave my player Kafra Points. and now I need NPC for my player to exchange item by using the Kafra Points. Please forgive me if i dupplicate the post.

This is my script. Kindly assist.. Thanks

You can use this.
 

prontera,155,166,4<tab>pointshop<tab>PointShop-Test3 123,#KAFRAPOINTS,678:5,607:5,608:3

or... change your scripts from KAFRAPOINTS to something else, change #KAFRAPOINTS to the same points.

You can use any, or create new points example , #ZODIACPOINTS 

But.. make sure the hourly script also change to #ZODIACPOINTS

  • Upvote 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now