Jump to content
  • 0

kinda need help im a newbie XD


jadedlight

Question


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   0
  • Joined:  08/14/15
  • Last Seen:  

 

- 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 or you are a poring haha. 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;
}
end;
set @map$, .@map$; set @x, .@x; set @y, .@y;
Idle Check for 5 Minutes
if(@afk == 0) {
dispbottom "The hourly points event stopped because you were idle for 5 minutes. Please relog if you wish to start again.";
stopnpctimer;
}
OnTimer60000:
set @minute, @minute + 1;
//Check for 1 Minute
if(@minute == 60){
set @minute,0;
set .@point_amt, 2; //Points to get every hour (default: 10)
getitem 21009,.@point_amt;
dispbottom "You received "+.@point_amt+"Event Ticket by staying ingame for 1 hour or you are lucky to get this haha!<.<";
set @consecutive_hour, @consecutive_hour + 1;
end;
}
//Check for 12 hours consecutive
if(@consecutive_hour == 12) {
set @consecutive_hour,0;
set .@cpoint_amt, 50; //Points to get for 12 Consecutive hours (default: 50)
getitem 21009,.@point_amt;
dispbottom "You received "+.@point_amt+"Event Ticket in playing for 12 consecutive hours. <.< dude you need sleep!";
}
stopnpctimer;
initnpctimer;
end;
}

wanted to as how to make it work for AFK people

i mean people can get the reward too even if they are afk :( been rescripting it for a day now cant get it to work! it works on people that are moving around 

 

TIA hope someone can help this noob that is me hahaha!

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   0
  • Joined:  08/14/15
  • Last Seen:  

sorry for the late reply wanted to give them 2 event tickets every hour..

still checking now if it works fine XD thank you


 12021948_1064982366846461_282471706_n.jp

 

=.= this error makes me go nae nae haha tried to change it.. nothing works.. any advice?


SOLVED SORRY had an extra curly lol =.= dang 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   46
  • Joined:  03/27/13
  • Last Seen:  

 

 

- 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 or you are a poring haha. 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;
}
end;
set @map$, .@map$; set @x, .@x; set @y, .@y;
Idle Check for 5 Minutes
if(@afk == 0) {
dispbottom "The hourly points event stopped because you were idle for 5 minutes. Please relog if you wish to start again.";
stopnpctimer;
}
OnTimer60000:
set @minute, @minute + 1;
//Check for 1 Minute
if(@minute == 60){
set @minute,0;
set .@point_amt, 2; //Points to get every hour (default: 10)
getitem 21009,.@point_amt;
dispbottom "You received "+.@point_amt+"Event Ticket by staying ingame for 1 hour or you are lucky to get this haha!<.<";
set @consecutive_hour, @consecutive_hour + 1;
end;
}
//Check for 12 hours consecutive
if(@consecutive_hour == 12) {
set @consecutive_hour,0;
set .@cpoint_amt, 50; //Points to get for 12 Consecutive hours (default: 50)
getitem 21009,.@point_amt;
dispbottom "You received "+.@point_amt+"Event Ticket in playing for 12 consecutive hours. <.< dude you need sleep!";
}
stopnpctimer;
initnpctimer;
end;
}

wanted to as how to make it work for AFK people

i mean people can get the reward too even if they are afk :( been rescripting it for a day now cant get it to work! it works on people that are moving around 

 

TIA hope someone can help this noob that is me hahaha!

 

 

Find:

//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;
}
end;
set @map$, .@map$; set @x, .@x; set @y, .@y;
Idle Check for 5 Minutes
if(@afk == 0) {
dispbottom "The hourly points event stopped because you were idle for 5 minutes. Please relog if you wish to start again.";
stopnpctimer;
}

Replace:

//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 == 5) {
	dispbottom "The hourly points event stopped because you were idle for 5 minutes. Please relog if you wish to start again.";
	stopnpctimer;
	end;
}
*/
end;

Now if you also wanna reward people who're AFK with chatroom,

 

Find:

OnTimer30000:
//Check if Vending (normal or @at)
if(checkvending() >= 1 || checkchatting() == 1)

Replace:

OnTimer30000:
//Check if Vending (normal or @at)
if(checkvending() >= 1)

Basically you just erase that checkchatting() == 1, so that makes it only people who're vending / autovending will be excluded on the rewards.

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


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   0
  • Joined:  08/14/15
  • Last Seen:  

thank you so much XD you made someone so happy XD

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   46
  • Joined:  03/27/13
  • Last Seen:  

No problem.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   0
  • Joined:  08/14/15
  • Last Seen:  

now the problem is that it gives random Q.Q it gives afk people not like 1 every 1hour but many times in an hour 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  47
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   46
  • Joined:  03/27/13
  • Last Seen:  

now the problem is that it gives random Q.Q it gives afk people not like 1 every 1hour but many times in an hour 

 

How many reward item do you want to give your players?

 

EDIT: I think this is the problem:

 

Find:

//Check for 12 hours consecutive
if(@consecutive_hour == 12) {
set @consecutive_hour,0;
set .@cpoint_amt, 50; //Points to get for 12 Consecutive hours (default: 50)
getitem 21009,.@point_amt;
dispbottom "You received "+.@point_amt+"Event Ticket in playing for 12 consecutive hours. <.< dude you need sleep!";
}

Replace:

//Check for 12 hours consecutive
if(@consecutive_hour == 12) {
set @consecutive_hour,0;
set .@cpoint_amt, 50; //Points to get for 12 Consecutive hours (default: 50)
getitem 21009,.@cpoint_amt;
dispbottom "You received "+.@cpoint_amt+"Event Ticket in playing for 12 consecutive hours. <.< dude you need sleep!";
}

Should be @cpoint_amt on consecutive instead of @point_amt.

Edited by Mary Magdalene
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...