Jump to content
  • 0

Rebirth System [50 Rebirths]


WhatFT

Question


  • Group:  Members
  • Topic Count:  142
  • Topics Per Day:  0.03
  • Content Count:  511
  • Reputation:   7
  • Joined:  02/15/12
  • Last Seen:  

Can anyone got this kind of script? Or If anyone can make some script like this?

 

What kind of Rebirth System :

 

  • Only works in rAthena.
  • Maximum Rebirth is 50.
  • Each rebirth will give 300 Stat Points until they reach 30th Rebirth.
  • Once they reach the 30th Rebirth, they will now receive Items instead of Stat Points until they reach the 50th Rebirth. 
  • The Rebirth NPC will always check their weight limit before they rebirth, If their weight is quite large then the NPC won't make them rebirth.
  • Players who got to rebirth will be Broadcasted.
  • Players that have finished their Rebirth Stages will reset their Levels back into 1 including their Stat Point (This does not affect the additional Stat Points per rebirth, It will still remain).
  • Players can only Rebirth once they have the Single Item Requirement. (Like Rebirth Ticket)
  • Optional : Saves the rebirth of each character in the logs of Account ID, Character Name, No. of Reborn and IP Address.

 

How the Rebirth System works :

 

  • Each Rebirth will have atleast 5 Item Requirements like (Sample) 512, 513, 514, 515, 516...
  • Each Rebirth will increase the amount of the Item Requirements by 1 until it reaches the 30th Rebirth.
  • Once the player reaches 30th Rebirth, there will be an Additional Item Requirement, (Sample) Item ID 505..

 

Hope someone will share or make some kind of this script... THANK YOU!

Link to comment
Share on other sites

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  142
  • Topics Per Day:  0.03
  • Content Count:  511
  • Reputation:   7
  • Joined:  02/15/12
  • Last Seen:  

 

Add an exception for the expanded class in the line

else if( NextJobExp || NextBaseExp || !( .@eac&EAJL_2 ) || !Upper ) {

How? Sorry Don't get it..

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  04/14/14
  • Last Seen:  

 

 

 

Bonjour monsieur Capuche,

 

Im using this Reborn System script that you made and I'm thankful for creating it..

If you dont mind  monsieur can I request some additional  script for it,

 

Id like to request scripts for the Reborn NPC to appear at 12pm - 12:10pm and 12am - 12:10am everyday...

 

Thank you monsieur bonne journée :)

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

Use OnClock and disablenpc/enablenpc

// rewards <item ID>, <number>
	setarray .reward, 7732, 5;
	.size_reward = getarraysize( .reward );
	end;

OnClock0000:
OnClock1200:
	disablenpc strnpcinfo(3);
	end;
OnClock0010:
OnClock1210:
	enablenpc strnpcinfo(3);
	end;
}
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  04/14/14
  • Last Seen:  


 

Sir Capuche I put it already  and the NPC is gone...

when I input @reload scripts and then when the time is right

the NPC wont appear.. =(

 

 

 

 

Mille fois merci  monsieur :)

 

 

 

I forgot to say it in my last post monsieur,

if you dont mind, can you  add a script when the NPC enabled he will broadcast/announce that he have arrive and then when the NPC disabled he will broadcast/announce that he will leave..

 

merci, monsieur   /no1 

Edited by nicoyerel01
Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

Tss my mistake

try with this

// rewards <item ID>, <number>
	setarray .reward, 7732, 5;
	.size_reward = getarraysize( .reward );

	.@t = gettimetick(1);
	if ( .@t > 10*60 && .@t < 12*60*60 || .@t > ( 12*60*60 + 10*60 ) )
		disablenpc strnpcinfo(3);
	end;

OnClock0000:
OnClock1200:
	enablenpc strnpcinfo(3);
	announce "The rebirth npc appear!", 0;
	end;
OnClock0010:
OnClock1210:
	disablenpc strnpcinfo(3);
	announce "The rebirth npc is gone!", 0;
	end;
}
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  04/14/14
  • Last Seen:  

 

Tss my mistake

try with this


 

 

Hellow monsieur   :)

I cant get it work

here are my scripts,  

 

Is there any thing I done wrong in it?

 

Merci :)

//*/
//CREATE TABLE IF NOT EXISTS `rebirth_system` (
//  `account_id` int(11) unsigned NOT NULL default '0',
//  `name` varchar(255) NOT NULL DEFAULT 'NULL',
//  `num_rebirth` int(11) unsigned NOT NULL default '0',
// `last_ip` varchar(100) NOT NULL default '',
//  PRIMARY KEY  (`account_id`)
//) ENGINE=MyISAM;
//*/





alberta,185,139,5	script	Fairy King	624,{
function checkItem;			// check if player have all item required
function colorItemrequired;	// color the text. Red : not enough item, green otherwise
function deleteItem;		// delete all items required
function displayItemneed;	// display all items need at start
function getItemReward;		// give the items reward
function weightreq;			// check if your current weight is highter than weight high novice


	.@eac = eaclass();
	if ( num_rebirth == .reset_max ) {
		mes "You can only rebirth x"+ .reset_max +".";
		emotion e_gasp;
		close;
	}
	else if( NextJobExp || NextBaseExp || !( .@eac&EAJL_2 ) || !Upper ) {
		mes "Your Base & Job Lv must be maximum before you rebirth.";
		close;
	}

	mes "Items need :";
	displayItemneed();
	next;

	switch( select( "^777777~ Rebirth", "~ Informations", "~ Good bye^000000" ) ) {
		case 1:
			weightreq();
			checkItem();
			deleteItem();
			break;
		case 2:
			mes "You can only rebirth ^ff0000x"+ .reset_max +"^000000. You already have ^ff0000x"+ num_rebirth +"^000000 Rebirth.";
			mes "Each rebirth you get ^ff0000"+ .num_status +"^000000 Stat Points and after ^ff0000"+ .change_reward +"^000000 rebirth, you can receive Random as a reward!";
			close;
		case 3:
			mes "Bye.";
			close;
	}
	num_rebirth += 1;
	if ( Upper ) {	// just in case the user change the setting...
		lastJob = roclass( .@eac&EAJ_UPPERMASK );
		jobchange Job_Novice_High;
	}
	else
		jobchange Job_Novice;
	resetlvl 1;
	if ( num_rebirth < .change_reward )
		StatusPoint = StatusPoint + .num_status * num_rebirth;
	else {
		StatusPoint = StatusPoint + .num_status * .change_reward;
		getItemReward();
	}
	query_sql "insert into `rebirth_system` values ( "+ getcharid(3) +", '"+ escape_sql( strcharinfo(0) ) +"', '"+ num_rebirth +"', '"+ getcharip() +"' ) on duplicate key update `num_rebirth` = `num_rebirth` +1";
	announce " "+ strcharinfo(0) +" has been Reborn  "+ num_rebirth +" Times!", 0;
	set ClassHelper,0;
	close;



function checkItem {
	for ( ; .@i < .size_item; .@i += 2 )
		if ( countitem( .item_req[.@i] ) < .item_req[ .@i+1 ] + num_rebirth ) {
			mes "You don't have enought "+ getitemname( .item_req[.@i] ) +". ^ff0000["+ countitem( .item_req[.@i] ) +"/"+ ( .item_req[ .@i+1 ] + num_rebirth ) +"]^000000";
			close;
		}
	if ( num_rebirth >= .change_reward )
		if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) ) {
			mes "You don't have enought "+ getitemname( .add_item_req[0] ) +". ^ff0000["+ countitem( .add_item_req[0] ) +"/"+ ( .add_item_req[1] + num_rebirth - .change_reward ) +"]^000000";
			close;
		}
	return;
}

