Making a new command

Desufire
Posts: 162
Joined: Sun Feb 22, 2015 2:58 am

Re: Making a new command

Post by Desufire » Sat Jun 27, 2015 1:27 am

kjLotus wrote:
Desufire wrote:
kjLotus wrote:
player:setPos(0,0,0,0,player:getZoneID());

literally that's all you need
Seriously? I was making it harder than it needed to be? /sigh
yep.. common mistake actually, overcomplicating!
Okay, so how would I go about creating a check if player is in combat? I have an idea on how, but we've established my track record on this kind of stuff lol.

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Making a new command

Post by kjLotus » Sat Jun 27, 2015 1:18 pm

i'd just check if they were at 100% hp and mp (and if they have a pet, it's also at 100% hp and mp)

Desufire
Posts: 162
Joined: Sun Feb 22, 2015 2:58 am

Re: Making a new command

Post by Desufire » Sat Jun 27, 2015 5:01 pm

Ohoh! I can do that one! Lol

User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Re: Making a new command

Post by TeoTwawki » Tue Jun 30, 2015 4:20 pm

its also possible to check if they have a battletarget (I forget the function, but its got a lua binding), but that doesn't check if something is targeting the player so wouldn't stop somebody who was fast with the escape key. I'd go with Kj's suggestion, or both.
Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

Post Reply