Jump to content
  • 0

N> Script


freehit21

Question


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  68
  • Reputation:   0
  • Joined:  08/27/13
  • Last Seen:  

anyone has a hourlypoints script that counts on every minute?

 

like this "You are online for ___ mins"

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  68
  • Reputation:   0
  • Joined:  08/27/13
  • Last Seen:  

sir kido i actually looking for hourly points..

 

anyway i fixed my own script on our server here's mine..

 

----------------------------------------------------------------------------------------------

- 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 ___ Ragnarok Online playing 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 15 Minutes
if(@afk == 15) {
dispbottom "The ____ RO playing game time event stopped because you were idle for 5 minutes. Please relog if you wish to start again.";
stopnpctimer;
end;
}
end;


OnTimer59999:
set @min_check,@min_check + 1; 
set @minute, @minute + 1;
if(@minute == 30){
set @minute,0;
getitem 7227,100;
getitem 20080,100;
dispbottom "You've been online for "+@min_check+" minutes.";
initnpctimer;
}




stopnpctimer;
initnpctimer;
end;


}
-------------------------------------------------------------------------------------------------
 
its on 30mins basis
 
if youre online for every 30mins its say's like this
 
>>>> You've been online for 30 minutes.
>>>> You've been online for 60 minutes.
>>>> You've been online for 90 minutes.
>>>> You've been online for 120 minutes.
 
something like that without being idle or afk.. ^_^ thanks for those who helps
 
thank you to all the devs here.
Edited by Skorm
Codebox
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  108
  • Reputation:   12
  • Joined:  06/19/12
  • Last Seen:  

// By GorthexTiger
-	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 Ragnarok Online hourly cash 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 10 Minutes
if(@afk == 10) {
	dispbottom "The Ragnarok hourly points event stopped because you were idle for 5 minutes. Please relog if you wish to start again.";
	stopnpctimer;
	end;
}
end;

OnTimer60000:
set @min_check,@min_check + 1; // For checking minutes in-game.
set @minute, @minute + 1;
//Check for 1 Minute
if(@minute == 60){
	set @minute,0;
	set .@amount, 10; //Points to get every hour (default: 10)
	set .@reward, 7227; //Change the "7227" into any item ID you wish them to receive. Use "set" instead of "getitem" if you want to set a variable for it like #CASHPOINTS, #KAFRAPOINTS, or any custom variable.
	getitem .@reward,.@amount;
	dispbottom "You received 10 TCG Cards by staying in-game for 1 hour";
	dispbottom "You've been online for "+@min_check+" minutes."; // Displays the corresponding minutes online. Doesn't reset.
	set @consecutive_hour, @consecutive_hour + 1;
	}

stopnpctimer;
initnpctimer;
end;

}

//--End of the Script

Credits to GorthexTiger for this Hourly Points Script and I only modified a few lines.

 

This part displays the corresponding minutes you are online and doesn't resets every after 1 hour :

dispbottom "You've been online for "+@min_check+" minutes."; // Displays the corresponding minutes online. Doesn't reset.

As you can see, I added a minute check at this script :

set @min_check,@min_check + 1; // For checking minutes in-game.

So if you have been online for 2 hours, it'll display on the player's chat box as "You've been online for 120 minutes."

 

Just edit the value of .@amount for the amount to be given and the .@reward for the item name ID if you want them to receive :

	set .@amount, 10; //Points to get every hour (default: 10)
	set .@reward, 7227; //Change the "7227" into any item ID you wish them to receive. Use "set" instead of "getitem" if you want to set a variable for it like #CASHPOINTS, #KAFRAPOINTS, or any custom variable.
	getitem .@reward,.@amount;

If you want to set a variable for it like Cash Points, edit the part "getitem" to "set" and edit the variable to be used at .@reward:

For example, I want them to receive 10 Cash Points every hour so the script should be like this instead of the one above :

	set .@amount, 10; //Points to get every hour (default: 10)
	set .@reward, #CASHPOINTS;
	set .@reward,.@amount;

Hope I helped... Please don't forget to click the Green UP Button on the lower right of my comment if I helped. Thanks

Edited by Spades
  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  68
  • Reputation:   0
  • Joined:  08/27/13
  • Last Seen:  

thanks sir. I will try this on my server. :)


sir its not working?


does anyone knows how to revise the script like this info.

 

1. tells you when the event hourlypoints is started like this

"Hourly points has been started"

 

2. tells you every minute that you consumed time from the event like this..

"You are online in __ minute.!"

 

3. tells you that the event has stopped because you are idle for ___ mins..

Edited by freehit21
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  68
  • Reputation:   0
  • Joined:  08/27/13
  • Last Seen:  

no reply sir developers?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

always whe n you get errors, psot what errors you are getting DD:

 

huh try this one, it's so cool  too o:!

 

http://rathena.org/board/topic/84800-stolaos-script-collection-update-5-4-2014-1111/

 

that reward is pretty awesome actually

 

try to find those script before asking for them DDD:!

Link to comment
Share on other sites


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

 

sir kido i actually looking for hourly points..

 

anyway i fixed my own script on our server here's mine..

 
its on 30mins basis
 
if youre online for every 30mins its say's like this
 
>>>> You've been online for 30 minutes.
>>>> You've been online for 60 minutes.
>>>> You've been online for 90 minutes.
>>>> You've been online for 120 minutes.
 
something like that without being idle or afk.. ^_^ thanks for those who helps
 
thank you to all the devs here.

 

 

Did you resolve this topic yourself? I can't tell anyways I'm marking this as solved just quote me if you still need help with this.

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