function colorItemrequired {
	if ( countitem( .item_req[ getarg(0) ] ) < .item_req[ getarg(0)+1 ] + num_rebirth ) return "^ff0000";
	return "^00ff00";
}

function deleteItem {
	for ( ; .@i < .size_item; .@i += 2 )
		delitem .item_req[.@i], ( .item_req[ .@i+1 ] + num_rebirth );
	if ( num_rebirth >= .change_reward )
		delitem .add_item_req[0], ( .add_item_req[1] + num_rebirth - .change_reward );
	return;
}

function displayItemneed {
	for ( ; .@i < .size_item; .@i += 2 )
		mes colorItemrequired( .@i ) +" - x"+ ( .item_req[ .@i+1 ] + num_rebirth ) +" "+ getitemname( .item_req[.@i] );
	if ( num_rebirth >= .change_reward ) {
		if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) )
			.@color$ = "^ff0000";
		else
			.@color$ = "^00ff00";
		mes .@color$ +"- x"+ ( .add_item_req[1] + ( num_rebirth - .change_reward ) ) +" "+ getitemname( .add_item_req[0] );
	}
	return;
}

function getItemReward {
	for ( ; .@i < .size_reward; .@i += 2 )
		getitem .reward[.@i], .reward[ .@i+1 ];
	return;
}

function weightreq {
	if ( Weight > 35000 ) {
		mes "You have too much items on you. Your weight will be too high after rebirth.";
		close;
	}
	return;
}

OnInit:
	.reset_max = 999;		// how much reset max
	.change_reward = 900;	// after 30 rebirth, change reward
	.num_status = 200;		// + X number of status points

// item required <item ID>, <number>
	setarray .item_req, 750, 5,
						751, 5,
						7029, 3;
	.size_item = getarraysize( .item_req );

// additionnal items after rebirth >> .change_reward
// <item ID>, <number>
	setarray .add_item_req, 7029, 3;

}


// rewards <item ID>, <number>
	setarray .reward, 7732, 5;
	.size_reward = getarraysize( .reward );
	end;

OnClock0939:
OnClock1200:
	enablenpc strnpcinfo(3);
	announce "The rebirth npc appear!", 0;
	end;
OnClock0945:
OnClock1210:
	disablenpc strnpcinfo(3);
	announce "The rebirth npc is gone!", 0;
	end;
}


Edited by nicoyerel01
Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  


//*/

//CREATE TABLE IF NOT EXISTS `rebirth_system` (

// `account_id` int(11) unsigned NOT NULL default '0',

// `name` varchar(255) NOT NULL DEFAULT 'NULL',

// `num_rebirth` int(11) unsigned NOT NULL default '0',

// `last_ip` varchar(100) NOT NULL default '',

// PRIMARY KEY (`account_id`)

//) ENGINE=MyISAM;

//*/

alberta,185,139,5 script Fairy King 624,{

function checkItem; // check if player have all item required

function colorItemrequired; // color the text. Red : not enough item, green otherwise

function deleteItem; // delete all items required

function displayItemneed; // display all items need at start

function getItemReward; // give the items reward

function weightreq; // check if your current weight is highter than weight high novice

.@eac = eaclass();

if ( num_rebirth == .reset_max ) {

mes "You can only rebirth x"+ .reset_max +".";

emotion e_gasp;

close;

}

else if( NextJobExp || NextBaseExp || !( .@eac&EAJL_2 ) || !Upper ) {

mes "Your Base & Job Lv must be maximum before you rebirth.";

close;

}

mes "Items need :";

displayItemneed();

next;

switch( select( "^777777~ Rebirth", "~ Informations", "~ Good bye^000000" ) ) {

case 1:

weightreq();

checkItem();

deleteItem();

break;

case 2:

mes "You can only rebirth ^ff0000x"+ .reset_max +"^000000. You already have ^ff0000x"+ num_rebirth +"^000000 Rebirth.";

mes "Each rebirth you get ^ff0000"+ .num_status +"^000000 Stat Points and after ^ff0000"+ .change_reward +"^000000 rebirth, you can receive Random as a reward!";

close;

case 3:

mes "Bye.";

close;

}

num_rebirth += 1;

if ( Upper ) { // just in case the user change the setting...

lastJob = roclass( .@eac&EAJ_UPPERMASK );

jobchange Job_Novice_High;

}

else

jobchange Job_Novice;

resetlvl 1;

if ( num_rebirth < .change_reward )

StatusPoint = StatusPoint + .num_status * num_rebirth;

else {

StatusPoint = StatusPoint + .num_status * .change_reward;

getItemReward();

}

query_sql "insert into `rebirth_system` values ( "+ getcharid(3) +", '"+ escape_sql( strcharinfo(0) ) +"', '"+ num_rebirth +"', '"+ getcharip() +"' ) on duplicate key update `num_rebirth` = `num_rebirth` +1";

announce " "+ strcharinfo(0) +" has been Reborn "+ num_rebirth +" Times!", 0;

set ClassHelper,0;

close;

function checkItem {

for ( ; .@i < .size_item; .@i += 2 )

if ( countitem( .item_req[.@i] ) < .item_req[ .@i+1 ] + num_rebirth ) {

mes "You don't have enought "+ getitemname( .item_req[.@i] ) +". ^ff0000["+ countitem( .item_req[.@i] ) +"/"+ ( .item_req[ .@i+1 ] + num_rebirth ) +"]^000000";

close;

}

if ( num_rebirth >= .change_reward )

if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) ) {

mes "You don't have enought "+ getitemname( .add_item_req[0] ) +". ^ff0000["+ countitem( .add_item_req[0] ) +"/"+ ( .add_item_req[1] + num_rebirth - .change_reward ) +"]^000000";

close;

}

return;

}

function colorItemrequired {

if ( countitem( .item_req[ getarg(0) ] ) < .item_req[ getarg(0)+1 ] + num_rebirth ) return "^ff0000";

return "^00ff00";

}

function deleteItem {

for ( ; .@i < .size_item; .@i += 2 )

delitem .item_req[.@i], ( .item_req[ .@i+1 ] + num_rebirth );

if ( num_rebirth >= .change_reward )

delitem .add_item_req[0], ( .add_item_req[1] + num_rebirth - .change_reward );

return;

}

function displayItemneed {

for ( ; .@i < .size_item; .@i += 2 )

mes colorItemrequired( .@i ) +" - x"+ ( .item_req[ .@i+1 ] + num_rebirth ) +" "+ getitemname( .item_req[.@i] );

if ( num_rebirth >= .change_reward ) {

if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) )

.@color$ = "^ff0000";

else

.@color$ = "^00ff00";

mes .@color$ +"- x"+ ( .add_item_req[1] + ( num_rebirth - .change_reward ) ) +" "+ getitemname( .add_item_req[0] );

}

return;

}

function getItemReward {

for ( ; .@i < .size_reward; .@i += 2 )

getitem .reward[.@i], .reward[ .@i+1 ];

return;

}

function weightreq {

if ( Weight > 35000 ) {

mes "You have too much items on you. Your weight will be too high after rebirth.";

close;

}

return;

}

OnInit:

.reset_max = 999; // how much reset max

.change_reward = 900; // after 30 rebirth, change reward

.num_status = 200; // + X number of status points

// item required <item ID>, <number>

setarray .item_req, 750, 5,

751, 5,

7029, 3;

.size_item = getarraysize( .item_req );

// additionnal items after rebirth >> .change_reward

// <item ID>, <number>

setarray .add_item_req, 7029, 3;

end;

OnClock0939:

OnClock1200:

