Jump to content
  • 1

Hourly Point~


casteryee

Question


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  80
  • Reputation:   3
  • Joined:  02/07/12
  • Last Seen:  

//===== Hourly Points Script =========================================
//===== By: ==========================================================
//= nostafu
//===== Current Version: =============================================
//= 1.3
//===== Compatible With: =============================================
//= Any eAthena Version
//===== Description: =================================================
//= Get Points every successful hours of gameplay, you cannot get
//= the points even if you miss a second or a minute. A player will
//= get a very big bonus if they played 12 hours consecutively
//= or without logging out of the game. If the player is vending
//= the script will then stop.
//====================================================================
- script hourlypoints -1,{
//--Start of the Script
OnPCLoginEvent:
attachnpctimer ""+strcharinfo(0)+"";
initnpctimer;
end;

OnTimer30000:
//Check if Vending (normal or @at)
if(checkvending() >= 1 || checkchatting() == 1) {
dispbottom "The hourly points event stopped because you were vending / chatting. Please relog if you wish to start again.";
stopnpctimer;
end;
}
//Check if Idle
getmapxy( .@map$, .@x, .@y, 0 );
if(@map$ == .@map$ && @x == .@x && @y == .@y) {
set @afk, @afk + 1;
}
//If move timer resets
else {
set @afk, 0;
}
set @map$, .@map$; set @x, .@x; set @y, .@y;
//Idle Check for 5 Minutes
if(@afk == 10) {
dispbottom "The hourly points event stopped because you were idle for 5 minutes. Please relog if you wish to start again.";
stopnpctimer;
end;
}
end;
OnTimer60000:
set @minute, @minute + 1;
//Check for 1 Minute
if(@minute == 60){
set @minute,0;
set .@point_amt, 1; //Points to get every hour (default: 10)
set #KAFRAPOINTS, #KAFRAPOINTS + .@point_amt;
dispbottom "You received "+.@point_amt+" Kafrapoints by staying ingame for 1 hour";
dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints";
set @consecutive_hour, @consecutive_hour + 1;
}
//Check for 12 hours consecutive
if(@consecutive_hour == 12) {
set @consecutive_hour,0;
set .@cpoint_amt, 10; //Points to get for 12 Consecutive hours (default: 50)
set #KAFRAPOINTS, #KAFRAPOINTS + .@cpoint_amt;
dispbottom "You receive "+.@cpoint_amt+" Kafrapoints in playing for 12 consecutive hours";
dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints";
}
stopnpctimer;
initnpctimer;
end;
}
//--End of the Script

I want to ask, how to prevent stop run this script when idle for 5 minutes.

I want to change it to if the player is online-ing, but not with @at and @afk command will keep obtain the point.

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  43
  • Reputation:   2
  • Joined:  01/17/12
  • Last Seen:  


//===== Hourly Points Script =========================================
//===== By: ==========================================================
//= nostafu
//===== Current Version: =============================================
//= 1.3
//===== Compatible With: =============================================
//= Any eAthena Version
//===== Description: =================================================
//= Get Points every successful hours of gameplay, you cannot get
//= the points even if you miss a second or a minute. A player will
//= get a very big bonus if they played 12 hours consecutively
//= or without logging out of the game. If the player is vending
//= the script will then stop.
//====================================================================
- script hourlypoints -1,{
//--Start of the Script
OnPCLoginEvent:
attachnpctimer ""+strcharinfo(0)+"";
initnpctimer;
end;
OnTimer60000:
set @minute, @minute + 1;
//Check for 1 Minute
if(@minute == 60){
set @minute,0;
set .@point_amt, 1; //Points to get every hour (default: 10)
set #KAFRAPOINTS, #KAFRAPOINTS + .@point_amt;
dispbottom "You received "+.@point_amt+" Kafrapoints by staying ingame for 1 hour";
dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints";
set @consecutive_hour, @consecutive_hour + 1;
}
//Check for 12 hours consecutive
if(@consecutive_hour == 12) {
set @consecutive_hour,0;
set .@cpoint_amt, 10; //Points to get for 12 Consecutive hours (default: 50)
set #KAFRAPOINTS, #KAFRAPOINTS + .@cpoint_amt;
dispbottom "You receive "+.@cpoint_amt+" Kafrapoints in playing for 12 consecutive hours";
dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints";
}
stopnpctimer;
initnpctimer;
end;
}
//--End of the Script

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  80
  • Reputation:   3
  • Joined:  02/07/12
  • Last Seen:  

if(checkvending() >= 1 || checkchatting() == 1) {
dispbottom "The hourly points event stopped because you were vending / chatting. Please relog if you wish to start again.";
stopnpctimer;
end;
}

