This bot is modification of Thailand 's dekaron bot, adapted to work for 2Moons\GlobalDK servers. It has many bugs, and lacks good scripts, but i have no time to spend on this program, so i'm releasing it as it is.But it's quite interesting and i guess experienced people can make good use of it, since it has some nice features, TzPhQy bot lacks.A thanks goes to gawron25 and L.e.v.i.a.t.h.a.n for supplying me with the original version
The bot is script based. It means that right after login, or if a game event occurs (such as incoming chat message for example) it calls appropriate function from script ( "onChat(id,chatType,from,mesg)" in dkutil.script).In the function you can write your own code that handle the event (in the chat example you could scan message for words like "bot" or "party?" and reply with "i'm not bot" or "no,ty" ).Your script can access any variable and call any function that is declared in "binding list" (See lua_bind.txt).You can also call another functions that is defined in script and define your own functions. Theoretically, the bot can be programmed to do anything : dungeon runs, quests, fishing, player assisting, etc...To do unimplemented things you can call sendPacket() to directly send required packet. Of course, you need to know game protocol specifics to do that.
Please don't ask me to teach you Lua script language. Google is your friend.
Please don't ask me to give you ready-made scripts.I don't have any besides released ones.
Download link 1 :

Download link 2 :

Script files:
| .\bot\user.script | general bot setup, skill definitions |
| .\bot\config.script | paths to scripts and other data files |
| .\share\script\dkutil.script | most of game event handlers, bot AI |
| .\share\script\util.script | misc. useful functions used by other scripts |
| .\share\script\const.script | general game constants definitions(servers IP list, map list, map portal locations, etc...) |
------------ How to update bot ------------
To update bot with Xigncode, simply copy all new ReXIGNation files to bot folder (folder that contains dkutil.exe file)
To update bot with game update, use Merovingian's data pack unpacker and included tool BotCRC.exe
1.Use Data Unpacker to unpack 'share' folder from pack.d04
2.Start BotCRC.exe
3.Click 'Select' button and choose path to unpacked shared folder.When correct folder is selected, OK button will become active.
4.After a few seconds a window will appear asking whether to create CRC Archive. Answer "YES".
5.When the archive is ready, a window will popup.Click "OK" to close it.
6.Copy newly created file crcdata.bin to \ThaiBot\share\data folder
7.Open user.script file with a notepad and find (you have to scroll it almost to the end) following line:
Code:
crcDataInitValue=hex('0x12345678');
8.That's all.Restart bot to take effect.
------- Brief script configuration tutorial ------