enablenpc strnpcinfo(3);

announce "The rebirth npc appear!", 0;

end;

OnClock0945:

OnClock1210:

disablenpc strnpcinfo(3);

announce "The rebirth npc is gone!", 0;

end;

}

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  1
  • Reputation:   0
  • Joined:  08/23/14
  • Last Seen:  

Hi sir,

 

How to make some headgears or item only can be equipped with required rebirth?

 

Need your help.

 

Thanks you.

 

Hezels


//*/
//CREATE TABLE IF NOT EXISTS `rebirth_system` (
//  `account_id` int(11) unsigned NOT NULL default '0',
//  `name` varchar(255) NOT NULL DEFAULT 'NULL',
//  `num_rebirth` int(11) unsigned NOT NULL default '0',
// `last_ip` varchar(100) NOT NULL default '',
//  PRIMARY KEY  (`account_id`)
//) ENGINE=MyISAM;
//*/





alberta,185,139,5	script	Fairy King	624,{
function checkItem;			// check if player have all item required
function colorItemrequired;	// color the text. Red : not enough item, green otherwise
function deleteItem;		// delete all items required
function displayItemneed;	// display all items need at start
function getItemReward;		// give the items reward
function weightreq;			// check if your current weight is highter than weight high novice


	.@eac = eaclass();
	if ( num_rebirth == .reset_max ) {
		mes "You can only rebirth x"+ .reset_max +".";
		emotion e_gasp;
		close;
	}
	else if( NextJobExp || NextBaseExp || !( .@eac&EAJL_2 ) || !Upper ) {
		mes "Your Base & Job Lv must be maximum before you rebirth.";
		close;
	}

	mes "Items need :";
	displayItemneed();
	next;

	switch( select( "^777777~ Rebirth", "~ Informations", "~ Good bye^000000" ) ) {
		case 1:
			weightreq();
			checkItem();
			deleteItem();
			break;
		case 2:
			mes "You can only rebirth ^ff0000x"+ .reset_max +"^000000. You already have ^ff0000x"+ num_rebirth +"^000000 Rebirth.";
			mes "Each rebirth you get ^ff0000"+ .num_status +"^000000 Stat Points and after ^ff0000"+ .change_reward +"^000000 rebirth, you can receive Random as a reward!";
			close;
		case 3:
			mes "Bye.";
			close;
	}
	num_rebirth += 1;
	if ( Upper ) {	// just in case the user change the setting...
		lastJob = roclass( .@eac&EAJ_UPPERMASK );
		jobchange Job_Novice_High;
	}
	else
		jobchange Job_Novice;
	resetlvl 1;
	if ( num_rebirth < .change_reward )
		StatusPoint = StatusPoint + .num_status * num_rebirth;
	else {
		StatusPoint = StatusPoint + .num_status * .change_reward;
		getItemReward();
	}
	query_sql "insert into `rebirth_system` values ( "+ getcharid(3) +", '"+ escape_sql( strcharinfo(0) ) +"', '"+ num_rebirth +"', '"+ getcharip() +"' ) on duplicate key update `num_rebirth` = `num_rebirth` +1";
	announce " "+ strcharinfo(0) +" has been Reborn  "+ num_rebirth +" Times!", 0;
	set ClassHelper,0;
	close;



function checkItem {
	for ( ; .@i < .size_item; .@i += 2 )
		if ( countitem( .item_req[.@i] ) < .item_req[ .@i+1 ] + num_rebirth ) {
			mes "You don't have enought "+ getitemname( .item_req[.@i] ) +". ^ff0000["+ countitem( .item_req[.@i] ) +"/"+ ( .item_req[ .@i+1 ] + num_rebirth ) +"]^000000";
			close;
		}
	if ( num_rebirth >= .change_reward )
		if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) ) {
			mes "You don't have enought "+ getitemname( .add_item_req[0] ) +". ^ff0000["+ countitem( .add_item_req[0] ) +"/"+ ( .add_item_req[1] + num_rebirth - .change_reward ) +"]^000000";
			close;
		}
	return;
}

function colorItemrequired {
	if ( countitem( .item_req[ getarg(0) ] ) < .item_req[ getarg(0)+1 ] + num_rebirth ) return "^ff0000";
	return "^00ff00";
}

function deleteItem {
	for ( ; .@i < .size_item; .@i += 2 )
		delitem .item_req[.@i], ( .item_req[ .@i+1 ] + num_rebirth );
	if ( num_rebirth >= .change_reward )
		delitem .add_item_req[0], ( .add_item_req[1] + num_rebirth - .change_reward );
	return;
}

function displayItemneed {
	for ( ; .@i < .size_item; .@i += 2 )
		mes colorItemrequired( .@i ) +" - x"+ ( .item_req[ .@i+1 ] + num_rebirth ) +" "+ getitemname( .item_req[.@i] );
	if ( num_rebirth >= .change_reward ) {
		if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) )
			.@color$ = "^ff0000";
		else
			.@color$ = "^00ff00";
		mes .@color$ +"- x"+ ( .add_item_req[1] + ( num_rebirth - .change_reward ) ) +" "+ getitemname( .add_item_req[0] );
	}
	return;
}

function getItemReward {
	for ( ; .@i < .size_reward; .@i += 2 )
		getitem .reward[.@i], .reward[ .@i+1 ];
	return;
}

function weightreq {
	if ( Weight > 35000 ) {
		mes "You have too much items on you. Your weight will be too high after rebirth.";
		close;
	}
	return;
}

OnInit:
	.reset_max = 999;		// how much reset max
	.change_reward = 900;	// after 30 rebirth, change reward
	.num_status = 200;		// + X number of status points

// item required <item ID>, <number>
	setarray .item_req, 750, 5,
						751, 5,
						7029, 3;
	.size_item = getarraysize( .item_req );

// additionnal items after rebirth >> .change_reward
// <item ID>, <number>
	setarray .add_item_req, 7029, 3;
	end;

OnClock0939:
OnClock1200:
	enablenpc strnpcinfo(3);
	announce "The rebirth npc appear!", 0;
	end;
OnClock0945:
OnClock1210:
	disablenpc strnpcinfo(3);
	announce "The rebirth npc is gone!", 0;
	end;
}


Sir Please Help~

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  14
  • Reputation:   1
  • Joined:  09/19/14
  • Last Seen:  

Discord: https://discord.gg/uh3GJ9XxqQ

Edited by Dev-Merot
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  68
  • Reputation:   1
  • Joined:  10/16/12
  • Last Seen:  

Here is my Script. 

i have a problem! ||

