Jump to content
  • 0

request - npc who give hourly points


oblinez

Question


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   1
  • Joined:  02/23/14
  • Last Seen:  

hi
can i request an npc? a simple npc who gives hourly points with a sistem security
this npc dont give points for player who stay stopped for more than 15 minutes
and this npc dont give points for players under @autotrade

Thanks in advance
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  


- script hourlypoints -1,{

OnPCLoginEvent:

attachnpctimer();

startnpctimer();

end;

OnTimer3600000:

if( checkidle() < 900 && !@autotrade ) {

.@mes$ = "";

set #KAFRAPOINTS, #KAFRAPOINTS + .point_amt;

dispbottom "You received "+.point_amt+" Kafrapoints by staying in-game for 1 hour";

dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints";

set @consecutive_hour, @consecutive_hour + 1;

//Check for 3 hours consecutive

if(@consecutive_hour == 3) {

set @consecutive_hour,0;

set #KAFRAPOINTS, #KAFRAPOINTS + .cpoint_amt;

dispbottom "You receive "+.cpoint_amt+" Kafrapoints for 3 consecutive hours of play.";

dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints";

}

} else if( !getstrlen(.@mes$) ) {

.@mes$ = "While afk for 15 minutes or more you will not receive hourly points.";

dispbottom .@mes$;

}

attachnpctimer();

initnpctimer();

end;

OnCommand:

@autotrade = 1;

atcommand "@autotrade";

end;

OnInit:

bindatcmd "autotrade","hourlypoints::OnCommand";

set .cpoint_amt, 50; //Points gained for consecutive time online.

set .point_amt, 10; //Normal points gained.

}

Edited by Skorm
Caught something I missed.
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   1
  • Joined:  02/23/14
  • Last Seen:  


- script hourlypoints -1,{

OnPCLoginEvent:

attachnpctimer();

startnpctimer();

end;

OnTimer3600000:

if( checkidle() < 900 && !@autotrade ) {

.@mes$ = "";

set #KAFRAPOINTS, #KAFRAPOINTS + .point_amt;

dispbottom "You received "+.point_amt+" Kafrapoints by staying in-game for 1 hour";

dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints";

set @consecutive_hour, @consecutive_hour + 1;

//Check for 3 hours consecutive

if(@consecutive_hour == 3) {

set @consecutive_hour,0;

set #KAFRAPOINTS, #KAFRAPOINTS + .cpoint_amt;

dispbottom "You receive "+.cpoint_amt+" Kafrapoints for 3 consecutive hours of play.";

dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints";

}

} else if( !getstrlen(.@mes$) ) {

.@mes$ = "While afk for 15 minutes or more you will not receive hourly points.";

dispbottom .@mes$;

}

attachnpctimer();

initnpctimer();

end;

OnCommand:

@autotrade = 1;

atcommand "@autotrade";

end;

OnInit:

bindatcmd "autotrade","hourlypoints::OnCommand";

set .cpoint_amt, 50; //Points gained for consecutive time online.

set .point_amt, 10; //Normal points gained.

}

skorm thx alot bro but i forget one detail... coud u edit this script to work with hourlypoints table on login db? and can you disable the "//Check for 3 hours consecutive" ??

skorm, if( checkidle() < 900 && !@autotrade ) <<<this part block @at too? or any command to open shop?

Edited by oblinez
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...