-- Tier_Maker_onLoad v1.0.3 --== For All ==-- -- Variables MailSenderCanotDoItString = getTEXT("SYS_CANOT_DO_IT") EventMonitorStart("MSGWHISPER", "CHAT_MSG_WHISPER"); UMM_SetSlotRange(61, 120); player.free_counter1 = 0; -- reset counter Cur_Zone = getZoneId(); ErrorSendStone = false; TwinkwindowList = {}; -- empty table for twink window Botsendedmail = 0; TryUnstick = 0; -- Reserve main window and Process local Main_WIN = __WIN; local Main_PROC = __PROC; -- change Profile settings changeProfileOption("THROWN_BAG", 0); changeProfileOption("ARROW_QUIVER", 0); changeProfileOption("COMBAT_DISTANCE", 50); changeProfileOption("MAX_UNSTICK_TRIALS", 3); -- MainLevel function MainLevel() --local mainLevel, secLevel = RoMScript("UnitLevel(\'"..string.gsub("player", string.char(34), ".").."\');"); player:update(); mainLevel = player.Level cprintf(cli.white, player.Name.." MainLevel: %s\n", mainLevel) return mainLevel end; local mainLevel = MainLevel(); -- Speed function function SetFarmerSpeed(_speed) local playerAddress = memoryReadIntPtr(getProc(), addresses.staticbase_char, addresses.charPtr_offset); if playerAddress ~= 0 then memoryWriteFloat(getProc(), playerAddress + 0x40, _speed); printf("Speedhack ACTIVATED!\n"); local Speed = memoryReadFloat(getProc(), playerAddress + 0x40); print("Player speed:", Speed); end end; -- Check Tier Level Received Items function CheckTierItems(Tierlevel) local Tierlevel = Tierlevel or 80 TierItems = 0 for slot = 61, 120 do local slotitem = inventory.BagSlot[slot] if slotitem.Available and not slotitem.Empty and bitAnd(slotitem.BoundStatus, 1) and (slotitem.ObjType == 0 or slotitem.ObjType == 1) then local level = slotitem.RequiredLvl if slotitem.Quality > 0 then level = level + 2 end if slotitem.Quality > 1 then level = level + (slotitem.Quality - 1) * 4 end if level >= Tierlevel then TierItems = TierItems + 1 end end end return TierItems end; -- gameState local function gameState(win) local proc if win then proc = openProcess( findProcessByWindow(win) ) else proc = getProc() end if proc == nil then error("No valid process found.") end if not windowValid(win) then return 4 end local atLogin = memoryReadUInt(proc, addresses.editBoxHasFocus_address) == 0 -- Only when not in game local atCharacterSelection = memoryReadUInt(proc, addresses.staticTableSize) == 1 local atLoadingScreen = memoryReadBytePtr(proc,addresses.loadingScreenPtr, addresses.loadingScreen_offset) ~= 0 local inGame = memoryReadInt(proc, addresses.isInGame) == 1 if win then closeProcess(proc) end if not atLoadingScreen then if inGame then return 3 elseif atCharacterSelection then return 2 elseif atLogin then return 1 end end return 0 -- Means between states end; -- Start Twink Client function StartTwinkClient(client) print("Starting client "..client.." ...") -- Get shortcut if not string.match(client, "%.lnk$") then client = client .. ".lnk" end if not fileExists(getExecutionPath().."/"..client) then error("Game shortcut does not exist: ".. client) end client = string.lower(client) local path = getExecutionPath().."/"..client -- fix spaces path = string.gsub(path," ","\" \"") -- Start client local a,b,c = os.execute("START "..path.." NoCheckVersion") if not a then error("Trouble executing shortcut. Values returned were: "..(a or "nil")..", "..(b or "nil")..", "..(c or "nil")) end end; -- Check Twink Online function CheckTwinkOnline(TwinkName) EventMonitorStop("CharDetect"); yrest(300) EventMonitorStart("CharDetect", "CHAT_MSG_SYSTEM"); yrest(300) RoMScript('AskPlayerInfo(\"'..TwinkName..'\")'); yrest(300) local time, moreToCome, msg = EventMonitorCheck("CharDetect", "1") if time ~= nil then if( bot.ClientLanguage == "RU" ) then msg = utf82oem_russian(msg) end print(msg) if string.find(msg, TwinkName) then EventMonitorStop("CharDetect") print("CharDetect: "..TwinkName.." is Online.") return true else return false end end end; -- Check Twink Client function CheckTwinkClient(_ignore) -- Get a list of current clients TwinkwindowList = findWindowList("*", "Radiant Arcana") if( #TwinkwindowList == 0 ) then error("You need to run rom first!") end for i = #TwinkwindowList, 1, -1 do __PROC = openProcess(findProcessByWindow(TwinkwindowList[i])); -- read player address if addresses["staticbase_char"] and addresses["charPtr_offset"] and addresses["pawnName_offset"] then local playerAddress = memoryReadUIntPtr(__PROC, addresses["staticbase_char"], addresses["charPtr_offset"]); -- read player name if( playerAddress ) then --print(i.." playerAddress "..playerAddress ) printf("%s playerAddress: %s,",i ,playerAddress) local nameAddress = memoryReadUInt(__PROC, playerAddress + addresses["pawnName_offset"]); if nameAddress ~= nil and memoryReadString(__PROC, nameAddress) ~= player.Name then printf(" nameAddress: %s,\t name: %s\n",nameAddress ,memoryReadString(__PROC, nameAddress)) attach(TwinkwindowList[i]) -- Setup the macros and action key. --printf("Setup the macros and action key.\n") setupMacros() else -- remove print("table.remove "..i.." window: "..TwinkwindowList[i]) table.remove(TwinkwindowList, i) end end end end print("Count TwinkwindowList: "..#TwinkwindowList) -- Restore Process and main window __PROC = Main_PROC __WIN = Main_WIN attach(getWin()) end; -- Twink Client direct control function ControlTwinkClient(Twinkname, Commandtype, Command, CheckInGame) -- check error if type(Twinkname) == "boolean" or type(Twinkname) ~= "string" then Twinkname = "All" end printf("KontrolTwinkClient. Twinkname: %s, Commandtype: %s, Command: %s\n",Twinkname ,Commandtype ,Command) if( #TwinkwindowList == 0 ) then error("Error. You need to run function CheckTwinkClient() first!") end -- direct control for i = 1, #TwinkwindowList do if windowValid(TwinkwindowList[i]) then attach(TwinkwindowList[i]) if CheckInGame and gameState(windowList[i]) ~= 3 then break; end __PROC = openProcess(findProcessByWindow(TwinkwindowList[i])); --printf("Main_PROC: %s, __PROC: %s, getProc: %s\n",Main_PROC ,__PROC ,getProc()) -- test --RoMScript("AcceptGroup();"); -- Command if Commandtype == "Script" then sendMacro(""..Command..""); elseif Commandtype == "PressKey" then keyboardPress(Command); end end end -- Restore Process and main window __PROC = Main_PROC; __WIN = Main_WIN; attach(getWin()); end; --ControlTwinkClient(false, "Script", "AcceptGroup();StaticPopup_Hide('PARTY_INVITE');") --ControlTwinkClient(false, "Script","if UnitExists('party1') == true then QuitGame() end;") -- Kill Twink Client function KillTwinkClient(windowname, twinkname) if twinkname ~= nil then print("Kill Client "..twinkname.." ...") -- Get a list of current clients local windowList = findWindowList("*", "Radiant Arcana") -- find twinkname client for i = #windowList, 1, -1 do local Process = openProcess(findProcessByWindow(windowList[i])) -- read player address local playerAddress = memoryReadUIntPtr(Process, addresses["staticbase_char"], addresses["charPtr_offset"]) -- read player name if( playerAddress ) then local nameAddress = memoryReadUInt(Process, playerAddress + addresses["pawnName_offset"]) if nameAddress ~= nil then local name = memoryReadString(Process, nameAddress) if( name == twinkname ) then local NewWINProc = findProcessByWindow(windowList[i]) os.execute("TASKKILL /PID " .. NewWINProc .. " /F") return true end end end end elseif windowname ~= nil then print("Kill Client "..windowname.." ...") local NewWIN = findWindow(windowname) if NewWIN and windowValid(NewWIN) then cprintf(cli.white, "NewWIN: %s.\n", NewWIN) local NewWINProc = findProcessByWindow(NewWIN) os.execute("TASKKILL /PID " .. NewWINProc .. " /F") return true end end return false end; -- Clean Bag Items function CleanBagItems() inventory:update() for i, item in pairs(inventory.BagSlot) do if item.Available and not item.Empty then for __, ItemId in pairs(CL_CleanBagItems) do if( item.Id == ItemId ) then if( bot.ClientLanguage == "RU" ) then item.Name = utf82oem_russian(item.Name) end printf("Deleting Item: "..item.Name.."\n") item:delete() end end end end end; -- Code for onUnstickFailure function TirodelUnstick() Cur_Zone = getZoneId() TryUnstick = TryUnstick + 1 if( Cur_Zone == 2 or Cur_Zone == 1002 ) then sendMacro("SendWedgePointReport()") waitForLoadingScreen(60) player = CPlayer.new() loadPaths(__WPL.FileName) player.free_counter1 = 0 -- reset counter player.Unstick_counter = 0 -- reset unstick counter inventory:update() player:mount() __WPL:setWaypointIndex(__WPL:findWaypointTag("TwinkUnstick")) --__WPL:setWaypointIndex(__WPL:getNearestWaypoint(player.X, player.Z)); else releaseKeys() sendMacro("SendWedgePointReport()") waitForLoadingScreen(60) player = CPlayer.new() loadPaths(__WPL.FileName) player.free_counter1 = 0 -- reset counter player.Unstick_counter = 0 -- reset unstick counter end if( TryUnstick == 3 ) then error("\a\aError TirodelUnstick.");end end; -- onUnstickFailure if( not onUnstickFailureProfile ) then if( type(settings.profile.events.onUnstickFailure) ~= "function" ) then onUnstickFailureProfile = function(unused) return; end; else onUnstickFailureProfile = settings.profile.events.onUnstickFailure; end end; function settings.profile.events:onUnstickFailure() onUnstickFailureProfile(); TirodelUnstick(); end; --== 1 ==-- --== MailSender onLoad ==-- if( mainLevel >= 55 and Cur_Zone == 20 ) then include("waypoints/Tirol_Zone_20.lua",true) cprintf(cli.white, "include waypoint Tirol_Zone_20.\n") return end; local Cur_Gold = memoryReadInt( getProc(), addresses.moneyPtr ) if( mainLevel >= 55 and Cur_Zone ~= 19 and Cur_Zone ~= 20 ) then error("\a\aYou are too far from Land of Malevolence.") elseif( Cur_Zone == 19 and distance(player.X,player.Z,-3170,48890) > 70 ) then error("\a\aYou are too far from Mailbox.") elseif( Cur_Zone == 20 and distance(player.X,player.Z,-11655,38890) > 70 ) then error("\a\aYou are too far from NPC.") elseif( Cur_Zone == 19 and 8 > CheckTierItems() ) then RoMScript("DEFAULT_CHAT_FRAME:AddMessage('|cffffff00Tirodel:Not enough Excellent Belt. Buy Excellent Belt and Start again.|r')") error("\a\aError. Not enough Excellent Belt. Buy Excellent Belt and Start again."); elseif( Cur_Zone == 19 and 92000 > Cur_Gold or Cur_Zone == 20 and 92000 > Cur_Gold ) then error("\a\aError. GOLD WARNING!"); elseif( Cur_Zone == 19 and 16 > inventory:itemTotalCount(203276) or Cur_Zone == 20 and 16 > inventory:itemTotalCount(203276) ) then -- Amount of Experience Orb error("\a\aError. Not enough Experience Orb."); elseif( mainLevel >= 20 and 50 > distance(player.X,player.Z,-38220,1758) and Cur_Zone == 10 ) then if( 1 > CheckTierItems() or 1 > inventory:getItemCount(203276) or 15840 > Cur_Gold ) then printf("\aError. Not enough Experience Orb or TierItems.\n"); LoginNextChar() -- settings.loadProfile("Tirodel_Pr") yrest (4000) loadPaths(__WPL.FileName) end end; -- Hide nuby pet if( mainLevel > 11 and player:hasBuff(509705)) then inventory:useItem(207051);end; -- get Recipient function getRecipient() local timer = os.clock() cprintf(cli.white, "Recipient checker started.\n") RoMScript("DEFAULT_CHAT_FRAME:AddMessage('|cffffff00Tirodel:Recipient checker started..|r')") repeat local time, moreToCome, name, msg = EventMonitorCheck("MSGWHISPER", "4,1") if( time ~= nil ) then if( bot.ClientLanguage == "RU" ) then msg = utf82oem_russian(msg) end cprintf(cli.lightred, "Time: " ..os.date().. " Char name: " ..name.. " Message: " ..msg.. "\n") if (string.find(msg,text1) and name ~= last_name) or (string.find(msg,text1) and (os.clock() - timer) > 500) then RoMScript("DEFAULT_CHAT_FRAME:AddMessage('|cffffff00Tirodel:Recipient Checked: " ..name.. ".|r')") last_name = name return name end end if( (os.clock() - timer) > WhaitTime ) then os.execute("TASKKILL /PID " ..findProcessByWindow(getWin()).. " /F") os.exit() player.free_counter1 = 0 repeat player.free_counter1 = player.free_counter1 + 1 printf("\a\aError or final!\n"); yrest(20000) until player.free_counter1 == 10 end if( player.free_counter1 == 10 ) then os.execute("TASKKILL /PID " ..findProcessByWindow(getWin()).. " /F") os.exit() end yrest(50) until false end; --== 2 ==-- --== MailReceiver onLoad ==-- -- Check if Level >= 20 or Level == 10 and charges == 0 then Login next toon local charges = RoMScript("GetMagicBoxEnergy()"); if( mainLevel >= 20 and Cur_Zone ~= 27 and Cur_Zone ~= 20 and Cur_Zone ~= 10 ) or ( mainLevel == 1 and Cur_Zone ~= 12 ) then RoMScript("DEFAULT_CHAT_FRAME:AddMessage('|cffffff00Tirodel:You are too far from Elven Island or Final.|r')") cprintf(cli.lightred, "You are too far from Elven Island.\n") LoginNextChar() -- settings.loadProfile("Tirodel_Pr") yrest (4000) loadPaths(__WPL.FileName) elseif( mainLevel >= 10 and 50 > distance(player.X,player.Z,31797,3597) and ( charges > 1 or inventory:getItemCount(202843) > 1 or CheckTierItems() > 1 or inventory:getItemCount(202844) > 1 or inventory:getItemCount(202999) > 1 ) ) then cprintf(cli.lightred, "ElvenIslandMailbox2\n") __WPL:setWaypointIndex(__WPL:findWaypointTag("ElvenIslandMailbox2")); elseif( mainLevel >= 10 and 50 > distance(player.X,player.Z,4565,-2175) and 1 > charges and 1 > inventory:getItemCount(202843) and 1 > CheckTierItems() and 1 > inventory:getItemCount(202844) and 1 > inventory:getItemCount(202999) ) or ( mainLevel >= 10 and 50 > distance(player.X,player.Z,31797,3597) and 1 > charges and 1 > inventory:getItemCount(202843) and 1 > CheckTierItems() and 1 > inventory:getItemCount(202844) and 1 > inventory:getItemCount(202999) ) then cprintf(cli.lightred, "Finished. Delete Character.\n") sendMacro("}Logout_CharacterDelete=true;a={"); LoginNextChar() -- settings.loadProfile("Tirodel_Pr") yrest (4000) loadPaths(__WPL.FileName) end; -- Twink Go function TwinkGo() local timer = os.clock() Account = RoMScript("GetAccountName();") cprintf(cli.white, player.Name.."-"..Account..": Whait for command started.\n") RoMScript("DEFAULT_CHAT_FRAME:AddMessage('|cffffff00Tirodel:Recipient Go checker started..|r')") repeat local time, moreToCome, name, msg = EventMonitorCheck("MSGWHISPER", "4,1") if( time ~= nil ) then cprintf(cli.lightred, "Time: " ..os.date().. " Char name: " ..name.. " Message: " ..msg.. "\n") if string.find(msg,text2) then RoMScript("DEFAULT_CHAT_FRAME:AddMessage('|cffffff00Tirodel:Command Go Checked: " ..name.. ".|r')") break end end if( (os.clock() - timer) > 150 ) then RoMScript("SendChatMessage(\'"..text1.."\', 'WHISPER', 0, \'"..MailSender1.."\');") --sendMacro("SendChatMessage(\'"..text1.."\', 'WHISPER', 0, \'"..MailSender2.."\');"); --sendMacro("SendChatMessage(\'"..text1.."\', 'WHISPER', 0, \'"..MailSender3.."\');"); player.free_counter1 = player.free_counter1 + 1 timer = os.clock() end if( player.free_counter1 == 10 ) then player.free_counter1 = 0 --repeat player.free_counter1 = player.free_counter1 + 1 printf("\a\a\a\a\aTwink. Error Error!\n") yrest(20000) --until player.free_counter1 == 10 os.execute("TASKKILL /PID " ..findProcessByWindow(getWin()).. " /F") os.exit() end yrest(50) until false end; -- Accaunt Characters Names function AccauntCharactersNames() local CharsNames = ""; for index = 1, 8 do local name, gender, mainLevel, mainClass, secLevel, secClass, zone, destroyTime = sendMacro("GetCharacterInfo("..index..");"); CharsNames = CharsNames..""..name..":" end return CharsNames end; --== 3 ==-- ---===== Auto MailSender functions =====--- --== Varanas ==-- --== Sascilia Steppes ==-- -- Sascilia Steppes Mailbox function SasciliaSteppesMailbox() -- Open Mailbox player:target_Object(112113,1500); -- Почтовый ящик RoMScript("ChoiceOption(1);"); yrest(1500); RoMScript("UMMFrameTab1Tools:ButtonClick('tagempty');"); yrest(1500) RoMScript("UMMFrameTab1Tools:ButtonClick('delete');"); yrest(5000) inventory:update(); if( inventory:itemTotalCount(0) >= 30 and CheckTierItems() >= 16 ) then UMM_TakeMail(); yrest(4000); end RoMScript("CloseWindows()"); yrest(500); inventory:update(); -- Check recipient local recipient = getRecipient(); -- Selecting and Send Item player:target_Object(112113,1500); -- Почтовый ящик RoMScript("ChoiceOption(1);"); yrest(1500); RoMScript("UMMFrameTab1Tools:ButtonClick('tagempty');"); yrest(1500) RoMScript("UMMFrameTab1Tools:ButtonClick('delete');"); yrest(5000) if( inventory:itemTotalCount(0) >= 30 and CheckTierItems() >= 16 ) then UMM_TakeMail(); yrest(4000); RoMScript("CloseWindows()"); yrest(500); inventory:update(); player:target_Object(112113,1500); -- Почтовый ящик RoMScript("ChoiceOption(1);"); yrest(1500); end BagSpaceS = inventory:itemTotalCount(0); BotsendedS = 0; UMM_SendByFusedTierLevel(recipient, 5, 8); yrest(500) -- 8 штук шмоток для тира UMM_SendByNameOrId(recipient, 203276, 1); yrest(500) -- Шар опыта: 10 000 очков Botsendedmail = Botsendedmail + 9; BotsendedS = BotsendedS + 9; if( 8 > inventory:getItemCount(202999) )then -- Проверить наличие камней -- UMM_SendMoney(recipient, 92000); -- Если камней нету то Послать денег UMM_SendMoney(recipient, 15840); -- Если камней нету то Послать денег Botsendedmail = Botsendedmail + 1; BotsendedS = BotsendedS + 1; else UMM_SendByNameOrId(recipient, 202999, 8); yrest(500) -- Случайный камень соединения Botsendedmail = Botsendedmail + 8; BotsendedS = BotsendedS + 8; end RoMScript("CloseWindows()"); yrest(500); inventory:update(); BagSpaceS = inventory:itemTotalCount(0)+2 - BagSpaceS -- Send ChatMessage to recipient sendMacro("SendChatMessage(\'"..text2.."\', 'WHISPER', 0, \'"..recipient.."\');"); -- Open Mailbox player:target_Object(112113,1000); -- Почтовый ящик RoMScript("ChoiceOption(1);"); yrest(2000); RoMScript("UMMFrameTab1Tools:ButtonClick('tagempty');"); yrest(1500) RoMScript("UMMFrameTab1Tools:ButtonClick('delete');"); yrest(5000) inventory:update(); if( inventory:itemTotalCount(0) >= 30 and CheckTierItems() >= 16 ) then UMM_TakeMail(); yrest(4000); inventory:update(); end RoMScript("CloseWindows()"); yrest(500); inventory:update(); -- MailSender Report local Cur_Gold = memoryReadInt( getProc(), addresses.moneyPtr ) cprintf(cli.white, "Random Fusion Stone: %s\n", inventory:itemTotalCount(202999)) cprintf(cli.white, "Experience Orb: %s\n", inventory:itemTotalCount(203276)) cprintf(cli.white, "Excellent Belt: %s\n", inventory:itemTotalCount(227502)) cprintf(cli.white, "Botsendedmail: %s\n", Botsendedmail) cprintf(cli.white, "Tier Items: %s\n", CheckTierItems()) cprintf(cli.white, "Total Gold: %s\n", Cur_Gold) cprintf(cli.white, "Bag Space: %s\n", inventory:itemTotalCount(0)) -- Check Gold and Experience Orb if( 15840 > Cur_Gold ) then printf("\a\a\a Error. GOLD WARNING!"); elseif( 1 > inventory:itemTotalCount(203276) ) then -- Amount of Experience Orb printf("\a\a\a Error. Not enough Experience Orb."); end -- Player ReLogin for mail unstuk cprintf(cli.white, player.Name.." BotsendedS: %s, BagSpaceS %s\n", BotsendedS, BagSpaceS) if( Botsendedmail >= 50 and CheckTierItems() >= 8 ) or ( BotsendedS > BagSpaceS and CheckTierItems() >= 8 ) then cprintf(cli.white, player.Name.." Botsendedmail: %s, BotsendedS: %s, BagSpaceS %s\n", Botsendedmail, BotsendedS, BagSpaceS) cprintf(cli.white, player.Name.." ReLogin for mail unstuk.\n") Botsendedmail = 0 cprintf(cli.white, "Player ReLogin for mail unstik.\n") player:updateBuffs(); if ( not player:hasBuff(506959) ) then --cprintf(cli.white, "You are havnt Premium!\n") ChangeChar("current"); player = CPlayer.new(); EventMonitorStart("MSGWHISPER", "CHAT_MSG_WHISPER"); else repeat inventory:useItem(208456); yrest(1000); sendMacro("SpeakFrame_ListDialogOption(1, 3)") waitForLoadingScreen(30); player:update(); until getZoneId() == 400 repeat player:target_NPC(110758); yrest(1000); sendMacro("SpeakFrame_ListDialogOption(1, 1)"); waitForLoadingScreen(30); player:update(); until getZoneId() ~= 400 end end -- Check amount of Excellent Belt or Tier Items inventory:update(); if( CheckTierItems() >= 8 and Cur_Gold >= 15840 and inventory:itemTotalCount(203276) >= 1 ) then __WPL:setWaypointIndex(__WPL:findWaypointTag("SasciliaSteppesMailbox")); elseif( player.Name ~= MailSender3 ) then cprintf(cli.white, player.Name.." LoginNextToon.\n") -- Wait for Login next toon sendMacro("}fastLoginRelog=false;a={") sendMacro("}LoginNextToon=true;a={") sendMacro("Logout();"); waitForLoadingScreen(); player = CPlayer.new(); settings.load(); -- settings.loadProfile("Tirodel_Pr"); yrest(4000); loadPaths(__WPL.FileName) else error("\a\a\aError. Not enough Tier Items."); end end; --== Kampel Town ==-- -- Freud Dinks Store function FreudDinksStore() -- Check Bag and amount of Excellent Belt inventory:update(); if( 1 > inventory:itemTotalCount(0) ) and not ( CheckTierItems() >= 8 ) then error("\a\aError. Not enough BagSpase. Clean Bag and Start again."); end -- Buy Excellent Belt player:openStore(117108); yrest(1000); -- Фред Дринкс store:buyItem(227502, inventory:itemTotalCount(0)); -- Превосходный пояс RoMScript("CloseWindows()"); Cur_Gold = memoryReadInt( getProc(), addresses.moneyPtr ) cprintf(cli.white, "Random Fusion Stone: %s\n", inventory:itemTotalCount(202999)) cprintf(cli.white, "Experience Orb: %s\n", inventory:itemTotalCount(203276)) cprintf(cli.white, "Excellent Belt: %s\n", inventory:itemTotalCount(227502)) cprintf(cli.white, "CheckTierItems: %s\n", CheckTierItems()) cprintf(cli.white, "Total Gold: %s\n", Cur_Gold) -- Player ReLogin for mail unstuk cprintf(cli.white, "Player ReLogin for mail unstik.\n") player:updateBuffs(); if ( not player:hasBuff(506959) ) then cprintf(cli.white, "You are havnt Premium!\n") ChangeChar("current"); player = CPlayer.new(); EventMonitorStart("MSGWHISPER", "CHAT_MSG_WHISPER"); else repeat inventory:useItem(208456); yrest(1000); sendMacro("SpeakFrame_ListDialogOption(1, 3)") waitForLoadingScreen(30); player:update(); until getZoneId() == 400 player:target_NPC(110758); yrest(1000); sendMacro("SpeakFrame_ListDialogOption(1, 1)"); waitForLoadingScreen(30); player:update(); end end; -- Kampel Town Mailbox function KampelTownMailbox() -- Open Mailbox player:target_Object(110694,1500); -- Почтовый ящик RoMScript("ChoiceOption(1);"); yrest(1500); RoMScript("UMMFrameTab1Tools:ButtonClick('tagempty');"); yrest(1500) RoMScript("UMMFrameTab1Tools:ButtonClick('delete');"); yrest(5000) inventory:update(); if( inventory:itemTotalCount(0) >= 30 and CheckTierItems() >= 16 ) then UMM_TakeMail(); yrest(4000); end RoMScript("CloseWindows()"); yrest(500); inventory:update(); -- Check recipient local recipient = getRecipient(); -- Selecting and Send Item player:target_Object(110694,1500); -- Почтовый ящик RoMScript("ChoiceOption(1);"); yrest(1500); RoMScript("UMMFrameTab1Tools:ButtonClick('tagempty');"); yrest(1500) RoMScript("UMMFrameTab1Tools:ButtonClick('delete');"); yrest(5000) if( inventory:itemTotalCount(0) >= 30 and CheckTierItems() >= 16 ) then UMM_TakeMail(); yrest(4000); RoMScript("CloseWindows()"); yrest(500); inventory:update(); player:target_Object(110694,1500); -- Почтовый ящик RoMScript("ChoiceOption(1);"); yrest(1500); end BagSpaceS = inventory:itemTotalCount(0); BotsendedS = 0; UMM_SendByFusedTierLevel(recipient, 4, 8); yrest(500) -- 8 штук шмоток для тира UMM_SendByNameOrId(recipient, 203276, 1); yrest(500) -- Шар опыта: 10 000 очков Botsendedmail = Botsendedmail + 9; BotsendedS = BotsendedS + 9; if( 8 > inventory:getItemCount(202999) )then -- Проверить наличие камней UMM_SendMoney(recipient, 92000); -- Если камней нету то Послать денег Botsendedmail = Botsendedmail + 1; BotsendedS = BotsendedS + 1; else UMM_SendByNameOrId(recipient, 202999, 8); yrest(500) -- Случайный камень соединения Botsendedmail = Botsendedmail + 8; BotsendedS = BotsendedS + 8; end RoMScript("CloseWindows()"); yrest(500); inventory:update(); BagSpaceS = inventory:itemTotalCount(0)+2 - BagSpaceS -- Send ChatMessage to recipient sendMacro("SendChatMessage(\'"..text2.."\', 'WHISPER', 0, \'"..recipient.."\');"); -- Open Mailbox player:target_Object(110694,1000); -- Почтовый ящик RoMScript("ChoiceOption(1);"); yrest(2000); RoMScript("UMMFrameTab1Tools:ButtonClick('tagempty');"); yrest(1500) RoMScript("UMMFrameTab1Tools:ButtonClick('delete');"); yrest(5000) inventory:update(); if( inventory:itemTotalCount(0) >= 30 and CheckTierItems() >= 16 ) then UMM_TakeMail(); yrest(4000); inventory:update(); end RoMScript("CloseWindows()"); yrest(500); inventory:update(); -- MailSender Report Cur_Gold = memoryReadInt( getProc(), addresses.moneyPtr ) cprintf(cli.white, "Random Fusion Stone: %s\n", inventory:itemTotalCount(202999)) cprintf(cli.white, "Experience Orb: %s\n", inventory:itemTotalCount(203276)) cprintf(cli.white, "Excellent Belt: %s\n", inventory:itemTotalCount(227502)) cprintf(cli.white, "CheckTierItems: %s\n", CheckTierItems()) cprintf(cli.white, "Botsendedmail: %s\n", Botsendedmail) cprintf(cli.white, "Total Gold: %s\n", Cur_Gold) cprintf(cli.white, "Bag Space: %s\n", inventory:itemTotalCount(0)) if( 92000 > Cur_Gold ) then error("\a\a\aError. GOLD WARNING!"); elseif( 1 > inventory:itemTotalCount(203276) ) then -- Amount of Experience Orb error("\a\a\aError. Not enough Experience Orb."); end -- Player ReLogin for mail unstuk cprintf(cli.white, player.Name.." BotsendedS: %s, BagSpaceS %s\n", BotsendedS, BagSpaceS) if( Botsendedmail >= 50 and CheckTierItems() >= 8 ) or ( BotsendedS > BagSpaceS and CheckTierItems() >= 8 ) then cprintf(cli.white, player.Name.." Botsendedmail: %s, BotsendedS: %s, BagSpaceS %s\n", Botsendedmail, BotsendedS, BagSpaceS) cprintf(cli.white, player.Name.." ReLogin for mail unstuk.\n") Botsendedmail = 0 cprintf(cli.white, "Player ReLogin for mail unstik.\n") player:updateBuffs(); if ( not player:hasBuff(506959) ) then --cprintf(cli.white, "You are havnt Premium!\n") ChangeChar("current"); player = CPlayer.new(); EventMonitorStart("MSGWHISPER", "CHAT_MSG_WHISPER"); else repeat inventory:useItem(208456); yrest(1000); sendMacro("SpeakFrame_ListDialogOption(1, 3)") waitForLoadingScreen(30); player:update(); until getZoneId() == 400 repeat player:target_NPC(110758); yrest(1000); sendMacro("SpeakFrame_ListDialogOption(1, 1)"); waitForLoadingScreen(30); player:update(); until getZoneId() ~= 400 end end -- Check amount of Excellent Belt inventory:update(); if( CheckTierItems() >= 8 ) then __WPL:setWaypointIndex(__WPL:findWaypointTag("KampelTownMailbox")); end end; --== Wailing Fjord ==-- -- Spiderfoot Store function SpiderfootStore() -- check distance to Didide Spiderfoot local Spiderfoot = player:findNearestNameOrId(123010); if Spiderfoot and distance(player.X,player.Z, Spiderfoot.X,Spiderfoot.Z) > 50 then local Dist = math.sqrt( (player.X - Spiderfoot.X)^2 + (player.Z - Spiderfoot.Z)^2 ) local New_X = Spiderfoot.X + 55 * (player.X - Spiderfoot.X) / Dist local New_Z = Spiderfoot.Z + 55 * (player.Z - Spiderfoot.Z) / Dist player:moveTo(CWaypoint(New_X,New_Z),true); end; -- buy Recall Belt player:openStore(123010); -- Didide Spiderfoot store:buyItem(228966, inventory:getItemCount(0)); -- Пояс возвращения 6125 RoMScript("CloseWindows()"); inventory:update(); -- Error if not receive Recall Belt local Cur_Gold = memoryReadInt( getProc(), addresses.moneyPtr ) if( 9 > CheckTierItems() )then if( Cur_Gold > 6124 )then __WPL:setWaypointIndex(__WPL:findWaypointTag("Spiderfoot")); else error("\a\a\aError. Not enough Gold for buy Recall Belt."); end end end; -- Wailing Fjord Mailbox function WailingFjordMailbox() -- Open Mailbox player:target_Object(123006); -- Почтовый ящик RoMScript("ChoiceOption(1);"); yrest(1500); RoMScript("UMMFrameTab1Tools:ButtonClick('tagempty');"); yrest(1500) RoMScript("UMMFrameTab1Tools:ButtonClick('delete');"); yrest(5000) inventory:update(); if( inventory:itemTotalCount(0) >= 30 and CheckTierItems() >= 16 ) then UMM_TakeMail(); yrest(4000); end; RoMScript("CloseWindows()"); yrest(500); inventory:update(); -- Check recipient local recipient = getRecipient(); -- Selecting and Send Item player:target_Object(123006); -- Почтовый ящик RoMScript("ChoiceOption(1);"); yrest(2000); RoMScript("UMMFrameTab1Tools:ButtonClick('tagempty');"); yrest(1500) RoMScript("UMMFrameTab1Tools:ButtonClick('delete');"); yrest(5000) if( inventory:itemTotalCount(0) >= 30 and CheckTierItems() >= 16 ) then UMM_TakeMail(); yrest(4000); RoMScript("CloseWindows()"); yrest(500); inventory:update(); player:target_Object(123006); -- Почтовый ящик RoMScript("ChoiceOption(1);"); yrest(2000); end BagSpaceS = inventory:itemTotalCount(0); BotsendedS = 0; UMM_SendByFusedTierLevel(recipient, 5, 8); yrest(500) -- 8 штук шмоток для тира UMM_SendByNameOrId(recipient, 203276, 1); yrest(500) -- Шар опыта: 10 000 очков Botsendedmail = Botsendedmail + 9; BotsendedS = BotsendedS + 9; if( 8 > inventory:getItemCount(202999) )then -- Проверить наличие камней -- UMM_SendMoney(recipient, 92000); -- Если камней нету то Послать денег UMM_SendMoney(recipient, 15840); -- Если камней нету то Послать денег Botsendedmail = Botsendedmail + 1; BotsendedS = BotsendedS + 1; else UMM_SendByNameOrId(recipient, 202999, 8); yrest(500) -- Случайный камень соединения Botsendedmail = Botsendedmail + 8; BotsendedS = BotsendedS + 8; end RoMScript("CloseWindows()"); yrest(500); inventory:update(); BagSpaceS = inventory:itemTotalCount(0)+2 - BagSpaceS -- Send ChatMessage to recipient sendMacro("SendChatMessage(\'"..text2.."\', 'WHISPER', 0, \'"..recipient.."\');"); -- Open Mailbox player:target_Object(123006); -- Почтовый ящик RoMScript("ChoiceOption(1);"); yrest(2000); RoMScript("UMMFrameTab1Tools:ButtonClick('tagempty');"); yrest(1500) RoMScript("UMMFrameTab1Tools:ButtonClick('delete');"); yrest(5000) inventory:update(); if( inventory:itemTotalCount(0) >= 30 and CheckTierItems() >= 16 ) then UMM_TakeMail(); yrest(4000); end RoMScript("CloseWindows()"); yrest(500); inventory:update(); -- MailSender Report local Cur_Gold = memoryReadInt( getProc(), addresses.moneyPtr ) cprintf(cli.white, "Random Fusion Stone: %s\n", inventory:itemTotalCount(202999)) cprintf(cli.white, "Experience Orb: %s\n", inventory:itemTotalCount(203276)) cprintf(cli.white, "Botsendedmail: %s\n", Botsendedmail) cprintf(cli.white, "Recall Belt: %s\n", inventory:itemTotalCount(228966)) cprintf(cli.white, "Tier Items: %s\n", CheckTierItems()) cprintf(cli.white, "Total Gold: %s\n", Cur_Gold) cprintf(cli.white, "Tier Items: %s\n", CheckTierItems()) cprintf(cli.white, "Bag Space: %s\n", inventory:itemTotalCount(0)) -- Player ReLogin for mail unstuk cprintf(cli.white, player.Name.." BotsendedS: %s, BagSpaceS %s\n", BotsendedS, BagSpaceS) if ( Botsendedmail >= 50 and CheckTierItems() >= 8 ) or ( BotsendedS > BagSpaceS and CheckTierItems() >= 8 ) then cprintf(cli.white, player.Name.." Botsendedmail: %s, BotsendedS: %s, BagSpaceS %s\n", Botsendedmail, BotsendedS, BagSpaceS) cprintf(cli.white, player.Name.." ReLogin for mail unstuk.\n") Botsendedmail = 0 cprintf(cli.white, "Player ReLogin for mail unstik.\n") player:updateBuffs(); if ( not player:hasBuff(506959) ) then --cprintf(cli.white, "You are havnt Premium!\n") ChangeChar("current"); player = CPlayer.new(); EventMonitorStart("MSGWHISPER", "CHAT_MSG_WHISPER"); else repeat inventory:useItem(208456); yrest(1000); sendMacro("SpeakFrame_ListDialogOption(1, 3)") waitForLoadingScreen(30); player:update(); until getZoneId() == 400 repeat player:target_NPC(110758); yrest(1000); sendMacro("SpeakFrame_ListDialogOption(1, 1)"); waitForLoadingScreen(30); player:update(); until getZoneId() ~= 400 end end -- Check Gold and Experience Orb and amount of Recall Belt or Tier Items inventory:update(); if( 64840 > Cur_Gold ) then error("\a\a\aError. GOLD WARNING!"); elseif( 1 > inventory:itemTotalCount(203276) ) then -- Amount of Experience Orb error("\a\a\aError. Not enough Experience Orb."); elseif( CheckTierItems() >= 8 ) then -- Amount of Recall Belt or Tier Items __WPL:setWaypointIndex(__WPL:findWaypointTag("WailingFjordMailbox")); end end; --== 4 ==-- ---===== Auto MailReceiver functions =====--- --== Varanas ==-- -- Varanas Charges function VaranasCharges() -- Complete Quest for Arcane Transmutor player:target_NPC(111367); yrest(1000); -- Леман RoMScript("OnClick_QuestListButton(1, 1);"); sendMacro("AcceptQuest()"); player:target_NPC(111367); yrest(1000); -- Леман RoMScript("OnClick_QuestListButton(3, 1);"); RoMScript("CompleteQuest()"); yrest(1000); player.free_counter1 = player.free_counter1 + 1; -- Error if not find NPC. TwinkUnstick if( player.free_counter1 == 5 ) then TirodelUnstick() end; repeat MBEnergy = RoMScript("GetMagicBoxEnergy()"); yrest(500) until MBEnergy if 10 > MBEnergy or RoMScript("AdvancedMagicBoxFrame == nil") and RoMScript("MagicBoxFrame == nil") then __WPL:setWaypointIndex(__WPL:findWaypointTag("VaranasCharges")); elseif MBEnergy == 10 and (inventory:getItemCount(202999) + inventory:getItemCount(203001)) >= 8 then -- Tp to Elven Island RoMScript("UseSkill(1,2);"); -- Tp to Elven Island print(" Tp to Elven Island"); waitForLoadingScreen(30); player:update(); if( getZoneId() ~= 12 ) then cprintf(cli.lightred, "You are too far from Elven Island.\n"); else __WPL:setWaypointIndex(__WPL:findWaypointTag("ELF10Lvl")); end elseif ( RoMScript("AdvancedMagicBoxFrame == true") or RoMScript("MagicBoxFrame == true") ) and ( 8 > (inventory:getItemCount(202999) + inventory:getItemCount(203001)) ) then -- Set faceDirection and Rotation local angle = math.atan2(-4312 - player.Z, 5495 - player.X) player:faceDirection(angle) camera:setRotation(angle) end end; -- Varanas Lyeve function VaranasLyeve() -- Take Giftbags --inventory:useItem(201850); -- 9 Lvl Giftbag -- Tp to VCS player:target_NPC(110922); yrest(1000); -- Лив -- RoMScript("ChoiceOption(2);"); -- tp to VCS RoMScript("ChoiceOption(4);"); -- tp to IPV waitForLoadingScreen(60); yrest(2500); player:update(); -- Check for Varanas VCS Error if distance(player.X,player.Z,4745,-1967) > 70 and 70 > distance(player.X,player.Z,2846,-853) then player:update(); -- Check for NPC Noriv Error local Noriv = player:findNearestNameOrId(110726) if not Noriv or (Noriv.Y - player.Y) > 30 then TirodelUnstick() else -- Tp to WPV player:target_NPC(110726); yrest(1000); -- Норив RoMScript("ChoiceOption(3);"); waitForLoadingScreen(60); yrest(2500); player:update(); -- Check for WPV Error if distance(player.X,player.Z,2908,-798) > 70 then TirodelUnstick() end end elseif 70 > distance(player.X,player.Z,2846,-853) then -- Check and Buy Random Fusion Stone or Make Mana Stones inventory:update(); if( ErrorSendStone == true ) then __WPL:setWaypointIndex(__WPL:findWaypointTag("MakeMS")); else if( 8 > inventory:getItemCount(202999) and 8 > inventory:getItemCount(203001) )then __WPL:setWaypointIndex(__WPL:findWaypointTag("BuyFS")); else __WPL:setWaypointIndex(__WPL:findWaypointTag("MakeMS")); end end end end; -- Varanas Buy Fusion Stone function VaranasBuyFusionStone() -- Buy Fusion Stone local Cur_Gold = memoryReadInt( getProc(), addresses.moneyPtr ) player:openStore(110576); yrest(1000); -- Оделия Проул store:buyItem(202999, (Cur_Gold/1980)); -- Случайный камень соединения --store:buyItem(203001, inventory:getItemCount(0)); -- Камень соединения с Выностливость и двумя произвольными RoMScript("CloseWindows()"); inventory:update(); -- Error if not receive Random Fusion Stone local Cur_Gold = memoryReadInt( getProc(), addresses.moneyPtr ) if( 8 > inventory:getItemCount(202999) and Cur_Gold >= 1980 )then __WPL:setWaypointIndex(__WPL:findWaypointTag("VaranasBuyFusionStone")); else if( ErrorSendStone == true ) then -- Set faceDirection and Rotation local angle = math.atan2(3064 - player.Z, -1740 - player.X) player:faceDirection(angle) camera:setRotation(angle) else -- Tp to Elven Island RoMScript("UseSkill(1,2);"); -- Tp to Elven Island print(" Tp to Elven Island"); waitForLoadingScreen(30); yrest(1500); player:update(); if ( getZoneId() ~= 12 ) then cprintf(cli.lightred, "You are too far from Elven Island.\n"); -- Set faceDirection and Rotation local angle = math.atan2(3064 - player.Z, -1740 - player.X) player:faceDirection(angle) camera:setRotation(angle) else __WPL:setWaypointIndex(__WPL:findWaypointTag("ELF10Lvl")); end end end end; -- Varanas Mailbox function VaranasMailbox() -- Error if not receive Fusion Stone repeat MBEnergy = RoMScript("GetMagicBoxEnergy()"); yrest(500) until MBEnergy if( MBEnergy > 0 and ( 8 > CheckTierItems() or 8 > (inventory:getItemCount(202999) + inventory:getItemCount(203001)) ) )then TirodelUnstick() else -- Open Mailbox OpenMailbox = true if ( inventory:itemTotalCount(0) > 16 ) then player:target_Object(110538,1500); -- Почтовый ящик RoMScript("ChoiceOption(1);"); yrest(1500); RoMScript("UMMFrameTab1Tools:ButtonClick('tagempty');"); yrest(1500) RoMScript("UMMFrameTab1Tools:ButtonClick('delete');"); yrest(5000) UMM_TakeMail(); yrest(1000); RoMScript("CloseWindows()"); yrest(500); OpenMailbox = false end -- Make Mana Stones retry_count = 0 repeat MBEnergy = RoMScript("GetMagicBoxEnergy()"); yrest(500) until MBEnergy while( MBEnergy > 0 and 7 > retry_count ) do -- Open dialogs if RoMScript("AdvancedMagicBoxFrame ~= nil") then RoMScript("AdvancedMagicBoxFrame:Show()"); yrest(2000) else RoMScript("MagicBoxFrame:Show()"); yrest(2000) end RoMScript("FusionFrame:Show()"); yrest(2000) -- check version of Fusion if RoMScript("FusionFrame1 ~= nil") then -- Config Save RoMScript("FusionConfig_OnShow()"); yrest(2000) RoMScript("FusionConfigFrame_ItemlistEditBox:SetText(TEXT('Sys227502_name'))"); yrest(2000) -- Превосходный пояс RoMScript("FusionConfig_Save()"); yrest(2000) -- Set number to make RoMScript("FusionFrameFusionNumberEditBoxFusionAndItem:SetText('8')"); yrest(2000) RoMScript("FusionFrameFusionNumberEditBox5:SetText('2')"); yrest(2000) -- Do RoMScript("Fusion_QueueManastones(FusionFrame_Do)"); repeat yrest(2000) until RoMScript("Fusion.LastGrad")==0 or RoMScript("MagicBoxFrame:IsVisible()")==false -- EmptyMagicBox RoMScript("PickupBagItem(51);"); yrest(500); RoMScript("PickupBagItem(Fusion_SearchEmptyBagslot(1));"); yrest(500); RoMScript("PickupBagItem(52);"); yrest(500); RoMScript("PickupBagItem(Fusion_SearchEmptyBagslot(2));"); yrest(500); RoMScript("PickupBagItem(53);"); yrest(500); RoMScript("PickupBagItem(Fusion_SearchEmptyBagslot(3));"); yrest(500); else -- on Fusion v2.0 and newer RoMScript("Fusion:Config_OnShow()"); yrest(500) RoMScript("FusionConfigFrame_FusionStones:SetChecked(" .. tostring(true) .. ")"); --yrest(500) RoMScript("FusionConfigFrame_UseItemlist:SetChecked(" .. tostring(false) .. ")"); --yrest(500) RoMScript("FusionConfigFrame_Green:SetChecked(" .. tostring(true) .. ")"); --yrest(500) RoMScript("FusionConfigFrame_Blue:SetChecked(" .. tostring(true) .. ")"); --yrest(500) RoMScript("Fusion:Config_Save()"); yrest(500) -- Do RoMScript("Fusion:Do_OnClick(FusionFrame_Do)"); repeat yrest(1500) until RoMScript("Fusion.DoQueue")~=true and RoMScript("Fusion.EmptyMagicBox") ~= true end -- close yrest(2000) if RoMScript("AdvancedMagicBoxFrame ~= nil") then RoMScript("AdvancedMagicBoxFrame:Hide()"); yrest(2000) else RoMScript("MagicBoxFrame:Hide()"); yrest(2000) end inventory:update(); player:update(); repeat MBEnergy = RoMScript("GetMagicBoxEnergy()"); yrest(500) until MBEnergy retry_count = retry_count + 1; end -- Error if not receive Mana Stones repeat MBEnergy = RoMScript("GetMagicBoxEnergy()"); yrest(500) until MBEnergy if( MBEnergy > 0 ) then error("\a\a\aWe didn't receive Mana Stones."); end -- Open Mailbox if( inventory:itemTotalCount(0) > 8 and OpenMailbox ) then player:target_Object(110538,1500); -- Почтовый ящик RoMScript("ChoiceOption(1);"); yrest(1500); RoMScript("UMMFrameTab1Tools:ButtonClick('tagempty');"); yrest(1500) RoMScript("UMMFrameTab1Tools:ButtonClick('delete');"); yrest(5000) UMM_TakeMail(); yrest(1000); RoMScript("CloseWindows()"); yrest(500); end -- Open Mailbox and Send Mana Stone, Fusion Stone and Gold local retry_count = 0; while( 5 > retry_count and ( inventory:getItemCount(202843) > 0 or inventory:getItemCount(202844) > 0 or inventory:getItemCount(202999) > 0 or inventory:getItemCount(203001) > 0 or inventory:getItemCount(202843) > 0 or inventory:getItemCount(202844) > 0 or inventory:getItemCount(202845) > 0 or inventory:getItemCount(202846) > 0 or inventory:getItemCount(202847) > 0 or inventory:getItemCount(202848) > 0 or CheckTierItems() > 0 ) ) do retry_count = retry_count + 1; local TierReceiver1 = TierRecs[math.random(#TierRecs)] cprintf(cli.lightred, "Time: " ..os.date().. " Char name: " ..TierReceiver1.. "\n") -- Open Mailbox player:target_Object({110538,112778},1500); -- Почтовый ящик Острова Эльфов RoMScript("ChoiceOption(1);"); yrest(1000); -- Send Mana Stone and Gold UMM_SendByNameOrId(TierReceiver1, {202843, 202844, 202845}); -- Камни маны ур. 4, ур. 5, ур. 6 UMM_SendByNameOrId(TierReceiver2, {202846, 202847, 202848}); -- Камни маны ур. 7, ур. 8, ур. 9 UMM_SendByNameOrId(MailSender1, {202999, 203001, 203276}); -- Случайный камень соединения и Шар опыта: 10 000 очков UMM_SendByFusedTierLevel(MailSender1, 4); -- шмотоки для тира UMM_SendMoney(MailSender1, "All"); RoMScript("CloseWindows()"); inventory:update(); if getLastWarning(MailSenderCanotDoItString, os.clock()-start) then local client = TierTwinkClient; local account = RoMScript("LogID"); local character = RoMScript("CHARACTER_SELECT.selectedIndex"); print("killClient ...") killClient() print("startClient: "..client..", "..account..", "..character) login(character, account, client) end end --[[ Fusion Stone -- Open Mailbox and Send Fusion Stone local retry_count = 0; while( inventory:getItemCount(203001) > 0 and 10 > retry_count ) do retry_count = retry_count + 1; Stonerec = Charstone[math.random(#Charstone)] cprintf(cli.lightred, "Time: " ..os.date().. " Char name: " ..Stonerec.. "\n") -- Open Mailbox player:target_Object(110538,1000); -- Почтовый ящик RoMScript("ChoiceOption(1);"); yrest(1000); -- Send Stone UMM_SendByStatNumber(Charstone1, 1) -- Одностатные Камни соединения UMM_SendByStatNumber(Stonerec, 2) -- Двухстатные Камни соединения RoMScript("CloseWindows()"); inventory:update(); end ]]-- -- Error if not Send Random Fusion Stone T4 or T5 Stone if( inventory:getItemCount(202843)> 0 ) or ( inventory:getItemCount(202844)> 0 ) or ( inventory:getItemCount(202999) > 0 ) or ( inventory:getItemCount(203001) > 0 ) then error("\a\a\a\a\a\a\aWe didn't Send T4 or T5 Stone."); end -- Twink Report Account = RoMScript("GetAccountName();"); Cur_Gold = memoryReadInt( getProc(), addresses.moneyPtr ) repeat MBEnergy = RoMScript("GetMagicBoxEnergy()"); yrest(500) until MBEnergy if( TierReceiver1 ~= nil )then cprintf(cli.white, player.Name.."_"..Account.." Bot sended Mana Stone: "..TierReceiver1.."\n"); else cprintf(cli.white, player.Name.."_"..Account.." Same Error! Bot haven't T4 or T5 Mana Stone!\n"); end cprintf(cli.white, "Twink Gold: %s\n", Cur_Gold) cprintf(cli.white, "Twink Tier Items: %s\n", CheckTierItems()) cprintf(cli.white, "Twink Fusion Stone: %s\n", inventory:itemTotalCount(203001)) cprintf(cli.white, "Twink T4 Mana Stone: %s\n", inventory:itemTotalCount(202843)) cprintf(cli.white, "Twink T5 Mana Stone: %s\n", inventory:itemTotalCount(202844)) cprintf(cli.white, "Twink T6 Mana Stone: %s\n", inventory:itemTotalCount(202845)) cprintf(cli.white, "Twink MagicBoxEnergy: %s\n", MBEnergy) cprintf(cli.white, "Twink Excellent Belt: %s\n", inventory:itemTotalCount(227502)) cprintf(cli.white, "Twink Experience Orb: %s\n", inventory:itemTotalCount(203276)) cprintf(cli.white, "Twink Random Fusion Stone: %s\n", inventory:itemTotalCount(202999)) -- Wait for Login next toon --> sendMacro("}Logout_CharacterDelete=true;a={"); LoginNextChar() settings.load() -- settings.loadProfile("Tirodel_Pr") yrest (4000) loadPaths(__WPL.FileName) end end; --== Elven Island ==-- -- Start Twink function StartTwink() -- collect garbage sendMacro("DEFAULT_CHAT_FRAME:AddMessage(collectgarbage('count') .. ' before');"); sendMacro("collectgarbage('collect');"); yrest(1500) sendMacro("DEFAULT_CHAT_FRAME:AddMessage(collectgarbage('count') .. ' after');"); -- Take Giftbags inventory:useItem(201843); -- 1 Lvl Giftbag -- Whisper to MailSender and whait for Command Go sendMacro("SendChatMessage(\'"..text1.."\', 'WHISPER', 0, \'"..MailSender1.."\');"); --sendMacro("SendChatMessage(\'"..text1.."\', 'WHISPER', 0, \'"..MailSender2.."\');"); --sendMacro("SendChatMessage(\'"..text1.."\', 'WHISPER', 0, \'"..MailSender3.."\');"); TwinkGo(); -- Set faceDirection and Rotation local angle = math.atan2(31925 - player.Z, 3391 - player.X) player:faceDirection(angle) camera:setRotation(angle) end; -- Elven Island Mailbox function ElvenIslandMailbox() local function ErrorMail() player:target_Object(112778,1500); -- Почтовый ящик Острова Эльфов RoMScript("ChoiceOption(1);"); yrest(1000); UMM_SendByNameOrId(MailSender1, {202999, 203001, 203276}); -- Случайный камень соединения, Превосходный пояс и Шар опыта: 10 000 очков UMM_SendByFusedTierLevel(MailSender1, 4); yrest(500) -- шмотоки для тира UMM_SendMoney(MailSender1, "All"); yrest(500) sendMacro("SendChatMessage(\'"..text1.."\', 'WHISPER', 0, \'"..MailSender1.."\');"); --sendMacro("SendChatMessage(\'"..text1.."\', 'WHISPER', 0, \'"..MailSender2.."\');"); --sendMacro("SendChatMessage(\'"..text1.."\', 'WHISPER', 0, \'"..MailSender3.."\');"); RoMScript("CloseWindows()"); TwinkGo(); player:rest(15); __WPL:setWaypointIndex(__WPL:findWaypointTag("ElvenIslandMailbox")); end -- Open Mailbox and take All player:target_Object(112778,1000); -- Почтовый ящик Острова Эльфов RoMScript("ChoiceOption(1);"); yrest(1500); RoMScript("UMMFrameTab1Tools:ButtonClick('tagempty');"); yrest(1500) RoMScript("UMMFrameTab1Tools:ButtonClick('delete');"); yrest(5000) UMM_TakeMail(); yrest(4000); RoMScript("CloseWindows()"); yrest(500); inventory:update(); -- Check Received Items and Money if not All Ok then reinit all again Cur_Gold = memoryReadInt( getProc(), addresses.moneyPtr ) if( 1 > inventory:getItemCount(203276) and 10 > MainLevel() ) then player.free_counter1 = player.free_counter1 + 1; printf("We receive Experience Orb error!."); ErrorMail(); elseif( 8 > CheckTierItems() ) then player.free_counter1 = player.free_counter1 + 1; printf("We receive Tier Items error!."); ErrorMail(); elseif( 8 > (inventory:itemTotalCount(202999) + inventory:itemTotalCount(203001)) and 15840 > Cur_Gold ) then player.free_counter1 = player.free_counter1 + 1; printf("We receive GOLD error!."); ErrorMail(); __WPL:setWaypointIndex(__WPL:findWaypointTag("ElvenIslandMailbox")); elseif( inventory:getItemCount(203276) >= 1 and CheckTierItems() >= 8 and (inventory:itemTotalCount(202999) + inventory:itemTotalCount(203001)) >= 8 or Cur_Gold >= 15840 or MainLevel() >= 10 and CheckTierItems() >= 8 and (inventory:itemTotalCount(202999) + inventory:itemTotalCount(203001)) >= 8 or Cur_Gold >= 15840 ) then if( 10 > MainLevel() ) then -- Use Experience Orb. inventory:useItem(203276); yrest(1000); end --[[ -- Tp to Coast of Opportunity RoMScript("CastSpellByName(TEXT('Sys540193_name'));"); -- Tp to Heffner Camp print(" Tp to Coast of Opportunity"); waitForLoadingScreen(60); player:update(); if ( getZoneId() ~= 13 ) then error("\a\aYou are too far from Coast of Opportunity.");end --]] -- Take Giftbags local starttimer = os.clock() repeat inventory:useItem(201844); yrest(2500); -- 2 Lvl Giftbag player:rest(math.random(5)); inventory:update(); player:mount(); player:update(); until player.Mounted or os.clock() - starttimer > 30 -- Random Waypoint local WPLtag = {"Esc1","Esc2"} local WPLtag = WPLtag[math.random(2)] cprintf(cli.white, "WPL tag: %s\n", WPLtag) __WPL:setWaypointIndex(__WPL:findWaypointTag(WPLtag)) end RoMScript("CloseWindows();"); end; -- Elven Island Mailbox 2 function ElvenIslandMailbox2() -- Error if not receive Fusion Stone repeat MBEnergy = RoMScript("GetMagicBoxEnergy()"); yrest(500) until MBEnergy if( MBEnergy > 0 and ( 8 > CheckTierItems() or 8 > (inventory:getItemCount(202999) + inventory:getItemCount(203001)) ) )then -- Random Waypoint inventory:update(); player:mount(); WpIndex= {"Esc1","Esc2"} __WPL:setWaypointIndex(__WPL:findWaypointTag(WpIndex[math.random(2)])); else -- Open Mailbox OpenMailbox = true if ( inventory:itemTotalCount(0) > 16 ) then player:target_Object(112778,1500); -- Почтовый ящик Острова Эльфов RoMScript("ChoiceOption(1);"); yrest(1500); RoMScript("UMMFrameTab1Tools:ButtonClick('tagempty');"); yrest(1500) RoMScript("UMMFrameTab1Tools:ButtonClick('delete');"); yrest(5000) UMM_TakeMail(); yrest(1000); RoMScript("CloseWindows()"); yrest(500); OpenMailbox = false end -- Make Mana Stones --> retry_count = 0 repeat MBEnergy = RoMScript("GetMagicBoxEnergy()"); yrest(500) until MBEnergy while( MBEnergy > 0 and 7 > retry_count ) do -- Open dialogs if RoMScript("AdvancedMagicBoxFrame ~= nil") then RoMScript("AdvancedMagicBoxFrame:Show()"); yrest(2000) else RoMScript("MagicBoxFrame:Show()"); yrest(2000) end RoMScript("FusionFrame:Show()"); yrest(2000) -- check version of Fusion if RoMScript("FusionFrame1 ~= nil") then -- Config Save RoMScript("FusionConfig_OnShow()"); yrest(2000) RoMScript("FusionConfigFrame_ItemlistEditBox:SetText(TEXT('Sys227502_name'))"); yrest(2000) -- Превосходный пояс RoMScript("FusionConfig_Save()"); yrest(2000) -- Set number to make RoMScript("FusionFrameFusionNumberEditBoxFusionAndItem:SetText('8')"); yrest(2000) RoMScript("FusionFrameFusionNumberEditBox5:SetText('2')"); yrest(2000) -- Do RoMScript("Fusion_QueueManastones(FusionFrame_Do)"); repeat yrest(2000) until RoMScript("Fusion.LastGrad")==0 or RoMScript("MagicBoxFrame:IsVisible()")==false -- EmptyMagicBox RoMScript("PickupBagItem(51);"); yrest(500); RoMScript("PickupBagItem(Fusion_SearchEmptyBagslot(1));"); yrest(500); RoMScript("PickupBagItem(52);"); yrest(500); RoMScript("PickupBagItem(Fusion_SearchEmptyBagslot(2));"); yrest(500); RoMScript("PickupBagItem(53);"); yrest(500); RoMScript("PickupBagItem(Fusion_SearchEmptyBagslot(3));"); yrest(500); else -- on Fusion v2.0 and newer RoMScript("Fusion:Config_OnShow()"); yrest(500) RoMScript("FusionConfigFrame_FusionStones:SetChecked(" .. tostring(true) .. ")"); --yrest(500) RoMScript("FusionConfigFrame_UseItemlist:SetChecked(" .. tostring(false) .. ")"); --yrest(500) RoMScript("FusionConfigFrame_Green:SetChecked(" .. tostring(true) .. ")"); --yrest(500) RoMScript("FusionConfigFrame_Blue:SetChecked(" .. tostring(true) .. ")"); --yrest(500) RoMScript("Fusion:Config_Save()"); yrest(500) -- Do RoMScript("Fusion:Do_OnClick(FusionFrame_Do)"); repeat yrest(1500) until RoMScript("Fusion.DoQueue") ~= true and RoMScript("Fusion.EmptyMagicBox") ~= true end -- close yrest(2000) if RoMScript("AdvancedMagicBoxFrame ~= nil") then RoMScript("AdvancedMagicBoxFrame:Hide()"); yrest(2000) else RoMScript("MagicBoxFrame:Hide()"); yrest(2000) end inventory:update(); player:update(); repeat MBEnergy = RoMScript("GetMagicBoxEnergy()"); yrest(500) until MBEnergy retry_count = retry_count + 1; end -- Error if not receive Mana Stones repeat MBEnergy = RoMScript("GetMagicBoxEnergy()"); yrest(500) until MBEnergy if( MBEnergy > 0 ) then error("\a\a\aWe didn't receive Mana Stones."); end -- Open Mailbox if( inventory:itemTotalCount(0) > 8 and OpenMailbox ) then player:target_Object(112778,1500); -- Почтовый ящик Острова Эльфов RoMScript("ChoiceOption(1);"); yrest(1500); RoMScript("UMMFrameTab1Tools:ButtonClick('tagempty');"); yrest(1500) RoMScript("UMMFrameTab1Tools:ButtonClick('delete');"); yrest(5000) UMM_TakeMail(); yrest(1000); RoMScript("CloseWindows()"); yrest(500); end -- Open Mailbox and Send Mana Stone, Random Fusion Stone and Gold local retry_count = 0; while( 5 > retry_count and ( inventory:getItemCount(202843) > 0 or inventory:getItemCount(202844) > 0 or inventory:getItemCount(202999) > 0 or inventory:getItemCount(203001) > 0 or inventory:getItemCount(202843) > 0 or inventory:getItemCount(202844) > 0 or inventory:getItemCount(202845) > 0 or inventory:getItemCount(202846) > 0 or inventory:getItemCount(202847) > 0 or inventory:getItemCount(202848) > 0 or CheckTierItems() > 0 ) ) do retry_count = retry_count + 1; local TierReceiver1 = TierRecs[math.random(#TierRecs)] cprintf(cli.lightred, "Time: " ..os.date().. " Char name: " ..TierReceiver1.. "\n") -- Open Mailbox local start = os.clock() player:target_Object(112778,1500); -- Почтовый ящик Острова Эльфов RoMScript("ChoiceOption(1);"); yrest(1000); -- Send Mana Stone and Gold UMM_SendByNameOrId(TierReceiver1, {202843, 202844, 202845}); -- Камни маны ур. 4, ур. 5, ур. 6 UMM_SendByNameOrId(TierReceiver2, {202846, 202847, 202848}); -- Камни маны ур. 7, ур. 8, ур. 9 UMM_SendByNameOrId(MailSender1, {202999, 203001, 203276}); -- Случайный камень соединения и Шар опыта: 10 000 очков UMM_SendByFusedTierLevel(MailSender1, 4); -- шмотоки для тира UMM_SendMoney(MailSender1, "All"); RoMScript("CloseWindows()"); inventory:update(); if getLastWarning(MailSenderCanotDoItString, os.clock()-start) then local client = TierTwinkClient; local account = RoMScript("LogID"); local character = RoMScript("CHARACTER_SELECT.selectedIndex"); print("killClient ...") killClient() print("startClient: "..client..", "..account..", "..character) login(character, account, client) end end --[[ -- Open Mailbox and Send Mana Stone, Random Fusion Stone and Gold local retry_count = 0; while( inventory:getItemCount(203001) > 0 and 10 > retry_count ) do retry_count = retry_count + 1; Stonerec = Charstone[math.random(#Charstone)] cprintf(cli.lightred, "Time: " ..os.date().. " Char name: " ..Stonerec.. "\n") -- Open Mailbox player:target_Object(110538,1000); -- Почтовый ящик RoMScript("ChoiceOption(1);"); yrest(1000); -- Send Stone UMM_SendByStatNumber(Charstone1, 1) -- Одностатные Камни соединения UMM_SendByStatNumber(Stonerec, 2) -- Двухстатные Камни соединения RoMScript("CloseWindows()"); inventory:update(); end ]]-- -- Error if not Send Random Fusion Stone, T4, T5 or T6 Stone if( inventory:getItemCount(202843) > 0 or inventory:getItemCount(202844) > 0 or inventory:getItemCount(202845) > 0 or inventory:getItemCount(202845) > 0 or inventory:getItemCount(202999) > 0 or inventory:getItemCount(203001) > 0 ) then --error("\a\a\a\a\a\a\aWe didn't Send T4, T5 or T6 Stone."); -- Random Waypoint ErrorSendStone = true inventory:update(); player:mount(); local WPLtag = {"Esc1","Esc2"} local WPLtag = WPLtag[math.random(2)] cprintf(cli.white, "WPL tag: %s\n", WPLtag) __WPL:setWaypointIndex(__WPL:findWaypointTag(WPLtag)) else -- Twink Report Account = RoMScript("GetAccountName();"); Cur_Gold = memoryReadInt( getProc(), addresses.moneyPtr ) repeat MBEnergy = RoMScript("GetMagicBoxEnergy()"); yrest(500) until MBEnergy if( TierReceiver1 ~= nil )then cprintf(cli.white, player.Name.."_"..Account.." Bot sended Mana Stone: "..TierReceiver1.."\n"); else cprintf(cli.white, player.Name.."_"..Account.." Same Error! Bot haven't T4 or T5 Mana Stone!\n"); end cprintf(cli.white, "Twink Gold: %s\n", Cur_Gold) cprintf(cli.white, "Twink Tier Items: %s\n", CheckTierItems()) cprintf(cli.white, "Twink Fusion Stone: %s\n", inventory:itemTotalCount(203001)) cprintf(cli.white, "Twink T4 Mana Stone: %s\n", inventory:itemTotalCount(202843)) cprintf(cli.white, "Twink T5 Mana Stone: %s\n", inventory:itemTotalCount(202844)) cprintf(cli.white, "Twink T6 Mana Stone: %s\n", inventory:itemTotalCount(202845)) cprintf(cli.white, "Twink MagicBoxEnergy: %s\n", MBEnergy) cprintf(cli.white, "Twink Excellent Belt: %s\n", inventory:itemTotalCount(227502)) cprintf(cli.white, "Twink Experience Orb: %s\n", inventory:itemTotalCount(203276)) cprintf(cli.white, "Twink Random Fusion Stone: %s\n", inventory:itemTotalCount(202999)) -- Wait for Login next toon --> --[[ sendMacro("}Logout_CharacterDelete=true;LoginNextToon=true;a={"); sendMacro("Logout();"); waitForLoadingScreen(); player = CPlayer.new(); settings.load(); -- settings.loadProfile("Tirodel_Pr"); yrest(4000); ]]-- sendMacro("}Logout_CharacterDelete=true;a={"); LoginNextChar() settings.load() -- settings.loadProfile("Tirodel_Pr") yrest (4000) loadPaths(__WPL.FileName) end end end;