Can some one edit this enable to use for gunslinger , ninja , and star gladiator ?:( 

And also working rebirth on expanded jobs! PLSSSS

 

prontera,164,174,5	script	Rebirth System	833,{
function checkItem;			// check if player have all item required
function colorItemrequired;	// color the text. Red : not enough item, green otherwise
function deleteItem;		// delete all items required
function displayItemneed;	// display all items need at start
function getItemReward;		// give the items reward
//function weightreq;			// check if your current weight is highter than weight high novice


	.@eac = eaclass();
	if ( num_rebirth4 == .reset_max ) {
		mes "You can only rebirth x"+ .reset_max +".";
		emotion e_gasp;
		close;
	}
	else if( NextJobExp || NextBaseExp || !( .@eac&EAJL_2 ) || !Upper ) {
		mes "You must be rebirth max level/max job level.";
		close;
	}

	mes "Items need :";
	displayItemneed();
	next;

	switch( select( "^777777~ Rebirth", "~ Informations", "~ Rebirth ranking", "~ Good bye^000000" ) ) {
		case 1:
			checkItem();
			deleteItem();
			break;
		case 2:
			mes "You can only rebirth ^ff0000x"+ .reset_max +"^000000. You already rebirth ^ff0000x"+ num_rebirth4 +"^000000.";
			mes "Each rebirth you get ^ff0000"+ .num_status +"^000000 status points and after ^ff0000"+ .change_reward +"^000000 rebirth, you get only some items.";
			close;
		case 4:
			mes "Bye.";
			close;
		case 3:
			mes "TOP 50 of rebirth.";
			mes "Name  -  Number of rebirth";
			.@size = query_sql( "select `name`, `num_rebirth4` from `rebirth_system` order by `num_rebirth4` desc limit 50", .@name$, .@value );
			if( .@size ) {
				for( .@i = 0; .@i < .@size; .@i++ )
					mes "^777777"+ ( .@i +1 ) +"^000000 : "+ .@name$[.@i] +" : ^FF0000"+ .@value[.@i] +"^000000";
			}
			else
				mes "^0000ff* the list is empty *^000000";
			close;
	}
	num_rebirth4 += 1;
	if ( Upper ) {	// just in case the user change the setting...
		lastJob = roclass( .@eac&EAJ_UPPERMASK );
		jobchange Job_Novice_High;
	}
	else
		jobchange Job_Novice;
	resetlvl 1;
	if ( num_rebirth < 30 )
		StatusPoint = StatusPoint + .num_status * num_rebirth;
	else
		getItemReward();
	query_sql "insert into `rebirth_system` values ( "+ getcharid(3) +", '"+ escape_sql( strcharinfo(0) ) +"', '"+ num_rebirth4 +"', '"+ getcharip() +"' ) on duplicate key update `num_rebirth4` = `num_rebirth4` +1";
	announce "[ Rebirth system ] : "+ strcharinfo(0) +" Successfully Rebirth!", 0;
	close;



function checkItem {
	for ( ; .@i < .size_item; .@i += 2 )
		if ( countitem( .item_req[.@i] ) < .item_req[ .@i+1 ] + num_rebirth4 ) {
			mes "You don't have enought "+ getitemname( .item_req[.@i] ) +". ^ff0000["+ countitem( .item_req[.@i] ) +"/"+ ( .item_req[ .@i+1 ] + num_rebirth4 ) +"]^000000";
			close;
		}
	if ( num_rebirth4 >= .change_reward )
		if ( .add_item_req[1] + num_rebirth4 - .change_reward > countitem( .add_item_req[0] ) ) {
			mes "You don't have enought "+ getitemname( .add_item_req[0] ) +". ^ff0000["+ countitem( .add_item_req[0] ) +"/"+ ( .add_item_req[1] + num_rebirth4 - .change_reward ) +"]^000000";
			close;
		}
	return;
}

function colorItemrequired {
	if ( countitem( .item_req[ getarg(0) ] ) < .item_req[ getarg(0)+1 ] + num_rebirth4 ) return "^ff0000";
	return "^00ff00";
}

function deleteItem {
	for ( ; .@i < .size_item; .@i += 2 )
		delitem .item_req[.@i], ( .item_req[ .@i+1 ] + num_rebirth4 );
	if ( num_rebirth4 >= .change_reward )
		delitem .add_item_req[0], ( .add_item_req[1] + num_rebirth4 - .change_reward );
	return;
}

function displayItemneed {
	for ( ; .@i < .size_item; .@i += 2 )
		mes colorItemrequired( .@i ) +" - x"+ ( .item_req[ .@i+1 ] + num_rebirth4 ) +" "+ getitemname( .item_req[.@i] );
	if ( num_rebirth4 >= .change_reward ) {
		if ( .add_item_req[1] + num_rebirth4 - .change_reward > countitem( .add_item_req[0] ) )
			.@color$ = "^ff0000";
		else
			.@color$ = "^00ff00";
		mes .@color$ +"- x"+ ( .add_item_req[1] + ( num_rebirth4 - .change_reward ) ) +" "+ getitemname( .add_item_req[0] );
	}
	return;
}

function getItemReward {
	for ( ; .@i < .size_reward; .@i += 2 )
		getitem .reward[.@i], .reward[ .@i+1 ];
	return;
}

function weightreq {
	if ( Weight > 20000 ) {
		mes "You have too much items on you. Your weight will be too high after rebirth.";
		close;
	}
	return;
}

OnInit:
	.reset_max = 17;		// how much reset max
	.change_reward = 15;	// after 30 rebirth, change reward
	.num_status = 500;		// + X number of status points

// item required <item ID>, <number>
	setarray .item_req, 7179, 50,
						20234, 50,
						969, 300;
	.size_item = getarraysize( .item_req );

// additionnal items after rebirth >> .change_reward
// <item ID>, <number>
	setarray .add_item_req, 7179, 100;

// rewards <item ID>, <number>
	setarray .reward, 20234, 50;
	.size_reward = getarraysize( .reward );
	end;
}
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  68
  • Reputation:   1
  • Joined:  10/16/12
  • Last Seen:  

Can i Request to have an usable items like Rebirth stone, every time you use additional +1 Rebirth ? 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  223
  • Reputation:   4
  • Joined:  02/23/12
  • Last Seen:  

Hi noob question. 

how exactly do you rebirth?

everytime i talk to the npc it alays says that "You must be rebirth max level/max job level.

i have max base/job level.. hmmm

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

rebirth top 50 not showing any IGN

help please

i have the script that has a ladder here it is

prontera,141,179,5	script	Rebirth System	531,{
function checkItem;			// check if player have all item required
function colorItemrequired;	// color the text. Red : not enough item, green otherwise
function deleteItem;		// delete all items required
function displayItemneed;	// display all items need at start
function getItemReward;		// give the items reward
//function weightreq;			// check if your current weight is highter than weight high novice


	.@eac = eaclass();
	if ( num_rebirth == .reset_max ) {
		mes "You can only rebirth x"+ .reset_max +".";
		emotion e_gasp;
		close;
	}
	else if( BaseLevel < 255 || JobLevel < 120 || ( !( .@eac&EAJL_2 ) || !Upper ) && ( Class != Job_Ninja && Class != Job_Gunslinger && Class != Job_Soul_Linker && Class != Job_Star_Gladiator) ) {
		mes "You must be rebirth max level/max job level.";
		close;
	}

	mes "Items need :";
	displayItemneed();
	next;

	switch( select( "^777777~ Rebirth", "~ Informations", "~ Rebirth ranking", "~ Good bye^000000" ) ) {
		case 1:
			checkItem();
			deleteItem();
			break;
		case 2:
			mes "You can only rebirth ^ff0000x"+ .reset_max +"^000000. You already rebirth ^ff0000x"+ num_rebirth +"^000000.";
			mes "Each rebirth you get ^ff0000"+ .num_status +"^000000 status points and after ^ff0000"+ .change_reward +"^000000 rebirth, you get only some items.";
			close;
		case 4:
			mes "Bye.";
			close;
		case 3:
			mes "TOP 50 of rebirth.";
			mes "Name  -  Number of rebirth";
			.@size = query_sql( "select `name`, `num_rebirth` from `rebirth_system` order by `num_rebirth` desc limit 50", .@name$, .@value );
			if( .@size ) {
				for( .@i = 0; .@i < .@size; .@i++ )
					mes "^777777"+ ( .@i +1 ) +"^000000 : "+ .@name$[.@i] +" : ^FF0000"+ .@value[.@i] +"^000000";
			}
			else
				mes "^0000ff* the list is empty *^000000";
			close;
	}
	num_rebirth += 1;
	if ( Upper ) {	// just in case the user change the setting...
		lastJob = roclass( .@eac&EAJ_UPPERMASK );
		jobchange Job_Novice_High;
	}
	else
		jobchange Job_Novice;
	resetlvl 1;
	if ( num_rebirth < .change_reward ) {
		if ( Class == Job_Novice ) StatusPoint = 48;
		StatusPoint = StatusPoint + .num_status * num_rebirth;
	}
	else {
		StatusPoint = StatusPoint + .num_status * .change_reward;
		getItemReward();
	query_sql "insert into `rebirth_system` ( `account_id`, `name`, `num_rebirth`, `last_ip` ) select "+ getcharid(3) +", '"+ escape_sql( strcharinfo(0) ) +"', '"+ num_rebirth +"',`login`.`last_ip` from `login` where `login`.`account_id` = "+ getcharid(3) +" on duplicate key update `rebirth_system`.`num_rebirth` = `rebirth_system`.`num_rebirth` +1";
	announce "[ Rebirth system ] : "+ strcharinfo(0) +" Successfully Rebirth!", 0;
	close;

}

function checkItem {
	for ( ; .@i < .size_item; .@i += 2 )
		if ( countitem( .item_req[.@i] ) < .item_req[ .@i+1 ] + num_rebirth ) {
			mes "You don't have enought "+ getitemname( .item_req[.@i] ) +". ^ff0000["+ countitem( .item_req[.@i] ) +"/"+ ( .item_req[ .@i+1 ] + num_rebirth ) +"]^000000";
			close;
		}
	if ( num_rebirth >= .change_reward )
		if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) ) {
			mes "You don't have enought "+ getitemname( .add_item_req[0] ) +". ^ff0000["+ countitem( .add_item_req[0] ) +"/"+ ( .add_item_req[1] + num_rebirth - .change_reward ) +"]^000000";
			close;
		}
	return;
}

