EOSERV Forum > EOSERV > lewis999's EOserv rev 189
Topic is locked.
Page: << 1 2 ... 9 10 11 12 13 ... 28 29 >>
lewis999's EOserv rev 189
Author Message
Post #48144 Re: EOserv rev 189 Compiled
lewis999 posted: (3rd Sep 2010 05:18 pm)

kenobi13 posted: (3rd Sep 2010 05:13 pm)

Respect posted: (3rd Sep 2010 05:08 pm)


ok well i am admin lvl 5 nothin seems to work and on a lighter note looked in config.ini see nothing that would disable me to use commands


Max admin level is 4, not 5.
Ok, ill change all the lvl 5 stuff in the admin.ini to lvl 4.
Thanks for Ponting this out :)

Are you able to answer my question??

EDIT: Just tryed to compile, and it's saying Nothing to be done etc, Yes i've done things. I was compiling it in Mysql +Sqlite Im not compiling in, DEBUG + MYSQL + SQLITE

14 years, 35 weeks ago
Post #48145 Re: EOserv rev 189 Compiled
xIFearlessIxx posted: (3rd Sep 2010 05:15 pm)

lewis999 posted: (3rd Sep 2010 05:12 pm)

xIFearlessIxx posted: (3rd Sep 2010 05:08 pm)

I have a question Lewis, where is the code located, that allows people to enable/disable things.


If you mean it he config it's right at the bottom.

I know, but I mean in the source, What's the code makes this work, I seen what you using.
if (static_cast<int>(this->server->world->config["Enable_Fishing"]) == 1)
Is that all you need?


Yep, that's pretty much perfect, also if there is already an "if" statement I just add this to it:
&& static_cast<int>(this->server->world->config["Admin_pet_commands"]) == 1 

Edit:This is a problem with your compiler not the source. to fix it go to compiler and debugger settings, then toolchain executables, after that click auto detect.
Now it should work

14 years, 35 weeks ago
Post #48146 Re: EOserv rev 189 Compiled
lewis999 posted: (3rd Sep 2010 05:26 pm)

xIFearlessIxx posted: (3rd Sep 2010 05:15 pm)

lewis999 posted: (3rd Sep 2010 05:12 pm)

xIFearlessIxx posted: (3rd Sep 2010 05:08 pm)

I have a question Lewis, where is the code located, that allows people to enable/disable things.


If you mean it he config it's right at the bottom.

I know, but I mean in the source, What's the code makes this work, I seen what you using.
if (static_cast<int>(this->server->world->config["Enable_Fishing"]) == 1)
Is that all you need?


Yep, that's pretty much perfect, also if there is already an "if" statement I just add this to it:
&& static_cast<int>(this->server->world->config["Admin_pet_commands"]) == 1 

Okay, Sounds good. Just wanted to be sure.

14 years, 35 weeks ago
Post #48147 Re: EOserv rev 189 Compiled
xIFearlessIxx posted: (3rd Sep 2010 05:31 pm)

lewis999 posted: (3rd Sep 2010 05:26 pm)

xIFearlessIxx posted: (3rd Sep 2010 05:15 pm)

lewis999 posted: (3rd Sep 2010 05:12 pm)

xIFearlessIxx posted: (3rd Sep 2010 05:08 pm)

I have a question Lewis, where is the code located, that allows people to enable/disable things.


If you mean it he config it's right at the bottom.

I know, but I mean in the source, What's the code makes this work, I seen what you using.
if (static_cast<int>(this->server->world->config["Enable_Fishing"]) == 1)
Is that all you need?


Yep, that's pretty much perfect, also if there is already an "if" statement I just add this to it:
&& static_cast<int>(this->server->world->config["Admin_pet_commands"]) == 1 

Okay, Sounds good. Just wanted to be sure.

Look at my post above for how to fix the error, I just edited it.

14 years, 35 weeks ago
Post #48149 Re: EOserv rev 189 Compiled

did that didn't do anything, I don't think it's my compiler I also dont think it's the source, but I has to be, my compiler worked before (With another rev it works) If I compile in Debug+MYSQL It works...

14 years, 35 weeks ago
Post #48153 Re: EOserv rev 189 Compiled


ok well  commands won't work i changed it all to lvl 4 admin in database and admin.ini?? EDIT warp cmd and item cmd don't work $admin name and rank work though

14 years, 35 weeks ago
Post #48155 Re: EOserv rev 189 Compiled

@respect better to drop database and run install.sql from your trunk folder

@lewis maybe an idea for admin lvl at first created character?


14 years, 35 weeks ago
Post #48157 Re: EOserv rev 189 Compiled
Wizzle posted: (3rd Sep 2010 06:12 pm)

@respect better to drop database and run install.sql from your trunk folder

@lewis maybe an idea for admin lvl at first created character?


