[SCRIPT] Catch'em alive

  • Hi folks,


    yay the new update is released and the setposition bug is fixed :thumbsup:




    I wrote this a few weeks ago when i was trying to build a ranch/farm, and today I could finally see it in action :D
    It's very basic, tho. I couldn't really use it back then so I haven't put much in it yet.
    This script let's you catch animals and teleports them to a specified position by hitting them.
    I guess this can also become handy with the new hungersystem and the limited amount of pigs/cows nearby.



    Catch'em alive


    provides rudimentary catch animal alive functionality



    Command:

    • /catch

    Usage:

    • /catch home

    Marks your current position as the "new animal home"
    From now on any npc you hit gets teleported to this position.

    • /catch done

    Deletes the "animal home" position and the npc-hitting process is back to normal again.



    Feedback or suggestions are welcome :)
    Have fun.

  • dunno if that helps, there are functions in api called LuaNpc/synchronizeNpcPosition(no args) and LuaNpc/synchronizeNpcStatus(no args)

  • Yeah you're right. Maybe that's it. Can't test that on my own anyway, tho. But i can include it and just put it in here. Maybe red51 sees this and can tell what's wrong here.

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!