function colorItemrequired {
	if ( countitem( .item_req[ getarg(0) ] ) < .item_req[ getarg(0)+1 ] + num_rebirth ) return "^ff0000";
	return "^00ff00";
}

function deleteItem {
	for ( ; .@i < .size_item; .@i += 2 )
		delitem .item_req[.@i], ( .item_req[ .@i+1 ] + num_rebirth );
	if ( num_rebirth >= .change_reward )
		delitem .add_item_req[0], ( .add_item_req[1] + num_rebirth - .change_reward );
	return;
}

function displayItemneed {
	for ( ; .@i < .size_item; .@i += 2 )
		mes colorItemrequired( .@i ) +" - x"+ ( .item_req[ .@i+1 ] + num_rebirth ) +" "+ getitemname( .item_req[.@i] );
	if ( num_rebirth >= .change_reward ) {
		if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) )
			.@color$ = "^ff0000";
		else
			.@color$ = "^00ff00";
		mes .@color$ +"- x"+ ( .add_item_req[1] + ( num_rebirth - .change_reward ) ) +" "+ getitemname( .add_item_req[0] );
	}
	return;
}

function getItemReward {
	for ( ; .@i < .size_reward; .@i += 2 )
		getitem .reward[.@i], .reward[ .@i+1 ];
	return;
}

function weightreq {
	if ( Weight > 20000 ) {
		mes "You have too much items on you. Your weight will be too high after rebirth.";
		close;
	}
	return;
}

OnInit:
	.reset_max = 200;		// how much reset max
	.change_reward = 150;	// after 30 rebirth, change reward
	.num_status = 10;		// + X number of status points

// item required <item ID>, <number>
	setarray .item_req, 7179, 50,
						7227, 50,
						969, 300;
	.size_item = getarraysize( .item_req );

// additionnal items after rebirth >> .change_reward
// <item ID>, <number>
	setarray .add_item_req, 7179, 100;

// rewards <item ID>, <number>
	setarray .reward, 674, 50;
	.size_reward = getarraysize( .reward );
	end;
}

the problem here is it doesnt save on the SQL..

NEXT

i have here that doesnt have rebirth ladder here it is

prontera,141,179,5	script	Rebirth System	531,{
function checkItem;	// check if player have all item required

function colorItemrequired;	// color the text. Red : not enough item, green otherwise

function deleteItem;	// delete all items required

function displayItemneed;	// display all items need at start

function getItemReward;	// give the items reward

//function weightreq;	// check if your current weight is highter than weight high novice

.@eac = eaclass();

if ( num_rebirth == .reset_max ) {

mes "You can only rebirth x"+ .reset_max +".";

emotion e_gasp;

close;

}

	else if( BaseLevel < 255 || JobLevel < 120 || ( !( .@eac&EAJL_2 ) || !Upper ) && ( Class != Job_Ninja && Class != Job_Gunslinger && Class != Job_Soul_Linker && Class != Job_Star_Gladiator) ) {

mes "Your Base & Job Lv must be maximum before you rebirth.";

close;

}

mes "Items need :";

displayItemneed();

next;

switch( select( "^777777~ Rebirth", "~ Informations", "~ Good bye^000000" ) ) {

case 1:

//weightreq();

checkItem();

deleteItem();

break;

case 2:

mes "You can only rebirth ^ff0000x"+ .reset_max +"^000000. You already have ^ff0000x"+ num_rebirth +"^000000 Rebirth.";

mes "Each rebirth you get ^ff0000"+ .num_status +"^000000 Stat Points and after ^ff0000"+ .change_reward +"^000000 rebirth, you can receive Random as a reward!";

close;

case 3:

mes "Bye.";

close;

}

num_rebirth += 1;

if ( Upper ) {	// just in case the user change the setting...

lastJob = roclass( .@eac&EAJ_UPPERMASK );

jobchange Job_Novice_High;

}

else

jobchange Job_Novice;

resetlvl 1;

if ( num_rebirth < .change_reward )

StatusPoint = StatusPoint + .num_status * num_rebirth;

else {

StatusPoint = StatusPoint + .num_status * .change_reward;

getItemReward();

}

query_sql "insert into `rebirth_system` values ( "+ getcharid(3) +", '"+ escape_sql( strcharinfo(0) ) +"', '"+ num_rebirth +"', '"+ getcharip() +"' ) on duplicate key update `num_rebirth` = `num_rebirth` +1";

announce " "+ strcharinfo(0) +" has been Reborn "+ num_rebirth +" Times!", 0;

set ClassHelper,0;

close;

function checkItem {

for ( ; .@i < .size_item; .@i += 2 )

if ( countitem( .item_req[.@i] ) < .item_req[ .@i+1 ] + num_rebirth ) {

mes "You don't have enought "+ getitemname( .item_req[.@i] ) +". ^ff0000["+ countitem( .item_req[.@i] ) +"/"+ ( .item_req[ .@i+1 ] + num_rebirth ) +"]^000000";

close;

}

if ( num_rebirth >= .change_reward )

if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) ) {

mes "You don't have enought "+ getitemname( .add_item_req[0] ) +". ^ff0000["+ countitem( .add_item_req[0] ) +"/"+ ( .add_item_req[1] + num_rebirth - .change_reward ) +"]^000000";

close;

}

return;

}

function colorItemrequired {

if ( countitem( .item_req[ getarg(0) ] ) < .item_req[ getarg(0)+1 ] + num_rebirth ) return "^ff0000";

return "^00ff00";

}

function deleteItem {

for ( ; .@i < .size_item; .@i += 2 )

delitem .item_req[.@i], ( .item_req[ .@i+1 ] + num_rebirth );

if ( num_rebirth >= .change_reward )

delitem .add_item_req[0], ( .add_item_req[1] + num_rebirth - .change_reward );

return;

}

