local bot = getBot() local firstPlayer = nil local secondPlayer = nil local isFirstRound = true local lastPlayerName = nil local isGameStarted = false local ispulled = false local isFirstPlayerPulled = false -- isFirstPlayerPulled değişkeni ekledim local collectedWLCount = 0 local playerName local firstPullLocation = { x = 12, y = 53 } local secondPullLocation = { x = 16, y = 53 } local ucPullLocation = { x = 14, y = 51 } local firstPullPath = getBot():getPath(firstPullLocation.x, firstPullLocation.y) local secondPullPath = getBot():getPath(secondPullLocation.x, secondPullLocation.y) local ucPullPath = getBot():getPath(ucPullLocation.x, ucPullLocation.y) function moveCharacterToLocation(path) for i, node in pairs(path) do getBot():moveTile(node.x, node.y) sleep(30) end end function findPlayer(varlist, netid) local message = varlist:get(1):getString() if message:find("gas") then playerName = message:match("`w(%w+)`") -- playerName değişkenini tanımlıyoruz if not isFirstPlayerPulled then moveCharacterToLocation(firstPullPath) sleep(1000) getBot():say("/pull " .. playerName) sleep(1000) moveCharacterToLocation(ucPullPath) isFirstPlayerPulled = true firstPlayerName = playerName sleep(1000) elseif playerName ~= firstPlayerName then moveCharacterToLocation(secondPullPath) sleep(1000) bot:say("/pull " .. playerName) sleep(2000) moveCharacterToLocation(ucPullPath) sleep(1000) bot:say("Drop 20 World Lock") bot.auto_collect = true isFirstPlayerPulled = false ispulled = true end end end function wl(varlist, netid) local message = varlist:get(1):getString() if ispulled then if message:find("Collected `%w(%d+) World Lock``.") then local worldlock = tonumber(message:match("`w(%d+)%s+World%s+Lock")) if worldlock and worldlock == 20 then collectedWLCount = collectedWLCount + 1 if collectedWLCount >= 2 then bot:say("Oyun başladı: " .. firstPlayerName .. " vs " .. playerName .. " `4Bet: `3[`240 WLS`3]") bot.auto_collect = false isGameStarted = true collectedWLCount = 0 sleep(500) end end end end end local function detectAndPrint(varlist, netid) local message = removeColor(varlist:get(1):getString()) if isGameStarted and ispulled then local playerName, number = message:match("%[(.-)%s+spun%s+the%s+wheel%s+and%s+got%s+(%d+)%!%]") if playerName and number then if playerName == lastPlayerName and not isFirstRound then return end local lastnumber = tonumber(number) % 10 if isFirstRound then firstPlayer = { name = playerName, score = lastnumber } isFirstRound = false else secondPlayer = { name = playerName, score = lastnumber } isFirstRound = true if firstPlayer.score == 0 and secondPlayer.score ~= 0 then bot:say(firstPlayer.name .. " kazandi!") isGameStarted = false bot:say("/kick " .. secondPlayer.name) bot:findPath(10, 53) sleep(100) bot:findPath(12, 53) bot:drop(242, 36) bot.auto_collect = false sleep(5000) bot:say("/kick " .. firstPlayer.name) elseif firstPlayer.score ~= 0 and secondPlayer.score == 0 then bot:say(secondPlayer.name .. " kazandi!") isGameStarted = false bot:say("/kick " .. firstPlayer.name) bot:findPath(18, 53) sleep(100) bot:findPath(16, 53) getBot():drop(242, 36) bot.auto_collect = false sleep(5000) bot:say("/kick " .. secondPlayer.name) elseif firstPlayer.score > secondPlayer.score then bot:say(firstPlayer.name .. " kazandi!") isGameStarted = false bot:say("/kick " .. secondPlayer.name) bot:findPath(10, 53) sleep(100) bot:findPath(12, 53) bot:drop(242, 36) bot.auto_collect = false sleep(5000) bot:say("/kick " .. firstPlayer.name) elseif firstPlayer.score < secondPlayer.score then bot:say(secondPlayer.name .. " kazandi!") isGameStarted = false bot:say("/kick " .. firstPlayer.name) bot:findPath(18, 53) sleep(100) bot:findPath(16, 53) bot:drop(242, 36) bot.auto_collect = false sleep(5000) bot:say("/kick " .. secondPlayer.name) else bot:say("Berabere!") end end lastPlayerName = playerName end end end addEvent(Event.variantlist, detectAndPrint) addEvent(Event.variantlist, findPlayer) addEvent(Event.variantlist, wl) listenEvents(999999)