Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //name=Gui bypass
- //description=Скрипт обходящий сервер kollyworld (возможно другие)
- var events = {
- onBotGuiChange: function(type, bot) {
- if (type === 'ServerOpenWindowPacket' || type === 'ServerWindowItemsPacket') {
- var container = bot.getOpenContainer();
- if (container != null) {
- var title = container.getTitle();
- var text = getTitleText(title);
- if (text !== null) {
- var itemName = getItemName(text);
- if (itemName !== null) {
- var item = container.findItemByContainName(itemName);
- if (item !== null) {
- var slot = item.getSlot();
- bot.getPlayerOwner().sendDebugMessage('Бот ' + bot.getName() + ' прошел капчу');
- container.slotClick(slot);
- } else {
- return;
- }
- }
- }
- }
- }
- }
- }
- function getTitleText(title) {
- var index = title.indexOf('Кликни на ');
- if (index !== -1) {
- var text = title.substring(index);
- return text;
- }
- return null;
- }
- function getItemName(text) {
- var start = text.indexOf('Кликни на ') + 10;
- var end = text.indexOf('!', start);
- if (end !== -1) {
- var itemName = text.substring(start, end);
- return itemName.trim();
- }
- return null;
- }
- events;
Add Comment
Please, Sign In to add comment