function displayItemneed {

for ( ; .@i < .size_item; .@i += 2 )

mes colorItemrequired( .@i ) +" - x"+ ( .item_req[ .@i+1 ] + num_rebirth ) +" "+ getitemname( .item_req[.@i] );

if ( num_rebirth >= .change_reward ) {

if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) )

.@color$ = "^ff0000";

else

.@color$ = "^00ff00";

mes .@color$ +"- x"+ ( .add_item_req[1] + ( num_rebirth - .change_reward ) ) +" "+ getitemname( .add_item_req[0] );

}

return;

}

function getItemReward {

for ( ; .@i < .size_reward; .@i += 2 )

getitem .reward[.@i], .reward[ .@i+1 ];

return;

}

function weightreq {

if ( Weight > 35000 ) {

mes "You have too much items on you. Your weight will be too high after rebirth.";

close;

}

return;

}

OnInit:

.reset_max = 200;	// how much reset max

.change_reward = 150;	// after 30 rebirth, change reward

.num_status = 10;	// + X number of status points

// item required <item ID>, <number>

setarray .item_req, 7179, 5,

7227, 5,

969, 3;

.size_item = getarraysize( .item_req );

// additionnal items after rebirth >> .change_reward

// <item ID>, <number>

setarray .add_item_req, 674, 3;

//end;

//OnClock0939:

//OnClock1200:

//enablenpc strnpcinfo(3);

//announce "The rebirth npc appear!", 0;

//end;

//OnClock0945:

//OnClock1210:

//disablenpc strnpcinfo(3);

//announce "The rebirth npc is gone!", 0;

end;

}

the problem here instead of per player who rebirth will be saved on the SQL its per account ID
and the thing is the 1st character who made a rebirth will be listed
EX: Test1 has 100 reset then create new char same accnt and try to do a rebirth, then Test2 Rebirth will be added to Test1 instead of having 2 character listed on SQL

can anyone help me with this im trying to change every part of it but still have the same output

THNX IN ADVANCE
CALLING @Capuche this is a great script u had please help us

Edited by whodhell
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   0
  • Joined:  05/21/18
  • Last Seen:  

On 6/16/2017 at 3:20 PM, AinsLord said:

the problem here is it doesnt save on the SQL..

just create it on phpmyadmin going into 127.0.0.1> YOURDB_db > MySQL
type it there

CREATE TABLE rebirth_system (
  accountid INT(11),
  name VAR(30),
  num_rebirth INT(3),
  last_ip VAR(100)
  );

When created you will have to go onto the created label > Structure > go to the line NAME, click on "MORE" and make it UNIQUE.

image.thumb.png.a761490e3d2df35310b594dcdabe9dd0.png

     - It will make you have only 1 log for each name. Without it you'll have a bugged Top50 rank.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

ill test this one out thnx thnx

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   2
  • Joined:  08/02/17
  • Last Seen:  

On 6/4/2013 at 2:41 AM, Capuche said:

You don't have getcharip() command. So replace the current query by this one :


query_sql "insert into `rebirth_system` ( `account_id`, `name`, `num_rebirth`, `last_ip` ) select "+ getcharid(3) +", '"+ escape_sql( strcharinfo(0) ) +"', '"+ num_rebirth +"',`login`.`last_ip` from `login` where `login`.`account_id` = "+ getcharid(3) +" on duplicate key update `rebirth_system`.`num_rebirth` = `rebirth_system`.`num_rebirth` +1";

Sorry for reviving this thread but i cant seem to update this query.

Here's my query

INSERT INTO
  rebirth_system (`account_id`, `name`, `num_rebirth`, `last_ip`)
VALUES
  (
    "+ getcharid(3) +",
    '"+ escape_sql( strcharinfo(0) ) +"',
    '"+ num_rebirth +"',
    '(Select `account_id` From login Where `account_id` = "+ getcharid(3) +")'
  ) 
ON DUPLICATE KEY UPDATE `rebirth_system.num_rebirth` = `rebirth_system.num_rebirth` + 1;

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  04/03/22
  • Last Seen:  

On 5/7/2013 at 7:18 AM, Capuche said:

 

 

/*
CREATE TABLE IF NOT EXISTS `rebirth_system` (
  `account_id` int(11) unsigned NOT NULL default '0',
  `name` varchar(255) NOT NULL DEFAULT 'NULL',
  `num_rebirth` int(11) unsigned NOT NULL default '0',
  `last_ip` varchar(100) NOT NULL default '',
  PRIMARY KEY  (`account_id`)
) ENGINE=MyISAM;
*/

prontera,150,170,5	script	Spec	833,{
function checkItem;			// check if player have all item required
function colorItemrequired;	// color the text. Red : not enough item, green otherwise
function deleteItem;		// delete all items required
function displayItemneed;	// display all items need at start
function getItemReward;		// give the items reward
function weightreq;			// check if your current weight is highter than weight high novice


	.@eac = eaclass();
	if ( num_rebirth == .reset_max ) {
		mes "You can only rebirth x"+ .reset_max +".";
		emotion e_gasp;
		close;
	}
	else if( NextJobExp || NextBaseExp || !( .@eac&EAJL_2 ) || !Upper ) {
		mes "You must be rebirth max level/max job level.";
		close;
	}

	mes "Items need :";
	displayItemneed();
	next;

	switch( select( "^777777~ Rebirth", "~ Informations", "~ Good bye^000000" ) ) {
		case 1:
			weightreq();
			checkItem();
			deleteItem();
			break;
		case 2:
			mes "You can only rebirth ^ff0000x"+ .reset_max +"^000000. You already rebirth ^ff0000x"+ num_rebirth +"^000000.";
			mes "Each rebirth you get ^ff0000"+ .num_status +"^000000 status points and after ^ff0000"+ .change_reward +"^000000 rebirth, you get only some items.";
			close;
		case 3:
			mes "Bye.";
			close;
	}
	num_rebirth += 1;
	if ( Upper ) {	// just in case the user change the setting...
		lastJob = roclass( .@eac&EAJ_UPPERMASK );
		jobchange Job_Novice_High;
	}
	else
		jobchange Job_Novice;
	resetlvl 1;
	if ( num_rebirth < .change_reward )
		StatusPoint = StatusPoint + .num_status * num_rebirth;
	else
		getItemReward();
	query_sql "insert into `rebirth_system` values ( "+ getcharid(3) +", '"+ escape_sql( strcharinfo(0) ) +"', '"+ num_rebirth +"', '"+ getcharip() +"' ) on duplicate key update `num_rebirth` = `num_rebirth` +1";
	announce "[ Rebirth system ] : "+ strcharinfo(0) +" rebirth for the "+ num_rebirth +" time !", 0;
	close;



function checkItem {
	for ( ; .@i < .size_item; .@i += 2 )
		if ( countitem( .item_req[.@i] ) < .item_req[ .@i+1 ] + num_rebirth ) {
			mes "You don't have enought "+ getitemname( .item_req[.@i] ) +". ^ff0000["+ countitem( .item_req[.@i] ) +"/"+ ( .item_req[ .@i+1 ] + num_rebirth ) +"]^000000";
			close;
		}
	if ( num_rebirth >= .change_reward )
		if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) ) {
			mes "You don't have enought "+ getitemname( .add_item_req[0] ) +". ^ff0000["+ countitem( .add_item_req[0] ) +"/"+ ( .add_item_req[1] + num_rebirth - .change_reward ) +"]^000000";
			close;
		}
	return;
}

function colorItemrequired {
	if ( countitem( .item_req[ getarg(0) ] ) < .item_req[ getarg(0)+1 ] + num_rebirth ) return "^ff0000";
	return "^00ff00";
}

