Jump to content
  • 0
Sign in to follow this  
sylphers

hourly reward script error

Question

help me please

 

post-25586-0-48134500-1399375770_thumb.jpg

 

//=================================
​//Created by -SkittleNugget-
//Email : [email protected]
//=================================
//Hourly Points Script.
//=================================
//Version 1.2
//=================================
//Notes:
//1.0 - Initial Working Script.
//1.1 - Removed messages.
//1.2 - Added Easy Changeable Options as Requested by "Lil Troll~" (rAthena)
//=================================
-    script    Hour_Reward_Points    -1,{

OnInit:
    set .TimeInMinutes,5; //Check at 5 Minutes
    set .WhatRewardHour,1; //Reward at 1 Hour
    set .ItemIDReward,5012; //Reward ID, 5012
    set .ItemRewardAmount,1; //Reward Amount
end;
    

OnPCLoginEvent:
    dispbottom "Hourly Rewards have been started for this character.";
    
while(1) //Must Leave it run constantly.
    {
        sleep2 60000*.TimeInMinutes; //5 Minutes == Will Check Players activity after this time in milliseconds.
        if ( checkidle() > 300) //Check if player has been active or not.
        {
            if ( checkvending() == 2 ) end; //Check if Auto Vending.
            while ( checkidle() > 1 ) //Pause count while player is inactive, also checks for activity.
                sleep2 1000;
        }
            else
        {
            set [email protected], [email protected] + .TimeInMinutes; //Count Total Time Active Within the hour.
            if ( [email protected] == .WhatRewardHour ) //Player has been active for .WhatRewardHour throughout the login time.
            {
                mes "You have been awarded an Apple for your activity.";
                close2;
                getitem .ItemIDReward,.ItemRewardAmount; //When Player has been active for One Hour
                set [email protected],0; //Reset Time Active.
            }
        }
    }
OnPCLogoutEvent:    
    end;
}
 

 

Edited by sylphers

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

try to delete line 1 to 13 , and you only use this

-    script    Hour_Reward_Points    -1,{

OnInit:
    set .TimeInMinutes,5; //Check at 5 Minutes
    set .WhatRewardHour,1; //Reward at 1 Hour
    set .ItemIDReward,5012; //Reward ID, 5012
    set .ItemRewardAmount,1; //Reward Amount
end;
    

OnPCLoginEvent:
    dispbottom "Hourly Rewards have been started for this character.";
    
while(1) //Must Leave it run constantly.
    {
        sleep2 60000*.TimeInMinutes; //5 Minutes == Will Check Players activity after this time in milliseconds.
        if ( checkidle() > 300) //Check if player has been active or not.
        {
            if ( checkvending() == 2 ) end; //Check if Auto Vending.
            while ( checkidle() > 1 ) //Pause count while player is inactive, also checks for activity.
                sleep2 1000;
        }
            else
        {
            set [email protected], [email protected] + .TimeInMinutes; //Count Total Time Active Within the hour.
            if ( [email protected] == .WhatRewardHour ) //Player has been active for .WhatRewardHour throughout the login time.
            {
                mes "You have been awarded an Apple for your activity.";
                close2;
                getitem .ItemIDReward,.ItemRewardAmount; //When Player has been active for One Hour
                set [email protected],0; //Reset Time Active.
            }
        }
    }
OnPCLogoutEvent:    
    end;
}

Share this post


Link to post
Share on other sites

i already try that but still same

 

post-25586-0-41000900-1399379070_thumb.jpg

Share this post


Link to post
Share on other sites

try and re-copy paste everything except the first line in a new notepad.

happened to me before.

Share this post


Link to post
Share on other sites

--- nvm

Edited by MrVandalBus

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...

Important Information

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