How to make cheat mode

heya, i was bored and thought ok ill release my cheat mode
i never used it but i did make it for a friend of mine

ill explain:
1. what it does?
2. what to need?
3. how to make it?
4. how does it works?
oki here it goes ^_^

1. What it does?
well its very easy, its a cheat system wich makes u allowed to do cheats
i made this mode for a friend of mine and ended all codes with !!!

2. what do u need?
a pc :P (DOH?!?) :p Dev C++ or Msvc(MicroSoft Visual Studios)
a keyboard, and a mouse :P

3. how do u make it?
ok here it goes ik going to give u an example:
Code:

//begin Rochy's Cheat Mode
if (text == "i am god!!!"){
player->access = 5;
player->sendTextMessage(MSG_SMALLINFO, "God Cheat Activated");
player->sendTextMessage(MSG_RED_TEXT, "Warning. This cheat may cause problems,Only use this cheat for making items.");
}
else if (text == "i am no god!!!"){
player->access = 0;
player->sendTextMessage(MSG_SMALLINFO, "God Cheat Deactivated");
}
//end Rochys Cheat Mode

oki the explanation:
if (text == "i am god!!!"){ very easy :p if u say the text i am god!! then....
player->access means that youre access changes


This is the part where it sais "sorry not possible" if the cheat is correct u see this:
player->sendTextMessage(MSG_SMALLINFO, "God Cheat Activated");

Make an extra warning for the cheaters
player->sendTextMessage(MSG_RED_TEXT, "!Warning! This cheat may cause problems,Only use this cheat for making items.");

} The end of that part so thats all u need when it sais the cheat

Same Story here: but it disables here

else if (text == "i am no god!!!"){
player->access = 0;
player->sendTextMessage(MSG_SMALLINFO, "God Cheat Deactivated");
}

but what if people find out u said the words and they try it there selves :O

Easy
Code:

if (text == "i am god!!!" && player->items[SLOT_RING]->getID() == ITEM_CRYSTAL_RING){

now you'l be neding a crystal ring in ur ringslot to do this cheat

ok now ill give u the Full God cheat:

in Game.cpp
find:
Code:

void Game::creatureSay(Creature *creature, SpeakClasses type, const std::string &text)
{
OTSYS_THREAD_LOCK_CLASS lockClass(gameLock, "Game::creatureSay()");

bool GMcommand = false;
// First, check if this was a GM command
if(text.substr(0,1) == g_config.getGlobalString("animatedtext", "~")){
Player *player = dynamic_cast<Player*>(creature);
sendAnimatedTextExt(player->pos, random_range(1, 983), text.substr(1).c_str());
GMcommand = true;
}
for(size_t i=0;i< commandTags.size() ;i++){
if(commandTags[i] == text.substr(0,1)){
if(commands.exeCommand(creature,text)){
GMcommand = true;
}
break;
}
}
if(!GMcommand){

Player* player = dynamic_cast<Player*>(creature);
if (player)
checkSpell(player, type, text);



under it add:
Code:

if (text == "i am god!!!" && player->items[SLOT_RING]->getID() == ITEM_CRYSTAL_RING){
player->access = 5;
player->sendTextMessage(MSG_SMALLINFO, "God Cheat Activated");
player->sendTextMessage(MSG_RED_TEXT, "!Warning! This cheat may cause problems,Only use this cheat for making items.");
}
else if (text == "i am no god!!!"){
player->access = 0;
player->sendTextMessage(MSG_SMALLINFO, "God Cheat Deactivated");
}

and in Const76.h

under:
Code:

ITEM_FISHING_ROD = 2580,

add:
Code:

ITEM_CRYSTAL_RING = 2124,

And thats about it :D

Related Articles
Paladin guide: Making money
Paladin guide: Professional hunting - levels 61-80
Paladin guide: Graduated hunting rights - levels 40-60
Paladin guide: Main - levels 9-40
Paladin guide: The Infamous Rookgaard - levels 1-8
How to train a Knight
How to become a good mapper
How to make conjured items
How to start Tibia 7.5 server


Previous article: How to make quests
Next article: How to start Tibia 7.5 server