Jump to content
  • 0

No hourly Points for PUB.


cross10hunter

Question


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  49
  • Reputation:   0
  • Joined:  10/13/17
  • Last Seen:  

Hi, i need your help, I implemented hourly points on our server but there seems alot of loopholes like opening a watingroom/PUB and dueling someone with loli ruri card so when he keeps hitting him he just going to heal. but my main concern is disabling hourly points when you open waiting room and stay there for 30mins something like that.

 

 end;
        }
        if(.s_vinding){
            if(checkvending() & .s_vinding){
                message strcharinfo(0),"[Hourly Rewards]: No Hourly Rewards for Venders , Relogin to change that .";
                if(.s_GePard_ip){
                query_logsql("delete from `sader_variables_log` where `variable` = '#Hourly_Rewads_Check' AND `account_id`= '"+getcharid(3)+"'");
                }
                #Hourly_Rewads_Check = 0;
                #Hourly_Ban = 1;
                addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
                end;
            }

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1678
  • Reputation:   704
  • Joined:  12/21/14
  • Last Seen:  

9 hours ago, cross10hunter said:

but there seems alot of loopholes like opening a watingroom/PUB and dueling someone with loli ruri card so when he keeps hitting him he just going to heal.

this not from that npc you need to check what the issue is

 

for your request //read carefully

after this

if(.s_vinding){
			if(checkvending() & .s_vinding){
				message strcharinfo(0),"[Hourly Rewards]: No Hourly Rewards for Venders , Relogin to change that .";
				if(.s_GePard_ip){
				query_logsql("delete from `sader_variables_log` where `variable` = '#Hourly_Rewads_Check' AND `account_id`= '"+getcharid(3)+"'");
				}
				#Hourly_Rewads_Check = 0;
				#Hourly_Ban = 1;
				addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
				end;
			}
		}

and before this

#Hourly_Rewads_Check += 1;
		if(.s_GePard_ip == 1){

add this

if (checkchatting()){
		addtimer 1800000, strnpcinfo(3)+"::OnChatOpen";
}

and above or under this

OnUnHourlyBan:
	#Hourly_Ban = 0;
end;

add this

OnChatOpen:
	message strcharinfo(0),"[Hourly Rewards]: No Hourly Rewards for Chat Rooms that more then 30min opend , Relogin to change that .";
	if(.s_GePard_ip){
	query_logsql("delete from `sader_variables_log` where `variable` = '#Hourly_Rewads_Check' AND `account_id`= '"+getcharid(3)+"'");
	}
	#Hourly_Rewads_Check = 0;
	#Hourly_Ban = 1;
end;	

 

Edited by sader1992
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  49
  • Reputation:   0
  • Joined:  10/13/17
  • Last Seen:  

I will try it! Thanks sader!

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  49
  • Reputation:   0
  • Joined:  10/13/17
  • Last Seen:  

9 hours ago, sader1992 said:

this not from that npc you need to check what the issue is

 

for your request //read carefully

after this


if(.s_vinding){
			if(checkvending() & .s_vinding){
				message strcharinfo(0),"[Hourly Rewards]: No Hourly Rewards for Venders , Relogin to change that .";
				if(.s_GePard_ip){
				query_logsql("delete from `sader_variables_log` where `variable` = '#Hourly_Rewads_Check' AND `account_id`= '"+getcharid(3)+"'");
				}
				#Hourly_Rewads_Check = 0;
				#Hourly_Ban = 1;
				addtimer .s_time, strnpcinfo(3)+"::OnHourlyRewards";
				end;
			}
		}

and before this


#Hourly_Rewads_Check += 1;
		if(.s_GePard_ip == 1){

add this


if (checkchatting()){
		addtimer 1800000, strnpcinfo(3)+"::OnChatOpen";
}

and above or under this


OnUnHourlyBan:
	#Hourly_Ban = 0;
end;

add this


OnChatOpen:
	message strcharinfo(0),"[Hourly Rewards]: No Hourly Rewards for Chat Rooms that more then 30min opend , Relogin to change that .";
	if(.s_GePard_ip){
	query_logsql("delete from `sader_variables_log` where `variable` = '#Hourly_Rewads_Check' AND `account_id`= '"+getcharid(3)+"'");
	}
	#Hourly_Rewads_Check = 0;
	#Hourly_Ban = 1;
end;	

 

Thanks sader its working perfectly! the only problem left is when they attack something like punching bag or they duel each other. the server arent detecting them as IDLE. guess thats kinda hard to fix.

 

Link to comment
Share on other sites

  • 0

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

well, you can use some trick like check for the coordinate of players.

if they keep stay at the same location, then just skip these players when assign the rewards.

getmapxy(.@map$, .@x,. @y, 0);
if (.@map$ == @last_map$ && .@x == @last_x && .@y == @last_y ) {
	// player stay in same location.
	atcommand "@kick "+strcharinfo(0);
	end;
}
@last_map$ = .@map$;
@last_x = .@x;
@last_y = .@y;

well of course you should also add in other condition checking to avoid it kick players who are just really in afk mode.

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  49
  • Reputation:   0
  • Joined:  10/13/17
  • Last Seen:  

14 hours ago, Emistry said:

well, you can use some trick like check for the coordinate of players.

if they keep stay at the same location, then just skip these players when assign the rewards.


getmapxy(.@map$, .@x,. @y, 0);
if (.@map$ == @last_map$ && .@x == @last_x && .@y == @last_y ) {
	// player stay in same location.
	atcommand "@kick "+strcharinfo(0);
	end;
}
@last_map$ = .@map$;
@last_x = .@x;
@last_y = .@y;

well of course you should also add in other condition checking to avoid it kick players who are just really in afk mode.

Thank you for this! I will try it later. Btw, can I msg you about a script I want to request? I am willing to pay. if you are busy thats fine I am willing to wait :).

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