Log in

View Full Version : Pk solution maybe?



zxzero
06-04-2013, 12:20 AM
If player attacked, skip all waypoints, disable targeting and looter, go to label Leave: or something, it would help fix pking and look less bot like when you are attacked

Spectrus
06-04-2013, 12:26 AM
What if you're on the way back to spawn when you get attacked? Jumping to Leave would finish bringing you to the spawn before walking you to pz. Also, what if there is multiple floors?

zxzero
06-04-2013, 12:28 AM
Ah, I didn't think of this. :s

Hmm, there must be something we could think of to help prevent this. I will keep pondering for now. xD

Spectrus
06-04-2013, 12:30 AM
If you come up with anything, let me know.

Hendy
06-04-2013, 12:52 AM
What if you're on the way back to spawn when you get attacked? Jumping to Leave would finish bringing you to the spawn before walking you to pz. Also, what if there is multiple floors?

Use a module, turn it on only during the actual mob killing. Have a floor checker as well and send the walker to a certain label made specifically for that floor.

Spectrus
06-04-2013, 12:53 AM
Use a module, turn it on only during the actual mob killing. Have a floor checker as well and send the walker to a certain label made specifically for that floor.

Too much work for each independent script. Think of a global solution.

Hendy
06-04-2013, 12:58 AM
Too much work for each independent script. Think of a global solution.

The global solution would be to stick to n-pvp

zxzero
06-04-2013, 01:51 AM
True this, but pvp is better imo. Hendys solution is the best so far though and it would work tbh, but yes it would be kind of bad for scripters, as in more work.

Milice
06-04-2013, 05:55 AM
The only thing we would actually need is LUA Implention of something like isPlayerAttackedByPlayer() and if someone would want to add it, it would work. It's already in there in the Alarms. It wouldn't be too much work to implent it into the LUA modules i guess... But then again, there might be some stuff with a bit more prio than this :p

XtrmJosh
06-04-2013, 06:21 AM
The only thing we would actually need is LUA Implention of something like isPlayerAttackedByPlayer() and if someone would want to add it, it would work. It's already in there in the Alarms. It wouldn't be too much work to implent it into the LUA modules i guess... But then again, there might be some stuff with a bit more prio than this :p

Pretty sure the creature class has a blacksquare element (or similar), so I think the function already exists. Shouldn't be too difficult to implement, and a global feature would be to check your location against a general area (e.g if x > 12345 && y > 12345 && z == 6 then LeavePK), that's how I've always done it at least.

fenol
06-04-2013, 06:22 AM
If you come up with anything, let me know.

Well i have an idea , if its multi floors etc ,

Put a checker/leave label at each floor and make it go to leave label if attacked by player? that way it will run from current location to the stair that gets it to leave and then go to dp?

XtrmJosh
06-04-2013, 06:40 AM
Yet another idea, map out each town and pick 4 corners which surround the town, but don't surround the nearby spawns, then if the location isn't within that map, it's safe to use run waypoints... This becomes a little difficult when botting in places like port hope though...

Spectrus
06-04-2013, 06:52 AM
The checker is easy, but it would be so nice to have a nice way of putting it in the .xbst file that didn't require a ton of spawn specific labels (floor1Leave, floor2Leave, etc).

fenol
06-04-2013, 06:56 AM
The checker is easy, but it would be so nice to have a nice way of putting it in the .xbst file that didn't require a ton of spawn specific labels (floor1Leave, floor2Leave, etc).

Agreed but that sounds close to impossibruuu xD

NeeP
06-04-2013, 09:01 AM
some other bots have this feature. so it's not impossible to script. Just idk how they do it...

zxzero
06-07-2013, 11:52 PM
Another solution possibly is to Attack the player back, I mean if you are going to die anyway the bot might as well try to kill them. Maybe DarkstaR could implement something like if player is attacked by another player stop all functions and attack player until dead, possibly kill the surrounding monsters first so they don't break shielding, and maybe even be able to use a custom spell to attack back.

Adky
06-08-2013, 12:42 AM
Make the Walker go back lines instead of its normal behaviour and then stops when it hits a certain Label.

for example: Self.TurnBackUntilLabel(label)

But this would bug if there stairs or holes etc.

