Jump to content

  •  

Photo

Rebirth System modification


  • Please log in to reply
1 reply to this topic

#1 Holiness

Holiness

    Member

  • Members
  • PipPip
  • 23 posts

Posted 05 June 2013 - 09:50 PM

Hello,

 

I'm currently using this script:

 

prontlegend,195,210,6  script  [Rebirth] Rebirther  465,{

  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 "[Rebirther]";
   mes "You can start the Rebirth Process only "+ .reset_max +". times.";
   emotion e_gasp;
   close;
 }
 else if( NextJobExp || NextBaseExp || ( !( .@eac&EAJL_2 ) || !Upper ) ) {
   mes "[Rebirther]";
   mes "Your Base Level must be ^ff0000255^000000, while your Job Level ^ff0000120^000000.";
   close;
 }
 
 mes "[Rebirther]";
 mes "Welcome...";
 mes "I am the ^FF0000Rebirther^000000, what do you want me to do?";
 next;

 switch( select( "^777777~ Rebirth", "~ Information", "~ Nothing^000000" ) ) {
   case 1:
     mes "[Rebirther]";
     mes "You'll need the following items:";
     mes " ";
     displayItemneed();
     mes " ";
     mes "^ff0000You can get the 17Carat Diamond by using the Mining System^000000.";
     mes "Use @go Manuk and talk to the ^777777Miner Renter^000000.";
     next;
     weightreq();
     checkItem();
     deleteItem();
     break;
   case 2:
     mes "[Rebirther]";
     mes "You can only start the Rebirth Process ^ff0000"+ .reset_max +"^000000 times.";
     mes "^008800You have started it^000000 ^ff0000"+ num_rebirth +"^000000 ^008800time(s)^000000.";
     next;
     mes "[Rebirther]";
     mes "Whenever you complete a Rebirth Process, you get ^ff0000"+ .num_status +"^000000 Status Points and once you complete the ^ff000065th^000000 one, you obtain the awesome and legendary ^ff0000Dragon Set^000000.";
     mes "Only the best players can have it.";
     close;
   case 3:
     mes "[Rebirther]";
     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) +" has started the Rebirth Process number "+ num_rebirth +"!", 0;
 close;



function checkItem {
 for ( ; .@i < .size_item; .@i += 2 )
   if ( countitem( .item_req[.@i] ) < .item_req[ .@i+1 ] + num_rebirth ) {
     mes "[Rebirther]";
     mes "You do not have enough "+ 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 "[Rebirther]";
     mes "You do not have enough "+ 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 ) +" - ["+ ( .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$ +"- "+ ( .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 "[Rebirther]";
   mes "^ff0000You are carrying too many items. After rebirth, your weight will be very low and you might drop some items^ff0000.";
   close;
 }
 return;
}

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

// item required <item ID>, <number>
 setarray .item_req, 6024, 10,
           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, 25256, 1, 25257, 1, 25259, 1, 25258, 1, 25260, 1, 25261, 1, 25262, 1;
 .size_reward = getarraysize( .reward );
 end;
}


I would like to let Ninja and Gunslinger use it, however it seems a little bit hard.
I tried to add (Class == 24 && Class == 25) and it would work if it weren't for the fact that whenever I rebirth using a Ninja or a Gunslinger I get 8k points (approximately) instead of 50.

Is there a solution?

NOTE: The script is very useful and well organized. You can get it and use it according to your liking!



#2 Jigs

Jigs

    Member

  • Members
  • PipPip
  • 10 posts

Posted 06 June 2013 - 02:19 AM

try this one complete rebirth system:

 

http://rathena.org/b...em-reset-stats/






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users


This topic has been visited by 69 user(s)