Chapter Thirty-Eight: Automatic Monster Fighting
Now there are 20 pea shooters left on Han Hai's body, Han Hai arranged them all on the city wall outside the battlements, about 1 meter away from the battlements above, only to see these pea shooters use their roots to penetrate into the city wall and firmly fix on it, Han Hai began to order them to shoot the zombies below.
Then Han Hai was surprised to find that his pea shooter now needed two seed bullets to kill a zombie.
Looking at the zombies whose faces were no longer seriously decomposed, Han Hai was surprised to find that these zombies were actually evolving.
This gave Han Hai a clear understanding of the speed of zombie evolution, and Han Hai's eyes were full of solemnity, which was simply a competition between humans and zombie evolution.
Han Hai didn't dare to imagine what would happen to the human race if the zombies won the victory in this evolutionary war one day, and he didn't dare to continue thinking about it anymore when he thought of this.
Han Hai looked at most of the zombies below who could only roar, and felt a little relieved in his heart, at least now humans are still ahead of these monsters on the path of evolution.
Thinking of this, Han Hai shook his head, these are not things that he can consider now, now it is better to look at the energy efficiency of collecting characters first.
Then Han Hai leaned against the city wall, picked up his watch, looked at the number of characters in the upper left corner, and began to observe for a long time.
When the second hand of the watch rotated in a circle, Han Hai looked at the number of character energy, and he found that his character energy reached more than 1,800 at this time.
At first, Han Hai found that the speed of character energy growth was very fast, and he could reach the speed of collecting more than 50 character energy in 1 second, but after 20 seconds, the speed of character collection slowed down.
Han Hai listened to the much sparse sound of zombie roars, turned around and looked under the city wall through the battlement.
Then Han Hai knew why the energy of the characters was collected quickly in the early stage and the reason why the collection of characters in the later stage was slow.
Because at this moment, within a radius of 20 meters near the battlements of the city wall of Han Hai, the zombies have all been cleaned up, and the zombies who enter this area in the distance will soon be taken care of by the seed bullets of the pea shooter, and then fall to the ground and become a real corpse.
Then Han Hai showed a wry smile, if this was the case, his idea of frantically collecting the energy of the characters through this method would be in vain.
If Han Hai had placed a pea shooter at intervals on the city wall, it would have been much more efficient, but Han Hai really couldn't do that, because there was a person around Han Hai who was staring at him all the time.
Han Hai found that there was a soldier staring at him when he went up the city wall, Han Hai didn't pay much attention at first, thinking that it was the reason why the pea shooter on his body was strange, but now Han Hai found that this person was still looking at him, at this time Han Hai felt that something was wrong, and it was obvious that this person was watching himself.
So Han Hai can't do anything too much now, if he catches the attention of that yin man Jian San, it will not be good, and when he mentions that man's speed, Han Hai is terrified.
Thinking of this, Han Hai sat down with his back against the inner extension of the city wall against the battlements of the city wall, then opened his system menu, and then found the dynamic loading library data model to create a new document, Han Hai looked at the slowly growing number on the left, and then wrote at the beginning of the document:
/**
* Auto-fight hooks
*/
BOOL WINAPI DllMain(HINSTANCE hinstDll, DWORD dwReason, LPVOID lpvReserved)……
Then Han Hai began to write for a long time, this is a dynamic loading library of the beginning of the function, Han Hai in order to simplify the amount of code, ready to start writing directly in the function, so as to save some character energy, after all, now he is a poor man again, only more than 1800 characters remained.
Han Hai has written these codes before, and when he was in school, he studied image recognition by himself, and also wrote simple AI for automatic monster fighting.
Han Hai wrote another function: public bool isArea(unsigned char *image,int height,int width,vector templeImages)
It's just that this time the operation of the code needs to be based on 3D, so Han Hai needs to use the dynamic loading library to intercept the image of the pea shooter's visual area into the model target matching, which is more logical and requires the use of a lot of filtered image transformations.
The basic logic is that the image is intercepted to the RGB component of the image data, and then the grayscale picture is compared with the mean square deviation of the template image convolution, and the smallest one is the target, because the function done this time does not require a strong image recognition function, so these rough algorithms have achieved Han Hai's purpose, and the purpose of his writing this function is only to determine whether the attack target is within the attack range.
After doing this, Han Hai helplessly found that he no longer had character energy at this time, at this time, the character energy in the upper left corner of Han Hai's vision began to grow slowly, Han Hai was a little speechless to find that if this growth continued, it was expected that he would not be able to continue writing code until a long time later.
The rest of the code is to tamper with a movement function, the purpose is to let the pea shooter move around the city wall when there is no attack target, so that you can ensure that there are monsters that can attack at any time, and even if Han Hai does not come to the city wall area, there is a steady stream of character energy in the account, thinking of this, Han Hai is still a little excited.
But now Han Hai has to find a way to quickly earn enough character energy, because to call the dynamic library, Han Hai also has to write a piece of code on the Pea Shooter data model, which is to load the dynamic library written by Han Hai.
Han Hai has already obtained access to two modules of Pea Shooter, so he only needs to add a piece of code to any of the module's code lines.
In fact, it is also possible to load the dynamic library for the objects that have appeared, but this will have to write another program for Han Hai, so far Han Hai has not found the data model for creating the project, so he can only load the dynamic library in this way.
Han Hai stood up and glanced to the left with the rest of his eyes, he found that the soldier was still staring at him, Han Hai secretly carried the man, and then walked forward 10 steps, and then changed to an empty battlement and sat on the ground again.
After doing all this, Han Hai skimmed his eyes and found that the man had followed him for some distance, and then looked at him from a distance.
This time, Han Hai finally confirmed that this man was monitoring and tracking him, thinking of this, he had a sense of urgency in his heart, he didn't dare to delay any longer, and immediately ordered the pea shooter who followed Han Hai to the outside of this battlement to start harvesting the zombies in this range.
Looking at the rapidly rising numbers in the upper left corner, Han Hai concentrated on reopening the document, and added a mobile instruction tampering instruction function at the end, which was very simple and moved directly along the extension of the city wall.
After a while, Han Hai opened the documentation for the Pea Shooter data model and embedded four lines of code from the growth function module:
HMODULE hookDll = LoadLibraryA(DLL_NAME);
pfnHookStart start =(pfnHookStart)GetProcAddress(hookDll,“HookStart“);
pfnHookstop (pfnHookStop)GetProcAddress(hookDll,“HookStop“);
start(hWnd,id,type);
In this way, the whole hook function and the method of hook loading call are available, and now because of the limited character energy, Han Hai can only simplify it to write, and many places are very rough, which can only be slowly improved in the future after there is enough character energy.
After all was done, Han Hai turned off the system, and then quietly glanced to the left side with his peripheral vision, he found that the soldier at this time was still staring at him, but he didn't pay much attention to it.
Han Hai saw this and felt a slight certainty in his heart, he looked at the 1400 character energy on it, and his heart was slightly certain.
Then Han Hai took advantage of the staring soldier not paying attention, then stood up and came to the battlement, his eyes were slightly condensed on the side of the city wall, and when he saw that there were 10 more protrusions on the city wall, Han Hai jumped down and sat on the ground and resumed his original posture.
Han Hai carefully observed the man with his spare eyes, he was stunned in his heart, his face became a little ugly, if he was not mistaken, he should know this person, he and Fan Yu were in the underground garage slaughterhouse, and he should be one of the people who rescued.
Then Han Hai was shocked in his heart, if this is the case, this person should know his appearance, look at his outfit and the two green dragon waist cards that snake around his waist, this person should have joined the Double Dragon Club, thinking of this, Han Hai was even more anxious in his heart, he can't be recognized by this person now, if he summons that Yin Ji man Jian San Han Hai will be in trouble.
Thinking of this, Han Hai decided to leave here when this batch of pea shooters matured.
Time passed in Han Hai's inner torment, and when Han Hai saw the energy character speed in his upper left corner rising rapidly, he knew that his dynamic module had been loaded, and the pea shooter should have started to clean up around the city wall.
Han Hai didn't dare to make too many pea shooters, and the current 10 self-propelled pea shooters would not be obvious in the intertwining of cannon fodder on the city wall, and the endless stream of zombies in the distance could well draw the attention of the soldiers.
But if Han Hai makes too much and cleans up the zombies too quickly, it will cause the soldiers to be idle.
In that case, it will attract a lot of attention, this is the result that Han Hai does not want, and now this collection speed has made Han Hai very satisfied, and after a while, this soaring speed stopped for a moment, at this time Han Hai's character energy number reached more than 2000 points, and after a while, this number began to grow rapidly, it should be that the 10 pea shooters each found a new zombie group.
In this way, Han Hai studied it carefully, if nothing else, he could collect 500 character energy points in a minute, and 30,000 points in an hour, and 720,000 points in a day.
However, it is also necessary to ignore the range of the wall where there are no zombies attacking, and the slow movement speed of the pea shooter, so that the number that Han Hai just now is just an estimate, and if Han Hai has half of this number in his plan, it will be good.
After handling the matter of character energy, Han Hai's task of coming to the city wall was basically completed.
It's time to leave.
Thinking of this, Han Hai took advantage of the man's inattention, stood up suddenly, and then rushed into the troop transport road not far away, at this moment Han Hai did not dare to slack off, and walked down the stairs and quickly towards the interior of the city.
At this moment, the man who was staring at Han Hai on the city wall, only to find that Han Hai was missing at this time, he tilted his head left and right, his face showed a trace of anxiety, and then he suddenly saw the familiar back in the position of the inner city wall, at this time his eyes lit up, as if he had found something at this moment, and shouted loudly in surprise: "It's him, the master of the sword three helms, I found him." ”
Han Hai heard the man's voice and didn't dare to slack off, only to see him run into the street quickly, Han Hai knew very well that with his running speed, he couldn't get rid of the tracking of the yin man Jian San, so after he entered the alley, he suddenly flew out of the center of his eyebrows, and the wind changed to a distance of 2 meters and two feet wide, and then stopped in front of Han Hai on the ground.
Han Hai didn't dare to slack off and stepped on it immediately, only to see that he compared a sword trick with his right hand, and then left only a speeding sword light in place, and Han Hai had disappeared without a trace.
Besides, the stalking man had just finished shouting, and suddenly a black-robed man with a gloomy face appeared in front of him, and it was the speed ability of the sword three.
I only heard him say to the man who was staring, "What's the matter? Who have you found? ”
The man who was staring saw a hint of fear on Jian San's face, and then his trembling body explained what had just happened.
Jian San's eyes lit up after hearing the words of the staring man, and he asked, "So, that man is the professional who killed the second dragon head?" ”
Hearing this, the staring man quickly nodded flatteringly, and pointed to the small alley where Han Hai disappeared and said, "Helmsman, he just entered that alley not long ago." ”
Jian San nodded excitedly, and then disappeared in an instant, and in just a moment, the two of them came to the mouth of the alley that Han Hai entered.
…
I don't know how long later, still on the eastern city wall of Shicheng, a loud slap resounded in the sky of Dongcheng District, only to see a soldier in army green clothing, flying down from the city wall, when he fell to the ground, he let out a desperate scream: "Helmsman, what I said is true, you have to believe me, ah...... Yes... Don't come here... Ahh
Then he couldn't speak anymore, because his face had been bitten off by the zombies that surrounded him, and he couldn't even make a sound for a while.
"Waste, dare you lie to me."
At this time, I found that there was a young man with a gloomy face at a battlement in the city wall, and he looked at the young man who was thrown down and said.