jParty [Version v1.11.20beta]

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Message
Author
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: jParty [Version 0.11.20beta]

#21 Post by lisa » Sat Nov 19, 2011 9:18 pm

Since the bot targets using memory that game/client is the only client that knows it is targeting that mob, Any sort of assist to the character will never be 100% regardless of if you use the assist shortcut key or the in game function or getting it from memory.

Works like this
Bot1 targets a mob via memory, that client is the ONLY client that knows it is targeting the mob at that time.
Bot1 then starts to attack the mob, the mob then of course retaliates, when the mob attacks Bot1 at that time the physical target of Bot1 will become the mob and no sooner. Now any other client can see Bot1 is targeting that mob.

Trying to use assist on a bot in any way will never be 100% effective.
Most of the time Bot2 will become in combat(if same party) before even realising Bot1 has a target and Bot2 will defend Bot1 because of being in combat and not because of any sort of assist coding.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
Zangetsu
Posts: 56
Joined: Fri Nov 11, 2011 5:45 pm

Re: jParty [Version 0.11.20beta]

#22 Post by Zangetsu » Sat Nov 19, 2011 9:41 pm

Yeah Lisa I understood. This is working now lol

I might not be clear enough each time or you're probably hating me xD

I was asking this:

You have a party
:arrow: Bot
:arrow: Player1

With my script, when i'm walking with Player1 and if the distance is more than {A distance}, the bot is going to the last X and Z of Player1. Until here it's fine.

Imagine the following. We're on the map A
Bot is following Player great then Player is zoning. The bot will go to the last X and Z of Player1.

To make it zoning, I thought to do it like this:
If Player1 is in the party but not in the same zone, I will press the keyboard VK_{FORWARD} til the bot zone.

So my question is:
- Is it possible to see if a party member is in the same zone or not in the same zone?


Also I'll use Icons for another function but I can't find a way to remove the current icon in game.
In keyboard settings, there is a possibility to bind 1,2,3,4,5,6,7 and 8 but none to remove. But there is a right click "none", it might exist something to remove this then. I keep searching but if you know, I'll be glad to hear.

And finally, if I look stupid and if your previous post was explaining this. Before getting pissed, accept my excuse, I'll read it again :oops:

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: jParty [Version 0.11.20beta]

#23 Post by lisa » Sat Nov 19, 2011 10:09 pm

The way people have handled zoning is to check the distance to the other character and if further then X then do code to try to ensure you go through a portal. Pretty sure there are posts about it a few times already. Just doing forward key isn't always a good idea.
People have posted about going back and forth between 2 WP until the load screen appears. If you just use forward you could just keep walking into a wall forever.


The in game function to assign an icon doesn't have an arg to remove an icon. I never bothered to find the function that would remove it as I never felt it necessary. If you set an icon to a mob then when you set same icon to next mob the first icon dissappears. You can only have a single occurance of each icon.
So the way I handled it when placing icons on chars was this.
place icon IV on party1, then when you don't need it anymore place icon I on party1, then when icon I is placed on mob the icon on party1 dissappears.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
Zangetsu
Posts: 56
Joined: Fri Nov 11, 2011 5:45 pm

Re: jParty [Version 0.11.20beta]

#24 Post by Zangetsu » Sat Nov 19, 2011 10:23 pm

Ok thanks Lisa :)

Currently if I zone with Player1, the bot is zoning if not too far but I my last X and Z is too far of the portal, it's just standing there. I'll search the post talking about it, I've seen this few days ago.

My major problem if it's doing a {something}:update() while loading it's crashing. Now it will be hard to say to the bot to waitforloadingscreen() without giving any tips.
If I had a function which see that Player1 is not in the same zone, it will be pretty easy. I'll find a solution, I hope :lol:

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: jParty [Version 0.11.20beta]

#25 Post by lisa » Sat Nov 19, 2011 10:57 pm

you will find this in party.lua

Code: Select all

		if memoryReadBytePtr(getProc(),addresses.loadingScreenPtr, addresses.loadingScreen_offset) ~= 0 then
			repeat
				printf("loading screen has appeared, waiting for it to end.\n")
				yrest(1000)
			until memoryReadBytePtr(getProc(),addresses.loadingScreenPtr, addresses.loadingScreen_offset) == 0
		end
it deals with stopping for loading screen...
The address names should give an indication of what it does combine that with what the print message says.
Do I need to point out the code already existed and in a file I already mentioned you should have a read of lol

Don't get me wrong I am not trying to be mean and I am not getting upset but if you really want to learn you should try learning what already exists and work out why it already works. Then you will have more time to work on the things you want to do differently to what already exists and put it all together to eventually achieve what you want in a better way.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
Zangetsu
Posts: 56
Joined: Fri Nov 11, 2011 5:45 pm

Re: jParty [Version 0.11.20beta]

#26 Post by Zangetsu » Sun Nov 20, 2011 12:24 am

Thanks Lisa, I was too noob to understand that will handle the loading screen :lol:

I'm doing fine til now because of your help :o

Next step is to act with NPC when the partymemberpawn designed as "Bot master" put a icon on a NPC.

For now it's good if the icon is on self and I can't use player:target(player:findEnemy(nil,nil,icontarget,nil)) to get the icon because a NPC isn't a enemy.
I'll find it :lol:

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: jParty [Version 0.11.20beta]

#27 Post by lisa » Sun Nov 20, 2011 3:41 am

findenemy only looks for enemies and a npc you can interact with is not an enemy.

Instead of just giving you the code you needed, like previously, I will just give you a hint. Since no one ever learns anything from just being spoon fed information.

Look for code with this

Code: Select all

local objectList = CObjectList();
and have a good look at the code and how it works.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
Zangetsu
Posts: 56
Joined: Fri Nov 11, 2011 5:45 pm

