[REQUEST] Function for keeping Unique Skills after reborn.

Welcome in the osRose emulator Project.

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

[REQUEST] Function for keeping Unique Skills after reborn.

Postby Mark on Wed Feb 01, 2012 11:27 pm

Hi All,

Just a quick Question:

What is the Function name for keeping Unique Skills and milease skills after reborning? Currently I have it so that when you reborn, you lose all your normal class skills and your level becomes 1 again, but you stay as the class you were i.e 250 knight /reborns become lvl 1 knight with normal skills again, I like it this way, but I want to be able to keep the Unique Skills like Drive Cart and Castle Gear.

Here's how I have it so far:
  1. // Reborn command credits Core
  2. bool CWorldServer::pakGMReborn(CPlayer* thisclient)
  3. {
  4.     if(thisclient->Party->party!=NULL)
  5.     {
  6.         Log(MSG_INFO,"Player %s tried to use reborn but he was in a party.");
  7.         return true;
  8.     }
  9.  
  10.      if(thisclient->Stats->Level < 250) //Level 250 can be changed to any level you want
  11.      {
  12.         GServer->SendPM(thisclient, "You have to be lvl 250 to reborn !");
  13.      }
  14.     else
  15.     {
  16.  
  17.  
  18.  
  19.         //LMA: We remove all but basic skills.
  20.            for(int i=0;i<320;i++)  //For keeping the skills, remove this line
  21.         {  //For keeping the skills, remove this line
  22.             thisclient->cskills[i].id = 0;  //For keeping the skills, remove this line
  23.             thisclient->cskills[i].level = 1;  //For keeping the skills, remove this line
  24.             thisclient->cskills[i].thisskill=NULL;
  25.         }  //For keeping the skills, remove this line
  26.  
  27.         for(int i=0;i<MAX_QUICKBAR;i++)
  28.             thisclient->quickbar[i] = 0;
  29.  
  30.          thisclient->p_skills = 0;  //For keeping the skills, remove*/
  31.          thisclient->CharInfo->SkillPoints = 0;
  32.          thisclient->CharInfo->StatPoints = 0;
  33.  
  34.  
  35.          thisclient->Stats->Level = 1;
  36.          thisclient->CharInfo->Exp = 0;
  37.  
  38.          thisclient->ActiveQuest = 0;
  39.  
  40.         /*Update Reborn Command {By CrAshInSiDe*/
  41.         int x = 5098;
  42.         int y = 5322;
  43.         int map = 22;
  44.         if( (x != 0) && (y != 0) && (map != 0) )
  45.         {
  46.             fPoint coord;
  47.             coord.x = x;
  48.             coord.y = y;
  49.             MapList.Index[map]->TeleportPlayer( thisclient, coord, false );
  50.         }
  51.  
  52.  
  53.          // Uncomment below if you want to use the Nobles part
  54.  
  55.         /*char newcharname[65];
  56.         strcpy (newcharname,"[NOBLES]");
  57.         strcat (newcharname, thisclient->CharInfo->charname);
  58.         GServer->DB->QExecute(" UPDATE characters SET char_name = '%s' WHERE id = '%i' ",newcharname, thisclient->CharInfo->charid);
  59.         */
  60.  
  61.          BEGINPACKET( pak, 0x702 );
  62.          ADDSTRING( pak, "You were disconnected from the server !" );
  63.          ADDBYTE( pak, 0 );
  64.          thisclient->client->SendPacket( &pak );
  65.  
  66.          RESETPACKET( pak, 0x707 );
  67.          ADDWORD( pak, 0 );
  68.          thisclient->client->SendPacket( &pak );
  69.  
  70.          //saving skills.
  71.          thisclient->saveskills();
  72.          thisclient->ResetSkillOffset();
  73.          thisclient->client->isActive = false;
  74.  
  75.       }
  76.         return true;
  77. }


I'm guessing that I would have to use something like: thisclient->U_skills = 0; ?? I dunno though, cant find where the Unique / Mileage skills are called.

Any And all help is much appreciated ty ^^
Administrator / Coder for EutopiaRose Online
Image
http://www.eutopiarose.co.uk
User avatar
Mark
Rackie
Rackie
 
Posts: 176
Joined: Tue Dec 13, 2011 8:15 am
Location: Sunny England

Return to Support - OsRose Emulator

Who is online

Users browsing this forum: No registered users and 4 guests

cron