Backpack Dropping


 

      Hi, its Ze0 here again and today i'm going to show you how to fix something that you may of been concerned with or may have not even noticed. Now lets get on with the lesson shall we?

      You may of come to notice that the Tutor Bot doesn't drop backpacks ALL the time this isn't good, it takes away some of the realism of emulating a real client as real players drop backpacks every time they die, the Tutor Bot only drops a backpack randomly. Easy to fix..

      Scroll down to bot_drop_pack() in tutor.qc


// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void() bot_drop_pack =
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{
	if (random () < 0.5)
		DropBackpack();
};

      This is what you should see if you haven't modified the original routine. Being the smart coder that you are I guess you've already spotted the problem, what we have to do is remove the bots dropping backpacks randomly and make them drop backpacks always.

      So lets take out:


	if (random () < 0.5)

      Now you should have this:


// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void() bot_drop_pack =
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{
	DropBackpack();
};

      And thats it. Your bots will now drop backpacks always whenver they die. Any questions?

 


What We Learned

1. The Tutor Bot is far from perfect
2. Problems are fun to solve
3. Players always drop backpacks
4. This is another step to making the Tutor Bot more like a client

 


Author: Ze0
Questions:
ze0@botepidemic.com
AI chat on ICQ: 4801437