Jump to content
  • 0

Help in Hourly Points


GM Winter

Question


  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

hello im having a problem while the players are fishing they cant get any hourly coins, can someone check it thank you

 

Quote

-    script hourly_point_main  -1,{
 
    OnInit:
        .npc_name$ = strnpcinfo(3);
        bindatcmd "check",.npc_name$+"::OnAtcommand";
        end;
 
    OnAtcommand:
        dispbottom "Accumulated "+#daily_minute_count;
        end;
 
    OnUpdate:
        if (checkvending() & 2) end;
        #daily_minute_count++;
        deltimer .npc_name$+"::OnUpdate";
        switch ( #daily_minute_count ) {
            default:
                break;
            case 60: // 60 minutes
                #CASHPOINT += 1;
                getitem 677,1;
                break;
            case 120: // 120 minutes
                #CASHPOINT += 1;
                getitem 677,1;
                break;
            case 180: // 180 minutes
                #CASHPOINT += 1;
                getitem 677,1;
                break;
            case 240: // 240 minutes
                #CASHPOINT += 1;
                getitem 677,1;
                break;
            case 300: // 300 minutes
                #CASHPOINT += 1;
                getitem 677,1;
                break;
            case 360: // 360 minutes
                #CASHPOINT += 1;
                getitem 677,1;
                break;
            case 420: // 420 minutes
                #CASHPOINT += 1;
                getitem 677,1;
                break;
            case 480: // 480 minutes
                #CASHPOINT += 1;
                getitem 677,1;
                #daily_minute_count = 0; // reset.
                break;
        }
 
    OnPCLoginEvent:
        addtimer ( 60 * 1000 ), .npc_name$+"::OnUpdate";
        end;
}



 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  234
  • Reputation:   87
  • Joined:  06/30/18
  • Last Seen:  

-    script hourly_point_main  -1,{
     OnInit:
        .npc_name$ = strnpcinfo(3);
        .reward_minutes = 60;
        bindatcmd("check", .npc_name$ + "::OnAtcommand");
        end;
 
    OnAtcommand:
        dispbottom("Accumulated " + #daily_minute_count);
        end;
 
    OnPCLoginEvent:
        addtimer(.reward_minutes * 60000, .npc_name$ + "::OnUpdate");
        end;

    OnUpdate:
        deltimer(.npc_name$ + "::OnUpdate");
        addtimer(.reward_minutes * 60000, .npc_name$ + "::OnUpdate");

        if (checkvending() & 2) {
            end;
        }

        #daily_minute_count += .reward_minutes;

        switch(#daily_minute_count) {
            case 60: // 60 minutes
                #CASHPOINT += 1;
                getitem 677,1;
                break;
            case 120: // 120 minutes 
                #CASHPOINT += 1;
                getitem 677,1;
                break;
            case 180: // 180 minutes
                #CASHPOINT += 1;
                getitem 677,1;
                break;
            case 240: // 240 minutes
                #CASHPOINT += 1;
                getitem 677,1;
                break;
            case 300: // 300 minutes
                #CASHPOINT += 1;
                getitem 677,1;
                break;
            case 360: // 360 minutes
                #CASHPOINT += 1;
                getitem 677,1;
                break;
            case 420: // 420 minutes
                #CASHPOINT += 1;
                getitem 677,1;
                break;
            case 480: // 480 minutes
                #CASHPOINT += 1;
                getitem 677,1;
                #daily_minute_count = 0; // reset.
                break;
            default:
                break;
        }
}

 

Edited by Winterfox
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

2 hours ago, Winterfox said:
-    script hourly_point_main  -1,{
     OnInit:
        .npc_name$ = strnpcinfo(3);
        .reward_minutes = 60;
        bindatcmd("check", .npc_name$ + "::OnAtcommand");
        end;
 
    OnAtcommand:
        dispbottom("Accumulated " + #daily_minute_count);
        end;
 
    OnPCLoginEvent:
        addtimer(.reward_minutes * 60000, .npc_name$ + "::OnUpdate");
        end;

    OnUpdate:
        deltimer(.npc_name$ + "::OnUpdate");
        addtimer(.reward_minutes * 60000, .npc_name$ + "::OnUpdate");

        if (checkvending() & 2) {
            end;
        }

        #daily_minute_count += .reward_minutes;

        switch(#daily_minute_count) {
            case 60: // 60 minutes
                #CASHPOINT += 1;
                getitem 677,1;
                break;
            case 120: // 120 minutes 
                #CASHPOINT += 1;
                getitem 677,1;
                break;
            case 180: // 180 minutes
                #CASHPOINT += 1;
                getitem 677,1;
                break;
            case 240: // 240 minutes
                #CASHPOINT += 1;
                getitem 677,1;
                break;
            case 300: // 300 minutes
                #CASHPOINT += 1;
                getitem 677,1;
                break;
            case 360: // 360 minutes
                #CASHPOINT += 1;
                getitem 677,1;
                break;
            case 420: // 420 minutes
                #CASHPOINT += 1;
                getitem 677,1;
                break;
            case 480: // 480 minutes
                #CASHPOINT += 1;
                getitem 677,1;
                #daily_minute_count = 0; // reset.
                break;
            default:
                break;
        }
}

 

i still cant get any hourly coins , also after using @check while fishing the command this showing then if i cancel the fishing the accumulated points are still the same as the 1st check while not fishing anyways ty for your effort sir i appreciate it 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   1
  • Joined:  08/22/18
  • Last Seen:  

Better to use this if you're using 2021+ clients

https://github.com/rathena/rathena/pull/7410/files

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

1 hour ago, khouuming21 said:

Better to use this if you're using 2021+ clients

https://github.com/rathena/rathena/pull/7410/files

im using a custom item as a hourly points  

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  234
  • Reputation:   87
  • Joined:  06/30/18
  • Last Seen:  

11 hours ago, GM Winter said:

i still cant get any hourly coins , also after using @check while fishing the command this showing then if i cancel the fishing the accumulated points are still the same as the 1st check while not fishing anyways ty for your effort sir i appreciate it 

Can you show your fishing script?

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