Jump to content
  • 0

Script for Hourly points for the whole account


jobbyray25

Question


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  46
  • Reputation:   1
  • Joined:  07/15/13
  • Last Seen:  

can i ask a script for houlry points for the whole account not just per char and also an npc that shows the top 10 players who has the many hourly points has,

Link to comment
Share on other sites

11 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

This is hourly points script, but idk how to make top 10 ladder of hourly points, probably needs SQL idk yet how to make SQL. Maybe someone can help you.

//===== Hourly Points Script =========================================
//===== By: ==========================================================
//= GorthexTiger modified by Nibi
//===== Current Version: =============================================
//= 1.0
//===== 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.
//===== Additional Comments: =========================================
//= You can modify the script to your liking.
//= The default points is Kafrapoints change it anyway if you like.
//= 1.1 = Check Chatting too
//= 1.2 = 5 Minute Idle Check & @at/@autotrade check.
//= 1.3 = Corrected the current balance line on 12 Hours Consecutive
//====================================================================

-	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 15 Minutes
if(@afk == 30) {
	dispbottom "The Points stopped because you were idle for 30 minutes. Please relog if you wish to start again.";
	stopnpctimer;
	end;
}
end;

OnTimer60000:
set @minute, @minute + 1;
//Check for 15 Minute
if(@minute == 5){
	set @minute,0;
	set .@point_amt, 10; //Points to get every hour (default: 10)
	set #CASHPOINTS, #CASHPOINTS + .@point_amt;
	dispbottom "You received "+.@point_amt+" Kafrapoints by staying ingame for 5 minutes";
	dispbottom "Current Balance = "+#CASHPOINTS+" Kafrapoints";
	set @consecutive_hour, @consecutive_hour + 1;
	}
//Check for 12 hours consecutive
	if(@consecutive_hour == 6) {
	set @consecutive_hour,0;
	set .@cpoint_amt, 50; //Points to get for 12 Consecutive hours (default: 50)
	set #CASHPOINTS, #CASHPOINTS + .@cpoint_amt;
	dispbottom "You receive "+.@cpoint_amt+" You receive 30 bonus points by staying ingame Have fun";
	dispbottom "Current Balance = "+#CASHPOINTS+" Kafrapoints";
	}
stopnpctimer;
initnpctimer;
end;

}
//--End of the Script
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  46
  • Reputation:   1
  • Joined:  07/15/13
  • Last Seen:  

thank you lil for the reply , i hope some1 will help me with this

and do you have an npc script that will exchange the points to mithril coin??

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

Are you referring to CASH POINTS?

If yes, I dont have but i can make you one, how many Points = Mithril Coin?

Do you want vise versa trading?
Means Pts > Mith && Mith > PTS

If no, (MVP/PVP/WOE/ETC POINTS) sorry it will need SQL querry, idk how to make one atm.

Edited by Lil Troll
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:  

I updated this script for rAthena not to long ago. If you're using rAthena I think it would be best to use this version.

 

//===== Hourly Points Script =========================================
//===== By: ==========================================================
//= GorthexTiger modified by Nibi
//===== Current Version: =============================================
//= 1.0
//===== 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 3 hours consecutively
//= or without logging out of the game. If the player is vending
//= the script will then stop.
//===== Additional Comments: =========================================
//= You can modify the script to your liking.
//= The default points is Kafrapoints change it anyway if you like.
//= 1.1 = Check Chatting too
//= 1.2 = 5 Minute Idle Check & @at/@autotrade check.
//= 1.3 = Corrected the current balance line on 12 Hours Consecutive
//====================================================================
-	script	hourlypoints	-1,{
//--Start of the Script
OnPCLoginEvent:
	addtimer .timer,"hourlypoints::OnPointGet";
	end;
    
OnPointGet:
	while(checkvending() >= 1 || checkchatting() == 1 || checkidle()>=.dlimit) {
		sleep2 .delay;
		if(.@mes$=="")
			dispbottom set(.@mes$,"The hourly points event haulted because you were vending, chatting, or idle.");
	}

	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 3 hours consecutive
	if(@consecutive_hour == 3) {
		set @consecutive_hour,0;
		set #KAFRAPOINTS, #KAFRAPOINTS + .cpoint_amt;
		dispbottom "You receive "+.cpoint_amt+" Kafrapoints in playing for 12 consecutive hours";
		dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints";
	}
	addtimer .timer,"hourlypoints::OnPointGet";
	end;

OnInit:
	set .timer, 1000*60*60; //Timer in milliseconds.
	set .cpoint_amt, 50; //Points gained for consecutive time online.
	set .point_amt, 10; //Normal points gained.
	set .delay, 1000; //Delay for idle re-check check.
	set .dlimit, 60*5; //Stop points if afk greater then in seconds.
}
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

