Page 1 of 1

Kill player after unStick and load return WP

Posted: Thu Jan 19, 2012 10:52 am
by Xmen
Hi @ ll
my english is very bad :( so I have translated the following text with google

I have a DoD WP for a groupe, the problem that is occurring as the Manchester Group members would disconnect after X unsticki (which is not bad) but since my group manager is always waiting for everything else

Now I have edited the file "bot.lua" and my profile, now that he no longer disconnects but too many of the players has unsticki just killed.

I just wanted to share with you (can even be useful)


=======================
Bot.lua

find

Code: Select all

						if( type(settings.profile.events.onUnstickFailure) == "function" ) and
							player.Unstick_counter == settings.profile.options.MAX_UNSTICK_TRIALS + 1 then
							pcall(settings.profile.events.onUnstickFailure);

						elseif( settings.profile.options.LOGOUT_WHEN_STUCK ) then
							if settings.profile.options.CLOSE_WHEN_STUCK == false then
								player:logout() -- doesn't close client
							else
								player:logout(nil,true); -- closes client
							end
						else
replace with

Code: Select all

						if( type(settings.profile.events.onUnstickFailure) == "function" ) and
							player.Unstick_counter == settings.profile.options.MAX_UNSTICK_TRIALS + 1 then
							pcall(settings.profile.events.onUnstickFailure);

						elseif( settings.profile.options.LOGOUT_WHEN_STUCK ) then
							if settings.profile.options.CLOSE_WHEN_STUCK == false and settings.profile.options.KILL_WHEN_STUCK == false then
								player:logout() -- doesn't close client
							elseif settings.profile.options.KILL_WHEN_STUCK == true then
								local eggslot = settings.profile.options.EGGPET_ASSIST_SLOT
								cprintf(cli.yellow, "Save Pet slot: %s\n.", eggslot);
								sendMacro('ReturnPet(eggslot)')
								yrest(1000)
								sendMacro('SetCameraPosition(0,0,100000)')
                                                                cprintf(cli.red, "Kill Player");
								yrest(10000);
								player.Unstick_counter = 0;	
							else
								player:logout(nil,true); -- closes client
							end
						else
end bot.lua

=======================

in you profile

add

Code: Select all

<option name="KILL_WHEN_STUCK"		value="false" />
to use the option pls set follow in you profile

Code: Select all

		<option name="LOGOUT_WHEN_STUCK"	value="true" />
		<option name="KILL_WHEN_STUCK"		value="true" />
		<option name="CLOSE_WHEN_STUCK"	value="false" />
and now someone can still go and improve it: D

Have a nice day

Re: Kill player after unStick and load return WP

Posted: Thu Jan 19, 2012 11:13 am
by lisa
I actually made it easier for people to do things like this, I added in usage of 3 functions you can create yourself that will be performed when bot reaches 3,6 and 9 unstick tries

Code: Select all

unStick3()
unStick6()
unStick9()
So you could put in your WP onload

Code: Select all

function unStick9()
                        local eggslot = settings.profile.options.EGGPET_ASSIST_SLOT
                        cprintf(cli.yellow, "Save Pet slot: %s\n.", eggslot);
                        sendMacro('ReturnPet(eggslot)')
                        yrest(1000)
                        sendMacro('SetCameraPosition(0,0,100000)')
                                                                cprintf(cli.red, "Kill Player");
                        yrest(10000);
                        player.Unstick_counter = 0;

end
When bot reaches 9 unstick tries it will then perform that code.

Re: Kill player after unStick and load return WP

Posted: Thu Jan 19, 2012 12:21 pm
by Xmen
ahh I did not know, works beautifully and is much smaller

PS:I'm still a beginner :lol:

Re: Kill player after unStick and load return WP

Posted: Thu Jan 19, 2012 7:40 pm
by lisa
I think you did really well with what you did do and 10 months ago it would have been necessary to do it the way you did.

I just like to plan ahead =)

Re: Kill player after unStick and load return WP

Posted: Thu May 24, 2012 7:34 pm
by jock52
Does this still work? I am trying to figure out exactly what I need to do.

Re: Kill player after unStick and load return WP

Posted: Thu May 24, 2012 7:54 pm
by lisa
jock52 wrote:Does this still work? I am trying to figure out exactly what I need to do.
The unstick functionality of course still works, what you do with it is up to you.

The code I posted would go in your WP onload section, you can also add in a loadpaths to load a specific WP file after killing the character.

Re: Kill player after unStick and load return WP

Posted: Tue Sep 25, 2012 6:19 pm
by vo2male
I have a little problem with this. It works fine but after some deahts its not functioning as it would do. What happen to my character is when kill player is applied my player died and will triger the resurrect macro. Then the loading screen will appear. After that, i'll just see my character lying dead on the revive circle ground but is actually alive. Infact he is still using buffs and you could see the buffs will be applied. However, when he will start to go to the waypoint he cannot move that's why he will call unstick again until the 9th time and will run kill player again. And there comes another problem as the loading screen will not appear after player kill..

Re: Kill player after unStick and load return WP

Posted: Wed Sep 26, 2012 12:48 am
by rock5
I would think there is a limited number of times you can do this, because of the known game memory leak issues. Just do the usual stuff. Run the game in minimum video settings, zoom in all the way so it doesn't have to draw the character and maybe try cleanmem. That should help a bit.

Re: Kill player after unStick and load return WP

Posted: Mon Jul 15, 2013 9:38 pm
by C3PO
Hello,

I used to use this function but now it doesn't seem to work anymore (maybe since the last patch). Could someone confirm that, are better post a new way to kill the char?

Re: Kill player after unStick and load return WP

Posted: Tue Jul 16, 2013 2:20 am
by rock5
A short while back there was a discuscion on using the nofall hack to die. I think I even posted some code. Do a search for 'nofall'.

Re: Kill player after unStick and load return WP

Posted: Tue Jul 16, 2013 5:01 am
by C3PO
I tried that already, but my char didn't die...

Re: Kill player after unStick and load return WP

Posted: Tue Jul 16, 2013 5:31 am
by rock5
Maybe you're on a server where they didn't implement that. It did work for me. You just had to be high enough and wait a bit.

I have nothing else.