• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[8.60] Thais War with PvP bots

Gesior.pl

Mega Noob&LOL 2012
Senator
Joined
Sep 18, 2007
Messages
3,190
Solutions
106
Reaction score
3,790
Location
Poland
GitHub
gesior
Edit: new .zip file link, now 100% working
ThaisWar.net release!

Thais war server with scripted AI! :)

I had hope that I will get many players on this server, 'collect much data about players moves in pvp fights', make neuron network, learn it to fight and create best [not scripted] pvp bots.................. but players did not play (5-30 online), so I resigned.

3 bots + me fight in Thais:
bots.jpg


I will not host it anymore. Maybe someone else find it interesting:
* modified Thais map (6 temples)
-------- VIEW: http://thaiswarmap.ots.me/
  • spells, vocations, potions config for 75-150 lvl
  • level limit from 75 to 150 (config in data/lib/106-war.lua)
  • players move to temple after 'die', no need to relog
  • frags/deaths/assists counters
  • special experience formula for kill/assist to block frag giving/MC and other noobs ( http://paste.ots.me/362797/text )
  • BOTs! BOTs! BOTs! :)

  • bots use potions (not use items, but get mana/hp and has cooldown)
  • bots use runes
  • bots use spells
  • bots choose best attack/healing method for their vocation/target
  • bots use wands/crossbows/axes etc.
  • bots choose best target (closest, knights check if there is 'way to place where target stands', sorc/druid/paladin check if there is 'clear sight')
  • bots ignore targets that they can't hit
  • bots run in random places in Thais and try to find enemy
  • bots walk on some stairs (scripted), but not often
  • bots attack players and other bots
  • bots use anti-paralyze (with random delay - like real players without 'anti-paralyze bot')
  • bots 'tell' other bots to attack same target to make it possible to kill someone (it's not possible to kill 1 v 1)
  • bots use UTAMO VITA
  • bots RUN AWAY, when too many other bots/players attack them (utani hur/gran hur and ruuun+heal)
  • bots do not use much CPU/RAM (on my dedic [3.4GHz, 8GB ram] I had 300 bots without lags.. 300 bots in thais?! MASSACRE!)
Number of bots online is controlled by globalevent ( http://skalski.at/files/files/thaiswar860_with_bots/view/data/globalevents/scripts/botmanager.lua )
LUA:
local keepOnline = 23 -- number of players + bots at start
local maxChange = 2 -- maximum change per script execution [default 1 time per second] - goes random +1 or -1

local minOnline = 2 -- minimum number of players + bots online
local maxOnline = 35 -- maximum number of players + bots online [so if there is 35 players server will try to 'logout' all bots]
Sometimes server tries to remove bots, but can't, because it removes them only when they are in temple (after death).
Bots are not really logged out/in every time when server want add/remove bots. They are teleported to some place far away on map by function setBotActive(bot, false).
Server login all bots (listed in file http://skalski.at/files/files/thaiswar860_with_bots/view/data/lib/105-bot_nowy.lua ) on start and keep them online, because of memory leak in login/logout C++ function (function loadPlayer(name) in LUA).

View files:
Jerzy Skalski AKA 'Gesior' files (http://skalski.at/files/?dir=files/thaiswar860_with_bots/view/)
Download (data, sources, mods, config.lua, phpmyadmin database dump 'war.sql' [with bot characters, their skills and EQ, GOD account is ppp/ppp], www [modified Gesior 2012] with extra war statistics):

http://skalski.at/files/files/thaiswar860_with_bots/zip/thaiswar_860_bots_working.zip
I CANNOT HELP YOU WITH THAT OTS [COMPILE, RUN ETC.]
I CANNOT IMPLEMENT BOTS IN YOUR OTS [EVEN FOR MONEY]
 

Attachments

Last edited by a moderator:
I compiled with success and running in raspbian, but when I try to login server crashes.

*** glibc detected *** ./tfs: malloc(): memory corruption: 0x10651330 ***
Aborted

dunno what is wrong......

btw good work!
 
I get the same problem. Server crashing when logging in. Also getting an error with z communication not being found in database
 
I got no idea why it crashes at start.

Today I can only add old promotion movie with 95 bots in action:

Tommorow I will upload .zip with old version of thaiswar [before some AI updates] that works for 100% + .exe file + old database schema.
 
I've changed link to .zip file. This version with new database dump works without problems:
http://skalski.at/files/files/thaiswar860_with_bots/zip/thaiswar_860_bots_working.zip
(includes .exe, .map [compiled debug version] and .dll's)
This OTS used OTSME acc. maker (not released), so there can be some problems to install gesior.

very very nice

is possible to make the team?
red team x blue team
In file:
http://skalski.at/files/files/thaiswar860_with_bots/view/data/creaturescripts/scripts/bot/think.lua
is code..
to don't attack some players:
LUA:
if(isIgnored(guid, pid) or pid == cid or isNpc(pid) or getTileInfo(tpos).protection or getTileInfo(pos).protection or (isPlayer(pid) and getPlayerGroupId(pid) > 3) or (isBot(pid) and math.abs(getPlayerGUID(pid) - guid) < friendGUIDrange)) then
table.remove(targets, i)
to communicate with some players [combo/help to kill]:
LUA:
if(checkInterval(guid, 20) and math.random(1, 5) == 1) then
local specs = getSpectators(pos, 3, 3, false)
for _, spec in pairs(specs) do
if(isBot(spec)) then
local friendGUID = getPlayerGUID(spec)
if(math.abs(friendGUID - guid) < friendGUIDrange) then
setNewTarget(spec, friendGUID, getCreatureTarget(cid))
end
end
end
end

Bots got 'id' in table `players` in databae like 1,2,3,4,5,6...200, to don't make it like 'bots vs players', I made that your friends are bots with IDs +- X from your ID.
(isBot(pid) and math.abs(getPlayerGUID(pid) - guid) < friendGUIDrange)

Config in http://skalski.at/files/files/thaiswar860_with_bots/view/data/lib/105-bot_nowy.lua - default it's:
Code:
friendGUIDrange = 10

So if you modify that code:
(isBot(pid) and math.abs(getPlayerGUID(pid) - guid) < friendGUIDrange)
to check if target ID is < 100 or > 100 (and in what range is 'guid' of current bot) you can make it 2 teams, team 1 has IDs 1-100, team 2 has IDs 100-200
 
Last edited:
Hi Gesior, I'm getting a server freeze on real players every few minutes. It's not within a time interval, its just random. Any ideas? I do not freeze on my GOD character. It's just the players. The bots are still active the players at the time of the lag.
 
Gesior, problem.
"This server is currently banned! Reason: Spoofing data info.
Server will be unbanned after 12/01/2014."
To register the server is banned
 
Up. its the bots.

so the bots is like spoofing cuz its not a player that plays ?

I think thats why :p
 
Hmm.. it was online for month with 50-100 spoofed bots and I had no ban.
 
I wish to know how can I edit the account manager, there's apparently a few things I cannot change.

I'm thinking about dedicated hosting this server, but there are a few bugs with it.

1. The account manager isn't 1 / 1, apparently it is "1dd" but ok, I tried to change the password and it's encrypted and there's no way I can decrypt it
2. When I give up changing the account and finally get the account manager working when it's supposed to ask me for "which vocation would you like to bla bla bla" it says "Account couldn't be created"

If you fix that, the server will be ready to go and I will have a dedicated host for it.
 

Similar threads

Back
Top