Do you mean make it so that the first person to make a character is automaticly an admin?

14 years, 35 weeks ago
Post #48158 Re: EOserv rev 189 Compiled

yep , then you wouldnt have to go into the database

14 years, 35 weeks ago
Post #48160 Re: EOserv rev 189 Compiled

I plan to fix all admin level commands.

Actually, Yes it does.... Read above my friend.

14 years, 35 weeks ago
Post #48166 Re: EOserv rev 189 Compiled

repost in original $hire ....

else if (command.length() >= 4 && command.compare(0,4,"hire") == 0 && this->player->character->admin >= static_cast<int>(this->server->world->admin_config["admin"]))
                {
                    Character *victim = this->server->world->GetCharacter(arguments[0]);
                    if(arguments[1] == "0")
                    {
                        victim->player->character->admin = ADMIN_PLAYER;
                        victim->str = 0;
                        victim->intl = 0;
                        victim->wis = 0;
                        victim->agi = 0;
                        victim->con = 0;
                        victim->cha = 0;
                        victim->statpoints = this->player->character->level * util::to_int(this->server->world->config["StatPerLevel"]);
                        victim->StatSkill();
                        victim->CalculateStats();
                        victim->hp = victim->maxhp;
                        victim->tp = victim->maxtp;
                        victim->Save();
                        //this->server->world->db("UPDATE `characters` SET `admin` = ADMIN_PLAYER WHERE `name` = '$'", victim->admin, victim->name.c_str());
                        victim->CalculateStats();
                        this->player->character->map->Effect(MAP_EFFECT_QUAKE, 1);
                        this->server->world->ServerMsg("Attention!! "+ victim->name+" has been demoted to a player!");
                    }
                    if(arguments[1] == "1")
                    {
                        victim->player->character->admin = ADMIN_GUIDE;
                        victim->str = 1000;
                        victim->intl = 1000;
                        victim->wis = 1000;
                        victim->agi = 1000;
                        victim->con = 1000;
                        victim->cha = 1000;
                        Database_Result callbackdata;
                        victim->StatSkill();
                        victim->CalculateStats();
                        victim->hp = victim->maxhp;
                        victim->tp = victim->maxtp;
                        victim->Save();
                        //this->server->world->db("UPDATE `characters` SET `admin` = 1 WHERE `name` = '$'", victim->admin, victim->name.c_str());
                        victim->map->Effect(MAP_EFFECT_QUAKE, 1);
                        //Character::Save();
                        this->server->world->ServerMsg("Attention!! "+ victim->name+" has been promoted to Light Guide!");
                    }
                    if(arguments[1] == "2")
                    {
                        victim->player->character->admin = ADMIN_GUARDIAN;
                        victim->str = 1000;
                        victim->intl = 1000;
                        victim->wis = 1000;
                        victim->agi = 1000;
                        victim->con = 1000;
                        victim->cha = 1000;
                        Database_Result callbackdata;
                        victim->StatSkill();
                        victim->CalculateStats();
                        victim->hp = victim->maxhp;
                        victim->tp = victim->maxtp;
                        victim->Save();
                        //this->server->world->db("UPDATE `characters` SET `admin` = 2 WHERE `name` = '$'", victim->admin, victim->name.c_str());
                        victim->map->Effect(MAP_EFFECT_QUAKE, 2);
                        //Character::Save();
                        this->server->world->ServerMsg("Attention!! "+ victim->name+" has been promoted to Guardian");
                    }
                    if(arguments[1] == "3")
                    {
                        victim->player->character->admin = ADMIN_GM;
                        victim->str = 1000;
                        victim->intl = 1000;
                        victim->wis = 1000;
                        victim->agi = 1000;
                        victim->con = 1000;
                        victim->cha = 1000;
                        Database_Result callbackdata;
                        victim->StatSkill();
                        victim->CalculateStats();
                        victim->hp = victim->maxhp;
                        victim->tp = victim->maxtp;
                        victim->Save();
                        //this->server->world->db("UPDATE `characters` SET `admin` = 3 WHERE `name` = '$'", victim->admin, victim->name.c_str());
                        victim->map->Effect(MAP_EFFECT_QUAKE, 3);
                        //Character::Save();
                        this->server->world->ServerMsg("Attention!! "+ victim->name+" has been promoted to GM");
                    }
                    if(arguments[1] == "4")
                    {
                        victim->player->character->admin = ADMIN_HGM;
                        victim->str = 1000;
                        victim->intl = 1000;
                        victim->wis = 1000;
                        victim->agi = 1000;
                        victim->con = 1000;
                        victim->cha = 1000;
                        Database_Result callbackdata;
                        victim->StatSkill();
                        victim->CalculateStats();
                        victim->hp = victim->maxhp;
                        victim->tp = victim->maxtp;
                        victim->Save();
                        victim->map->Effect(MAP_EFFECT_QUAKE, 4);
                        //Character::Save();
                        this->server->world->ServerMsg("Attention!! "+ victim->name+" has been promoted to HGM");
                    }
                }

