Welcome in the osRose emulator Project.
Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators
by Bless on Sat Jun 15, 2013 12:06 pm
I'm trying to play with the code but it never works :S
-
Bless
- Pomic
-
- Posts: 83
- Joined: Wed Oct 13, 2010 9:44 pm
-
by Bless on Mon Jun 17, 2013 9:50 am
I got it working, thanks to hoegarden31!!
- if(thisclient->Party->party!=NULL)
- {
- Log(MSG_INFO,"Player %s tried to use reborn but he was in a party.");
- return true;
- }
-
- if(thisclient->Stats->Level < GServer->Config.MaxLevel) //Level 260 can be changed to any level you want
- {
- GServer->SendPM(thisclient, "You have to be lvl %i to reborn !", GServer->Config.MaxLevel);
- }
- else
- {
-
- thisclient = GServer->GetClientByCharName( thisclient->CharInfo->charname ); // adding this allows the server to retrieve the players client info for item removal
- //starting the item removal process from slots 1 through 11
- /*
- slot 1, Face
- slot 2, Head
- slot 3, Body
- slot 4, Back
- slot 5, Hand
- slot 6, Foot
- slot 7, Weapon
- slot 8, Offhand
- slot 9, Necklace
- slot 10, Ring
- slot 11, Earring
- */
- /*for(int j=1; j<11; j++){
- if(thisclient->items[j].itemnum == 0){ //prevents unknown itemtype error
- continue;
- }
-
- UINT newslot = thisclient->GetNewItemSlot(thisclient->items[j]); // finds the first free slot in inventory
- if(newslot==0xffff)
- {
- Log(MSG_INFO,"Unable to find empty slot");
- SendPM(thisclient,"Your inventory is full");
- return false;
- }
-
- thisclient->items[newslot] = thisclient->items[j];
- ClearItem( thisclient->items[j] );
- thisclient->UpdateInventory( newslot, j );
- BEGINPACKET( pak, 0x7a5 );
- ADDWORD ( pak, thisclient->clientid );
- ADDWORD ( pak, j );
- ADDWORD ( pak, thisclient->items[j].itemnum );
- ADDWORD ( pak, GServer->BuildItemRefine( thisclient->items[j] ) );
- ADDWORD ( pak, thisclient->Stats->Move_Speed );
- GServer->SendToVisible( &pak, (CCharacter*)this);
- thisclient->SetStats( );
- }
- (CPlayer *)thisclient;*/
-
- //LMA: We remove all but basic skills.
- /*for(int i=0;i<320;i++) //For keeping the skills, remove this line
- { //For keeping the skills, remove this line
- //For keeping the skills, remove this line
- //For keeping the skills, remove this line
- } //For keeping the skills, remove this line
-
- for(int i=0;i<MAX_QUICKBAR;i++)
- thisclient->quickbar[i] = 0;
- */
- thisclient->p_skills = 0; //For keeping the skills, remove
- thisclient->CharInfo->SkillPoints = 0;
- thisclient->CharInfo->StatPoints = 0;
- thisclient->CharInfo->Job = 1;
-
- thisclient->Stats->Level = 1;
- thisclient->CharInfo->Exp = 0;
-
- thisclient->ActiveQuest = 0;
-
- /*Update Reborn Command {By CrAshInSiDe*/
- int x = 5098;
- int y = 5322;
- int map = 22;
- if( (x != 0) && (y != 0) && (map != 0) )
- {
- fPoint coord;
- coord.x = x;
- coord.y = y;
- MapList.Index[map]->TeleportPlayer( thisclient, coord, false );
- }
-
-
- // Uncomment below if you want to use the Nobles part
- /*
- char newcharname[65];
- strcpy (newcharname,"[Nobles]");
- strcat (newcharname, thisclient->CharInfo->charname);
- GServer->DB->QExecute(" UPDATE characters SET char_name = '%s' WHERE id = '%i' ",newcharname, thisclient->CharInfo->charid);
- */
-
- BEGINPACKET( pak, 0x702 );
- ADDSTRING( pak, "You were disconnected from the server !" );
- ADDBYTE( pak, 0 );
- thisclient->client->SendPacket( &pak );
-
- RESETPACKET( pak, 0x707 );
- ADDWORD( pak, 0 );
- thisclient->client->SendPacket( &pak );
-
- //saving skills.
- thisclient->saveskills();
- thisclient->ResetSkillOffset();
- thisclient->client->isActive = false;
- thisclient->clearquest(thisclient);
- }
If you want the reborn to keep the job/class, comment this out:
- thisclient->CharInfo->Job = 1;
-
Bless
- Pomic
-
- Posts: 83
- Joined: Wed Oct 13, 2010 9:44 pm
-
Return to Support - OsRose Emulator
Users browsing this forum: No registered users and 11 guests