If the lines above remain, will it check chatroom and vending?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  43
  • Reputation:   2
  • Joined:  01/17/12
  • Last Seen:  

yes

Link to comment
Share on other sites

  • -2

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  52
  • Reputation:   3
  • Joined:  04/23/17
  • Last Seen:  

This script is not woring

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

if(checkvending() >= 1 || checkchatting() == 1) {
dispbottom "The hourly points event stopped because you were vending / chatting. Please relog if you wish to start again.";
stopnpctimer;
end;
}

If the lines above remain, will it check chatroom and vending?

well..if you have removed the condition checking...

player can just make alot of Merchant class to FARM points / items accordingly..

they can just make a merchant with level 1 vending skills..and then put it anywhere..and vending..

and resulting their character to get point every hour....

there is no way to differentiate the merchant who currently vending is under Normal Vending...or using @autotrade...

unless you did some source mod and change the status ...perhap there might be a chances for you to avoid the above situation.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  80
  • Reputation:   3
  • Joined:  02/07/12
  • Last Seen:  

Thanks, I just left the line that checking vending and chatroom.

But is that possible to make only some maps available to get hourly point?

To prevent afk characters in main town.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  43
  • Reputation:   2
  • Joined:  01/17/12
  • Last Seen:  


//===== Hourly Points Script =========================================
//===== By: ==========================================================
//= nostafu
//===== Current Version: =============================================
//= 1.3
//===== Compatible With: =============================================
//= Any eAthena Version
//===== Description: =================================================
//= Get Points every successful hours of gameplay, you cannot get
//= the points even if you miss a second or a minute. A player will
//= get a very big bonus if they played 12 hours consecutively
//= or without logging out of the game. If the player is vending
//= the script will then stop.
//====================================================================
- script hourlypoints -1,{
//--Start of the Script
OnPCLoginEvent:
attachnpctimer ""+strcharinfo(0)+"";
initnpctimer;
end;

OnTimer30000:
//Check if Vending (normal or @at)
if(checkvending() >= 1 || checkchatting() == 1) {
dispbottom "The hourly points event stopped because you were vending / chatting. Please relog if you wish to start again.";
stopnpctimer;
end;
}
//Check if Idle
getmapxy( .@map$, .@x, .@y, 0 );
if(@map$ == .@map$ && @x == .@x && @y == .@y) {



//=================================================================
if(@map$ == "some_map" || @map$ == "some_other_map" || @map$ == "some_yet_another_map") // (...)
set @afk, @afk + 1;
//=================================================================



}
//If move timer resets
else {
set @afk, 0;
}
set @map$, .@map$; set @x, .@x; set @y, .@y;
//Idle Check for 5 Minutes
if(@afk == 10) {
dispbottom "The hourly points event stopped because you were idle for 5 minutes. Please relog if you wish to start again.";
stopnpctimer;
end;
}
end;
OnTimer60000:
set @minute, @minute + 1;
//Check for 1 Minute
if(@minute == 60){
set @minute,0;
set .@point_amt, 1; //Points to get every hour (default: 10)
set #KAFRAPOINTS, #KAFRAPOINTS + .@point_amt;
dispbottom "You received "+.@point_amt+" Kafrapoints by staying ingame for 1 hour";
dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints";
set @consecutive_hour, @consecutive_hour + 1;
}
//Check for 12 hours consecutive
if(@consecutive_hour == 12) {
set @consecutive_hour,0;
set .@cpoint_amt, 10; //Points to get for 12 Consecutive hours (default: 50)
set #KAFRAPOINTS, #KAFRAPOINTS + .@cpoint_amt;
dispbottom "You receive "+.@cpoint_amt+" Kafrapoints in playing for 12 consecutive hours";
dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints";
}
stopnpctimer;
initnpctimer;
end;
}
//--End of the Script

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   0
  • Joined:  11/22/11
  • Last Seen:  

they can abuse this i think. i tried it on my server but they can use dual log in then go to some map then Right click on the other character then other character is attacking some porings. so both of the 2 char can have hourly points. not just 2 they can use 4 or more char :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  43
  • Reputation:   2
  • Joined:  01/17/12
  • Last Seen:  

So can it be afk-abused with 2 crusader-classes poking each other with Shrink on.

Anything can be abused in some way, but that doesn't mean you shouldn't implement anything. Just make sure the abuses aren't fatal.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  80
  • Reputation:   3
  • Joined:  02/07/12
  • Last Seen:  

@Derceto, thanks for helping me.

I think they can't abuse this very much, since my points are for trade poring coins, and the ratio is 5:1.

They can afk as much as they want, but of course not for vending and chatroom.

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