Re: jParty [Version 0.11.20beta]

#28 Post by Zangetsu » Sun Nov 20, 2011 11:03 am

MicroMacro wrote: Call to CObjectList:getObject failed: index out of bounds
EDIT
nvm, I think I found something interesting in pawn.lua

User avatar
Zangetsu
Posts: 56
Joined: Fri Nov 11, 2011 5:45 pm

Re: jParty [Version 0.11.20beta]

#29 Post by Zangetsu » Sun Nov 20, 2011 12:20 pm

That was failing to check icon and I found probably a mistake in pawn.lua

There is 8 icons in game but here it's looping for 6 only:

Code: Select all

function CPawn:GetPartyIcon()
   local listStart = memoryReadRepeat("intptr", getProc(), addresses.partyIconList_base, addresses.partyIconList_offset)
   for i = 0, 6 do
      local guid = memoryReadShort(getProc(), listStart + i * 12)
      if guid == self.GUID then
         return i + 1
      end
   end
end
Then I've changed to:

Code: Select all

for i = 0, 8 do
to make it work.

If I have the last version, you should edit it.

User avatar
Zangetsu
Posts: 56
Joined: Fri Nov 11, 2011 5:45 pm

Re: jParty [Version v1.11.20beta]

#30 Post by Zangetsu » Sun Nov 20, 2011 6:08 pm

New version uploaded on first post.
If you want to use NPC and Icon, check this:

:arrow: Open rom/classes/pawn.lua
:arrow: Seach for:

Code: Select all

function CPawn:GetPartyIcon()
   local listStart = memoryReadRepeat("intptr", getProc(), addresses.partyIconList_base, addresses.partyIconList_offset)
   for i = 0, 6 do
      local guid = memoryReadShort(getProc(), listStart + i * 12)
      if guid == self.GUID then
         return i + 1
      end
   end
end
:arrow: Replace:

Code: Select all

for i = 0, 6 do
:arrow: With

Code: Select all

for i = 0, 8 do

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: jParty [Version v1.11.20beta]

#31 Post by lisa » Sun Nov 20, 2011 9:26 pm

If you look at the code more you will realise 0,6 is actually 7 numbers. when it is setting the return value it uses i + 1.
so 0 is actually for icon I and 6 would be for icon VII.

I don't recall offhand why it was only done for icons 1 to 7 but this would only cause an issue if you actually used icon VIII for anything. I manage to do everything I want using 4 icons max.

So "for i = 0, 8 do" would be looking for icons 1 to 9 and there is no icon 9.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
Zangetsu
Posts: 56
Joined: Fri Nov 11, 2011 5:45 pm

Re: jParty [Version v1.11.20beta]

#32 Post by Zangetsu » Sun Nov 20, 2011 11:10 pm

lisa wrote:If you look at the code more you will realise 0,6 is actually 7 numbers. when it is setting the return value it uses i + 1.
so 0 is actually for icon I and 6 would be for icon VII.

I don't recall offhand why it was only done for icons 1 to 7 but this would only cause an issue if you actually used icon VIII for anything. I manage to do everything I want using 4 icons max.

So "for i = 0, 8 do" would be looking for icons 1 to 9 and there is no icon 9.
Sorry to say that Lisa but I think you're wrong. I have made a loop checking the icon with other stuff and it was printing it on the MM window.
If no Icon it's returning 0, if it's icon I -> it's returning 1 and if it's VIII -> it's returning 8

Have a look but I don't think I'm wrong here :oops:

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: jParty [Version v1.11.20beta]

#33 Post by rock5 » Mon Nov 21, 2011 2:50 am

Yes, but for it to return 8, "i" would have to equal 7.
Zangetsu wrote: return i + 1
It will never return 9 because it's not a valid icon number so "i" will never be 8. So valid values for "i" are 0 to 7 so it will return 1 to 8. If there is no icon it should be returning nil.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: jParty [Version v1.11.20beta]

#34 Post by lisa » Mon Nov 21, 2011 3:49 am

I guess I just didn't explain it well enough.

Code: Select all

i = 0 // icon = 1
i = 1 // icon = 2
i = 2 // icon = 3
i = 3 // icon = 4
i = 4 // icon = 5
i = 5 // icon = 6
i = 6 // icon = 7
As I said I don't recall why the code was done to only do icons 1-7, it was a long time ago. Fact still remains if people used icons 1-7 then there is no issue.

It is possible it was just a mistake at the time to only cover icons 1-7 or there may have been a good reason.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

Golbez
Posts: 66
Joined: Sat Aug 02, 2008 8:27 pm

Re: jParty [Version v1.11.20beta]

#35 Post by Golbez » Sat Dec 24, 2011 6:43 pm

i keep getting this error after i load the jparty.xml waypoint. can someone help me here please :)


--=== Edited by Lisa ===--

Sorry but I removed your image, it had the name of your character in it, don't want you to get banned.


edit: ty lisa
Last edited by Golbez on Sun Jan 08, 2012 5:48 pm, edited 1 time in total.

Pmaia
Posts: 70
Joined: Wed Jun 22, 2011 8:17 pm

Re: jParty [Version v1.11.20beta]

#36 Post by Pmaia » Mon Dec 26, 2011 5:00 pm

its this jparty version working good?
and as i understand for example on dod
at main char i load the normal wapoint for dod and at the other char i load the jparty.xml?
its that???

rage447
Posts: 18
Joined: Thu Dec 22, 2011 9:56 am

Re: jParty [Version v1.11.20beta]

#37 Post by rage447 » Wed Jan 04, 2012 8:10 am

Is it possible that my bot don´t res after death but res after Resurrection from my priest ?
sry for my bad english im german =)+

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests