|
Post by Darth Maul on Jan 17, 2015 12:24:39 GMT
Relog and enter trainers after dieing
auto 200 | dontlist | if [$hp == 0] {reconnect | set $died 1 | wait 400 | say '!bless'} | if [$died == 1] {moveto 32372 32231 7}
|
|
diego
New Member
Posts: 1 Likes: 0
Currently Offline
Last Online: May 29, 2022 1:44:31 GMT
View Profile
Registered On: Jan 18, 2015 3:22:33 GMT
|
Post by diego on Jan 18, 2015 3:40:28 GMT
Hi Darth.
Looking at this; I have some helpful criticism. Firstly, there's no point in setting the $died variable and then following it up with an if statement checking if you died. That's "double handling". It's basically saying: "If you died, you died. BUT if you died, do this" You're much better off being "If you died, do this."
Secondly, in Tibia dying is essentially the same as disconnecting particularly in this scenario (in that you won't reappear in the trainers if you disconnected instead of dying). As such, you can safely assume that if the character is forced offline in any way, you'll trigger the move to the trainer portal. To make it run much smoother, you can use Elfbot's "$connected" condition to simply check if your character is still online. Combine this with an "ifnot" statement, instead of your "if you're dead, set me to dead".
In regards to saying "!bless", if you're already blessed (ie. disconnected instead of dying), it'll simply fail. No harm done.
Lastly; there's generally always a few people making their way to the trainer portal, so it doesn't hurt to double up on the "moveto" command for safe measure.
All in all, it would be much better like this:
auto 5000 ifnot [$connected] {reconnect | wait 3000 | say '!bless' | moveto 32372 32231 7 | moveto 32372 32231 7}
The breakdown is as follows. auto - makes it automatic 5000 - check less often than the normal 100 ifnot - if the following variable isn't true (in this case, you're not connected) $connected - check if self is connected reconnect - self explanatory wait 3000 - allow for the server to reappear in case of a boot say '!bless' - self explanatory moveto x x x - move to trainers moveto x x x - double this up in case of blockage or an unsuccessful move
If you're curious, I've also made two more scripts which always target Trainers upon re-entry (as I'm sure you know, they're really tricky to get working in Targeting) and also eat the eternal meat after every exori, or whatever spell you're using.
Let me know if you're interested!
Edit: forgot to add !bless
|
|
mwuana
New Member
Posts: 3 Likes: 0
Currently Offline
Last Online: Dec 22, 2016 15:33:32 GMT
View Profile
Registered On: Apr 26, 2016 7:01:12 GMT
|
Post by mwuana on Apr 26, 2016 7:25:25 GMT
If you're curious, I've also made two more scripts which always target Trainers upon re-entry (as I'm sure you know, they're really tricky to get working in Targeting) and also eat the eternal meat after every exori, or whatever spell you're using. Hi! Can you please give me this?
|
|