Code:
+1lvl
Code:
if(packet[0] == "$lvlup" && this->Char->isGm ) { if (Char->Level.CurrentLevel = 99) { ss << "say 0 0 10 Du bist Bereits Lvl 99!"; Char->Send(ss.str()); ss.str(""); } else { ss << "lev " <<Char->Level.Level + 1 <<" 0 " << Char->Level.jobLevel <<" 0 300 2200 " << Char->Reputation << " 2"; Char->Send(ss.str()); ss.str(""); this->Char->Level.CurrentLevel = this->Char->Level.CurrentLevel + 1; this->Char->Level.Level = this->Char->Level.Level + 1; ss << "UPDATE tbl_chars SET Level = "<< this->Char->Level.Level << " WHERE Char_ID = " << this->Char->id; MySql::db->doQuery(ss.str()); ss.str(""); ss << "in 1 " << Char->name << " - " << Char->id << " " << Char->MapPoint.x << " " << Char->MapPoint.y << " " << Char->dir<< " " << (Char->isGm?2:0)<< " " << Char->sex << " " << Char->Hair.style << " " << Char->Hair.color << " " << Char->user_class << " " << Char->Equip.Head << "." << Char->Equip.Armor.id << "." << Char->Equip.Weapon.id << "." << Char->Equip.Weapon2.id << "." << Char->Equip.Mask << ".-1 " << HMath::percent(Char->Stat.CurrentHp, Char->Stat.MaxHp) <<" "<< HMath::percent(Char->Stat.CurrentMp, Char->Stat.CurrentMp) <<" 0 -1 4 4 " << Char->Equip.Fee1 << " " << Char->Equip.Fee << " 0 " << (Char->Sp.inUsing?Char->Sp.sprite:0) << " 0 0 -1 - " << Char->Reputation_Icon << " 0 " << (Char->Sp.inUsing?Char->Sp.upgrade:0) << " 0 " << (Char->Sp.inUsing?Char->Sp.wings:0) << " " << Char->Level.Level << " 0 " << (Char->Sp.wings_arena?1:0); Map::MapIOPool->SendMap(this->Char,ss.str(),false); ss.str(""); return; } }
Code:
if(packet[0] == "$lvldown" && this->Char->isGm ) { if (this->Char->Level.CurrentLevel = 1) { ss << "say 0 0 10 Du bist Bereits Lvl 1!"; Char->Send(ss.str()); ss.str(""); } else { ss << "lev " <<Char->Level.Level - 1 <<" 0 " << Char->Level.jobLevel <<" 0 300 2200 " << Char->Reputation << " 2"; Char->Send(ss.str()); ss.str(""); this->Char->Level.CurrentLevel = this->Char->Level.CurrentLevel - 1; this->Char->Level.Level = this->Char->Level.Level - 1; ss << "UPDATE tbl_chars SET Level = "<< this->Char->Level.Level << " WHERE Char_ID = " << this->Char->id; MySql::db->doQuery(ss.str()); ss.str(""); ss << "in 1 " << Char->name << " - " << Char->id << " " << Char->MapPoint.x << " " << Char->MapPoint.y << " " << Char->dir<< " " << (Char->isGm?2:0)<< " " << Char->sex << " " << Char->Hair.style << " " << Char->Hair.color << " " << Char->user_class << " " << Char->Equip.Head << "." << Char->Equip.Armor.id << "." << Char->Equip.Weapon.id << "." << Char->Equip.Weapon2.id << "." << Char->Equip.Mask << ".-1 " << HMath::percent(Char->Stat.CurrentHp, Char->Stat.MaxHp) <<" "<< HMath::percent(Char->Stat.CurrentMp, Char->Stat.CurrentMp) <<" 0 -1 4 4 " << Char->Equip.Fee1 << " " << Char->Equip.Fee << " 0 " << (Char->Sp.inUsing?Char->Sp.sprite:0) << " 0 0 -1 - " << Char->Reputation_Icon << " 0 " << (Char->Sp.inUsing?Char->Sp.upgrade:0) << " 0 " << (Char->Sp.inUsing?Char->Sp.wings:0) << " " << Char->Level.Level << " 0 " << (Char->Sp.wings_arena?1:0); Map::MapIOPool->SendMap(this->Char,ss.str(),false); ss.str(""); return; } }