Wow thanks Skorm for the updated one, i really want to have this one. :D

Anyways @jobyray heres your requested script. :D
Just tell me whats the conversion rate do you want, im gonna change it, if you know how i youll be fine.

The script is working fine.

The conversion is 10 Mith = 1 Cash

//////////////////////////////////////////////
//           LIL TROLL                     //
// FEEL FREE TO MODIFY                    //
///////////////////////////////////////////
prontera,150,150,0	script	CASH&&MITHS	719,{
    set @name$,"^FF0000Trader^000000";
    mes @name$;
    mes "What do you want to do?";
    next;
    switch(select("Information","Convert")) {
        case 1:
            mes @name$;
            mes "I can convert your CASH into MITHRIL COINS and vice versa.";
            mes "10 MITHS CARD = 1 CASH";         // EDIT TO YOUR LIKING
            close;
        case 2:
            switch(select("MITHS to CASH","CASH to MITHS")) {
             case 1:
              mes @name$;
              mes "How many CASH you want to have?";
              input .@item_count ;
              if( .@item_count == 0 ) close;
                    if (countitem(674) < (.@item_count*10)) goto noMITH;
                    delitem 674,(.@item_count*10);
                    set #CASHPOINTS,#CASHPOINTS +.@item_count;
                    dispbottom "Current Balance = "+#CASHPOINTS+" Cashpoints";
                    next;
                    mes @name$;
                    mes "There you go! You got your " + .@item_count + " Cash.  Hope to see you again!";
                    close;
             case 2:
              mes @name$;
              mes "How many MITHS you want to have?";
              input .@item_count;
              if( .@item_count == 0 ) close;
                    if (checkweight(674,100) == 100 ) goto overWeight;
                    if (#CASHPOINTS == 0) goto noCASH;
                    set #CASHPOINTS,#CASHPOINTS-(.@item_count/10);
                    dispbottom "Current Balance = "+#CASHPOINTS+" Cashpoints";
                    getitem 674,.@item_count;
                    next;
                    mes @name$;
                    mes "There you go! You got your " + .@item_count + " Mithril Coins. Hope to see you again!";
                    close;
    }
            }
OnInit:
        waitingroom "CASH&&MITHS",0;  // WITH WAITING ROOM
end;

noCASH:
    next;
    mes @name$;
    mes "I'm Sorry but you don't have enough CASH.";
    close;

noMITH:
    next;
    mes @name$;
    mes "I'm Sorry you don't have enough MITHRIL COINS";
    close;
    
overWeight:
    next;
    mes @name$;
    mes "Sorry you're overweight.";
    close;
}}
Edited by Lil Troll
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  46
  • Reputation:   1
  • Joined:  07/15/13
  • Last Seen:  

its just hourlypoints to mithril coin.. only that but for now i dont need to convert it as of now i need is the npc thats shows who has the most hourly points,

and thanks for your reply guys i cannot qoute your messages because im at work ill try these script when i got home,

and just an npc that can buy cards using hourly points, and this houourly points will continue is they change char ?? what i mean is if they have two char or more but they aleays using the sinx and they have 100 hourly points if they switch to the other character does the points will continue in the 2nd char??

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  38
  • Topics Per Day:  0.01
  • Content Count:  276
  • Reputation:   24
  • Joined:  07/06/13
  • Last Seen:  

Here is the card shop via cash currency:

prontera,150,150,5	script	Yugi-Oh	107,{
        set $NPC_TRADER$, "[Yugi-Oh]";
        mes $NPC_TRADER$;
	mes "Hi, "+ strcharinfo(0) +"...."; 
	mes "So what are you up to?";
	mes "Do you want to buy CARDS using your CASHPOINTS?";
	menu "Yes, I need to buy something!",card,"No thanks!",gg;
card:
callshop "Card S", 0;
	end;
gg;
close;
}

-	cashshop	Card S	-,4001:100,4002:100,4003:100,4004:100,4005:100; // Change cards and the price you wanted.
//      callthe cash shop      -,card:price,card:price,card:price,card:price,card:price, 

 



Im sorry i dont know really how to make querries, i hope someone correct my work. So that both of us @jobby will learn.

//CREATE TABLE IF NOT EXISTS `Cash Ladder` (
//	`account_id` int(11) unsigned NOT NULL default '0',
//	`char_id` int(11) unsigned NOT NULL default '0',
//	`name` varchar(30) NOT NULL DEFAULT '',
//	`cash` int(11) unsigned NOT NULL default '0',
//	PRIMARY KEY  (`char_id`),
//	KEY `account_id` (`account_id`),
//	KEY `name` (`name`)
//) ENGINE=MyISAM;