function deleteItem {
	for ( ; .@i < .size_item; .@i += 2 )
		delitem .item_req[.@i], ( .item_req[ .@i+1 ] + num_rebirth );
	if ( num_rebirth >= .change_reward )
		delitem .add_item_req[0], ( .add_item_req[1] + num_rebirth - .change_reward );
	return;
}

function displayItemneed {
	for ( ; .@i < .size_item; .@i += 2 )
		mes colorItemrequired( .@i ) +" - x"+ ( .item_req[ .@i+1 ] + num_rebirth ) +" "+ getitemname( .item_req[.@i] );
	if ( num_rebirth >= .change_reward ) {
		if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) )
			.@color$ = "^ff0000";
		else
			.@color$ = "^00ff00";
		mes .@color$ +"- x"+ ( .add_item_req[1] + ( num_rebirth - .change_reward ) ) +" "+ getitemname( .add_item_req[0] );
	}
	return;
}

function getItemReward {
	for ( ; .@i < .size_reward; .@i += 2 )
		getitem .reward[.@i], .reward[ .@i+1 ];
	return;
}

function weightreq {
	if ( Weight > 20000 ) {
		mes "You have too much items on you. Your weight will be too high after rebirth.";
		close;
	}
	return;
}

OnInit:
	.reset_max = 50;		// how much reset max
	.change_reward = 30;	// after 30 rebirth, change reward
	.num_status = 300;		// + X number of status points

// item required <item ID>, <number>
	setarray .item_req, 501, 5,
						502, 2,
						503, 3;
	.size_item = getarraysize( .item_req );

// additionnal items after rebirth >> .change_reward
// <item ID>, <number>
	setarray .add_item_req, 601, 1;

// rewards <item ID>, <number>
	setarray .reward, 504, 1;
	.size_reward = getarraysize( .reward );
	end;
}

EDIT: fix a small typo

how to change the max level requirements on your script sir? my offline server is 250/70

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

On 4/7/2022 at 9:01 AM, Hitman Monkey said:

how to change the max level requirements on your script sir? my offline server is 250/70

use this code

prontera,141,179,5	script	Rebirth System	531,{
function checkItem;			// check if player have all item required
function colorItemrequired;	// color the text. Red : not enough item, green otherwise
function deleteItem;		// delete all items required
function displayItemneed;	// display all items need at start
function getItemReward;		// give the items reward
//function weightreq;			// check if your current weight is highter than weight high novice


	.@eac = eaclass();
	if ( num_rebirth == .reset_max ) {
		mes "You can only rebirth x"+ .reset_max +".";
		emotion e_gasp;
		close;
	}
	else if( BaseLevel < 255 || JobLevel < 120 || ( !( .@eac&EAJL_2 ) || !Upper ) && ( Class != Job_Ninja && Class != Job_Gunslinger && Class != Job_Soul_Linker && Class != Job_Star_Gladiator) ) {
		mes "You must be rebirth max level/max job level.";
		close;
	}

	mes "Items need :";
	displayItemneed();
	next;

	switch( select( "^777777~ Rebirth", "~ Informations", "~ Rebirth ranking", "~ Good bye^000000" ) ) {
		case 1:
			checkItem();
			deleteItem();
			break;
		case 2:
			mes "You can only rebirth ^ff0000x"+ .reset_max +"^000000. You already rebirth ^ff0000x"+ num_rebirth +"^000000.";
			mes "Each rebirth you get ^ff0000"+ .num_status +"^000000 status points and after ^ff0000"+ .change_reward +"^000000 rebirth, you get only some items.";
			close;
		case 4:
			mes "Bye.";
			close;
		case 3:
			mes "TOP 50 of rebirth.";
			mes "Name  -  Number of rebirth";
			.@size = query_sql( "select `name`, `num_rebirth` from `rebirth_system` order by `num_rebirth` desc limit 50", .@name$, .@value );
			if( .@size ) {
				for( .@i = 0; .@i < .@size; .@i++ )
					mes "^777777"+ ( .@i +1 ) +"^000000 : "+ .@name$[.@i] +" : ^FF0000"+ .@value[.@i] +"^000000";
			}
			else
				mes "^0000ff* the list is empty *^000000";
			close;
	}
	num_rebirth += 1;
	if ( Upper ) {	// just in case the user change the setting...
		lastJob = roclass( .@eac&EAJ_UPPERMASK );
		jobchange Job_Novice_High;
	}
	else
		jobchange Job_Novice;
	resetlvl 1;
	if ( num_rebirth < .change_reward ) {
		if ( Class == Job_Novice ) StatusPoint = 48;
		StatusPoint = StatusPoint + .num_status * num_rebirth;
	}
	else {
		StatusPoint = StatusPoint + .num_status * .change_reward;
		getItemReward();
	query_sql "insert into `rebirth_system` ( `account_id`, `name`, `num_rebirth`, `last_ip` ) select "+ getcharid(3) +", '"+ escape_sql( strcharinfo(0) ) +"', '"+ num_rebirth +"',`login`.`last_ip` from `login` where `login`.`account_id` = "+ getcharid(3) +" on duplicate key update `rebirth_system`.`num_rebirth` = `rebirth_system`.`num_rebirth` +1";
	announce "[ Rebirth system ] : "+ strcharinfo(0) +" Successfully Rebirth!", 0;
	close;

}

function checkItem {
	for ( ; .@i < .size_item; .@i += 2 )
		if ( countitem( .item_req[.@i] ) < .item_req[ .@i+1 ] + num_rebirth ) {
			mes "You don't have enought "+ getitemname( .item_req[.@i] ) +". ^ff0000["+ countitem( .item_req[.@i] ) +"/"+ ( .item_req[ .@i+1 ] + num_rebirth ) +"]^000000";
			close;
		}
	if ( num_rebirth >= .change_reward )
		if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) ) {
			mes "You don't have enought "+ getitemname( .add_item_req[0] ) +". ^ff0000["+ countitem( .add_item_req[0] ) +"/"+ ( .add_item_req[1] + num_rebirth - .change_reward ) +"]^000000";
			close;
		}
	return;
}

function colorItemrequired {
	if ( countitem( .item_req[ getarg(0) ] ) < .item_req[ getarg(0)+1 ] + num_rebirth ) return "^ff0000";
	return "^00ff00";
}

function deleteItem {
	for ( ; .@i < .size_item; .@i += 2 )
		delitem .item_req[.@i], ( .item_req[ .@i+1 ] + num_rebirth );
	if ( num_rebirth >= .change_reward )
		delitem .add_item_req[0], ( .add_item_req[1] + num_rebirth - .change_reward );
	return;
}

function displayItemneed {
	for ( ; .@i < .size_item; .@i += 2 )
		mes colorItemrequired( .@i ) +" - x"+ ( .item_req[ .@i+1 ] + num_rebirth ) +" "+ getitemname( .item_req[.@i] );
	if ( num_rebirth >= .change_reward ) {
		if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) )
			.@color$ = "^ff0000";
		else
			.@color$ = "^00ff00";
		mes .@color$ +"- x"+ ( .add_item_req[1] + ( num_rebirth - .change_reward ) ) +" "+ getitemname( .add_item_req[0] );
	}
	return;
}

function getItemReward {
	for ( ; .@i < .size_reward; .@i += 2 )
		getitem .reward[.@i], .reward[ .@i+1 ];
	return;
}

function weightreq {
	if ( Weight > 20000 ) {
		mes "You have too much items on you. Your weight will be too high after rebirth.";
		close;
	}
	return;
}

OnInit:
	.reset_max = 200;		// how much reset max
	.change_reward = 150;	// after 30 rebirth, change reward
	.num_status = 10;		// + X number of status points