[Setting up bot for trading (private shop)]
You should login first with normal client and put items you want to sell to your private shop.Logout. Login with bot, enter name of your shop into text input field (see pic.) then right- click on items tab and select "Shop->Name" in popup menu.Then do again right-click and select "Shop->Open".Your shop will open.
[Settings up bot for leveling]
All configuarion parameters is stored in user.script file.You should not edit otehr files unless you're know what you're doing (but you can always try, just keep a backup copy).
First of all you need to setup walkcode.WalkCode (also called "Style" in client's CSV files) is a special code used in action packets (while attacking, moving, and doing any other activities).Without correct code your character won't do anything in game. This code is dependant on weapons (and thus, indirectly, on character class) you're armed with. Use following table to determine WalkCode
| Armed weapons | WalkCode |
| Azure Knight | |
| sword(1h) | 3 |
| sword(1h) + shield | 16 |
| sword(1h) + sword(1h) | 10 |
| sword(1h) + mace(1h) | 10 |
| sword(1h) + axe(1h) | 10 |
| sword(2h) | 4 |
| mace(1h) | 12 |
| mace(1h) + shield | 17 |
| mace(1h) + mace(1h) | 10 |
| mace(1h) + axe(1h) | 10 |
| mace(2h) | 19 |
| axe(1h) | 13 |
| axe(1h) + shield | 18 |
| axe(1h) + axe(1h) | 10 |
| axe(2h) | 20 |
| Segita Hunter | |
| bow | 7 |
| crossbow | 8 |
| Incar Magician | |
| staff | 9 |
| wand | 11 |
| Vicious Summoner | |
| staff | 9 |
| twin sword | 21 |
| Segnale | |
| Whip | 22 |
| Bagi Warrior | |
| Gauntlet | 24 |
| Aloken | |
| Spear | 25 |
| Spear + Guardam | 27 |
Code:
function getWalkCode()
walkCode=22; -- modify this value according to your character's weapons
dbgTrace("getWalkCode()");
trace( "WalkCode(Style)="..walkCode);
end;
Setting up grind location.Set map value to ID of desired map, see table for map ID's
Code:
toLevelTab = {
{name="GOTO", map=14, delay=1000}, -- map is an ID of destination map
Code:
toShoppingTab = { -- What to do when we need to buy\sell stuff from\to NPC
{name="SCRIPT", delay=1000,
func=function(self)
trace("Shopping : preparing to go shopping...");
toShoppingTab.x = myPlayer.curPos.x; -- save current coordiantes
toShoppingTab.y = myPlayer.curPos.y; -- save current coordinates
end;
},
{name="GOTO", map=7, delay=1000}, -- '7' = ID of target map (Loa castle)
{name="SCRIPT", delay=1000,
func=function(self)
trace("Shopping : Moving to NPC...");
sendMove(28160,29696); -- Near 'Sonya' in Loa castle
end;
},
Code:
sellTab = {-- Items to sell to NPC
{name='Armor',plus=8, numSlot=8},
{name='Boots',plus=8, numSlot=8},
Code:
buyTab = {--Items to buy from NPC
-- ### North Morte & Draco Desert ###
{name="Large Health Potion",numKeep=3,numToShop=1,tab=0,slotID=10}, --(pack5) 480 HP
-- {name="Large Mana Potion",numKeep=4,numToShop=1,tab=0,slotID=11},
After login click "Script-> > go Leveling" to start bot.
Other options:
“Script->Reload Script” - reload all script files from disk
“Script->Exec” – execute Lua script string from text input field
"Option->Auto reconnect" - auto reconnect if disconnected
"Option->Use scoreboard" - Used to communicate betewen members-bots in party.Probably not working, not sure about this one.
"Option->Debug mode" - spit out more messages about program internal state
------------ Script reference ------------
For a list of Lua binding functions see lua_bind.txt file in bot archive.
Following functions are NOT implemented in bot, even though they are present in binding list.
Code:
sendNPCBuy() processRecvPacket() showFriend() healParty() supportParty() cleanupMonster() useItem() sellItem() buyItem() dropItem() move() sendReadyPacket() autoSell() autoBuy() autoStore() sendSellStart() sendSellEnd() sendWarpXZ() sendChatEx() processCommand() useSkill() clearSkillStatus() updateSkillStatus() getSkillStatus() updatePlayerPos() autoTalk() autoUseItem() reposition() warpSavePoint() isFriend() sendTradeRequest() sendTradeCancel() sendTradeAccept() sendTradeItem() sendTradeMoney() sendTradeCommit() sendStoreStart() sendStoreEnd() setFollow() sendIRC() addFriendFromIRCList() setFriendOnline() syntaxCheck() addLuaEditor() showSkillStatus() sendAction() sendNPCRequest() sendWarpByNearestNPC() putMoneyToStore() getMoneyFromStore() autoGetStore() putToStore() getFromStore() syncMyPos() cmdMgrSendAll() cmdMgrSendTo() crcMe() crcMe2() resetDir() sendPetAttack() sendSit() sendStand() sendRest() sendNPCClick() sendNPCBuy() sendUseBuffSkill() sendUseWeaponSkill() sendBuyItem() sendSellItem() sendUseSkillMultiAll() sendUseSkillStatus() sendUseSkillMulti() sendUseSkillMultiMoveAll() sendUseSkillMultiMoveAll2() sendUseSkillMultiMove() sendUseSkillMultiMove2() sendMoveStop() sendMoveContinue() sendTransmuteItem() sendDropAll() sendBossKill() sendQuestDunStart() sendDunFinish() sendServerChat() sendHex() sendMoveContinue2() sendChatGuild() sendChatInfo() sendComboStart() sendTradeReady() sendPartyRequest() sendPartyAccept() sendUseMoveSkill() sendAddParty() sendRequestQuest() sendPVPRequest() sendPVPAccept() sendUpdateQuest() sendSumbitQuest() PlaySound()
Code:
function onSkillFail(code) function onSkillSuccess(id,level) function onSkillObjCreate(id,targetID,unkI) function onSkillHoming() function onSkillDone(id,level) function onGMAppear() function onAttackMonster(id,value) function onControlMonster(id) function onInventoryFull() function onNPCShopClose() function onPartyCreate() function shouldPickItem(name) function onGameReady() function onDisconnect()
Code:
frmMain:addCustomScript('name menu item','scriptHandlerName();');