-	script	CashLadder	-1,{

OnStart:
mes "[Cash Ladder]";
if( select("View Ladder:Cancel") == 1 )
	if( query_sql("SELECT `name`,`cash`, FROM `Cash Ladder` ORDER BY `cash` DESC LIMIT 127",.@Name$,.@cash ) ){
		mes "Cash Ladder : Ranking :";
		for( set .@i,0; .@i < getarraysize( .@Name$ ); set .@i,.@i + 1 )
			mes ( .@i + 1 )+". "+.@Name$[.@i]+" - ^0055FF"+.@Cash[.@i]+";
	}else
		mes "[Cash Ladder]";
		mes "No Record found.";
close;

OnInit:
set .@Name$,strcharinfo(3)
set .@Cash,#CASHPOINTS
if( strcharinfo(3) == .@Cash[.@i] )
			if( query_sql("SELECT `cash` FROM `Cash Ladder` WHERE `name`='"+strcharinfo(0)+"'",.@cash ) ){


ftown,210,213,6	script	CashLadder#1	459,{
	doevent "CashLadder::OnStart";
}
Edited by Lil Troll
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  46
  • Reputation:   1
  • Joined:  07/15/13
  • Last Seen:  

@lil thank you so much for the effort, ill try this later when i got home

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  65
  • Topics Per Day:  0.02
  • Content Count:  181
  • Reputation:   0
  • Joined:  08/07/13
  • Last Seen:  

Use this is work :D 

every 1hr get 2 points cash


-	script	hourlypoint1s	-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 badge rewards has stopped because you were vending / Pub Room. Please relog if you wish to start again.";
stopnpctimer;
end;
}

OnTimer60000:
set @minute, @minute + 1;
//Check for 1 Minute
if(@minute == 60){
set @minute,0;
set #CASHPOINTS, #CASHPOINTS + 2;
dispbottom "You received 2 CASHPOINTS for staying 1 hour in-game.";
set @consecutive_hour, @consecutive_hour + 1;
}
//Check for 12 hours consecutive
if(@consecutive_hour == 5) {
set @consecutive_hour,0;
set #CASHPOINTS, #CASHPOINTS + 20;
dispbottom "You received 20 CASHPOINTS for staying 5 hours in-game.";
}
stopnpctimer;
initnpctimer;
end;

}
//--End of the Script

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  126
  • Reputation:   4
  • Joined:  10/31/12
  • Last Seen:  

 

I updated this script for rAthena not to long ago. If you're using rAthena I think it would be best to use this version.

//===== Hourly Points Script =========================================
//===== By: ==========================================================
//= GorthexTiger modified by Nibi
//===== Current Version: =============================================
//= 1.0
//===== 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 3 hours consecutively
//= or without logging out of the game. If the player is vending
//= the script will then stop.
//===== Additional Comments: =========================================
//= You can modify the script to your liking.
//= The default points is Kafrapoints change it anyway if you like.
//= 1.1 = Check Chatting too
//= 1.2 = 5 Minute Idle Check & @at/@autotrade check.
//= 1.3 = Corrected the current balance line on 12 Hours Consecutive
//====================================================================
-	script	hourlypoints	-1,{
//--Start of the Script
OnPCLoginEvent:
	addtimer .timer,"hourlypoints::OnPointGet";
	end;
    
OnPointGet:
	while(checkvending() >= 1 || checkchatting() == 1 || checkidle()>=.dlimit) {
		sleep2 .delay;
		if(.@mes$=="")
			dispbottom set(.@mes$,"The hourly points event haulted because you were vending, chatting, or idle.");
	}

	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 3 hours consecutive
	if(@consecutive_hour == 3) {
		set @consecutive_hour,0;
		set #KAFRAPOINTS, #KAFRAPOINTS + .cpoint_amt;
		dispbottom "You receive "+.cpoint_amt+" Kafrapoints in playing for 12 consecutive hours";
		dispbottom "Current Balance = "+#KAFRAPOINTS+" Kafrapoints";
	}
	addtimer .timer,"hourlypoints::OnPointGet";
	end;

OnInit:
	set .timer, 1000*60*60; //Timer in milliseconds.
	set .cpoint_amt, 50; //Points gained for consecutive time online.
	set .point_amt, 10; //Normal points gained.
	set .delay, 1000; //Delay for idle re-check check.
	set .dlimit, 60*5; //Stop points if afk greater then in seconds.
}

nice script but sir how can i change the time

exmp every 10min get reward for //Normal points gained.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  


- set .timer, 1000*60*60; //Timer in milliseconds.

+ set .timer, 1000*60*10; //Timer in milliseconds.

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