Re: Malatinas Goblins by Bot_romka
Posted: Wed Nov 02, 2011 10:06 am
mm figured it out
MicroMacro home
https://www.solarstrike.net/phpBB3/
Bot_romka wrote:New version Malatinas Goblins
I modefid code for use waypoint with little character which not have much more HP. Tested with character 6 Lvl.
Start Wp for Mainchar near NPC "Mahler Palo". characters can be anyware in "Aslan Valley".
With this Waypoint you can enter in Goblins Malatinas without pay the Phirius tokens to the NPC. Simpl just need 30 Phirius tokens for enter which not spended. Bot enable Swimhack and fly over Goblins Gate. Swimhack code directly in Waypoint onloads.
Waypoint vary fast because you killing only elementals not need kills 40 and 60 mobs for open gate. I create new version function getTreasureChest() and now all character allways open chest.
Change in Wp
MainLevel = 50 to Level of character which kill mobs
NumTwinks = 0 to Number of characters. For solo = 0, up to 5.
_sory for my bad english.
Code: Select all
if(zoneid ~= 4 and zoneid ~= 352) then error("\a\a\Malatinas: "..player.Name.." You are too far from "..zonename..".") end;
aslan in from of goblin npclisa wrote:What zone were you in when you started the WP??
It checks if you are in zone ID 4 or 352 and if not then you get the error.Code: Select all
if(zoneid ~= 4 and zoneid ~= 352) then error("\a\a\Malatinas: "..player.Name.." You are too far from "..zonename..".") end;
Code: Select all
if(zoneid ~= 4 and zoneid ~= 352) then error("\a\a\Malatinas: "..player.Name.." You are too far from "..zonename..".") end;
if(zoneid ~= 352 and player.Level >= MainLevel and distance(player.X,player.Z,-5874,3315) > 50) then
RoMScript("DEFAULT_CHAT_FRAME:AddMessage('|cffffff00Malatinas:Main "..player.Name.." You are too far from NPC " ..npcname.. ".|r')")
error("\a\a\Malatinas: Mainchar " ..player.Name.. " You are too far from NPC "..npcname..".")
Code: Select all
if(player.Level >= MainLevel) then
if(NumTwinks ~= 0 and NumTwinks+1 > sendMacro('GetNumPartyMembers()')) then
RoMScript("DEFAULT_CHAT_FRAME:AddMessage('|cffffff00Malatinas: Mainchar "..player.Name.." Stop near Goblins Malatinas. Ivite all characters.|r')")
printf("Malatinas: Mainchar "..player.Name.." Stop near Goblins Malatinas. Ivite all characters.\n");
repeat
yrest(1000);
until RoMScript('GetNumPartyMembers()') >= NumTwinks+1
end
player:target_NPC(npcname); yrest(1000);
RoMScript("ChoiceOption(1);"); yrest(1000);
RoMScript("StaticPopup_OnClick(StaticPopup1, 1);");
repeat yrest(5000);loggedin = RoMScript("UnitName('player');"); until loggedin
player:update();
repeat zoneid = RoMScript("GetZoneID()"); until zoneid
if (zoneid ~= 352) then error("\a\a\"Malatinas: " ..player.Name.. " You are too far from "..dgnname..".") end;
else
printf("Malatinas:character " ..player.Name.. " wait for Ivite.\n")
while not RoMScript("UnitExists('party1')") do
RoMScript("StaticPopup_OnClick(StaticPopup1, 1);");
yrest(1000)
end
printf("Malatinas:character " ..player.Name.. " wait for enter to "..dgnname..".\n")
while (zoneid ~= 352) do
RoMScript("StaticPopup_OnClick(StaticPopup1, 1);");
yrest(1000); player:update();
zoneid = RoMScript("GetZoneID()");
end
end
Code: Select all
<!-- Inside Goblin Mines -->
<waypoint x="1904" z="2230" y="308" tag="STARTM4">
if(NumTwinks ~= 0 and player.Level >= MainLevel) then
PauseMain();
end
gSwimhack(); gteleport(2040,2226,388);
</waypoint>
<waypoint x="2040" z="2226" y="388">gteleport(2161,2231,388);</waypoint>
<waypoint x="2161" z="2231" y="388">
if(player.Level >= MainLevel) then
gteleport(2296,2214,377);
__WPL:setWaypointIndex(__WPL:findWaypointTag("Main"));
else
gteleport(2061,2789,377);
__WPL:setWaypointIndex(__WPL:findWaypointTag("character"));
end
</waypoint>
Code: Select all
function gteleport(gX,gZ,gY)
player:update()
local address = memoryReadInt(getProc(), addresses.staticbase_char) + addresses.charPtr_offset
local offsetX = { 0x4, 0xB0};
local offsetZ = { 0x4, 0xB8};
local offsetY = { 0x4, 0xB4};
local totalDistance = distance(player.X, player.Z, player.Y, gX, gZ, gY)
local steps = math.ceil(totalDistance/50)
local xStep = (gX - player.X)/ steps
local zStep = (gZ - player.Z)/ steps
local yStep = (gY - player.Y)/ steps
for i = 1, steps do
memoryWriteFloatPtr(getProc(), address , offsetX, player.X + xStep); -- x value
memoryWriteFloatPtr(getProc(), address , offsetZ, player.Z + zStep); -- z value
memoryWriteFloatPtr(getProc(), address , offsetY, player.Y + yStep); -- y value
printf("Player Step %d Tp to X: %d Z: %d Y: %d\n", i, player.X + xStep, player.Z + zStep, player.Y + yStep);
yrest(800)
player:update()
end
end
function memoryfreezeSwimhack()
local offsets = {addresses.charPtr_offset, addresses.skillBuffFlag_offset, 0xB4};
memoryWriteIntPtr(getProc(), addresses.staticbase_char, offsets, 4);
end
function gSwimhack()
registerTimer("SwimhackTimer", 5, memoryfreezeSwimhack);
end
Code: Select all
gSwimhack(); gteleport(2040,2226,388);
Code: Select all
fly();
the file above uses getTreasureChest(), so no ID needed, it runs fine on my german client.spawni wrote:hmm.. I play with a german client.
As I see, all wp´s use names for the chest.
Would be nice to use id instead of names - so there is no language-barrier for the wp´s
Tryied to get the ID for the chest via database - can´t find it.
Can you help me?
Greetings
spawni wrote:hmm.. I play with a german client.
As I see, all wp´s use names for the chest.
Would be nice to use id instead of names - so there is no language-barrier for the wp´s
Tryied to get the ID for the chest via database - can´t find it.
Can you help me?
Greetings
berlin25 wrote:My bot gets stuck at the cealing bars in the area where the goblins are. So I need to fly below them manually. Am I the only one with this problem?
Code: Select all
if player.Class1 == 7 and player.Class2 == 2 then
player:cast("WARDEN_SAVAGE_POWER")
player:cast("WARDEN_ELVEN_PRAYER")
player:cast("WARDEN_MORALE_BOOST")
player:cast("WARDEN_ELVEN_GUIDANCE")
player:cast("WARDEN_EXPLOSION_OF_POWER")
end
Code: Select all
player:fight()
Code: Select all
<onSkillCast><![CDATA[
if player:findNearestNameOrId(102102) then
local Evelyn = player:findNearestNameOrId(102102)
player:target(Evelyn)
player:fight()
end
]]></onSkillCast>
Code: Select all
function bossbuff()