14 years, 35 weeks ago
Post #48168 Re: EOserv rev 189 Compiled

All you did was take a Hire command on this forum (Theres 100s of them) and just change it, One question, Does yours actually save the admin level, after restarted the server and relog?

14 years, 35 weeks ago
Post #48170 Re: EOserv rev 189 Compiled

indeed found on this forum just before i posted it ......only made some changes because there already was a $hi command in this rev so it hides instead of hiring...

14 years, 35 weeks ago
Post #48171 Re: EOserv rev 189 Compiled
Wizzle posted: (3rd Sep 2010 07:28 pm)

i was bored :)


else if (command.length() >= 4 && command.compare(0,4,"give") == 0 && this->player->character->admin >= this->player->character->admin = ADMIN_HGM; )
                    {
                    Character *victim = this->server->world->GetCharacter(arguments[0]);
                    if(arguments[1] == "0")
                    {
                        victim->player->character->admin = ADMIN_PLAYER;
                        victim->str = 0;
                        victim->intl = 0;
                        victim->wis = 0;
                        victim->agi = 0;
                        victim->con = 0;
                        victim->cha = 0;
                        victim->hp = victim->maxhp;
                        victim->tp = victim->maxtp;
                        victim->statpoints = this->player->character->level * util::to_int(this->server->world->config["StatPerLevel"]);
                        victim->StatSkill();
                        victim->CalculateStats();
                        victim->Save();
                        this->server->world->ServerMsg("Attention!! "+ victim->name+" has been demoted to a player!");
                    }
                    if(arguments[1] == "1")
                    {
                        victim->player->character->admin = ADMIN_GUIDE;
                        victim->str += 100;
                        victim->intl += 100;
                        victim->wis += 100;
                        victim->agi += 100;
                        victim->con += 100;
                        victim->cha += 100;
                        victim->hp = victim->maxhp;
                        victim->tp = victim->maxtp;
                        victim->StatSkill();
                        victim->CalculateStats();
                        victim->Save();
                        victim->map->Effect(MAP_EFFECT_QUAKE, 1);
                        this->server->world->ServerMsg("Attention!! "+ victim->name+" has been promoted to Light Guide!");
                    }
                    if(arguments[1] == "2")
                    {
                        victim->player->character->admin = ADMIN_GUARDIAN;
                        victim->str += 200;
                        victim->intl += 200;
                        victim->wis += 200;
                        victim->agi += 200;
                        victim->con += 200;
                        victim->cha += 200;
                        victim->hp = victim->maxhp;
                        victim->tp = victim->maxtp;
                        victim->StatSkill();
                        victim->CalculateStats();
                        victim->Save();
                        victim->map->Effect(MAP_EFFECT_QUAKE, 2);
                        this->server->world->ServerMsg("Attention!! "+ victim->name+" has been promoted to GUARDIAN");

                    }
                    if(arguments[1] == "3")
                    {
                        victim->player->character->admin = ADMIN_GM;
                        victim->str += 300;
                        victim->intl += 300;
                        victim->wis += 300;
                        victim->agi += 300;
                        victim->con += 300;
                        victim->cha += 300;
                        victim->hp = victim->maxhp;
                        victim->tp = victim->maxtp;
                        victim->StatSkill();
                        victim->CalculateStats();
                        victim->Save();
                        victim->map->Effect(MAP_EFFECT_QUAKE, 3);
                        this->server->world->ServerMsg("Attention!! "+ victim->name+" has been promoted to GM");
                    }
                    if(arguments[1] == "4")
                    {
                        victim->player->character->admin = ADMIN_HGM;
                        victim->str += 400;
                        victim->intl += 400;
                        victim->wis += 400;
                        victim->agi += 400;
                        victim->con += 400;
                        victim->cha += 400;
                        victim->hp = victim->maxhp;
                        victim->tp = victim->maxtp;
                        victim->StatSkill();
                        victim->CalculateStats();
                        victim->Save();
                        victim->map->Effect(MAP_EFFECT_QUAKE, 4);
                        this->server->world->ServerMsg("Attention!! "+ victim->name+" has been promoted to HGM");
                    }
    }

Thank you for posting this :D
Added.

14 years, 35 weeks ago
Post #48172 Re: EOserv rev 189 Compiled

Wait, what exactly does this do? Lol.

Just gives adminship and doesn't save.. I should fix it.

14 years, 35 weeks ago
Page: << 1 2 ... 9 10 11 12 13 ... 28 29 >>
Topic is locked.
EOSERV Forum > EOSERV > lewis999's EOserv rev 189