another solution to kill the PK is to use these functions:
(it will have flaws and there's a chance that you'll kill a random skull in town, but using modules, you can disable it while in town)


Targeting.Stop()
Creature:isPlayer()
Creature:isWhiteSkull()
Creature:isInnocent()
Creature:isSelf()
Creature:isAlive()
Creature:Attack()
Creature:Follow()
Targeting.Start()


I can make a simple script for attacking a skulled player, but I like my first solution a lot more.

zxzero
06-09-2013, 02:55 AM
Make the Walker go back lines instead of its normal behaviour and then stops when it hits a certain Label.

for example: Self.TurnBackUntilLabel(label)

But this would bug if there stairs or holes etc.

another solution to kill the PK is to use these functions:
(it will have flaws and there's a chance that you'll kill a random skull in town, but using modules, you can disable it while in town)


Targeting.Stop()
Creature:isPlayer()
Creature:isWhiteSkull()
Creature:isInnocent()
Creature:isSelf()
Creature:isAlive()
Creature:Attack()
Creature:Follow()
Targeting.Start()


I can make a simple script for attacking a skulled player, but I like my first solution a lot more.

Yea, the first solution would have some bugs like you said, however I do like the idea very much. Hopefully someone will improve on the second solution to make it disabled in town, and maybe make it so it only attacks skulled players that are attacking you.

Bushu
06-09-2013, 06:43 AM
Just get over it, stop crying and spend money (max 12k) on twist of fate. That's what I did back when I had this problem. They'll get bored and out of frags.

XtrmJosh
06-09-2013, 08:05 AM
The checker is easy, but it would be so nice to have a nice way of putting it in the .xbst file that didn't require a ton of spawn specific labels (floor1Leave, floor2Leave, etc).

A function like getLabel(string labelName, int labelIndexBegin = 0, int labelIndexEnd = Walker.Waypoints.Count) might be useful, or even one where you could pass in label names, so we could do maybe:

getLabel("Leave", 0, 20) -- It would search the first 20 waypoints and return the index of the waypoint which has the label Leave.

And it would automatically find that label... Perhaps even the ability to incorporate a way of passing variables into a called function which set other variables, or even just something which sets a "BeenAttacked" bool var, which could then be checked when the depot waypoint is reached to force exit log or something.

Another alternative is that in the walker the Add Waypoint button could have a list of default labels which pops out to the side, with "Other" at the bottom, so users are encouraged to use the default label set. The default label set could be defined in a lua file in the program files folder, and read dynamically into the bot on startup... That would allow people who make very advanced scripts to add a set of default labels. After that we could even go so far as to have a list of default functions which can be generated on adding a label... Each time you'd write an XBST file and add a label, the bot would search for the event handler in the text file, if there isn't a case for the label selected it would proceed to add one, and further to this, it could even automatically generate the code within the label, taking parameters entered into a list or text box in the game client...

It's a lot of work, but it might just be the continuation of the "botting revolution"...

zxzero
06-13-2013, 06:47 AM
A function like getLabel(string labelName, int labelIndexBegin = 0, int labelIndexEnd = Walker.Waypoints.Count) might be useful, or even one where you could pass in label names, so we could do maybe:

getLabel("Leave", 0, 20) -- It would search the first 20 waypoints and return the index of the waypoint which has the label Leave.

And it would automatically find that label... Perhaps even the ability to incorporate a way of passing variables into a called function which set other variables, or even just something which sets a "BeenAttacked" bool var, which could then be checked when the depot waypoint is reached to force exit log or something.

Another alternative is that in the walker the Add Waypoint button could have a list of default labels which pops out to the side, with "Other" at the bottom, so users are encouraged to use the default label set. The default label set could be defined in a lua file in the program files folder, and read dynamically into the bot on startup... That would allow people who make very advanced scripts to add a set of default labels. After that we could even go so far as to have a list of default functions which can be generated on adding a label... Each time you'd write an XBST file and add a label, the bot would search for the event handler in the text file, if there isn't a case for the label selected it would proceed to add one, and further to this, it could even automatically generate the code within the label, taking parameters entered into a list or text box in the game client...

It's a lot of work, but it might just be the continuation of the "botting revolution"...

You're a genius. haha. this would be amazing to see happen to botting. if dark incorporated this I bet you would see flocks of botters come here. xD