// item required <item ID>, <number>
	setarray .item_req, 7179, 50,
						7227, 50,
						969, 300;
	.size_item = getarraysize( .item_req );

// additionnal items after rebirth >> .change_reward
// <item ID>, <number>
	setarray .add_item_req, 7179, 100;

// rewards <item ID>, <number>
	setarray .reward, 674, 50;
	.size_reward = getarraysize( .reward );
	end;
}

and look for this part

else if( BaseLevel < 255 || JobLevel < 120 ||
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  04/03/22
  • Last Seen:  

5 hours ago, AinsLord said:

use this code

prontera,141,179,5	script	Rebirth System	531,{
function checkItem;			// check if player have all item required
function colorItemrequired;	// color the text. Red : not enough item, green otherwise
function deleteItem;		// delete all items required
function displayItemneed;	// display all items need at start
function getItemReward;		// give the items reward
//function weightreq;			// check if your current weight is highter than weight high novice


	.@eac = eaclass();
	if ( num_rebirth == .reset_max ) {
		mes "You can only rebirth x"+ .reset_max +".";
		emotion e_gasp;
		close;
	}
	else if( BaseLevel < 255 || JobLevel < 120 || ( !( .@eac&EAJL_2 ) || !Upper ) && ( Class != Job_Ninja && Class != Job_Gunslinger && Class != Job_Soul_Linker && Class != Job_Star_Gladiator) ) {
		mes "You must be rebirth max level/max job level.";
		close;
	}

	mes "Items need :";
	displayItemneed();
	next;

	switch( select( "^777777~ Rebirth", "~ Informations", "~ Rebirth ranking", "~ Good bye^000000" ) ) {
		case 1:
			checkItem();
			deleteItem();
			break;
		case 2:
			mes "You can only rebirth ^ff0000x"+ .reset_max +"^000000. You already rebirth ^ff0000x"+ num_rebirth +"^000000.";
			mes "Each rebirth you get ^ff0000"+ .num_status +"^000000 status points and after ^ff0000"+ .change_reward +"^000000 rebirth, you get only some items.";
			close;
		case 4:
			mes "Bye.";
			close;
		case 3:
			mes "TOP 50 of rebirth.";
			mes "Name  -  Number of rebirth";
			.@size = query_sql( "select `name`, `num_rebirth` from `rebirth_system` order by `num_rebirth` desc limit 50", .@name$, .@value );
			if( .@size ) {
				for( .@i = 0; .@i < .@size; .@i++ )
					mes "^777777"+ ( .@i +1 ) +"^000000 : "+ .@name$[.@i] +" : ^FF0000"+ .@value[.@i] +"^000000";
			}
			else
				mes "^0000ff* the list is empty *^000000";
			close;
	}
	num_rebirth += 1;
	if ( Upper ) {	// just in case the user change the setting...
		lastJob = roclass( .@eac&EAJ_UPPERMASK );
		jobchange Job_Novice_High;
	}
	else
		jobchange Job_Novice;
	resetlvl 1;
	if ( num_rebirth < .change_reward ) {
		if ( Class == Job_Novice ) StatusPoint = 48;
		StatusPoint = StatusPoint + .num_status * num_rebirth;
	}
	else {
		StatusPoint = StatusPoint + .num_status * .change_reward;
		getItemReward();
	query_sql "insert into `rebirth_system` ( `account_id`, `name`, `num_rebirth`, `last_ip` ) select "+ getcharid(3) +", '"+ escape_sql( strcharinfo(0) ) +"', '"+ num_rebirth +"',`login`.`last_ip` from `login` where `login`.`account_id` = "+ getcharid(3) +" on duplicate key update `rebirth_system`.`num_rebirth` = `rebirth_system`.`num_rebirth` +1";
	announce "[ Rebirth system ] : "+ strcharinfo(0) +" Successfully Rebirth!", 0;
	close;

}

function checkItem {
	for ( ; .@i < .size_item; .@i += 2 )
		if ( countitem( .item_req[.@i] ) < .item_req[ .@i+1 ] + num_rebirth ) {
			mes "You don't have enought "+ getitemname( .item_req[.@i] ) +". ^ff0000["+ countitem( .item_req[.@i] ) +"/"+ ( .item_req[ .@i+1 ] + num_rebirth ) +"]^000000";
			close;
		}
	if ( num_rebirth >= .change_reward )
		if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) ) {
			mes "You don't have enought "+ getitemname( .add_item_req[0] ) +". ^ff0000["+ countitem( .add_item_req[0] ) +"/"+ ( .add_item_req[1] + num_rebirth - .change_reward ) +"]^000000";
			close;
		}
	return;
}

function colorItemrequired {
	if ( countitem( .item_req[ getarg(0) ] ) < .item_req[ getarg(0)+1 ] + num_rebirth ) return "^ff0000";
	return "^00ff00";
}

function deleteItem {
	for ( ; .@i < .size_item; .@i += 2 )
		delitem .item_req[.@i], ( .item_req[ .@i+1 ] + num_rebirth );
	if ( num_rebirth >= .change_reward )
		delitem .add_item_req[0], ( .add_item_req[1] + num_rebirth - .change_reward );
	return;
}

function displayItemneed {
	for ( ; .@i < .size_item; .@i += 2 )
		mes colorItemrequired( .@i ) +" - x"+ ( .item_req[ .@i+1 ] + num_rebirth ) +" "+ getitemname( .item_req[.@i] );
	if ( num_rebirth >= .change_reward ) {
		if ( .add_item_req[1] + num_rebirth - .change_reward > countitem( .add_item_req[0] ) )
			.@color$ = "^ff0000";
		else
			.@color$ = "^00ff00";
		mes .@color$ +"- x"+ ( .add_item_req[1] + ( num_rebirth - .change_reward ) ) +" "+ getitemname( .add_item_req[0] );
	}
	return;
}

function getItemReward {
	for ( ; .@i < .size_reward; .@i += 2 )
		getitem .reward[.@i], .reward[ .@i+1 ];
	return;
}

function weightreq {
	if ( Weight > 20000 ) {
		mes "You have too much items on you. Your weight will be too high after rebirth.";
		close;
	}
	return;
}

OnInit:
	.reset_max = 200;		// how much reset max
	.change_reward = 150;	// after 30 rebirth, change reward
	.num_status = 10;		// + X number of status points

// item required <item ID>, <number>
	setarray .item_req, 7179, 50,
						7227, 50,
						969, 300;
	.size_item = getarraysize( .item_req );

// additionnal items after rebirth >> .change_reward
// <item ID>, <number>
	setarray .add_item_req, 7179, 100;

// rewards <item ID>, <number>
	setarray .reward, 674, 50;
	.size_reward = getarraysize( .reward );
	end;
}

and look for this part

else if( BaseLevel < 255 || JobLevel < 120 ||

holy cow! it works like magic!!! thank you so much, you never know how happy i am right now, i am working on this for a week, but finally.... thank you so much!!!

and one more question, my reward stat is gone when i reset stats at npc, is there a way to recover my stat?

but then again thank you for this ❤️ appreciate it so mucchhhhhhh!!!!

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

On 4/11/2022 at 9:49 PM, Hitman Monkey said:

holy cow! it works like magic!!! thank you so much, you never know how happy i am right now, i am working on this for a week, but finally.... thank you so much!!!

and one more question, my reward stat is gone when i reset stats at npc, is there a way to recover my stat?

but then again thank you for this ❤️ appreciate it so mucchhhhhhh!!!!

go here conf/battle/exp.conf 

find this 

use_statpoint_table: no

check it if yes or no i forgot

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