Anyone know why this lua would not work in game ?
No matter what i add it just does not work , sometimes it crashes client also ?Code:-- MirrorWorld 224 function lua_smallMoveAttack() local OwnerID = 106487 --How far, how often do you move, and how far you move at a time SetRandMove( OwnerID(), 15, 15, 15) end
Its like SetRandMove is not working, i know its in there i check lua in source ...
Code:LuaRegisterFunc( "OwnerID" , int() , OwnerID ); LuaRegisterFunc( "TargetID" , int() , TargetID ); LuaRegisterFunc( "Rand" , int(int) , Random ); LuaRegisterFunc( "RandRange" , int(int,int) , RandRange ); LuaRegisterFunc( "SysPrint" , void(const char*) , SysPrint ); LuaRegisterFunc( "MoveTarget" , int(int,int) , MoveTarget ); LuaRegisterFunc( "Move" , int(int,float,float,float) , Move ); LuaRegisterFunc( "MoveDirect" , int(int,float,float,float) , MoveDirect ); LuaRegisterFunc( "SetRandMove" , void(int, int, int,int) , SetRandMove ); and everything looks ok ? void SetRandMove( int ID , int Range , int Freq, int Dist ) { BaseItemObject *OtherClass = BaseItemObject::GetObj( ID ); if( OtherClass == NULL ) return; NPC_RandomMoveStruct& RandomMove = OtherClass->Role()->TempData.RandomMove; RandomMove.Active = __max( 1 , Freq ); RandomMove.CenterX = OtherClass->Role()->Pos()->X; RandomMove.CenterZ = OtherClass->Role()->Pos()->Z; RandomMove.CountDown = 0; RandomMove.MaxRange = (float)Range; RandomMove.Dist = (float)Dist; RandomMove.Enable = true; return; }
Janebug



Reply With Quote


